From 48ce00ab514eaaa68b3971cf0d5e7df56508342b Mon Sep 17 00:00:00 2001 From: natemaia Date: Fri, 8 Dec 2017 03:25:55 -0800 Subject: [PATCH] More commenting in autostart, more improvments to user scripts --- home/.config/openbox/autostart | 1 + home/bin/toggle-compton | 4 ++-- home/bin/toggle-polybar | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/home/.config/openbox/autostart b/home/.config/openbox/autostart index fcc7b911..d8cd4e80 100755 --- a/home/.config/openbox/autostart +++ b/home/.config/openbox/autostart @@ -29,6 +29,7 @@ xfsettingsd & # Launch conky if session exists sleep 2; al-conky-session & +# set side user dirs shortcuts for file managers xdg-user-dirs-gtk-update & $HOME/.config/keypack & diff --git a/home/bin/toggle-compton b/home/bin/toggle-compton index 7e67e0b3..db02a132 100755 --- a/home/bin/toggle-compton +++ b/home/bin/toggle-compton @@ -3,14 +3,14 @@ on="" off="" -if [[ $1 == *toggle* ]] && pgrep compton >/dev/null; then +if [[ $1 == *toggle* ]] && [ "$(pidof compton)" ]; then al-compositor --stop && exit 0 elif [[ $1 == *toggle* ]]; then al-compositor --start && exit 0 fi while true; do - if pgrep compton >/dev/null; then + if [ "$(pidof compton)" ]; then echo "$on" else echo "%{F#888888}$off" diff --git a/home/bin/toggle-polybar b/home/bin/toggle-polybar index 8c387400..e1fed18f 100755 --- a/home/bin/toggle-polybar +++ b/home/bin/toggle-polybar @@ -1,6 +1,6 @@ #!/usr/bin/env bash -if pgrep -x polybar >/dev/null; then +if [ "$(pidof polybar)" ]; then pkill polybar else start-polybar