This commit is contained in:
Daniel Napora 2023-08-19 16:23:51 +02:00
parent 21f9ad9740
commit b890992b56
3 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ yad --title="About Mabox" --window-icon=mbcc \
--pversion="$(lsb_release -rs) <i>${OSCODE}</i>" \ --pversion="$(lsb_release -rs) <i>${OSCODE}</i>" \
--image=mbcc \ --image=mbcc \
--comments="${COMMENT}" \ --comments="${COMMENT}" \
--copyright="Copyright 2016-2022, Daniel Napora <danieln@maboxlinux.org>" \ --copyright="Copyright 2016-2023, Daniel Napora <danieln@maboxlinux.org>" \
--license=GPL3 \ --license=GPL3 \
--website="https://maboxlinux.org" \ --website="https://maboxlinux.org" \
--website-label=maboxlinux.org \ --website-label=maboxlinux.org \

View File

@ -10,17 +10,17 @@ case "$LANG" in
;; ;;
esac esac
if [ $(pidof picom) ]; then if [ $(pgrep -u $USER -f picom) ]; then
killall picom killall -u $USER picom
notify-send -i compton -t 5000 "Compositor" "$DISABLED" notify-send.sh -i compton -t 5000 "Compositor" "$DISABLED"
else else
CONFIGFILE="$HOME/.config/picom.conf" CONFIGFILE="$HOME/.config/picom.conf"
if [ -f "$CONFIGFILE" ];then if [ -f "$CONFIGFILE" ];then
picom --config "$CONFIGFILE" & picom --config "$CONFIGFILE" &
notify-send -i compton -t 5000 "Compositor" "$ENABLED" notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED"
else else
picom --config /dev/null & picom --config /dev/null &
notify-send -i compton -t 5000 "Compositor" "$ENABLED" notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED"
fi fi
fi fi
exit exit

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
if pgrep -f "conky -c" ;then if pgrep -u $USER -f "conky -c" ;then
pkill conky pkill -u $USER conky
else else
SESSIONFILE=$HOME/.config/conky/conky-sessionfile SESSIONFILE=$HOME/.config/conky/conky-sessionfile
while read -r line; do while read -r line; do
@ -9,11 +9,11 @@ while read -r line; do
THIS_CONKY=$(echo "${line##+([[:space:]])}" | awk '{print $3}') THIS_CONKY=$(echo "${line##+([[:space:]])}" | awk '{print $3}')
CONKYRC=${THIS_CONKY//\'/} CONKYRC=${THIS_CONKY//\'/}
if ! pgrep -f "${CONKYRC//\~/}" if ! pgrep -u $USER -f "${CONKYRC//\~/}"
then then
conky -c "${CONKYRC//\~/$HOME}" & conky -c "${CONKYRC//\~/$HOME}" &
else else
pkill -f "${CONKYRC//\~/}" pkill -u $USER -f "${CONKYRC//\~/}"
fi fi
fi fi
done < $SESSIONFILE done < $SESSIONFILE