From cde7c7d10f27476e663197980594e5bd20554a54 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Tue, 1 Nov 2022 01:42:12 +0000 Subject: [PATCH] Added 'Playing' Section on Xmobar --- .config/xmobar/xmobarrc0 | 6 +++++- .config/xmonad/xmonad.lhs | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.config/xmobar/xmobarrc0 b/.config/xmobar/xmobarrc0 index ca38025..2f630d9 100644 --- a/.config/xmobar/xmobarrc0 +++ b/.config/xmobar/xmobarrc0 @@ -28,6 +28,7 @@ Config {font = "xft:Ubuntu:weight=bold:pixelsize=14:antialias=true:hinting=true" , commands = [ Run UnsafeXPropertyLog "_XMONAD_LOG_0" , Run Date "%a, %d %b  %H:%M:%S" "date" 10 + , Run Mpris2 "playerctld" ["-t", " - </fc>"] 10 , Run Memory ["-t","Mem: <fc=#AAC0F0><usedratio></fc>%"] 10 , Run Com "/home/afonso/.config/xmobar/scripts/cpu_temp.sh" [] "cpu" 10 , Run Com "/home/afonso/.config/xmobar/scripts/gpu_util.sh" [] "gpu" 10 @@ -44,7 +45,10 @@ Config {font = "xft:Ubuntu:weight=bold:pixelsize=14:antialias=true:hinting=true" \%_XMONAD_LOG_0%\ \}\ \%date%\ - \{\ + \{\ + \Playing: %mpris2%\ + \ \ + \|\ \ \ \%memory%\ \ \ diff --git a/.config/xmonad/xmonad.lhs b/.config/xmonad/xmonad.lhs index 1770487..a730295 100644 --- a/.config/xmonad/xmonad.lhs +++ b/.config/xmonad/xmonad.lhs @@ -235,11 +235,9 @@ Percent of screen to increment by when resizing panes \subsubsection{Startup Hook} \begin{code} myStartupHook = do - spawn "setxkbmap -layout us,pt" - spawn "setxkbmap -option grp:win_space_toggle" - spawn "setxkbmap -option caps:escape" spawnOnce "pasystray" spawnOnce "nitrogen --restore &" + spawnOnce "playerctld" spawnOnce "picom &" spawnOnce "optimus-manager-qt" setWMName "LG3D" @@ -250,6 +248,10 @@ Percent of screen to increment by when resizing panes spawn ("killall trayer ;sleep 1 && trayer --monitor 0 --edge top --align right --widthtype request --padding 7 --iconspacing 12 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x2B2E37 --height 26 --distance 5 &") spawnOn "web" myWebBrowser spawnOn "main" myTerminal + spawn "setxkbmap -layout us,pt" + spawn "setxkbmap -option grp:win_space_toggle" + spawn "setxkbmap -option caps:escape" + \end{code}