executable_startup.tmpl

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