diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-02-18 17:36:51 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-02-18 17:36:51 +0400 |
commit | d1e8f727620479a98ad568e8e3dc98e84bef45b2 (patch) | |
tree | 56a8dedb74e9e8a6f8692027e3eadd201eb37c5f /src/scripts/sBrightness | |
parent | f40c73f3b30547f7267c84bd22677dec65029dc4 (diff) |
version 0.2
Diffstat (limited to 'src/scripts/sBrightness')
-rwxr-xr-x | src/scripts/sBrightness | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/scripts/sBrightness b/src/scripts/sBrightness new file mode 100755 index 0000000..9f2363a --- /dev/null +++ b/src/scripts/sBrightness @@ -0,0 +1,13 @@ +#!/bin/sh + +# Wrapper script for backlight control + +arg=$1 + +[ $# -eq 0 ] && { echo "Error: No argument" ; exit 2 ;} + +[ $# -gt 1 ] && { echo Too much arguments ; exit 2 ; } + +[ $arg -lt 0 ] && positive_arg=$(echo $arg | tr -d "-") && brightnessctl -c backlight set $positive_arg%- && exit 0 + +brightnessctl -c backlight set $arg% |