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