picom cd
This commit is contained in:
parent
86b039603e
commit
87bbd98e5b
@ -5,30 +5,40 @@ backend=${picom_renderer:-glx}
|
||||
|
||||
case "$LANG" in
|
||||
pl*)
|
||||
DISABLED="Kompozytor Picom zastał WYŁĄCZONY"
|
||||
ENABLED="Kompozytor Picom został URUCHOMIONY"
|
||||
RENDERER="Sposób renderowania:"
|
||||
WITHOUT="Bez pliku konfiguracyjnego (/dev/null)"
|
||||
_DISABLED="Kompozytor Picom zastał WYŁĄCZONY"
|
||||
_ENABLED="Kompozytor Picom został URUCHOMIONY"
|
||||
_RENDERER="Sposób renderowania"
|
||||
_WITHOUT="Bez pliku konfiguracyjnego (/dev/null)"
|
||||
_MENU="Menu Konfiguracji..."
|
||||
;;
|
||||
*)
|
||||
DISABLED="Picom compositor DISABLED"
|
||||
ENABLED="Picom compositor ENABLED"
|
||||
RENDERER="Renderer backend:"
|
||||
WITHOUT="Running without config file (/dev/null)"
|
||||
_DISABLED="Picom compositor DISABLED"
|
||||
_ENABLED="Picom compositor ENABLED"
|
||||
_RENDERER="Renderer backend"
|
||||
_WITHOUT="Running without config file (/dev/null)"
|
||||
_ERROR="Something went wrong"
|
||||
_NOT_STARTED="Picom not started\nCheck your configuration"
|
||||
_MENU="Configure Picom"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $(pgrep -u $USER picom) ]; then
|
||||
killall -u $USER picom
|
||||
notify-send.sh -i compton -t 5000 "Compositor" "$DISABLED"
|
||||
notify-send.sh --replace-file=/tmp/comptontgl -i compton -t 5000 "Compositor" "$_DISABLED" -o "$_MENU:jgpicom-pipe -s"
|
||||
else
|
||||
CONFIGFILE="$HOME/.config/picom.conf"
|
||||
if [ -f "$CONFIGFILE" ];then
|
||||
picom --backend "$backend" --config "$CONFIGFILE" &
|
||||
notify-send.sh -i compton -t 8000 "$ENABLED" "\n$RENDERER: <b>$backend</b>"
|
||||
sleep .25
|
||||
if [ $(pgrep -u $USER picom) ]; then
|
||||
notify-send.sh --replace-file=/tmp/comptontgl -i compton -t 8000 "$_ENABLED" "\n$_RENDERER: <b>$backend</b>" -o "$_MENU:jgpicom-pipe -s"
|
||||
else
|
||||
notify-send.sh --replace-file=/tmp/comptontgl -i error -t 8000 "$_ERROR" "\n$_NOT_STARTED\n$_RENDERER: <b>$backend</b>" -o "$_MENU:jgpicom-pipe -s"
|
||||
fi
|
||||
else
|
||||
picom --backend "$backend" --config /dev/null &
|
||||
notify-send.sh -i compton -t 8000 "$ENABLED" "\n$WITHOUT\n$RENDERER <b>$backend</b>"
|
||||
sleep .25
|
||||
notify-send.sh --replace-file=/tmp/comptontgl -i compton -t 8000 "$_ENABLED" "\n$_WITHOUT\n$_RENDERER <b>$backend</b>" -o "$_MENU:jgpicom-pipe -s"
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user