summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2022-05-06 16:23:51 -0700
committerMike Crute <mike@crute.us>2022-05-06 16:23:54 -0700
commit3bfd019a9f90c0a582195c6fc00738fc18df6269 (patch)
treec1bbe31add2e4499749d629b9731bcaaa8c9898d /bin
parentdd2780deeb2dd12845bd4ac4bf2d22db0d6a00ee (diff)
downloaddotfiles-3bfd019a9f90c0a582195c6fc00738fc18df6269.tar.bz2
dotfiles-3bfd019a9f90c0a582195c6fc00738fc18df6269.tar.xz
dotfiles-3bfd019a9f90c0a582195c6fc00738fc18df6269.zip
Add Dell monitor brightness script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dell-monitor-brightness22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/dell-monitor-brightness b/bin/dell-monitor-brightness
new file mode 100755
index 0000000..98d5972
--- /dev/null
+++ b/bin/dell-monitor-brightness
@@ -0,0 +1,22 @@
1#!/bin/sh
2
3if [ -z $1 ]; then
4 echo "usage: $(basename $0) <brightness:0-100>"
5 exit 1
6fi
7
8if (( $1 > 100 )) || (( $1 < 0 )); then
9 echo "usage: $(basename $0) <brightness:0-100>"
10 exit 1
11fi
12
13exec &>/dev/null
14
15ddccontrol -r 0x10 -w $1 dev:/dev/i2c-8
16
17if [ $? -ne 0 ]; then
18 echo "Error setting monitor brightness"
19 exit 1
20fi
21
22exit 0