Fix Wayland Startup Issues

- Make all notify-send commands non-blocking
  (i.e., run in background)
- Remove delay array from wayland startup
- Call startup script with `dwl -s`
This commit is contained in:
Sravan Balaji 2024-09-29 16:14:53 -04:00
parent e123f25cf7
commit 6a050b96f3
12 changed files with 117 additions and 197 deletions

View File

@ -684,10 +684,10 @@ main() {
# Start Dunst # Start Dunst
/usr/bin/dunst -config ~/.config/dunst/dunstrc & /usr/bin/dunst -config ~/.config/dunst/dunstrc &
notify-send "Turning Dunst ON" notify-send "Turning Dunst ON" &
;; ;;
--off) --off)
notify-send "Turning Dunst OFF" notify-send "Turning Dunst OFF" &
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill dunst pkill dunst
@ -1207,10 +1207,10 @@ main() {
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
string:type:reloadStyle string:type:reloadStyle
notify-send "Turning Deadd ON" notify-send "Turning Deadd ON" &
;; ;;
--off) --off)
notify-send "Turning Deadd OFF" notify-send "Turning Deadd OFF" &
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill deadd-notificat pkill deadd-notificat
@ -1220,7 +1220,7 @@ main() {
kill -s USR1 $(pidof deadd-notification-center) kill -s USR1 $(pidof deadd-notification-center)
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
/usr/bin/notify-send.py a --hint \ /usr/bin/notify-send.py a --hint \
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
@ -1231,7 +1231,7 @@ main() {
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
string:type:unpausePopups > /dev/null 2>&1 string:type:unpausePopups > /dev/null 2>&1
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu
@ -1290,7 +1290,7 @@ main() {
' '
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
/usr/bin/awesome-client ' /usr/bin/awesome-client '
local naughty = require("naughty") local naughty = require("naughty")
@ -1303,7 +1303,7 @@ main() {
naughty.resume() naughty.resume()
' '
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu
@ -1964,14 +1964,14 @@ main() {
xfce4-notifyd-config xfce4-notifyd-config
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true
;; ;;
--unpause) --unpause)
xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu
@ -3563,14 +3563,14 @@ main() {
picom --config $HOME/.config/picom/picom.conf -b picom --config $HOME/.config/picom/picom.conf -b
notify-send "Turning Picom ON" notify-send "Turning Picom ON" &
;; ;;
--off) --off)
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill picom pkill picom
fi fi
notify-send "Turning Picom OFF" notify-send "Turning Picom OFF" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu
@ -3808,7 +3808,7 @@ postlock() {
#+BEGIN_SRC toml :tangle shikane/.config/shikane/config.toml #+BEGIN_SRC toml :tangle shikane/.config/shikane/config.toml
[[profile]] [[profile]]
name = "docked" name = "docked"
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""] exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\" &"]
[[profile.output]] [[profile.output]]
enable = false enable = false
@ -3847,7 +3847,7 @@ adaptive_sync = false
#+BEGIN_SRC toml :tangle shikane/.config/shikane/config.toml #+BEGIN_SRC toml :tangle shikane/.config/shikane/config.toml
[[profile]] [[profile]]
name = "mobile" name = "mobile"
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""] exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\" &"]
[[profile.output]] [[profile.output]]
enable = true enable = true
@ -9037,58 +9037,30 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Java fix for Window Managers
export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop
#+END_SRC #+END_SRC
**** Stop Startup Applications & Processes
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc
$HOME/.scripts/wayland-startup.sh --kill-startup
$HOME/.scripts/wayland-startup.sh --kill-delay
#+END_SRC
**** Launch Environment **** Launch Environment
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc
dwl & $HOME/.scripts/wayland-startup.sh --kill-startup
#+END_SRC
**** Startup Applications & Processes exec dwl -s 'sleep 5 && $HOME/.scripts/wayland-startup.sh --startup'
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc
sleep 2
$HOME/.scripts/wayland-startup.sh --startup &
sleep 3
$HOME/.scripts/wayland-startup.sh --delay &
#+END_SRC #+END_SRC
*** Wayland Startup *** Wayland Startup
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.scripts/wayland-startup.sh #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.scripts/wayland-startup.sh
declare -a startup_array=(\ declare -a startup_array=(\
# Display / Compositor Setup
"/usr/bin/shikane" \ # Display Setup
"/usr/bin/bash $HOME/.azotebg" \ # Wallpaper
"/usr/bin/gammastep -x" \ # Reset gammastep night light
# Background Processes # Background Processes
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent "/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon "/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
"/usr/bin/bash $HOME/.scripts/dunst.sh" \ # Dunst Notification Daemon "$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text "/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text
"/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images "/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images
)
declare -a kill_startup_array=(\
# Display / Compositor Setup # Display / Compositor Setup
"pkill shikane" \ "/usr/bin/shikane" \ # Display Setup
"pkill gammastep" \ "$HOME/.azotebg" \ # Wallpaper
# Background Processes "/usr/bin/gammastep -x" \ # Reset gammastep night light
"pkill polkit-gnome-au" \
"pkill kdeconnectd" \
"pkill dunst" \
"pkill wl-paste" \
)
declare -a delay_array=(\
# Status Bar # Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration) "$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# Tray Applications # Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator "/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet "/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
@ -9101,7 +9073,15 @@ declare -a delay_array=(\
"/usr/bin/openrgb" \ # OpenRGB "/usr/bin/openrgb" \ # OpenRGB
) )
declare -a kill_delay_array=(\ declare -a kill_startup_array=(\
# Background Processes
"pkill polkit-gnome-au" \
"pkill kdeconnectd" \
"$HOME/.scripts/dunst.sh --off" \
"pkill wl-paste" \
# Display / Compositor Setup
"pkill shikane" \
"pkill gammastep" \
# Status Bar # Status Bar
"pkill waybar" \ "pkill waybar" \
# Tray Applications # Tray Applications
@ -9129,9 +9109,7 @@ help_menu() {
rofi_menu() { rofi_menu() {
declare -a options=( declare -a options=(
" Launch Startup Processes - startup" " Launch Startup Processes - startup"
"󰔟 Launch Delayed Processes - delay"
" Kill Startup Processes - kill-startup" " Kill Startup Processes - kill-startup"
" Kill Delayed Processes - kill-delay"
"󰌍 Back - back" "󰌍 Back - back"
"󰗼 Quit - quit" "󰗼 Quit - quit"
) )
@ -9166,17 +9144,6 @@ main() {
fi fi
done done
;; ;;
--delay)
for i in "${delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--kill-startup) --kill-startup)
for i in "${kill_startup_array[@]}" for i in "${kill_startup_array[@]}"
do do
@ -9188,17 +9155,6 @@ main() {
fi fi
done done
;; ;;
--kill-delay)
for i in "${kill_delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--rofi) --rofi)
rofi_menu rofi_menu
;; ;;
@ -9580,10 +9536,10 @@ trackpad_id=13
if xinput list-props $trackpad_id | grep "Device Enabled (.*):.*1" >/dev/null if xinput list-props $trackpad_id | grep "Device Enabled (.*):.*1" >/dev/null
then then
xinput disable $trackpad_id xinput disable $trackpad_id
notify-send -u low -i mouse "Trackpad disabled" notify-send -u low -i mouse "Trackpad disabled" &
else else
xinput enable $trackpad_id xinput enable $trackpad_id
notify-send -u low -i mouse "Trackpad enabled" notify-send -u low -i mouse "Trackpad enabled" &
fi fi
#+END_SRC #+END_SRC
@ -9694,46 +9650,46 @@ main() {
;; ;;
--graphics-query) --graphics-query)
current_graphics=$(sudo system76-power graphics) current_graphics=$(sudo system76-power graphics)
notify-send "System76-Power Graphics" "$current_graphics" notify-send "System76-Power Graphics" "$current_graphics" &
;; ;;
--graphics-compute) --graphics-compute)
notify-send "System76-Power Graphics" "Switching to Compute Graphics..." notify-send "System76-Power Graphics" "Switching to Compute Graphics..." &
sudo system76-power graphics compute sudo system76-power graphics compute
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-hybrid) --graphics-hybrid)
notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..." notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..." &
sudo system76-power graphics hybrid sudo system76-power graphics hybrid
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-integrated) --graphics-integrated)
notify-send "System76-Power Graphics" "Switching to Integrated Graphics..." notify-send "System76-Power Graphics" "Switching to Integrated Graphics..." &
sudo system76-power graphics integrated sudo system76-power graphics integrated
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-nvidia) --graphics-nvidia)
notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..." notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..." &
sudo system76-power graphics nvidia sudo system76-power graphics nvidia
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--rofi-cpu-profile) --rofi-cpu-profile)
rofi_cpu_profile_menu rofi_cpu_profile_menu
;; ;;
--cpu-profile-query) --cpu-profile-query)
current_profile=$(sudo system76-power profile) current_profile=$(sudo system76-power profile)
notify-send "System76-Power CPU Profile" "$current_profile" notify-send "System76-Power CPU Profile" "$current_profile" &
;; ;;
--cpu-profile-battery) --cpu-profile-battery)
sudo system76-power profile battery sudo system76-power profile battery
notify-send "System76-Power CPU Profile" "Switched to Battery Profile" notify-send "System76-Power CPU Profile" "Switched to Battery Profile" &
;; ;;
--cpu-profile-balanced) --cpu-profile-balanced)
sudo system76-power profile balanced sudo system76-power profile balanced
notify-send "System76-Power CPU Profile" "Switched to Balanced Profile" notify-send "System76-Power CPU Profile" "Switched to Balanced Profile" &
;; ;;
--cpu-profile-performance) --cpu-profile-performance)
sudo system76-power profile performance sudo system76-power profile performance
notify-send "System76-Power CPU Profile" "Switched to Performance Profile" notify-send "System76-Power CPU Profile" "Switched to Performance Profile" &
;; ;;
--rofi-gpu-profile) --rofi-gpu-profile)
rofi_gpu_profile_menu rofi_gpu_profile_menu
@ -9741,33 +9697,33 @@ main() {
--gpu-profile-query) --gpu-profile-query)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
current_profile=$(nvidia-settings -q GpuPowerMizerMode) current_profile=$(nvidia-settings -q GpuPowerMizerMode)
notify-send "NVIDIA GPU Profile" "$current_profile" notify-send "NVIDIA GPU Profile" "$current_profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-adaptive) --gpu-profile-adaptive)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=0" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=0"
notify-send "NVIDIA GPU Profile" "Switched to Adaptive Profile" notify-send "NVIDIA GPU Profile" "Switched to Adaptive Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-performance) --gpu-profile-performance)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1"
notify-send "NVIDIA GPU Profile" "Switched to Performance Profile" notify-send "NVIDIA GPU Profile" "Switched to Performance Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-auto) --gpu-profile-auto)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=2" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=2"
notify-send "NVIDIA GPU Profile" "Switched to Auto Profile" notify-send "NVIDIA GPU Profile" "Switched to Auto Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--rofi) --rofi)
@ -9885,27 +9841,27 @@ main() {
help_menu help_menu
;; ;;
--logout) --logout)
notify-send "Session Control" "Logging Out of dwl" notify-send "Session Control" "Logging Out of dwl" &
pkill dwl pkill dwl
;; ;;
--lock) --lock)
notify-send "Session Control" "Locking Session" notify-send "Session Control" "Locking Session" &
swaylock swaylock
;; ;;
--sleep) --sleep)
notify-send "Session Control" "Going to Sleep" notify-send "Session Control" "Going to Sleep" &
systemctl suspend systemctl suspend
;; ;;
--reboot) --reboot)
notify-send "Session Control" "Rebooting System" notify-send "Session Control" "Rebooting System" &
systemctl reboot systemctl reboot
;; ;;
--shutdown) --shutdown)
notify-send "Session Control" "Shutting Down System" notify-send "Session Control" "Shutting Down System" &
systemctl poweroff systemctl poweroff
;; ;;
--hibernate) --hibernate)
notify-send "Session Control" "Hibernating System" notify-send "Session Control" "Hibernating System" &
systemctl hibernate systemctl hibernate
;; ;;
--rofi) --rofi)

