wmstartup: Make startup logging more clear, make script more readable
This commit is contained in:
parent
1b78111d21
commit
fd4ee878cc
@ -60,7 +60,7 @@ xrdbupdate
|
||||
## SERVICES AND DAEMONS
|
||||
# Kill everything
|
||||
printf "[INFO] Stopping existing services\n"
|
||||
services="plasmashell xembedsniproxy krunner xfdesktop polybar compton conky sxhkd dunst"
|
||||
services="plasmashell xembedsniproxy krunner xfdesktop polybar compton conky sxhkd dunst xob"
|
||||
for service in $services; do
|
||||
printf " [INFO] Sending signal to all $service\n"
|
||||
killall $service
|
||||
@ -85,27 +85,62 @@ done
|
||||
# Start them back up
|
||||
printf "[INFO] Starting services\n"
|
||||
# Start with key functionality
|
||||
# SXHKD
|
||||
if pgrep bspwm > /dev/null 2>&1; then
|
||||
printf " [INFO] Found bspwm, starting sxhkd\n"
|
||||
sxhkd &
|
||||
fi
|
||||
# Don't start the compositor in a VM
|
||||
if [[ $(hostname) != "vm"* ]]; then
|
||||
printf " [INFO] Starting compton\n"
|
||||
compton &
|
||||
else
|
||||
printf " [INFO] In a VM, not starting compositor\n"
|
||||
printf " [WARN] bspwm was started, but sxhkd wasn't! Session may be unusable!\n"
|
||||
fi
|
||||
printf " [INFO] Starting polybar\n"
|
||||
$HOME/.config/polybar/start.sh &
|
||||
printf " [INFO] Starting dunst\n"
|
||||
dunst&
|
||||
printf " [INFO] Starting conky\n"
|
||||
# Use all the config files in its config directory
|
||||
for file in $HOME/.config/conky/*.conf; do
|
||||
printf " [INFO] Found config file $file\n"
|
||||
conky -c $file&
|
||||
done
|
||||
|
||||
# Compton
|
||||
if which compton > /dev/null 2>&1; then
|
||||
# Don't start the compositor in a VM
|
||||
if [[ $(hostname) != "vm"* ]]; then
|
||||
printf " [INFO] Starting compton\n"
|
||||
compton &
|
||||
else
|
||||
printf " [INFO] In a VM, not starting compositor\n"
|
||||
fi
|
||||
else
|
||||
printf " [INFO] Could not find a compositor\n"
|
||||
fi
|
||||
|
||||
# Polybar
|
||||
if which polybar > /dev/null 2>&1; then
|
||||
printf " [INFO] Starting polybar\n"
|
||||
$HOME/.config/polybar/start.sh &
|
||||
else
|
||||
printf " [INFO] Could not find a bar\n"
|
||||
fi
|
||||
|
||||
# Dunst
|
||||
if which dunst > /dev/null 2>&1; then
|
||||
printf " [INFO] Starting dunst\n"
|
||||
dunst&
|
||||
else
|
||||
printf " [INFO] Could not find a notification daemon\n"
|
||||
fi
|
||||
|
||||
# XOB
|
||||
if which xob > /dev/null 2>&1; then
|
||||
printf " [INFO] Starting xob instances\n"
|
||||
else
|
||||
printf " [INFO] Could not find a bar overlay application\n"
|
||||
fi
|
||||
|
||||
# Conky
|
||||
if which conky > /dev/null 2>&1; then
|
||||
printf " [INFO] Starting conky\n"
|
||||
# Use all the config files in its config directory
|
||||
for file in $HOME/.config/conky/*.conf; do
|
||||
printf " [INFO] Found config file $file\n"
|
||||
conky -c $file&
|
||||
done
|
||||
else
|
||||
printf " [INFO] Could not find a desktop statistics application\n"
|
||||
fi
|
||||
|
||||
# Wallpaper management
|
||||
printf "[INFO] Setting wallpaper\n"
|
||||
if which xfdesktop > /dev/null 2>&1; then
|
||||
@ -119,7 +154,8 @@ elif which xsetroot > /dev/null 2>&1; then
|
||||
printf " [INFO] Setting root window color\n"
|
||||
xsetroot -solid "#282828"
|
||||
else
|
||||
printf " [WARN] Could not find any wallpaper manager\n"
|
||||
printf " [WARN] Could not find a wallpaper manager\n"
|
||||
fi
|
||||
|
||||
printf "[INFO] Finished initialization\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user