summaryrefslogtreecommitdiffstats
path: root/.config/wayland/init.sh
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2025-03-01 22:00:30 +0100
committerJoe <rbo@gmx.us>2025-03-01 22:00:30 +0100
commit6184e00392c28f9903b519d4a63680b06436e894 (patch)
treedd6268aec81177d3db97b337fb2025c5b53669c6 /.config/wayland/init.sh
parentupup (diff)
downloaddotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.gz
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.bz2
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.xz
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.tar.zst
dotfiles-bsd-6184e00392c28f9903b519d4a63680b06436e894.zip
waylanded
Diffstat (limited to '')
-rwxr-xr-x.config/wayland/init.sh46
1 files changed, 45 insertions, 1 deletions
diff --git a/.config/wayland/init.sh b/.config/wayland/init.sh
index c8a1b91..47fee53 100755
--- a/.config/wayland/init.sh
+++ b/.config/wayland/init.sh
@@ -1,4 +1,48 @@
#!/bin/sh
-swaybg --image pics/wp.png &
+case $(hostname -s) in
+ mother)
+ icon=" "
+ mpd="mpd"
+ xscr="xscreensaver --no-splash"
+ sleep="sleep 1"
+ ping="ping -c1 -w1 9.9.9.9 >/dev/null 2>&1"
+ host="mother"
+ doas mkdir /var/run/jozan && doas chown -v jozan: /var/run/jozan
+ wlr-randr --output DP-3 --off
+ ;;
+ po-rbo)
+ icon=" "
+ mpd="mpd"
+ xscr="xscreensaver"
+ sleep="sleep 0.1"
+ ping="ping -c1 -w1 9.9.9.9 >/dev/null 2>&1"
+ host="po-rbo"
+ doas mkdir /var/run/r_bousset && doas chown -v r_bousset: /var/run/r_bousset
+ ;;
+ mars)
+ icon=" "
+ mpd="musicpd"
+ xscr="xscreensaver --no-splash"
+ sleep="gsleep 1"
+ ping="ping -c1 -t1 9.9.9.9 >/dev/null 2>&1"
+ host="mars"
+ doas mkdir /var/run/jozan && doas chown -v jozan: /var/run/jozan
+ ;;
+esac
+
+startif() {
+ pidof "$(basename "$1")" >/dev/null || "$@" >/dev/null 2>&1 &
+}
+
+startif dunst
+startif swaybg --image pics/wp.png &
+pgrep $mpd >/dev/null || $mpd >/dev/null 2>&1
+startif pipewire
+sleep 1
+startif pipewire-pulse
+sleep 1
+startif wireplumber
+startif copyq
+notify-send -u normal 'Welcome' "$icon Welcome back, partner!"
firefox &