diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 14 | ||||
-rwxr-xr-x | adjust-brightness | 10 | ||||
-rwxr-xr-x | battery-life | 4 |
3 files changed, 28 insertions, 0 deletions
@@ -28,6 +28,20 @@ TODO: allow directories to be passed in `./random-music $NUM_OF_SONGS` +## battery-life + +Grabs remaining battery life on laptops, using acpi. + +`./battery-life` + +## adjust-brightness + +Changes the brightness value of a screen, intended use being laptops. + +TODO: Pass through directory as to not be hardcoded + +`./adjust-brightness $+/- + ## backup.py Creates file copies on another drive and an external server. diff --git a/adjust-brightness b/adjust-brightness new file mode 100755 index 0000000..2cc2e4e --- /dev/null +++ b/adjust-brightness @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" == "+" ] +then + expr $(cat /sys/class/backlight/amdgpu_bl0/brightness) + 10 > /sys/class/backlight/amdgpu_bl0/brightness +else + expr $(cat /sys/class/backlight/amdgpu_bl0/brightness) - 10 > /sys/class/backlight/amdgpu_bl0/brightness +fi + +exit 0 diff --git a/battery-life b/battery-life new file mode 100755 index 0000000..f4a7281 --- /dev/null +++ b/battery-life @@ -0,0 +1,4 @@ +#!/bin/sh + +return="$(acpi | sed "s,[^0-9]*,,g")%" +echo "${return:1}" |