Last active 1731171150

dominic revised this gist 1731171150. Go to revision

1 file changed, 15 insertions

powersave-openbsd.sh(file created)

@@ -0,0 +1,15 @@
1 + #! /bin/sh
2 + #
3 + # Author: Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
4 +
5 + case $( sysctl -n hw.power ) in
6 +
7 + (0) # BATTERY
8 + doas wsconsctl display.brightness=$(cat ${HOME}/.backlight-bat) 1> /dev/null 2> /dev/null
9 + ;;
10 +
11 + (1) # AC
12 + doas wsconsctl display.brightness=$(cat ${HOME}/.backlight-ac) 1> /dev/null 2> /dev/null
13 + ;;
14 +
15 + esac
Newer Older