From 3d3d79a57fb6d0a5728e0070475f05d1699f0818 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Wed, 16 Mar 2022 23:37:09 -0500 Subject: move a lot of scripts around and make a bunch of minor changes. once again i am too lazy to document the changes properly since im never going to read these commit messages anyways --- keyboard/bl | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 keyboard/bl (limited to 'keyboard/bl') diff --git a/keyboard/bl b/keyboard/bl deleted file mode 100755 index 2bbd951..0000000 --- a/keyboard/bl +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -xbacklight -$1 $2 -time 50 -steps 5 2>/dev/null && exit - -red=16 -green=18 -blue=1A -getbl() { bl=$(doas ddcutil getvcp $red | sed 's/.*current value =\s*\([0-9]*\).*/\1/'); } # Get brightness of red channel so we only have to grab one -case "$1" in - dec) - getbl - [ $bl = 0 ] && exit - bl=$(( bl - $2 )) - [ $bl -lt 0 ] && bl=0 - ;; - inc) - getbl - [ $bl = 100 ] && exit - bl=$(( bl + $2 )) - [ $bl -gt 100 ] && bl=100 - ;; - set) - bl=$2 - [ $bl -lt 0 ] || [ $bl -gt 100 ] && echo "Invalid value" && exit - ;; - *) - echo "Invalid option" && exit - ;; -esac -for color in $red $green $blue; do doas ddcutil setvcp $color $bl; done -#dwmsbup 20 -- cgit v1.2.3