From 03d8dcc333a11bed629bec29dea33efb5b6274e2 Mon Sep 17 00:00:00 2001 From: Dejvino Date: Sun, 14 Jun 2020 07:44:17 +0200 Subject: [PATCH] Backlight selector shows current value. Dialog menus wait for term init. --- home/config/waybar/config_0 | 2 +- home/config/waybar/config_1 | 2 +- usr/local/bin/swayphone_backlightselect | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/home/config/waybar/config_0 b/home/config/waybar/config_0 index 854039e..82fd058 100755 --- a/home/config/waybar/config_0 +++ b/home/config/waybar/config_0 @@ -39,7 +39,7 @@ "format": " {:%e %b %Y}", // Icon: calendar-alt //"tooltip-format": "{:%e %B %Y}" "tooltip": true, - "on-click": "termite -e swayphone_menuselect" + "on-click": "termite -e sleep 1; swayphone_menuselect" }, "battery": { diff --git a/home/config/waybar/config_1 b/home/config/waybar/config_1 index 6b566d1..8495dc7 100755 --- a/home/config/waybar/config_1 +++ b/home/config/waybar/config_1 @@ -134,7 +134,7 @@ "format": "{icon} {percent}% ", "states": [0,50], "format-icons": ["", ""], - "on-click": "termite -e swayphone_backlightselect" + "on-click": "termite -e sleep 1; swayphone_backlightselect" }, "tray": { "icon-size": 22 diff --git a/usr/local/bin/swayphone_backlightselect b/usr/local/bin/swayphone_backlightselect index 4fcf28a..739f515 100755 --- a/usr/local/bin/swayphone_backlightselect +++ b/usr/local/bin/swayphone_backlightselect @@ -2,14 +2,14 @@ BACKLIGHT=~/.backlight -dialog --menu Backlight 0 0 10 \ +dialog --scrollbar --default-item `pptk-backlight get` --menu Backlight 0 0 10 \ 10 FULL \ - 9 . \ - 8 . \ - 7 . \ - 6 . \ - 5 . \ - 4 . \ + 9 :::: \ + 8 :::. \ + 7 ::: \ + 6 ::. \ + 5 :: \ + 4 :. \ 3 MIN \ 2>$BACKLIGHT && pptk-backlight set `cat $BACKLIGHT`