2020-02-18 17:24:18 +01:00
|
|
|
#!/bin/bash
|
2024-12-08 22:28:23 +01:00
|
|
|
. "$HOME/.config/mabox/mabox.conf"
|
|
|
|
|
|
|
|
backend=${picom_renderer:-glx}
|
|
|
|
|
2021-10-13 12:20:43 +02:00
|
|
|
case "$LANG" in
|
|
|
|
pl*)
|
|
|
|
DISABLED="Kompozytor Picom zastał WYŁĄCZONY"
|
|
|
|
ENABLED="Kompozytor Picom został URUCHOMIONY"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
DISABLED="Picom compositor DISABLED"
|
|
|
|
ENABLED="Picom compositor ENABLED"
|
|
|
|
;;
|
|
|
|
esac
|
2020-02-18 17:24:18 +01:00
|
|
|
|
2024-12-08 22:28:23 +01:00
|
|
|
if [ $(pgrep -u $USER picom) ]; then
|
2023-08-19 16:23:51 +02:00
|
|
|
killall -u $USER picom
|
|
|
|
notify-send.sh -i compton -t 5000 "Compositor" "$DISABLED"
|
2020-02-18 17:24:18 +01:00
|
|
|
else
|
2020-09-30 22:56:54 +02:00
|
|
|
CONFIGFILE="$HOME/.config/picom.conf"
|
|
|
|
if [ -f "$CONFIGFILE" ];then
|
2024-12-08 22:28:23 +01:00
|
|
|
picom --backend "$backend" --config "$CONFIGFILE" &
|
|
|
|
notify-send.sh -i compton -t 5000 "Compositor" "$ENABLED\nRenderer: $backend"
|
2020-09-30 22:56:54 +02:00
|
|
|
else
|
2024-12-08 22:28:23 +01:00
|
|
|
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"
|
2020-09-30 22:56:54 +02:00
|
|
|
fi
|
2020-02-18 17:24:18 +01:00
|
|
|
fi
|
|
|
|
exit
|