1#!/bin/bash
 2
 3if [[ -n $WAYLAND_DISPLAY ]]; then
 4    hyprctl -i 0 dispatch exec -- "waybar"
 5    hyprctl -i 0 dispatch exec -- "blueman-applet"
 6    hyprctl -i 0 dispatch exec -- "gammastep"
 7    hyprctl -i 0 dispatch exec -- "/usr/lib/geoclue-2.0/demos/agent"
 8    hyprctl -i 0 dispatch exec -- "dunst"
 9    hyprctl -i 0 dispatch exec -- "playerctl pause"
10    hyprctl -i 0 dispatch exec -- "solaar -w hide"
11    hyprctl -i 0 dispatch exec -- "emacs --daemon"
12    hyprctl -i 0 dispatch exec -- "xrdb -load ~/.Xresources"
13    hyprctl -i 0 dispatch exec -- "xfsettingsd"
14    hyprctl -i 0 dispatch exec -- "dbus-update-activation-environment --all"
15    hyprctl -i 0 dispatch exec -- "PYTHON_KEYRING_BACKEND=keyring.backends.SecretService.Keyring gajim"
16    hyprctl -i 0 dispatch exec -- "kdeconnect-indicator"
17    {{- if eq .chezmoi.hostname "angmar" }}
18    hyprctl -i 0 dispatch exec -- "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile"
19    hyprctl -i 0 dispatch exec -- "firefox-developer-edition"
20    {{- end }}
21    sleep 5
22    hyprctl dispatch exec -- "nextcloud"
23else
24    i3-msg exec "polybar top"
25    i3-msg exec "polybar bottom"
26    i3-msg exec "feh --bg-scale ~/.wallpaper.png"
27    i3-msg exec "blueman-applet"
28    i3-msg exec "redshift"
29    i3-msg exec "/usr/lib/geoclue-2.0/demos/agent"
30    i3-msg exec "dunst"
31    i3-msg exec "playerctl pause"
32    i3-msg exec "setxkbmap -option compose:ralt"
33    i3-msg exec "xset r rate 250 50"
34    i3-msg exec "picom"
35    i3-msg exec "solaar -w hide"
36    i3-msg exec "unclutter --ignore-scrolling --start-hidden"
37    i3-msg exec "emacs --daemon"
38    i3-msg exec "xrdb -load ~/.Xresources"
39    i3-msg exec "xfsettingsd"
40    i3-msg exec "dbus-update-activation-environment --all"
41    i3-msg exec "kdeconnect-indicator"
42    {{- if eq .chezmoi.hostname "angmar" }}
43    i3-msg exec "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile"
44    i3-msg workspace 7
45    i3-msg workspace 6
46    i3-msg exec "PYTHON_KEYRING_BACKEND=keyring.backends.SecretService.Keyring gajim"
47    i3-msg workspace 1
48    i3-msg exec "firefox-developer-edition"
49    i3-msg exec "xrandr -r 165.00"
50    {{- end }}
51    xsetwacom set "Wacom Intuos BT S Pad pad" Button 1 "key del"
52    xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "key +ctrl z -ctrl"
53    xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 "key +ctrl +shift z -shift -ctrl"
54    sleep 5
55    i3-msg exec "nextcloud"
56fi
57
58exit