aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar remph <lhr@disroot.org>2025-01-25 13:40:30 +0000
committerLibravatar remph <lhr@disroot.org>2025-01-25 13:40:30 +0000
commitb08d5cd6b2081000fb49c8e8bd135cb656aad95d (patch)
treea8c76c02fde21934a81b6119f21a5fbcdf4ba85d
parentf42cb4b553c65da0b925c48504ec47e5d1a5e6fb (diff)
parent49e52a04e11a63e5db2e36f64ec87c2109172db9 (diff)
Merge branch 'master' into other-audio-types
-rw-r--r--PKGBUILD2
-rwxr-xr-xinstall.sh14
-rwxr-xr-xswob.sh2
3 files changed, 11 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 94f3683..6b06c54 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ arch=(any) # limited only by dependencies
depends=(sh coreutils sed wob alsa-utils brightnessctl)
optdepends=( 'wireplumber: wpctl, for pipewire support'
'libpulse: pactl, for pulseaudio support' )
-url='https://github.com/el-remph/swob'
+url='https://git.sr.ht/~remph/swob'
license=(GPL-3.0-or-later)
provides=(swob)
source=("git+$url")
diff --git a/install.sh b/install.sh
index 8973287..4da6846 100755
--- a/install.sh
+++ b/install.sh
@@ -1,9 +1,13 @@
#!/bin/sh
set -ex
-mkdir -p "$DESTDIR"/etc/sway/config.d/ "$DESTDIR"/etc/swob/
+: ${PREFIX=/usr} ${ETCDIR:=/etc}
+
for i in swayconfig wob.ini; do
- install -m 644 swob-$i "$DESTDIR"/etc/swob/$i
+ install -Dm 644 swob-$i "$DESTDIR$ETCDIR"/swob/$i
done
-ln -s ../../swob/swayconfig "$DESTDIR"/etc/sway/config.d/swob-swayconfig
-install -Dt "$DESTDIR"/usr/bin swob.sh
-install -m644 -Dt "$DESTDIR"/usr/share/doc/swob README.md dwl-config.h.patch
+
+install -d "$DESTDIR$ETCDIR"/sway/config.d/
+ln -s ../../swob/swayconfig "$DESTDIR$ETCDIR"/sway/config.d/swob-swayconfig
+
+install -Dt "$DESTDIR$PREFIX"/bin swob.sh
+install -m644 -Dt "$DESTDIR$PREFIX"/share/doc/swob README.md dwl-config.h.patch
diff --git a/swob.sh b/swob.sh
index 463d02e..49e7675 100755
--- a/swob.sh
+++ b/swob.sh
@@ -7,7 +7,7 @@ wobfifo=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY.swob
wobini=
set_wobini() {
- for dir in ${XDG_CONFIG_HOME:+"$XDG_CONFIG_HOME"} ~/.config /etc; do
+ for dir in ${XDG_CONFIG_HOME:+"$XDG_CONFIG_HOME"} ~/.config /etc "${0%/*}"/../etc; do
if test -r "$dir"/swob/wob.ini; then
wobini=$dir/swob/wob.ini
return