diff --git a/bin/compton_toggle b/bin/compton_toggle index 78cfd82..67b4b36 100755 --- a/bin/compton_toggle +++ b/bin/compton_toggle @@ -1,16 +1,26 @@ #!/bin/bash +case "$LANG" in + pl*) + DISABLED="Kompozytor Picom zastał WYŁĄCZONY" + ENABLED="Kompozytor Picom został URUCHOMIONY" + ;; + *) + DISABLED="Picom compositor DISABLED" + ENABLED="Picom compositor ENABLED" + ;; +esac if [ $(pidof picom) ]; then - echo "Stopping picom" killall picom + notify-send -i compton -t 5000 "Compositor" "$DISABLED" else CONFIGFILE="$HOME/.config/picom.conf" if [ -f "$CONFIGFILE" ];then - echo "Starting picom with config: $CONFIGFILE" picom --config "$CONFIGFILE" & + notify-send -i compton -t 5000 "Compositor" "$ENABLED" else - echo "Starting picom without config file" picom --config /dev/null & + notify-send -i compton -t 5000 "Compositor" "$ENABLED" fi fi exit diff --git a/bin/noblank b/bin/noblank new file mode 100755 index 0000000..cf60559 --- /dev/null +++ b/bin/noblank @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +case "$LANG" in + pl*) + DISABLED="Wygaszanie monitora jest WYŁĄCZONE" + ENABLED="Wygaszanie monitora jest WŁĄCZONE" + ;; + *) + DISABLED="Monitor blanking is DISABLED" + ENABLED="Monitor blanking is ENABLED" + ;; +esac + +if (xset q|grep --quiet "DPMS is Enabled"); +then + xset s off -dpms + notify-send -i monitor -t 5000 "DPMS" "$DISABLED" +else + xset s on +dpms + notify-send -i monitor -t 5000 "DPMS" "$ENABLED" +fi