From a3f826a5ac8707946f5174d6e8dcc6b942516a0a Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 31 May 2020 03:21:22 +0200 Subject: [PATCH] Add backlight select --- home/config/waybar/config_1 | 3 ++- usr/local/bin/swayphone_backlightselect | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) mode change 100644 => 100755 home/config/waybar/config_1 create mode 100755 usr/local/bin/swayphone_backlightselect diff --git a/home/config/waybar/config_1 b/home/config/waybar/config_1 old mode 100644 new mode 100755 index 04c9287..6b566d1 --- a/home/config/waybar/config_1 +++ b/home/config/waybar/config_1 @@ -133,7 +133,8 @@ // "device": "acpi_video1", "format": "{icon} {percent}% ", "states": [0,50], - "format-icons": ["", ""] + "format-icons": ["", ""], + "on-click": "termite -e swayphone_backlightselect" }, "tray": { "icon-size": 22 diff --git a/usr/local/bin/swayphone_backlightselect b/usr/local/bin/swayphone_backlightselect new file mode 100755 index 0000000..8eeeb9b --- /dev/null +++ b/usr/local/bin/swayphone_backlightselect @@ -0,0 +1,16 @@ +#!/bin/bash + +BACKLIGHT=~/.backlight + +dialog --menu EXECUTE 20 40 12 \ + 10 FULL \ + 9 . \ + 8 . \ + 7 . \ + 6 . \ + 5 . \ + 4 . \ + 3 . \ + 2 MIN \ + 2>$BACKLIGHT && pptk-backlight set `cat $BACKLIGHT` +