Cleaned up power notifications, added package, ...
This commit is contained in:
parent
5dbad776a9
commit
0196190666
@ -56,3 +56,5 @@
|
|||||||
(package! groovy-mode)
|
(package! groovy-mode)
|
||||||
; allows the terraform files to be properly read
|
; allows the terraform files to be properly read
|
||||||
(package! terraform-mode)
|
(package! terraform-mode)
|
||||||
|
; add typescript major mode
|
||||||
|
(package! typescript-mode)
|
||||||
|
|||||||
@ -192,7 +192,7 @@ bindsym $mod+F11 mode "$mode_audio"
|
|||||||
set $mode_launch adefault start-up bnoise-fix cdual dhorizontal etearing
|
set $mode_launch adefault start-up bnoise-fix cdual dhorizontal etearing
|
||||||
mode "$mode_launch" {
|
mode "$mode_launch" {
|
||||||
# These are all the default programs launching at startup.
|
# These are all the default programs launching at startup.
|
||||||
bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default"
|
bindsym a exec thunderbird, exec signal-desktop, exec ferdi, exec obsidian mode "default", exec teams --no-sandbox, exec slack
|
||||||
# This fixes audio noise (lenovo)
|
# This fixes audio noise (lenovo)
|
||||||
# bindsym b exec sudo hda-verb /dev/snd/hwC*D0 0x1d SET_PIN_WIDGET_CONTROL 0x0, mode "default"
|
# bindsym b exec sudo hda-verb /dev/snd/hwC*D0 0x1d SET_PIN_WIDGET_CONTROL 0x0, mode "default"
|
||||||
# This bypasses weird xrandr bug, resets to single display, then goes back to triple monitor setup (use autorandr profile here, needs to be set up in advance)
|
# This bypasses weird xrandr bug, resets to single display, then goes back to triple monitor setup (use autorandr profile here, needs to be set up in advance)
|
||||||
|
|||||||
@ -2,12 +2,19 @@
|
|||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
CAPACITY=$(cat /sys/class/power_supply/BAT0/capacity)
|
CAPACITY=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||||
|
|
||||||
|
# perform notifications
|
||||||
if [[ $CAPACITY -lt 20 ]]
|
if [[ $CAPACITY -lt 20 ]]
|
||||||
then
|
then
|
||||||
MSG="Battery low: $CAPACITY%";
|
MSG="Battery low: $CAPACITY%";
|
||||||
else
|
/usr/bin/notify-send "$MSG";
|
||||||
MSG="Battery high: $CAPACITY%";
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/bin/notify-send "$MSG"
|
# suspend system when battery is low
|
||||||
|
if [[ $CAPACITY -ge 0 && $CAPACITY -lt 10 ]]
|
||||||
|
then
|
||||||
|
MSG="Should suspend now, battery critical: $CAPACITY";
|
||||||
|
/usr/bin/notify-send "$MSG";
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user