From 5cfad0aa0833b943f391f55dac126f6f140aa607 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Tue, 28 Feb 2023 13:40:02 -0600 Subject: [PATCH] Working on polybar for use with Xmonad. --- .config/polybar/config | 20 +++++++++++------ .config/xmonad/xmonad-with-polybar.org | 2 +- .config/xmonad/xmonad.hs | 30 +++++++++++++------------- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index 646e61b..cc69d65 100755 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -500,7 +500,7 @@ font-2 = "Font Awesome 6 Free:style=Regular:pixelsize=8;1" font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;1" font-4 = "Font Awesome 6 Brands:pixelsize=8;1" -modules-left = ewmh +modules-left = ewmh xwindow modules-center = modules-right = kernel networkspeed memory2 cpu2 pavolume arch-aur-updates date @@ -1074,24 +1074,31 @@ label-monitor = %name% label-active = %name% label-active-foreground = ${colors.foreground} label-active-background = ${colors.background} -label-active-underline= #6790eb label-active-padding = 1 +label-active-underline = ${colors.color5} +label-active-margin = 2 label-occupied = %name% label-occupied-background = ${colors.background} label-occupied-padding = 1 +label-occupied-underline = ${colors.color12} +label-occupied-margin = 2 label-urgent = %name% label-urgent-foreground = ${colors.foreground} label-urgent-background = ${colors.alert} label-urgent-underline = ${colors.alert} label-urgent-padding = 1 +label-urgent-margin = 2 label-empty = %name% label-empty-foreground = ${colors.foreground} label-empty-padding = 1 +label-empty-margin = 2 + format-foreground = ${colors.foreground} format-background = ${colors.background} +;;format-underline = ${colors.color14} ################################################################################ @@ -1710,11 +1717,12 @@ type = internal/xwindow label = %title% label-maxlen = 50 -format-prefix = " " -format-prefix-underline = #292d3e -format-underline = #e1acff -format-foreground = #e1acff +format-prefix = "* " +format-suffix = " *" +format-foreground = ${colors.color10} format-background = ${colors.background} +format-margin = 2 +format-padding = 0 ############################################################################### # vim:ft=dosini diff --git a/.config/xmonad/xmonad-with-polybar.org b/.config/xmonad/xmonad-with-polybar.org index 2c9ed02..4e1396e 100644 --- a/.config/xmonad/xmonad-with-polybar.org +++ b/.config/xmonad/xmonad-with-polybar.org @@ -532,7 +532,7 @@ I have made my workspaces in xmobar "clickable." Clickable workspaces means the #+begin_src haskell -- myWorkspaces = [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] -- myWorkspaces = [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] -myWorkspaces = [" 1 : dev ", " 2 : www ", " 3 : sys ", " 4 : doc ", " 5 : vbox ", " 6 : chat ", " 7 : mus ", " 8 : vid ", " 9 : gfx "] +myWorkspaces = ["1: dev", "2: www", "3: sys", "4: doc", "5: vbox", "6: chat", "7: mus", "8: vid", "9: gfx"] #+END_SRC * Managehook diff --git a/.config/xmonad/xmonad.hs b/.config/xmonad/xmonad.hs index a4f8785..291ab5f 100644 --- a/.config/xmonad/xmonad.hs +++ b/.config/xmonad/xmonad.hs @@ -1,4 +1,4 @@ - -- Base +-- Base import XMonad import System.Directory import System.IO (hClose, hPutStr, hPutStrLn) @@ -125,21 +125,21 @@ myStartupHook = do spawn "killall conky" -- kill current conky on each restart spawn "killall polybar" -- kill current polybar on each restart - spawnOnce "lxsession" - spawnOnce "picom" - spawnOnce "nm-applet" - spawnOnce "volumeicon" - spawnOnce "notify-log $HOME/.log/notify.log" - spawn "/usr/bin/emacs --daemon" -- emacs daemon for the emacsclient +spawnOnce "lxsession" +spawnOnce "picom" +spawnOnce "nm-applet" +spawnOnce "volumeicon" +spawnOnce "notify-log $HOME/.log/notify.log" +spawn "/usr/bin/emacs --daemon" -- emacs daemon for the emacsclient - spawn ("sleep 2 && conky -c $HOME/.config/conky/xmonad/" ++ colorScheme ++ "-01.conkyrc") - spawn "sleep 2 && $HOME/.config/polybar/launch.sh" +spawn ("sleep 2 && conky -c $HOME/.config/conky/xmonad/" ++ colorScheme ++ "-01.conkyrc") +spawn "sleep 2 && $HOME/.config/polybar/launch.sh" - spawnOnce "xargs xwallpaper --stretch < ~/.cache/wall" - -- spawnOnce "~/.fehbg &" -- set last saved feh wallpaper - -- spawnOnce "feh --randomize --bg-fill /usr/share/backgrounds/dtos-backgrounds/*" -- feh set random wallpaper - -- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh - setWMName "LG3D" +spawnOnce "xargs xwallpaper --stretch < ~/.cache/wall" +-- spawnOnce "~/.fehbg &" -- set last saved feh wallpaper +-- spawnOnce "feh --randomize --bg-fill /usr/share/backgrounds/dtos-backgrounds/*" -- feh set random wallpaper +-- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh +setWMName "LG3D" myNavigation :: TwoD a (Maybe a) myNavigation = makeXEventhandler $ shadowWithKeymap navKeyMap navDefaultHandler @@ -440,7 +440,7 @@ myLayoutHook = avoidStruts -- myWorkspaces = [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] -- myWorkspaces = [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] -myWorkspaces = [" 1 : dev ", " 2 : www ", " 3 : sys ", " 4 : doc ", " 5 : vbox ", " 6 : chat ", " 7 : mus ", " 8 : vid ", " 9 : gfx "] +myWorkspaces = ["1: dev", "2: www", "3: sys", "4: doc", "5: vbox", "6: chat", "7: mus", "8: vid", "9: gfx"] myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet) myManageHook = composeAll