[rc/rofi-light] don’t invoke light when esc was pressed
authorAmin Bandali <bandali@gnu.org>
Sat, 17 Nov 2018 04:27:51 +0000 (23:27 -0500)
committerAmin Bandali <bandali@gnu.org>
Sat, 17 Nov 2018 04:27:51 +0000 (23:27 -0500)
rc.org

diff --git a/rc.org b/rc.org
index d4e8a7c..336337f 100644 (file)
--- a/rc.org
+++ b/rc.org
@@ -5582,7 +5582,7 @@ if __name__ == '__main__':
 #+begin_src bash
 cur=$(light -G)
 val=$(rofi -dmenu -mesg "light    $cur" -p "light -S " -l 0 -width 12)
-light -S $val
+[ -n "$val" ] && light -S $val
 #+end_src
 
 ** s (run sway)