diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-12-24 00:06:27 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-12-24 00:06:27 +0530 |
| commit | 865728068c965e066d0f8971c5b5ba26e12e7dce (patch) | |
| tree | c16195f0a04cf7d004fe5b396255734f4d60bb00 /scripts/brightness.sh | |
| parent | 649ef5f225039e498358c3d056dfd7fcbc56f014 (diff) | |
| download | nixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.tar.gz nixos-config-865728068c965e066d0f8971c5b5ba26e12e7dce.zip | |
Adds scripts and links scripts and wallpapers
Diffstat (limited to 'scripts/brightness.sh')
| -rwxr-xr-x | scripts/brightness.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/brightness.sh b/scripts/brightness.sh new file mode 100755 index 0000000..71432d6 --- /dev/null +++ b/scripts/brightness.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +read_brightness() { xbacklight -get; } + +get_brightness() { printf "%.0f%s" "$(read_brightness)" "%"; } + +set_brightness() { xbacklight -set $1; } + +increment() { xbacklight -inc $1; } +decrement() { xbacklight -dec $1; } + +case $1 in + get) get_brightness ;; + set) set_brightness $2 ;; + inc) increment $2 ;; + dec) decrement $2 ;; + *) echo "For tools to work, you need to know how to use them" ;; +esac + +#~/scripts/statusbar/statusbar.sh update brightness; +update-dwmblock brightness; + |
