postmarketos-ui-sway: use config fragment for status bar

Separating the status bar allows for customization (e.g. in a device package)
without replacing the entire sway config

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
This commit is contained in:
Sicelo A. Mhlongo 2026-03-21 22:37:46 +02:00 committed by The Friendly Meow (merge) Bot
parent 94a191ce06
commit 79f6325f6c
No known key found for this signature in database
3 changed files with 22 additions and 20 deletions

View file

@ -1,7 +1,7 @@
# Reference: https://postmarketos.org/uipkg # Reference: https://postmarketos.org/uipkg
maintainer="Oliver Smith <ollieparanoid@postmarketos.org>" maintainer="Oliver Smith <ollieparanoid@postmarketos.org>"
pkgname=postmarketos-ui-sway pkgname=postmarketos-ui-sway
pkgver=3.2 pkgver=4
pkgrel=0 pkgrel=0
pkgdesc="(Wayland) Tiling WM, drop-in replacement for i3wm" pkgdesc="(Wayland) Tiling WM, drop-in replacement for i3wm"
url="https://postmarketos.org" url="https://postmarketos.org"
@ -36,6 +36,7 @@ _pmb_groups="
source=" source="
etc-sway-config etc-sway-config
etc-sway-config.d-00-logo-key.conf etc-sway-config.d-00-logo-key.conf
etc-sway-config.d-01-status-bar.conf
" "
options="!check pmb:drm" # no testsuite options="!check pmb:drm" # no testsuite
replaces="sway" replaces="sway"
@ -43,6 +44,8 @@ replaces="sway"
package() { package() {
install -Dm644 "$srcdir"/etc-sway-config \ install -Dm644 "$srcdir"/etc-sway-config \
"$pkgdir"/etc/sway/config "$pkgdir"/etc/sway/config
install -Dm644 "$srcdir"/etc-sway-config.d-01-status-bar.conf \
"$pkgdir"/etc/sway/config.d/01-status-bar.conf
} }
logo_key_alt() { logo_key_alt() {
@ -67,6 +70,7 @@ openrc() {
} }
sha512sums=" sha512sums="
e68719d5ee99e4df9e23de0b1e1a33df20f0cbb46cd3767ebd2d6d524a831defea8e0145877a26bce161ca1ec020de7356ab25374402e1886fa0c60e53c61025 etc-sway-config 9ba294550546d06f17515bce6e8e4b8ff855c5fcec971224f1284bbad2915582265bc7f47cc5aa5760b16940ffe64d11852c474986e777cc638f6019406218b2 etc-sway-config
889f10fb247396a11375057f7e81eae0f0b21ec90cd47964e02ba24fc0f6db8bb7678545e3272149535cf0bb6a2019456cc59d06a9564ce4a1797bb434013b78 etc-sway-config.d-00-logo-key.conf 889f10fb247396a11375057f7e81eae0f0b21ec90cd47964e02ba24fc0f6db8bb7678545e3272149535cf0bb6a2019456cc59d06a9564ce4a1797bb434013b78 etc-sway-config.d-00-logo-key.conf
8aaabb05db401c03ea7e2f1c44c3ccc641770a49db3e9163db9793ed15cb5e33fbf5827fffad7b5c205510dc9844f07f0e5c20e0e846868acd8c527dc22958e1 etc-sway-config.d-01-status-bar.conf
" "

View file

@ -202,22 +202,4 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %_I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}
include /etc/sway/config.d/* include /etc/sway/config.d/*

View file

@ -0,0 +1,16 @@
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %_I:%M:%S %p'; do sleep 1; done
colors {
statusline #ffffff
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
}