diff options
Diffstat (limited to '')
-rwxr-xr-x | .config/wayland/init.sh | 46 |
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 & |