noblank and compton_toggle
parent
113ad747d1
commit
f727e2448e
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue