diff --git a/README.org b/README.org
index bdfc5f0..2ac5e01 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,5 @@
-#+title: Personal Xmonad Configuration with Xmobar
+#+title: Personal Xmonad Configuration with Polybar
#+author: Sravan Balaji
-#+PROPERTY: header-args:haskell :tangle ./xmonad.hs
#+auto_tangle: t
* Welcome
@@ -16,7 +15,7 @@
* Imports
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
import XMonad hiding ( (|||) )
import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||))
import XMonad.Config.Desktop
@@ -25,9 +24,6 @@
import qualified XMonad.StackSet as W
import qualified Data.Map as M
- -- system
- import System.IO (hPutStrLn)
-
-- util
import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe)
import XMonad.Util.SpawnOnce
@@ -35,13 +31,14 @@
-- hooks
import XMonad.Hooks.DynamicLog
- import XMonad.Hooks.ManageDocks (avoidStruts, docksStartupHook, manageDocks, ToggleStruts(..))
+ import XMonad.Hooks.ManageDocks (docks, avoidStruts, docksStartupHook, manageDocks, ToggleStruts(..))
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers (isFullscreen, isDialog, doFullFloat, doCenterFloat, doRectFloat)
import XMonad.Hooks.Place (placeHook, withGaps, smart)
-- actions
import XMonad.Actions.CopyWindow
+ import XMonad.Actions.CycleWS
-- layout
import XMonad.Layout.NoBorders
@@ -55,7 +52,7 @@
The preferred terminal program, which is used in a binding below and by
certain contrib modules.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myTerminal = "kitty"
#+end_src
@@ -65,14 +62,14 @@ certain contrib modules.
Whether focus follows the mouse pointer.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
#+end_src
Whether clicking on a window to focus also passes the click to the window
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myClickJustFocuses :: Bool
myClickJustFocuses = False
#+end_src
@@ -81,7 +78,7 @@ Whether clicking on a window to focus also passes the click to the window
Width of the window border in pixels.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myBorderWidth = 2
#+end_src
@@ -89,7 +86,7 @@ Width of the window border in pixels.
Border colors for unfocused and focused windows, respectively.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myNormalBorderColor = "#4D4D4D"
myFocusedBorderColor = "#BD93F9"
#+end_src
@@ -113,7 +110,7 @@ of this list.
#+end_src
*Actual Workspace Definition:*
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
#+end_src
@@ -126,7 +123,7 @@ is mod1Mask ("left alt"). You may also consider using mod3Mask
("right alt"), which does not conflict with emacs keybindings. The
"windows key" is usually mod4Mask.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myModMask = mod4Mask
#+end_src
@@ -218,7 +215,7 @@ These default keybindings are left for reference, but are not actually used in m
** EZConfig Keybindings
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myKeys =
[
-- dwm-like add window to a specific workspace
@@ -229,8 +226,8 @@ These default keybindings are left for reference, but are not actually used in m
++
[
-- dwm-like add/remove window to/from all workspaces
- ("M-S-C-a", windows copyToAll) -- copy window to all workspaces
- , ("M-S-C-z", killAllOtherCopies) -- kill copies of window on other workspaces
+ ("M-C-S-a", windows copyToAll) -- copy window to all workspaces
+ , ("M-C-S-z", killAllOtherCopies) -- kill copies of window on other workspaces
-- modify tiled window size
, ("M-a", sendMessage MirrorShrink) -- decrease vertical window size
@@ -243,16 +240,27 @@ These default keybindings are left for reference, but are not actually used in m
, ("M-f", sendMessage $ JumpToLayout "Full")
, ("M-S-f", sequence_
[ withFocused $ windows . W.sink
+ , refresh
, sendMessage $ JumpToLayout "Full"])
, ("M-t", sendMessage $ JumpToLayout "Spacing ResizableTall")
, ("M-S-t", sequence_
[ withFocused $ windows . W.sink
+ , refresh
, sendMessage $ JumpToLayout "Spacing ResizableTall"])
, ("M-g", sendMessage $ JumpToLayout "Spacing Grid")
, ("M-S-g", sequence_
[ withFocused $ windows . W.sink
+ , refresh
, sendMessage $ JumpToLayout "Spacing Grid"])
+ -- cycle & move between screens
+ , ("M-,", prevScreen)
+ , ("M-S-,", shiftPrevScreen)
+ , ("M-C-S-,", swapPrevScreen)
+ , ("M-.", nextScreen)
+ , ("M-S-.", shiftNextScreen)
+ , ("M-C-S-.", swapNextScreen)
+
-- launch rofi
, ("M-p", spawn "rofi -show combi")
, ("M-c", spawn "rofi -show clipboard")
@@ -296,7 +304,7 @@ These default keybindings are left for reference, but are not actually used in m
Mouse bindings: default actions bound to mouse events
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
@@ -324,7 +332,7 @@ defaults, as xmonad preserves your old layout settings by default.
The available layouts. Note that each layout is separated by |||,
which denotes layout choice.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myLayout =
avoidStruts ( tiled ||| grid ||| monocle )
where
@@ -359,7 +367,7 @@ which denotes layout choice.
To match on the WM_NAME, you can use 'title' in the same way that
'className' and 'resource' are used below.
- #+begin_src haskell
+ #+begin_src haskell :tangle xmonad.hs
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
@@ -373,7 +381,7 @@ which denotes layout choice.
Smart placement with a preference for putting windows near the center of the screen, and with 16px gaps at the top and bottom of the screen where no window will be placed.
- #+begin_src haskell
+ #+begin_src haskell :tangle xmonad.hs
myPlacement = withGaps (16,0,16,0) (smart (0.5,0.5))
#+end_src
@@ -385,12 +393,11 @@ Smart placement with a preference for putting windows near the center of the scr
return (All True) if the default handler is to be run afterwards. To
combine event hooks use mappend or mconcat from Data.Monoid.
- *NOT IN USE*
- #+begin_src haskell :tangle no
- myEventHook = mempty
+ #+begin_src haskell :tangle xmonad.hs
+ myEventHook = ewmhDesktopsEventHook
#+end_src
-* Status Bars & Logging
+* Logging
Perform an arbitrary action on each internal state change or X event.
See the ~XMonad.Hooks.DynamicLog~ extension for examples.
@@ -408,7 +415,7 @@ See the ~XMonad.Hooks.DynamicLog~ extension for examples.
with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
per-workspace layout choices.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
myStartupHook = do
-- System Restore Processes
spawnOnce "/home/sravan/.screenlayout/default.sh &" -- restore default screen layout
@@ -416,7 +423,6 @@ See the ~XMonad.Hooks.DynamicLog~ extension for examples.
spawnOnce "numlockx on &" -- enable numlock
-- System Tray Applications
- spawnOnce "volctl &" -- PulseAudio Volume Control
spawnOnce "nyrna &" -- Nyrna Application Suspend
spawnOnce "blueman-applet &" -- Blueman Bluetooth Manager
spawnOnce "nm-applet &" -- Network Manager Applet
@@ -440,12 +446,13 @@ Now run xmonad with all the defaults we set up.
Run xmonad with the settings you specify. No need to modify this.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
main = do
- -- `xmobar -x 0` launches the bar on monitor 0
- xmproc <- spawnPipe "xmobar -x 0 /home/sravan/.xmonad/xmobar.config"
- -- launches xmobar as a dock
- xmonad $ ewmh desktopConfig
+ -- launches polybar
+ spawn "/home/sravan/.xmonad/polybar/launch.sh &"
+
+ -- launches xmonad
+ xmonad $ docks $ ewmh desktopConfig
{ manageHook = manageDocks <+> myManageHook <+> placeHook myPlacement <+> manageHook desktopConfig
, startupHook = myStartupHook
, layoutHook = myLayout
@@ -454,31 +461,22 @@ Run xmonad with the settings you specify. No need to modify this.
, modMask = myModMask
, normalBorderColor = myNormalBorderColor
, focusedBorderColor = myFocusedBorderColor
- , logHook = dynamicLogWithPP xmobarPP
- { ppOutput = \x -> hPutStrLn xmproc x
- , ppCurrent = xmobarColor "green" "" . wrap "[" "]" -- current workspace in xmobar
- , ppVisible = xmobarColor "cyan" "" -- visible but not current workspace
- , ppHidden = xmobarColor "yellow" "" . wrap "+" "" -- hidden workspaces in xmobar
- , ppHiddenNoWindows = xmobarColor "white" "" -- hidden workspaces (no windows)
- , ppTitle = xmobarColor "purple" "" . shorten 80 -- title of active window in xmobar
- , ppSep = " | " -- separators in xmobar
- , ppUrgent = xmobarColor "red" "" . wrap "!" "!" -- urgent workspace
- , ppOrder = \(ws:l:t:ex) -> [ws,l,t]
- }
- -- focusFollowsMouse = myFocusFollowsMouse,
- -- clickJustFocuses = myClickJustFocuses,
- -- workspaces = myWorkspaces,
- -- keys = myKeys,
- -- mouseBindings = myMouseBindings,
- -- handleEventHook = myEventHook,
- } `additionalKeysP` myKeys
+ , handleEventHook = myEventHook
+ , focusFollowsMouse = myFocusFollowsMouse
+ , clickJustFocuses = myClickJustFocuses
+ , workspaces = myWorkspaces
+ , mouseBindings = myMouseBindings
+ -- , logHook = myLogHook
+ -- , keys = myKeys
+ }
+ `additionalKeysP` myKeys
#+end_src
** Default Keybindings Reference
Finally, a copy of the default bindings in simple textual tabular format.
-#+begin_src haskell
+#+begin_src haskell :tangle xmonad.hs
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
@@ -530,9 +528,12 @@ Finally, a copy of the default bindings in simple textual tabular format.
"mod-button3 Set the window to floating mode and resize by dragging"]
#+end_src
-* Xmobar
+* Status Bar
-#+begin_src haskell :tangle ./xmobar.config
+** Xmobar
+
+*NOT IN USE*
+#+begin_src haskell :tangle no
Config { font = "xft:FiraCode Nerd Font Mono:weight=bold:pixelsize=12:antialias=true:hinting=true"
, additionalFonts = []
, borderColor = "black"
@@ -565,3 +566,1292 @@ Finally, a copy of the default bindings in simple textual tabular format.
\{ %cpu% | %memory% * %swap% | %wlp0s20f3% | %date% | %uname%"
}
#+end_src
+
+** Polybar
+
+To learn more about how to configure Polybar go to https://github.com/polybar/polybar
+
+*** General
+
+**** Colors
+
+#+begin_src conf :tangle polybar/config.ini
+ [colors]
+ dark-gray = ${xrdb:background:#282A36}
+ light-gray = ${xrdb:color8:#4D4D4D}
+ lighter-gray = ${xrdb:color7:#BFBFBF}
+ white = ${xrdb:foreground:#F8F8F2}
+ purple = ${xrdb:color4:#BD93F9}
+ blue = ${xrdb:color6:#8BE9FD}
+ red = ${xrdb:color1:#FF5555}
+ pink = ${xrdb:color5:#FF79C6}
+ yellow = ${xrdb:color3:#F1FA8C}
+ green = ${xrdb:color2:#50FA7B}
+ orange = ${xrdb:color16:#FFB86C}
+
+ background = ${self.dark-gray}
+ background-alt = ${self.light-gray}
+ foreground = ${self.white}
+ foreground-alt = ${self.lighter-gray}
+ primary = ${self.purple}
+ secondary = ${self.blue}
+ alert = ${self.red}
+
+ ; left
+ powermenu = ${self.blue}
+ powermenu-close = ${self.blue}
+ powermenu-logout = ${self.orange}
+ powermenu-lock = ${self.purple}
+ powermenu-sleep = ${self.yellow}
+ powermenu-reboot = ${self.green}
+ powermenu-power-off = ${self.red}
+ powermenu-hibernate = ${self.pink}
+ powermenu-cancel = ${self.white}
+
+ xmonad-focused-foreground = ${self.background}
+ xmonad-focused-background = ${self.primary}
+ xmonad-unfocused-foreground = ${self.background}
+ xmonad-unfocused-background = ${self.secondary}
+ xmonad-urgent-foreground = ${self.foreground}
+ xmonad-urgent-background = ${self.alert}
+ xmonad-empty-foreground = ${self.foreground}
+ xmonad-empty-background = ${self.background}
+
+ media-playing = ${self.green}
+
+ ; center
+ date = ${self.blue}
+ time = ${self.yellow}
+
+ ; right
+ user-kernel = ${self.purple}
+ updates = ${self.green}
+ cpu = ${self.yellow}
+ memory = ${self.pink}
+ filesystem = ${self.blue}
+
+ ; right (laptop only)
+ backlight = ${self.yellow}
+ battery = ${self.green}
+
+ ; right (continued)
+ pulseaudio-volume = ${self.red}
+ pulseaudio-muted = ${self.lighter-gray}
+ dunst-notification-status = ${self.purple}
+#+end_src
+
+**** Sizes
+
+#+begin_src conf :tangle polybar/config.ini
+ [sizes]
+ bar-height = ${xrdb:polybar.bar-height:25}
+ module-margin = ${xrdb:polybar.module-margin:2}
+ module-padding = ${xrdb:polybar.module-padding:2}
+ tray-maxsize = ${xrdb:polybar.tray-maxsize:15}
+ tray-scale = ${xrdb:polybar.tray-scale:1}
+ maxlen = ${xrdb:polybar.maxlen:50}
+#+end_src
+
+**** Intervals
+
+Define module update intervals in seconds.
+
+#+begin_src conf :tangle polybar/config.ini
+ [intervals]
+ battery = 30
+ cpu = 1
+ date = 1
+ time = 1
+ filesystem = 60
+ memory = 1
+ pulseaudio = 5
+ updates = 600
+ media-playing = 1
+ dunst-notification-status = 1
+#+end_src
+
+**** Global Window Manager
+
+#+begin_src conf :tangle polybar/config.ini
+ [global/wm]
+ ; Adjust the _NET_WM_STRUT_PARTIAL top value
+ ; Used for top aligned bars
+ margin-bottom = 0
+
+ ; Adjust the _NET_WM_STRUT_PARTIAL bottom value
+ ; Used for bottom aligned bars
+ margin-top = 0
+#+end_src
+
+*** Bars
+
+#+begin_src conf :tangle polybar/config.ini
+ [bar/mybar]
+ ; Use either of the following command to list available outputs:
+ ; If unspecified, the application will pick the first one it finds.
+ ; $ polybar -m | cut -d ':' -f 1
+ ; $ xrandr -q | grep " connected" | cut -d ' ' -f1
+ ; If no monitor is given, the primary monitor is used if it exists
+ monitor = ${env:MONITOR}
+
+ ; Use the specified monitor as a fallback if the main one is not found.
+ ; monitor-fallback =
+
+ ; Require the monitor to be in connected state
+ ; XRandR sometimes reports my monitor as being disconnected (when in use)
+ monitor-strict = false
+
+ ; Use fuzzy matching for monitors (only ignores dashes -)
+ ; Useful when monitors are named differently with different drivers.
+ monitor-exact = true
+
+ ; Tell the Window Manager not to configure the window.
+ ; Use this to detach the bar if your WM is locking its size/position.
+ ; Note: With this most WMs will no longer reserve space for
+ ; the bar and it will overlap other windows. You need to configure
+ ; your WM to add a gap where the bar will be placed.
+ override-redirect = false
+
+ ; Put the bar at the bottom of the screen
+ bottom = false
+
+ ; Prefer fixed center position for the `modules-center` block.
+ ; The center block will stay in the middle of the bar whenever
+ ; possible. It can still be pushed around if other blocks need
+ ; more space.
+ ; When false, the center block is centered in the space between
+ ; the left and right block.
+ fixed-center = true
+
+ ; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
+ ; the percentage can optionally be extended with a pixel offset like so:
+ ; 50%:-10, this will result in a width or height of 50% minus 10 pixels
+ width = 100%
+ height = ${sizes.bar-height}
+
+ ; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
+ ; the percentage can optionally be extended with a pixel offset like so:
+ ; 50%:-10, this will result in an offset in the x or y direction
+ ; of 50% minus 10 pixels
+ offset-x = 0
+ offset-y = 0
+
+ ; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
+ background = ${colors.background}
+
+ ; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
+ foreground = ${colors.foreground}
+
+ ; Background gradient (vertical steps)
+ ; background-[0-9]+ = #aarrggbb
+ ; background-0 =
+
+ ; Value used for drawing rounded corners
+ ; Note: This shouldn't be used together with border-size because the border
+ ; doesn't get rounded. For this to work you may also need to enable
+ ; pseudo-transparency or use a compositor like compton.
+ ; Individual top/bottom values can be defined using:
+ ; radius-{top,bottom}
+ radius = 0.0
+
+ ; Under-/overline pixel size and argb color
+ ; Individual values can be defined using:
+ ; {overline,underline}-size
+ ; {overline,underline}-color
+ line-size = 0
+ line-color = #f00
+
+ ; Values applied to all borders
+ ; Individual side values can be defined using:
+ ; border-{left,top,right,bottom}-size
+ ; border-{left,top,right,bottom}-color
+ ; The top and bottom borders are added to the bar height, so the effective
+ ; window height is:
+ ; height + border-top-size + border-bottom-size
+ ; Meanwhile the effective window width is defined entirely by the width key and
+ ; the border is placed within this area. So you effectively only have the
+ ; following horizontal space on the bar:
+ ; width - border-right-size - border-left-size
+ ; border-size can be defined as pixel value (e.g. 35) or percentage (e.g. 50%),
+ ; the percentage can optionally be extended with a pixel offset like so:
+ ; 50%:-10, this will result in 50% minus 10 pixels. The percentage is relative
+ ; to the monitor width or height depending on the border direction.
+ ; border-size =
+ ; border-color =
+
+ ; Number of spaces to add at the beginning/end of the bar
+ ; Individual side values can be defined using:
+ ; padding-{left,right}
+ padding-right = ${self.module-margin}
+
+ ; Number of spaces to add before/after each module
+ ; Individual side values can be defined using:
+ ; module-margin-{left,right}
+ module-margin = ${sizes.module-margin}
+
+ ; Fonts are defined using ;
+ ; Font names are specified using a fontconfig pattern.
+ ; font-0 = NotoSans-Regular:size=8;2
+ ; font-1 = MaterialIcons:size=10
+ ; font-2 = Termsynu:size=8;-1
+ ; font-3 = FontAwesome:size=10
+ ; See the Fonts wiki page for more details
+ font-0 = "NotoSans Nerd Font:size=11;3"
+ font-1 = "FiraCode Nerd Font:size=11;3"
+ font-2 = "Droid Sans Mono:size=11;3"
+ font-3 = "IPAPGothic:size=11;3"
+
+ ; Modules are added to one of the available blocks
+ ; modules-left = cpu ram
+ ; modules-center = xwindow xbacklight
+ ; modules-right = ipc clock
+ modules-left = powermenu ewmh media-playing
+ modules-center = date time
+ modules-right = user-kernel updates cpu memory filesystem backlight battery pulseaudio dunst-notification-status
+
+ ; The separator will be inserted between the output of each module
+ separator = " "
+
+ ; This value is used to add extra spacing between elements
+ ; @deprecated: This parameter will be removed in an upcoming version
+ ; spacing = 0
+
+ ; Opacity value between 0.0 and 1.0 used on fade in/out
+ dim-value = 1.0
+
+ ; Value to be used to set the WM_NAME atom
+ ; If the value is empty or undefined, the atom value
+ ; will be created from the following template: polybar-[BAR]_[MONITOR]
+ ; NOTE: The placeholders are not available for custom values
+ ; wm-name =
+
+ ; Locale used to localize various module data (e.g. date)
+ ; Expects a valid libc locale, for example: sv_SE.UTF-8
+ locale = en_US.utf8
+
+ ; Position of the system tray window
+ ; If empty or undefined, tray support will be disabled
+ ; NOTE: A center aligned tray will cover center aligned modules
+ ;
+ ; Available positions:
+ ; left
+ ; center
+ ; right
+ ; none
+ tray-position = ${env:TRAY_POS}
+
+ ; If true, the bar will not shift its
+ ; contents when the tray changes
+ tray-detached = false
+
+ ; Tray icon max size
+ tray-maxsize = ${sizes.tray-maxsize}
+
+ ; DEPRECATED! Since 3.3.0 the tray always uses pseudo-transparency
+ ; Enable pseudo transparency
+ ; Will automatically be enabled if a fully transparent
+ ; background color is defined using `tray-background`
+ ; tray-transparent = false
+
+ ; Background color for the tray container
+ ; ARGB color (e.g. #f00, #ff992a, #ddff1023)
+ ; By default the tray container will use the bar
+ ; background color.
+ tray-background = ${colors.background}
+
+ ; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
+ tray-offset-x = 0
+ tray-offset-y = 0
+
+ ; Pad the sides of each tray icon
+ tray-padding = ${self.module-margin}
+
+ ; Scale factor for tray clients
+ tray-scale = ${sizes.tray-scale}
+
+ ; Restack the bar window. Fixes the issue where the
+ ; bar is being drawn on top of fullscreen windows.
+ ;
+ ; Currently supported options:
+ ; generic (works in xmonad, may work with other WMs)
+ ; bspwm
+ ; i3 (requires: `override-redirect = true`)
+ wm-restack = generic
+
+ ; Set a DPI values used when rendering text
+ ; This only affects scalable fonts
+ ; Set this to 0 to let polybar calculate the dpi from the screen size.
+ ; dpi =
+ dpi-x = ${xrdb:dpi}
+ dpi-y = ${xrdb:dpi}
+
+ ; Enable support for inter-process messaging
+ ; See the Messaging wiki page for more details.
+ enable-ipc = true
+
+ ; Fallback click handlers that will be called if
+ ; there's no matching module handler found.
+ ; click-left =
+ ; click-middle =
+ ; click-right =
+ ; scroll-up =
+ ; scroll-down =
+ ; double-click-left =
+ ; double-click-middle =
+ ; double-click-right =
+
+ ; Requires polybar to be built with xcursor support (xcb-util-cursor)
+ ; Possible values are:
+ ; - default : The default pointer as before, can also be an empty string (default)
+ ; - pointer : Typically in the form of a hand
+ ; - ns-resize : Up and down arrows, can be used to indicate scrolling
+ cursor-click = pointer
+ cursor-scroll = ns-resize
+#+end_src
+
+*** Modules
+
+**** EWMH
+
+#+begin_src conf :tangle polybar/config.ini
+ [module/ewmh]
+ type = internal/xworkspaces
+
+ ; Only show workspaces defined on the same output as the bar
+ ;
+ ; Useful if you want to show monitor specific workspaces
+ ; on different bars
+ ;
+ ; Default: false
+ pin-workspaces = false
+
+ ; Create click handler used to focus desktop
+ ; Default: true
+ enable-click = true
+
+ ; Create scroll handlers used to cycle desktops
+ ; Default: true
+ enable-scroll = true
+
+ ; icon-[0-9]+ = ;
+ ; NOTE: The desktop name needs to match the name configured by the WM
+ ; You can get a list of the defined desktops using:
+ ; $ xprop -root _NET_DESKTOP_NAMES
+ ; Note: Neither nor can contain a semicolon (;)
+ ; icon-0 = code;♚
+ ; icon-1 = office;♛
+ ; icon-2 = graphics;♜
+ ; icon-3 = mail;♝
+ ; icon-4 = web;♞
+ ; icon-default = ♟
+ icon-0 = 1; ₁
+ icon-1 = 2;龎 ₂
+ icon-2 = 3; ₃
+ icon-3 = 4; ₄
+ icon-4 = 5;爵 ₅
+ icon-5 = 6; ₆
+ icon-6 = 7; ₇
+ icon-7 = 8; ₈
+ icon-8 = 9; ₉
+
+ ; Available tags:
+ ;
+ ; - gets replaced with
+ ; Default:
+ format =
+
+ ; Available tokens:
+ ; %name%
+ ; Default: %name%
+ label-monitor = %name%
+
+ ; Available tokens:
+ ; %name%
+ ; %icon%
+ ; %index%
+ ; Default: %icon% %name%
+ label-active = %icon%
+ label-active-foreground = ${colors.xmonad-focused-foreground}
+ label-active-background = ${colors.xmonad-focused-background}
+ label-active-underline = ${colors.xmonad-focused-background}
+ label-active-padding = ${sizes.module-padding}
+
+ ; Available tokens:
+ ; %name%
+ ; %icon%
+ ; %index%
+ ; Default: %icon% %name%
+ label-occupied = %icon%
+ label-occupied-foreground = ${colors.xmonad-unfocused-foreground}
+ label-occupied-background = ${colors.xmonad-unfocused-background}
+ label-occupied-underline = ${colors.xmonad-unfocused-background}
+ label-occupied-padding = ${sizes.module-padding}
+
+ ; Available tokens:
+ ; %name%
+ ; %icon%
+ ; %index%
+ ; Default: %icon% %name%
+ label-urgent = %icon%
+ label-urgent-foreground = ${colors.xmonad-urgent-foreground}
+ label-urgent-background = ${colors.xmonad-urgent-background}
+ label-urgent-underline = ${colors.xmonad-urgent-background}
+ label-urgent-padding = ${sizes.module-padding}
+
+ ; Available tokens:
+ ; %name%
+ ; %icon%
+ ; %index%
+ ; Default: %icon% %name%
+ label-empty = %icon%
+ label-empty-foreground = ${colors.xmonad-empty-foreground}
+ label-empty-background = ${colors.xmonad-empty-background}
+ label-empty-underline = ${colors.xmonad-empty-background}
+ label-empty-padding = ${sizes.module-padding}
+#+end_src
+
+**** Backlight
+
+#+begin_src conf :tangle polybar/config.ini
+ [module/backlight]
+ type = internal/backlight
+
+ ; Use the following command to list available cards:
+ ; $ ls -1 /sys/class/backlight/
+ card = intel_backlight
+
+ ; Enable changing the backlight with the scroll wheel (unreleased)
+ ; NOTE: This may require additional configuration on some systems. Polybar will
+ ; write to `/sys/class/backlight/${self.card}/brightness` which requires polybar
+ ; to have write access to that file.
+ ; DO NOT RUN POLYBAR AS ROOT.
+ ; The recommended way is to add the user to the
+ ; `video` group and give that group write-privileges for the `brightness` file.
+ ; See the ArchWiki for more information:
+ ; https://wiki.archlinux.org/index.php/Backlight#ACPI
+ ; Default: false
+ enable-scroll = true
+
+ ; Available tags:
+ ;