Merge All Autostart Applications & Blocking Processes into Master

- Ignore applications if they don't exist rather than having separate branches for desktop and laptop
- Re-organize scripts to define arrays and run applications with for loops
This commit is contained in:
Sravan Balaji
2020-08-01 14:36:39 -04:00
parent 485c40d5f9
commit 5015cfc93b
2 changed files with 45 additions and 30 deletions

View File

@@ -1,34 +1,35 @@
#!/bin/bash #!/bin/bash
############################
# System Tray Applications #
############################
# PulseAudio volume control
volctl &
# Nyrna
nyrna &
# Blueman
blueman-tray &
# Network Manager Applet
nm-applet &
# KDE Connect
kdeconnect-indicator &
######################## ########################
# Background Processes # # Startup Applications #
######################## ########################
# Deadd Notification Center # List of applications to run on start
deadd-notification-center & declare -a applications_array=(\
# System Tray Applications
"volctl" \ # PulseAudio Volume Control
"nyrna" \ # Nyrna Application Suspend
"blueman-tray" \ # Blueman Bluetooth Manager
"nm-applet" \ # Network Manager Applet
"kdeconnect-indicator" \ # KDE Connect
# Background Processes
"deadd-notification-center" \ # Deadd Notification Center
"greenclip daemon" \ # Greenclip Clipboard Manager
"redshift-gtk" \ # Redshift Blue Light Filter
# Hardware Driver Applications
"solaar --window=hide" \ # Logitech Mouse Driver
"polychromatic-tray-applet" \ # Razer Keyboard Customization
)
# Greenclip # Run applications (ignore if they don't exist)
greenclip daemon & for i in "${applications_array[@]}"
do
# Redshift if ! command -v $i > /dev/null
redshift-gtk & then
do_nothing() { :; }
else
$i &
fi
done
##################### #####################
# Cloud Drive Rsync # # Cloud Drive Rsync #

View File

@@ -1,7 +1,21 @@
#!/bin/bash #!/bin/bash
# Start compositor using configuration file ##############################
picom --config ~/.config/picom/picom.conf & # Startup Blocking Processes #
##############################
# List of processes to run on start
declare -a processes_array=(\
"picom --config ~/.config/picom/picom.conf" \ # Start compositor using configuration file
"nitrogen --restore" \ # Restore wallpaper
)
# Restore wallpaper # Run processes (ignore if they don't exist)
nitrogen --restore & for i in "${processes_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done