From d2a169d1dc912c5d3c2792415cd25c2db4e97f82 Mon Sep 17 00:00:00 2001 From: Amolith Date: Thu, 8 Feb 2024 10:47:49 -0500 Subject: [PATCH] add hyprland to startup script --- dot_local/bin/executable_startup-i3.tmpl | 54 --------------------- dot_local/bin/executable_startup.tmpl | 62 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 54 deletions(-) delete mode 100644 dot_local/bin/executable_startup-i3.tmpl create mode 100644 dot_local/bin/executable_startup.tmpl diff --git a/dot_local/bin/executable_startup-i3.tmpl b/dot_local/bin/executable_startup-i3.tmpl deleted file mode 100644 index 70f3edd55f3e5b910b3a55a97249551d4d13a15e..0000000000000000000000000000000000000000 --- a/dot_local/bin/executable_startup-i3.tmpl +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -x -autocutsel -fork -autocutsel -fork -selection PRIMARY - -# Start headless applications -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 "gotify-desktop" -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 st "zsh -c 'bitw serve'" - -{{- if eq .chezmoi.hostname "angmar" }} -i3-msg exec "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile" -i3-msg workspace 7 -i3-msg exec "hydrus-client" -i3-msg workspace 6 -i3-msg exec "telegram-desktop" -i3-msg exec "sprig" -i3-msg exec "beeper" -i3-msg workspace 1 -i3-msg exec "firefox-developer-edition" -i3-msg exec "xrandr -r 165.00" -{{- end }} - -sleep 50 -i3-msg exec "nextcloud" - -############################## -# Wacom tablet configuration # -############################## - -# Tablet button 1 = delete -xsetwacom set "Wacom Intuos BT S Pad pad" Button 1 "key del" -# Tablet button 3 = ctrl+z -xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "key +ctrl z -ctrl" -# Tablet button 4 = ctrl+shift+z -xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 "key +ctrl +shift z -shift -ctrl" - -exit diff --git a/dot_local/bin/executable_startup.tmpl b/dot_local/bin/executable_startup.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..9752270d7d65d0f97c9fb69c8438320022d2470d --- /dev/null +++ b/dot_local/bin/executable_startup.tmpl @@ -0,0 +1,62 @@ +#!/bin/bash +autocutsel -fork +autocutsel -fork -selection PRIMARY + +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 -- "nextcloud" + {{- if eq .chezmoi.hostname "angmar" }} + hyprctl dispatch exec -- "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile" + hyprctl dispatch exec -- "hydrus-client" + hyprctl dispatch exec -- "telegram-desktop" + hyprctl dispatch exec -- "firefox-developer-edition" + {{- end }} +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 "nextcloud" + {{- if eq .chezmoi.hostname "angmar" }} + i3-msg exec "caddy start --adapter caddyfile --config ~/Bulk/Media/Caddyfile" + i3-msg workspace 7 + i3-msg exec "hydrus-client" + 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" +fi + +exit