View File

@ -66,10 +66,10 @@ main() {
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
string:type:reloadStyle string:type:reloadStyle
notify-send "Turning Deadd ON" notify-send "Turning Deadd ON" &
;; ;;
--off) --off)
notify-send "Turning Deadd OFF" notify-send "Turning Deadd OFF" &
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill deadd-notificat pkill deadd-notificat
@ -79,7 +79,7 @@ main() {
kill -s USR1 $(pidof deadd-notification-center) kill -s USR1 $(pidof deadd-notification-center)
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
/usr/bin/notify-send.py a --hint \ /usr/bin/notify-send.py a --hint \
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
@ -90,7 +90,7 @@ main() {
boolean:deadd-notification-center:true \ boolean:deadd-notification-center:true \
string:type:unpausePopups > /dev/null 2>&1 string:type:unpausePopups > /dev/null 2>&1
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu

View File

@ -75,10 +75,10 @@ main() {
# Start Dunst # Start Dunst
/usr/bin/dunst -config ~/.config/dunst/dunstrc & /usr/bin/dunst -config ~/.config/dunst/dunstrc &
notify-send "Turning Dunst ON" notify-send "Turning Dunst ON" &
;; ;;
--off) --off)
notify-send "Turning Dunst OFF" notify-send "Turning Dunst OFF" &
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill dunst pkill dunst

View File

@ -41,27 +41,27 @@ main() {
help_menu help_menu
;; ;;
--logout) --logout)
notify-send "Session Control" "Logging Out of dwl" notify-send "Session Control" "Logging Out of dwl" &
pkill dwl pkill dwl
;; ;;
--lock) --lock)
notify-send "Session Control" "Locking Session" notify-send "Session Control" "Locking Session" &
swaylock swaylock
;; ;;
--sleep) --sleep)
notify-send "Session Control" "Going to Sleep" notify-send "Session Control" "Going to Sleep" &
systemctl suspend systemctl suspend
;; ;;
--reboot) --reboot)
notify-send "Session Control" "Rebooting System" notify-send "Session Control" "Rebooting System" &
systemctl reboot systemctl reboot
;; ;;
--shutdown) --shutdown)
notify-send "Session Control" "Shutting Down System" notify-send "Session Control" "Shutting Down System" &
systemctl poweroff systemctl poweroff
;; ;;
--hibernate) --hibernate)
notify-send "Session Control" "Hibernating System" notify-send "Session Control" "Hibernating System" &
systemctl hibernate systemctl hibernate
;; ;;
--rofi) --rofi)

