# vim: filetype=sh 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 ;; 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 [ $host = "po-rbo" ] && source "$HOME"/.config/env $ping && git --git-dir="$HOME"/docs/dotfiles-bsd --work-tree="$HOME" pull startif() { pgrep "$(basename "$1")" >/dev/null || "$@" >/dev/null 2>&1 & } dunst_shit() { sleep 1 [ $host = "po-rbo" ] && startif /home/r_bousset/.nix-profile/bin/dunst || startif dunst sleep 2 startif mpd-notification startif lowbat for pid in $(ps aux | grep local/bin/kb | awk '{print $2}'); do kill -9 $pid done [ $host = "mother" ] && "$HOME"/.local/bin/setwp "$HOME"/pics/wp.png || "$HOME"/.local/bin/setwp "$HOME"/pics/wp/129.jpg "$HOME"/.local/bin/kb & } start_apps() { [ $host = "po-rbo" ] && /home/r_bousset/.local/bin/pipe CM_SELECTIONS=clipboard startif clipmenud startif copyq startif nextcloud QT_SCALE_FACTOR=1.35 startif rclone-browser startif nixGL teams-for-linux startif thunderbird startif firefox } export LANG='en_US.UTF-8' [ $host = "mother" ] && xrandr --output HDMI-0 --primary --mode 1920x1080 --pos 1440x0 --rotate normal \ --output DP-0 --mode 1680x1050 --pos 3360x0 --rotate normal \ --output DP-1 --off \ --output DP-2 --off \ --output DP-3 --off \ --output DP-4 --mode 1440x900 --pos 0x0 --rotate normal \ --output DP-5 --off [ $host = "po-rbo" ] && xrandr \ --output eDP-1 --mode 1920x1200 --pos 0x0 --rotate normal \ --output HDMI-1 --primary --mode 2560x1440 --pos 1920x0 --rotate normal \ --output DP-1 --mode 2560x1440 --pos 4480x0 --rotate normal \ --output HDMI-2 --off \ --output VIRTUAL-1 --off dunst_shit startif picom pgrep $mpd >/dev/null || $mpd >/dev/null 2>&1 xset s off xset -dpms startif $xscr # doas rc-service wireguard start && # notify-send -u normal 'wireguard' 'WireGuard started' # $sleep pkill wireplumber pkill pipewire-pulse pkill pipewire startif pipewire $sleep startif pipewire-pulse $sleep startif wireplumber $sleep startif nm-applet $sleep startif blueman-applet cd "$HOME" xrdb "$HOME"/.config/x11/xresources start_apps & notify-send -u normal 'Welcome' "$icon Welcome back, partner!" [ $host = "po-rbo" ] && exec dwm