From 552b92a474b76d10a56ce969f19101fa66f29560 Mon Sep 17 00:00:00 2001 From: Daniele Fucini Date: Sun, 5 May 2024 22:07:06 +0200 Subject: [PATCH] Add volume info to xmobar --- .config/xmobar/xmobarrc_hdmi | 3 ++- .config/xmobar/xmobarrc_laptop | 3 ++- .config/xmonad/xmonad.hs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/xmobar/xmobarrc_hdmi b/.config/xmobar/xmobarrc_hdmi index 3416a4e..1ac8449 100644 --- a/.config/xmobar/xmobarrc_hdmi +++ b/.config/xmobar/xmobarrc_hdmi @@ -50,9 +50,10 @@ Config { overrideRedirect = True [ "--template" , "\xf017 Uptime: d h m" ] 600 , Run XPropertyLog "_XMONAD_TRAYPAD" + , Run Com "/home/fuxino/.config/xmobar/pactl_volume.sh" [] "pactl_volume" 10 , Run XMonadLog ] , sepChar = "%" , alignSep = "}{" - , template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %date% %_XMONAD_TRAYPAD%" + , template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %date%  %pactl_volume% %_XMONAD_TRAYPAD%" } diff --git a/.config/xmobar/xmobarrc_laptop b/.config/xmobar/xmobarrc_laptop index efd3541..8121192 100644 --- a/.config/xmobar/xmobarrc_laptop +++ b/.config/xmobar/xmobarrc_laptop @@ -49,9 +49,10 @@ Config { overrideRedirect = False , Run Uptime [ "--template" , "\xf017 Uptime: d h m" ] 600 + , Run Com "/home/fuxino/.config/xmobar/pactl_volume.sh" [] "pactl_volume" 10 , Run XMonadLog ] , sepChar = "%" , alignSep = "}{" - , template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %date% " + , template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %date%  %pactl_volume% " } diff --git a/.config/xmonad/xmonad.hs b/.config/xmonad/xmonad.hs index 18585d2..d49450a 100644 --- a/.config/xmonad/xmonad.hs +++ b/.config/xmonad/xmonad.hs @@ -176,7 +176,7 @@ myXmobarPP = def formatUnfocused = wrap (surface0 "[") (surface0 "]") . white . ppWindow ppWindow :: String -> String - ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30 + ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 20 surface0, teal, red, white, yellow :: String -> String teal = xmobarColor "#81c8be" ""