Adjust delays in wayland init and startup scripts

This commit is contained in:
Sravan Balaji
2024-09-29 15:25:20 -04:00
parent 4c4daeab26
commit e123f25cf7
4 changed files with 158 additions and 88 deletions

View File

@@ -8893,35 +8893,35 @@ declare -a kill_startup_array=(\
)
declare -a delay_array=(\
"/usr/bin/gammastep-indicator" \ # Gammastep Night Light
"/usr/bin/blueman-applet" \ # Blueman Bluetooth Manager
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/flameshot" \ # Flameshot Screenshot Tool
"/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/udiskie -a -n -s" \ # Udiskie
"/usr/bin/openrgb" \ # OpenRGB
"/usr/bin/syncthing-gtk" \ # Syncthing GTK
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --on" \ # Picom Compositor
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock
"/usr/bin/gammastep-indicator" \ # Gammastep Night Light
"/usr/bin/blueman-applet" \ # Blueman Bluetooth Manager
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/flameshot" \ # Flameshot Screenshot Tool
"/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/udiskie -a -n -s" \ # Udiskie
"/usr/bin/openrgb" \ # OpenRGB
"/usr/bin/syncthing-gtk" \ # Syncthing GTK
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --on" \ # Picom Compositor
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock
)
declare -a kill_delay_array=(\
"pkill gammastep-indic" \ # Gammastep Night Light
"pkill blueman-applet" \ # Blueman Bluetooth Manager
"pkill nm-applet" \ # Network Manager Applet
"pkill kdeconnect-indicator" \ # KDE Connect Indicator
"pkill flameshot" \ # Flameshot Screenshot Tool
"pkill xfce4-power-manager" \ # XFCE4 Power Manager
"pkill udiskie" \ # Udiskie
"pkill openrgb" \ # OpenRGB
"pkill syncthing-gtk" \ # Syncthing GTK
"pkill nextcloud" \ # NextCloud Client
"pkill nyrna" \ # Nyrna
"pkill gammastep-indic" \ # Gammastep Night Light
"pkill blueman-applet" \ # Blueman Bluetooth Manager
"pkill nm-applet" \ # Network Manager Applet
"pkill kdeconnect-indicator" \ # KDE Connect Indicator
"pkill flameshot" \ # Flameshot Screenshot Tool
"pkill xfce4-power-manager" \ # XFCE4 Power Manager
"pkill udiskie" \ # Udiskie
"pkill openrgb" \ # OpenRGB
"pkill syncthing-gtk" \ # Syncthing GTK
"pkill nextcloud" \ # NextCloud Client
"pkill nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --off" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --off" \ # Picom Compositor
)
@@ -9037,6 +9037,13 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Java fix for Window Managers
export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop
#+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
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc
@@ -9046,10 +9053,10 @@ dwl &
**** Startup Applications & Processes
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc
(sleep 3 &&
$HOME/.scripts/wayland-startup.sh --kill-startup &&
sleep 2 &&
$HOME/.scripts/wayland-startup.sh --startup) &
sleep 2
$HOME/.scripts/wayland-startup.sh --startup &
sleep 3
$HOME/.scripts/wayland-startup.sh --delay &
#+END_SRC
*** Wayland Startup
@@ -9066,18 +9073,6 @@ declare -a startup_array=(\
"/usr/bin/bash $HOME/.scripts/dunst.sh" \ # Dunst Notification Daemon
"/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text
"/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images
# Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/udiskie -a -n -s" \ # Udiskie
# Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# GUI Applications
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/syncthing-gtk" \ # Syncthing GUI
"/usr/bin/openrgb" \ # OpenRGB
)
declare -a kill_startup_array=(\
@@ -9089,14 +9084,32 @@ declare -a kill_startup_array=(\
"pkill kdeconnectd" \
"pkill dunst" \
"pkill wl-paste" \
)
declare -a delay_array=(\
# Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/udiskie -a -n -s" \ # Udiskie
# GUI Applications
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/syncthing-gtk" \ # Syncthing GUI
"/usr/bin/openrgb" \ # OpenRGB
)
declare -a kill_delay_array=(\
# Status Bar
"pkill waybar" \
# Tray Applications
"pkill gammastep-indic" \
"pkill blueman-applet" \
"pkill nm-applet" \
"pkill kdeconnect-indi" \
"pkill udiskie" \
# Status Bar
"pkill waybar" \
# GUI Applications
"pkill nextcloud" \
"pkill syncthing-gtk" \
@@ -9116,7 +9129,9 @@ help_menu() {
rofi_menu() {
declare -a options=(
" Launch Startup Processes - startup"
"󰔟 Launch Delayed Processes - delay"
" Kill Startup Processes - kill-startup"
" Kill Delayed Processes - kill-delay"
"󰌍 Back - back"
"󰗼 Quit - quit"
)
@@ -9151,6 +9166,17 @@ main() {
fi
done
;;
--delay)
for i in "${delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--kill-startup)
for i in "${kill_startup_array[@]}"
do
@@ -9162,6 +9188,17 @@ main() {
fi
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_menu
;;

View File

@@ -10,18 +10,6 @@ declare -a startup_array=(\
"/usr/bin/bash $HOME/.scripts/dunst.sh" \ # Dunst Notification Daemon
"/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text
"/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images
# Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/udiskie -a -n -s" \ # Udiskie
# Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# GUI Applications
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/syncthing-gtk" \ # Syncthing GUI
"/usr/bin/openrgb" \ # OpenRGB
)
declare -a kill_startup_array=(\
@@ -33,14 +21,32 @@ declare -a kill_startup_array=(\
"pkill kdeconnectd" \
"pkill dunst" \
"pkill wl-paste" \
)
declare -a delay_array=(\
# Status Bar
"/usr/bin/sh -c $HOME/.config/dwl/waybar/launch.sh" \ # Waybar (dwl configuration)
# Tray Applications
"/usr/bin/gammastep-indicator" \ # Gamamstep Night Light Indicator
"/usr/bin/blueman-applet" \ # Bluetooth Manager Applet
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/udiskie -a -n -s" \ # Udiskie
# GUI Applications
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/syncthing-gtk" \ # Syncthing GUI
"/usr/bin/openrgb" \ # OpenRGB
)
declare -a kill_delay_array=(\
# Status Bar
"pkill waybar" \
# Tray Applications
"pkill gammastep-indic" \
"pkill blueman-applet" \
"pkill nm-applet" \
"pkill kdeconnect-indi" \
"pkill udiskie" \
# Status Bar
"pkill waybar" \
# GUI Applications
"pkill nextcloud" \
"pkill syncthing-gtk" \
@@ -60,7 +66,9 @@ help_menu() {
rofi_menu() {
declare -a options=(
" Launch Startup Processes - startup"
"󰔟 Launch Delayed Processes - delay"
" Kill Startup Processes - kill-startup"
" Kill Delayed Processes - kill-delay"
"󰌍 Back - back"
"󰗼 Quit - quit"
)
@@ -95,6 +103,17 @@ main() {
fi
done
;;
--delay)
for i in "${delay_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done
;;
--kill-startup)
for i in "${kill_startup_array[@]}"
do
@@ -106,6 +125,17 @@ main() {
fi
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_menu
;;

View File

@@ -9,9 +9,12 @@ export QT_QPA_PLATFORMTHEME=qt6ct # QGtkStyle
export _JAVA_AWT_WM_NONREPARENTING=1 # Java fix for Window Managers
export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop
$HOME/.scripts/wayland-startup.sh --kill-startup
$HOME/.scripts/wayland-startup.sh --kill-delay
dwl &
(sleep 3 &&
$HOME/.scripts/wayland-startup.sh --kill-startup &&
sleep 2 &&
$HOME/.scripts/wayland-startup.sh --startup) &
sleep 2
$HOME/.scripts/wayland-startup.sh --startup &
sleep 3
$HOME/.scripts/wayland-startup.sh --delay &

View File

@@ -20,35 +20,35 @@ declare -a kill_startup_array=(\
)
declare -a delay_array=(\
"/usr/bin/gammastep-indicator" \ # Gammastep Night Light
"/usr/bin/blueman-applet" \ # Blueman Bluetooth Manager
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/flameshot" \ # Flameshot Screenshot Tool
"/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/udiskie -a -n -s" \ # Udiskie
"/usr/bin/openrgb" \ # OpenRGB
"/usr/bin/syncthing-gtk" \ # Syncthing GTK
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --on" \ # Picom Compositor
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock
"/usr/bin/gammastep-indicator" \ # Gammastep Night Light
"/usr/bin/blueman-applet" \ # Blueman Bluetooth Manager
"/usr/bin/nm-applet" \ # Network Manager Applet
"/usr/bin/kdeconnect-indicator" \ # KDE Connect Indicator
"/usr/bin/flameshot" \ # Flameshot Screenshot Tool
"/usr/bin/xfce4-power-manager" \ # XFCE4 Power Manager
"/usr/bin/udiskie -a -n -s" \ # Udiskie
"/usr/bin/openrgb" \ # OpenRGB
"/usr/bin/syncthing-gtk" \ # Syncthing GTK
"/usr/bin/nextcloud" \ # NextCloud Client
"/usr/bin/nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --on" \ # Picom Compositor
"/usr/bin/autorandr --change --force" \ # Auto restore screen layout
"/usr/bin/numlockx on" \ # Enable numlock
)
declare -a kill_delay_array=(\
"pkill gammastep-indic" \ # Gammastep Night Light
"pkill blueman-applet" \ # Blueman Bluetooth Manager
"pkill nm-applet" \ # Network Manager Applet
"pkill kdeconnect-indicator" \ # KDE Connect Indicator
"pkill flameshot" \ # Flameshot Screenshot Tool
"pkill xfce4-power-manager" \ # XFCE4 Power Manager
"pkill udiskie" \ # Udiskie
"pkill openrgb" \ # OpenRGB
"pkill syncthing-gtk" \ # Syncthing GTK
"pkill nextcloud" \ # NextCloud Client
"pkill nyrna" \ # Nyrna
"pkill gammastep-indic" \ # Gammastep Night Light
"pkill blueman-applet" \ # Blueman Bluetooth Manager
"pkill nm-applet" \ # Network Manager Applet
"pkill kdeconnect-indicator" \ # KDE Connect Indicator
"pkill flameshot" \ # Flameshot Screenshot Tool
"pkill xfce4-power-manager" \ # XFCE4 Power Manager
"pkill udiskie" \ # Udiskie
"pkill openrgb" \ # OpenRGB
"pkill syncthing-gtk" \ # Syncthing GTK
"pkill nextcloud" \ # NextCloud Client
"pkill nyrna" \ # Nyrna
"bash $HOME/.scripts/dunst.sh --off" \ # Dunst Notification Daemon
"bash $HOME/.scripts/picom.sh --off" \ # Picom Compositor
)