From 6594a21ac12b8644882923644dfccc246f4af29c Mon Sep 17 00:00:00 2001 From: 135e2 <135e2@135e2.tk> Date: Tue, 1 Feb 2022 23:37:44 +0800 Subject: config/i3: update to 20220201 - Support brightness control (for crouton) - ShortKey: $mod+Shift+u Brightness Up $mod+Shift+d Brightness Down --- config/i3/brightness | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 config/i3/brightness (limited to 'config/i3/brightness') diff --git a/config/i3/brightness b/config/i3/brightness new file mode 100644 index 0000000..ecd34ee --- /dev/null +++ b/config/i3/brightness @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +cur_brightness=$(brightness) + +case "$1" in +u*) arg='up' ;; +d*) arg='down' ;; +esac + +if [[ $((cur_brightness)) -le 6 && ${arg} == 'down' ]]; then + echo 'Brightness too low, skipping now...' +else + brightness b ${arg} +fi -- cgit v1.2.3