From 5431558ece9f2597c82a93301429f5de90f547c2 Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire Date: Mon, 2 Mar 2026 10:14:17 -0300 Subject: [PATCH] monitor_control qtile --- .config/qtile/monitor_control.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .config/qtile/monitor_control.sh diff --git a/.config/qtile/monitor_control.sh b/.config/qtile/monitor_control.sh new file mode 100755 index 0000000..fbc02d4 --- /dev/null +++ b/.config/qtile/monitor_control.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DEVICE="$(brightnessctl -l -c backlight g | head -n 2 | tail -n 1 | cut -d ' ' -f2 | sed "s/'//g")" + +case $1 in + # Brightness + b_current) + brightnessctl -d $DEVICE | grep Current | cut -d' ' -f4 | sed 's/(\(.*\))/\1/';; + b_up ) + brightnessctl -d "$DEVICE" set 5%+;; + b_down ) + brightnessctl -d "$DEVICE" set 5%-;; + * ) + echo "Command not valid" ; exit 1;; +esac + +exit 0;