dwm/autostart_blocking.sh
Sravan Balaji 5015cfc93b 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
2020-11-06 21:02:40 -05:00

22 lines
530 B
Bash
Executable File

#!/bin/bash
##############################
# 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
)
# Run processes (ignore if they don't exist)
for i in "${processes_array[@]}"
do
if ! command -v $i > /dev/null
then
do_nothing() { :; }
else
$i &
fi
done