From c3327cf0b5c18eea5c2b05e26eab9047e7dc0750 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Tue, 29 Jun 2021 16:55:05 +0200 Subject: [PATCH] polybar: backlight --- polybar/backlight.sh | 27 --------------------------- polybar/config | 4 ++-- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100755 polybar/backlight.sh diff --git a/polybar/backlight.sh b/polybar/backlight.sh deleted file mode 100755 index f6c0083..0000000 --- a/polybar/backlight.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# This polybar script show the current brightness level and allows you to increase or decrease it by scrolling up or down with the mouse wheel -# -# Make sure you have inotify-tools (and brightnessctl obv) installed otherwise inotifywait won't work -# You need to install a font from nerdfonts.com in order to see glyphs correctly. You can replace them with what you prefer -# https://raw.githubusercontent.com/FedericoAntoniazzi/dotfiles/master/.config/polybar/backlight.sh -increase(){ - brightnessctl s +2% > /dev/null - return -} - -decrease(){ - brightnessctl s 2%- > /dev/null - return -} - - -case "$1" in - "increase") - increase - exit - ;; - "decrease") - decrease - exit - ;; -esac diff --git a/polybar/config b/polybar/config index 7ffee7d..1125dc9 100644 --- a/polybar/config +++ b/polybar/config @@ -74,8 +74,8 @@ type = custom/script exec = /usr/bin/brightnessctl g tail = true interval = 5 -scroll-up = /home/mg/dotfiles/polybar/backlight.sh increase -scroll-down = /home/mg/dotfiles/polybar/backlight.sh decrease +scroll-up = brightnessctl s +2% > /dev/null +scroll-down = brightnessctl s 2%- > /dev/null [module/i3] type = internal/i3