executable_startup.tmpl

 1#!/bin/bash
 2autocutsel -fork
 3autocutsel -fork -selection PRIMARY
 4
 5matched=$(hyprctl instances | grep -oE "instance [a-zA-Z0-9]{40}_[a-zA-Z0-9]{10}:")
 6
 7if [[ -n $matched ]]; then
 8	# We're in Wayland
 9	hyprctl dispatch exec -- "waybar"
10	hyprctl dispatch exec -- "blueman-applet"
11	hyprctl dispatch exec -- "gammastep"
12	hyprctl dispatch exec -- "/usr/lib/geoclue-2.0/demos/agent"
13	hyprctl dispatch exec -- "dunst"
14	hyprctl dispatch exec -- "playerctl pause"
15	hyprctl dispatch exec -- "solaar -w hide"
16	hyprctl dispatch exec -- "emacs --daemon"
17	hyprctl dispatch exec -- "xrdb -load ~/.Xresources"
18	hyprctl dispatch exec -- "xfsettingsd"
19	hyprctl dispatch exec -- "darkman get"
20	hyprctl dispatch exec -- "nextcloud"
21	{{- if eq .chezmoi.hostname "angmar" }}
22	hyprctl dispatch exec -- "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile"
23	hyprctl dispatch exec -- "hydrus-client"
24	hyprctl dispatch exec -- "telegram-desktop"
25	hyprctl dispatch exec -- "firefox-developer-edition"
26	{{- end }}
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 "nextcloud"
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"
60fi
61
62exit