#!/bin/bash matched=$(hyprctl instances | grep -oE "instance [a-zA-Z0-9]{40}_[a-zA-Z0-9]{10}:") if [[ -n $matched ]]; then # We're in Wayland hyprctl dispatch exec -- "waybar" hyprctl dispatch exec -- "blueman-applet" hyprctl dispatch exec -- "gammastep" hyprctl dispatch exec -- "/usr/lib/geoclue-2.0/demos/agent" hyprctl dispatch exec -- "dunst" hyprctl dispatch exec -- "playerctl pause" hyprctl dispatch exec -- "solaar -w hide" hyprctl dispatch exec -- "emacs --daemon" hyprctl dispatch exec -- "xrdb -load ~/.Xresources" hyprctl dispatch exec -- "xfsettingsd" hyprctl dispatch exec -- "darkman get" hyprctl dispatch exec -- "dbus-update-activation-environment --all" hyprctl dispatch exec -- "telegram-desktop" {{- if eq .chezmoi.hostname "angmar" }} hyprctl dispatch exec -- "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile" hyprctl dispatch exec -- "firefox-developer-edition" {{- end }} sleep 5 hyprctl dispatch exec -- "nextcloud" else # We're in i3 (X.org) i3-msg exec "polybar top" i3-msg exec "polybar bottom" i3-msg exec "feh --bg-scale ~/.wallpaper.png" i3-msg exec "blueman-applet" i3-msg exec "redshift" i3-msg exec "/usr/lib/geoclue-2.0/demos/agent" i3-msg exec "dunst" i3-msg exec "playerctl pause" i3-msg exec "setxkbmap -option compose:ralt" i3-msg exec "xset r rate 250 50" i3-msg exec "picom" i3-msg exec "solaar -w hide" i3-msg exec "unclutter --ignore-scrolling --start-hidden" i3-msg exec "emacs --daemon" i3-msg exec "xrdb -load ~/.Xresources" i3-msg exec "xfsettingsd" i3-msg exec "darkman get" i3-msg exec "dbus-update-activation-environment --all" {{- if eq .chezmoi.hostname "angmar" }} i3-msg exec "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile" i3-msg workspace 7 i3-msg workspace 6 i3-msg exec "telegram-desktop" i3-msg workspace 1 i3-msg exec "firefox-developer-edition" i3-msg exec "xrandr -r 165.00" {{- end }} xsetwacom set "Wacom Intuos BT S Pad pad" Button 1 "key del" xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "key +ctrl z -ctrl" xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 "key +ctrl +shift z -shift -ctrl" sleep 5 i3-msg exec "nextcloud" fi exit