Compare commits

...

2 commits

Author SHA1 Message Date
09693db995 river: Overlay arriba 2022-05-18 12:15:41 -03:00
ed6280329b set-battery-threshold: Usar APIs de Linux
Ahora uso un coreboot actualizado que soporta las APIs nativas
2022-05-18 12:14:45 -03:00
2 changed files with 9 additions and 5 deletions

View file

@ -10,7 +10,7 @@ riverctl spawn 'killall yambar ; yambar'
riverctl spawn "killall fnott >/dev/null ; fnott" riverctl spawn "killall fnott >/dev/null ; fnott"
riverctl spawn "killall river-tag-overlay >/dev/null ; river-tag-overlay \ riverctl spawn "killall river-tag-overlay >/dev/null ; river-tag-overlay \
--border-width=5 \ --border-width=5 \
--anchors=0:0:1:0 \ --anchors=1:0:0:0 \
--timeout=2000 \ --timeout=2000 \
--square-padding=10 \ --square-padding=10 \
--square-inner-padding=5 \ --square-inner-padding=5 \

View file

@ -8,16 +8,20 @@ usage () {
} }
if expr "$1" : '[0-9][0-9]*$'>/dev/null; then if expr "$1" : '[0-9][0-9]*$'>/dev/null; then
start_threshold="$(printf '%x' "$1")" # start_threshold="$(printf '%x' "$1")"
start_threshold="$1"
else else
usage usage
fi fi
if expr "$2" : '[0-9][0-9]*$'>/dev/null; then if expr "$2" : '[0-9][0-9]*$'>/dev/null; then
stop_threshold="$(printf '%x' "$2")" # stop_threshold="$(printf '%x' "$2")"
stop_threshold="$2"
else else
usage usage
fi fi
ectool -w 0xb0 -z "$start_threshold" # ectool -w 0xb0 -z "$start_threshold"
ectool -w 0xb1 -z "$stop_threshold" # ectool -w 0xb1 -z "$stop_threshold"
echo "$start_threshold" > /sys/class/power_supply/BAT0/charge_control_start_threshold
echo "$stop_threshold" > /sys/class/power_supply/BAT0/charge_control_end_threshold