From 26f9682085c9a8e9f74550581575b263210b45f3 Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Sat, 1 Aug 2020 00:38:45 +0300 Subject: [PATCH] polybar: ++xsmartlight --- etc/soft/polybar/config | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/etc/soft/polybar/config b/etc/soft/polybar/config index f715f9e..5444aa2 100644 --- a/etc/soft/polybar/config +++ b/etc/soft/polybar/config @@ -71,8 +71,8 @@ font-1 = NotoMono Nerd Font:size=12 font-2 = NotoMono Nerd Font:size=12 modules-left = desktop -modules-center = filesystem -modules-right = bdays webcheck rss mail battery backlight alsa xkeyboard date +modules-center = filesystem +modules-right = bdays webcheck rss mail battery xbacklight xsmartlight alsa xkeyboard date separator = | @@ -81,8 +81,8 @@ tray-padding = 2 ;tray-transparent = true ;tray-background = #0063ff -cursor-click = pointer -cursor-scroll = ns-resize +cursor-click = pointer +cursor-scroll = pointer [module/desktop] ;type = internal/xworkspaces @@ -146,6 +146,10 @@ format-underline = ${colors.green} [module/xkeyboard] type = internal/xkeyboard blacklist-0 = num lock +blacklist-1 = scroll lock + +format = +format-spacing = 0 format-prefix = format-prefix-foreground = ${colors.foreground-alt} @@ -154,11 +158,6 @@ format-prefix-underline = ${colors.secondary} label-layout = [ %layout% ] label-layout-underline = ${colors.secondary} -label-indicator-padding = 2 -label-indicator-margin = 1 -label-indicator-background = ${colors.secondary} -label-indicator-underline = ${colors.secondary} - [module/filesystem] type = internal/fs @@ -238,9 +237,9 @@ animation-charging-2 =  animation-charging-foreground = ${colors.green} animation-charging-framerate = 750 -[module/backlight] -type = internal/backlight -card = intel_backlight +[module/xbacklight] +type = internal/xbacklight +#card = intel_backlight enable-scroll = true @@ -250,4 +249,16 @@ label =  %percentage%% ;label-margin = 1 label-underline = ${colors.cyan} +[module/xsmartlight] +type = custom/script +exec = "cat /tmp/smartscreen_brightness_level; echo %" +interval = 0 + +format-prefix = " " +format-underline = ${colors.alert} + +click-left = "xsmartlight -set" +scroll-up = "xsmartlight -inc 5" +scroll-down = "xsmartlight -dec 5" + ; vim:ft=dosini