View File

@ -1,31 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
declare -a startup_array=(\ declare -a startup_array=(\
# Display / Compositor Setup
"/usr/bin/shikane" \ # Display Setup
"/usr/bin/bash $HOME/.azotebg" \ # Wallpaper
"/usr/bin/gammastep -x" \ # Reset gammastep night light
# Background Processes # Background Processes
"/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent "/usr/libexec/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent
"/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon "/usr/bin/kdeconnectd --replace" \ # KDE Connect Daemon
"/usr/bin/bash $HOME/.scripts/dunst.sh" \ # Dunst Notification Daemon "$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text "/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text
"/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images "/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images
)
declare -a kill_startup_array=(\
# Display / Compositor Setup # Display / Compositor Setup
"pkill shikane" \ "/usr/bin/shikane" \ # Display Setup
"pkill gammastep" \ "$HOME/.azotebg" \ # Wallpaper
# Background Processes "/usr/bin/gammastep -x" \ # Reset gammastep night light
"pkill polkit-gnome-au" \
"pkill kdeconnectd" \
"pkill dunst" \
"pkill wl-paste" \
)
declare -a delay_array=(\
# Status Bar # Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration) "$HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# Tray Applications # Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator "/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet "/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
@ -38,7 +24,15 @@ declare -a delay_array=(\
"/usr/bin/openrgb" \ # OpenRGB "/usr/bin/openrgb" \ # OpenRGB
) )
declare -a kill_delay_array=(\ declare -a kill_startup_array=(\
# Background Processes
"pkill polkit-gnome-au" \
"pkill kdeconnectd" \
"$HOME/.scripts/dunst.sh --off" \
"pkill wl-paste" \
# Display / Compositor Setup
"pkill shikane" \
"pkill gammastep" \
# Status Bar # Status Bar
"pkill waybar" \ "pkill waybar" \
# Tray Applications # Tray Applications
@ -66,9 +60,7 @@ help_menu() {
rofi_menu() { rofi_menu() {
declare -a options=( declare -a options=(
" Launch Startup Processes - startup" " Launch Startup Processes - startup"
"󰔟 Launch Delayed Processes - delay"
" Kill Startup Processes - kill-startup" " Kill Startup Processes - kill-startup"
" Kill Delayed Processes - kill-delay"
"󰌍 Back - back" "󰌍 Back - back"
"󰗼 Quit - quit" "󰗼 Quit - quit"
) )
@ -103,17 +95,6 @@ main() {
fi fi
done done
;; ;;
--delay)
for i in "${delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--kill-startup) --kill-startup)
for i in "${kill_startup_array[@]}" for i in "${kill_startup_array[@]}"
do do
@ -125,17 +106,6 @@ main() {
fi fi
done done
;; ;;
--kill-delay)
for i in "${kill_delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--rofi) --rofi)
rofi_menu rofi_menu
;; ;;

View File

@ -10,11 +10,5 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Java fix for Window Managers
export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop
$HOME/.scripts/wayland-startup.sh --kill-startup $HOME/.scripts/wayland-startup.sh --kill-startup
$HOME/.scripts/wayland-startup.sh --kill-delay
dwl & exec dwl -s 'sleep 5 && $HOME/.scripts/wayland-startup.sh --startup'
sleep 2
$HOME/.scripts/wayland-startup.sh --startup &
sleep 3
$HOME/.scripts/wayland-startup.sh --delay &

View File

@ -43,7 +43,7 @@ main() {
' '
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
/usr/bin/awesome-client ' /usr/bin/awesome-client '
local naughty = require("naughty") local naughty = require("naughty")
@ -56,7 +56,7 @@ main() {
naughty.resume() naughty.resume()
' '
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu

View File

@ -57,14 +57,14 @@ main() {
picom --config $HOME/.config/picom/picom.conf -b picom --config $HOME/.config/picom/picom.conf -b
notify-send "Turning Picom ON" notify-send "Turning Picom ON" &
;; ;;
--off) --off)
if [ $(is_running) -eq '1' ]; then if [ $(is_running) -eq '1' ]; then
pkill picom pkill picom
fi fi
notify-send "Turning Picom OFF" notify-send "Turning Picom OFF" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu

View File

@ -1,6 +1,6 @@
[[profile]] [[profile]]
name = "docked" name = "docked"
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""] exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\" &"]
[[profile.output]] [[profile.output]]
enable = false enable = false
@ -35,7 +35,7 @@ adaptive_sync = false
[[profile]] [[profile]]
name = "mobile" name = "mobile"
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""] exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\" &"]
[[profile.output]] [[profile.output]]
enable = true enable = true

View File

@ -103,46 +103,46 @@ main() {
;; ;;
--graphics-query) --graphics-query)
current_graphics=$(sudo system76-power graphics) current_graphics=$(sudo system76-power graphics)
notify-send "System76-Power Graphics" "$current_graphics" notify-send "System76-Power Graphics" "$current_graphics" &
;; ;;
--graphics-compute) --graphics-compute)
notify-send "System76-Power Graphics" "Switching to Compute Graphics..." notify-send "System76-Power Graphics" "Switching to Compute Graphics..." &
sudo system76-power graphics compute sudo system76-power graphics compute
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-hybrid) --graphics-hybrid)
notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..." notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..." &
sudo system76-power graphics hybrid sudo system76-power graphics hybrid
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-integrated) --graphics-integrated)
notify-send "System76-Power Graphics" "Switching to Integrated Graphics..." notify-send "System76-Power Graphics" "Switching to Integrated Graphics..." &
sudo system76-power graphics integrated sudo system76-power graphics integrated
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--graphics-nvidia) --graphics-nvidia)
notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..." notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..." &
sudo system76-power graphics nvidia sudo system76-power graphics nvidia
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics" &
;; ;;
--rofi-cpu-profile) --rofi-cpu-profile)
rofi_cpu_profile_menu rofi_cpu_profile_menu
;; ;;
--cpu-profile-query) --cpu-profile-query)
current_profile=$(sudo system76-power profile) current_profile=$(sudo system76-power profile)
notify-send "System76-Power CPU Profile" "$current_profile" notify-send "System76-Power CPU Profile" "$current_profile" &
;; ;;
--cpu-profile-battery) --cpu-profile-battery)
sudo system76-power profile battery sudo system76-power profile battery
notify-send "System76-Power CPU Profile" "Switched to Battery Profile" notify-send "System76-Power CPU Profile" "Switched to Battery Profile" &
;; ;;
--cpu-profile-balanced) --cpu-profile-balanced)
sudo system76-power profile balanced sudo system76-power profile balanced
notify-send "System76-Power CPU Profile" "Switched to Balanced Profile" notify-send "System76-Power CPU Profile" "Switched to Balanced Profile" &
;; ;;
--cpu-profile-performance) --cpu-profile-performance)
sudo system76-power profile performance sudo system76-power profile performance
notify-send "System76-Power CPU Profile" "Switched to Performance Profile" notify-send "System76-Power CPU Profile" "Switched to Performance Profile" &
;; ;;
--rofi-gpu-profile) --rofi-gpu-profile)
rofi_gpu_profile_menu rofi_gpu_profile_menu
@ -150,33 +150,33 @@ main() {
--gpu-profile-query) --gpu-profile-query)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
current_profile=$(nvidia-settings -q GpuPowerMizerMode) current_profile=$(nvidia-settings -q GpuPowerMizerMode)
notify-send "NVIDIA GPU Profile" "$current_profile" notify-send "NVIDIA GPU Profile" "$current_profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-adaptive) --gpu-profile-adaptive)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=0" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=0"
notify-send "NVIDIA GPU Profile" "Switched to Adaptive Profile" notify-send "NVIDIA GPU Profile" "Switched to Adaptive Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-performance) --gpu-profile-performance)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1"
notify-send "NVIDIA GPU Profile" "Switched to Performance Profile" notify-send "NVIDIA GPU Profile" "Switched to Performance Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--gpu-profile-auto) --gpu-profile-auto)
if [ $XDG_SESSION_TYPE == "x11" ]; then if [ $XDG_SESSION_TYPE == "x11" ]; then
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=2" nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=2"
notify-send "NVIDIA GPU Profile" "Switched to Auto Profile" notify-send "NVIDIA GPU Profile" "Switched to Auto Profile" &
elif [ $XDG_SESSION_TYPE == "wayland" ]; then elif [ $XDG_SESSION_TYPE == "wayland" ]; then
notify-send "NVIDIA GPU Profile not supported on Wayland" notify-send "NVIDIA GPU Profile not supported on Wayland" &
fi fi
;; ;;
--rofi) --rofi)

View File

@ -4,8 +4,8 @@ trackpad_id=13
if xinput list-props $trackpad_id | grep "Device Enabled (.*):.*1" >/dev/null if xinput list-props $trackpad_id | grep "Device Enabled (.*):.*1" >/dev/null
then then
xinput disable $trackpad_id xinput disable $trackpad_id
notify-send -u low -i mouse "Trackpad disabled" notify-send -u low -i mouse "Trackpad disabled" &
else else
xinput enable $trackpad_id xinput enable $trackpad_id
notify-send -u low -i mouse "Trackpad enabled" notify-send -u low -i mouse "Trackpad enabled" &
fi fi

View File

@ -40,14 +40,14 @@ main() {
xfce4-notifyd-config xfce4-notifyd-config
;; ;;
--pause) --pause)
notify-send "Pausing Notifications" notify-send "Pausing Notifications" &
xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true
;; ;;
--unpause) --unpause)
xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false
notify-send "Unpausing Notifications" notify-send "Unpausing Notifications" &
;; ;;
--rofi) --rofi)
rofi_menu rofi_menu