fix picom handling
This commit is contained in:
parent
3d11013030
commit
aa31631b95
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
. "$HOME/.config/mabox/mabox.conf"
|
||||
|
||||
backend=${picom_renderer:-glx}
|
||||
|
||||
case "$LANG" in
|
||||
pl*)
|
||||
DISABLED="Kompozytor Picom zastał WYŁĄCZONY"
|
||||
@ -10,17 +14,17 @@ case "$LANG" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $(pgrep -u $USER -f picom) ]; then
|
||||
if [ $(pgrep -u $USER picom) ]; then
|
||||
killall -u $USER picom
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$DISABLED"
|
||||
else
|
||||
CONFIGFILE="$HOME/.config/picom.conf"
|
||||
if [ -f "$CONFIGFILE" ];then
|
||||
picom --config "$CONFIGFILE" &
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED"
|
||||
picom --backend "$backend" --config "$CONFIGFILE" &
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED\nRenderer: $backend"
|
||||
else
|
||||
picom --config /dev/null &
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED"
|
||||
picom --backend "$backend" --config /usr/share/doc/picom/picom.conf.example &
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED\n Using picom example config file\nRenderer: $backend"
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user