From 9327785e0142ce4bad013ce458fac8f797df0466 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Sat, 11 Sep 2021 10:11:13 -0400 Subject: [PATCH] Clean Up README.org - Remove leading whitespace from README.org --- README.org | 2260 ++++++++++++++++++++++++++-------------------------- 1 file changed, 1130 insertions(+), 1130 deletions(-) diff --git a/README.org b/README.org index 725d764..08651b5 100644 --- a/README.org +++ b/README.org @@ -5,47 +5,47 @@ * Welcome - My personal configuration of Xmonad, written as an [[https://orgmode.org][Org Mode]] document. +My personal configuration of Xmonad, written as an [[https://orgmode.org][Org Mode]] document. - Run the block below with ~C-c C-c~ to tangle code blocks to config file. +Run the block below with ~C-c C-c~ to tangle code blocks to config file. #+begin_src emacs-lisp :tangle no - (org-mode-restart) - (org-babel-tangle) +(org-mode-restart) +(org-babel-tangle) #+end_src * Imports #+begin_src haskell :tangle xmonad.hs - import XMonad hiding ( (|||) ) - import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||)) - import XMonad.Config.Desktop - import Data.Monoid - import System.Exit - import qualified XMonad.StackSet as W - import qualified Data.Map as M +import XMonad hiding ( (|||) ) +import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||)) +import XMonad.Config.Desktop +import Data.Monoid +import System.Exit +import qualified XMonad.StackSet as W +import qualified Data.Map as M - -- util - import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe) - import XMonad.Util.SpawnOnce - import XMonad.Util.EZConfig (additionalKeysP, additionalMouseBindings) +-- util +import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe) +import XMonad.Util.SpawnOnce +import XMonad.Util.EZConfig (additionalKeysP, additionalMouseBindings) - -- hooks - import XMonad.Hooks.DynamicLog - import XMonad.Hooks.ManageDocks (docks, avoidStruts, docksStartupHook, manageDocks, ToggleStruts(..), SetStruts(..)) - import XMonad.Hooks.EwmhDesktops - import XMonad.Hooks.ManageHelpers (isFullscreen, isDialog, doFullFloat, doCenterFloat, doRectFloat) - import XMonad.Hooks.Place (placeHook, withGaps, smart) +-- hooks +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.ManageDocks (docks, avoidStruts, docksStartupHook, manageDocks, ToggleStruts(..), SetStruts(..)) +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 +-- actions +import XMonad.Actions.CopyWindow +import XMonad.Actions.CycleWS - -- layout - import XMonad.Layout.NoBorders - import XMonad.Layout.Spacing (spacingRaw, Border(Border)) - import XMonad.Layout.GridVariants (Grid(Grid)) - import XMonad.Layout.ResizableTile +-- layout +import XMonad.Layout.NoBorders +import XMonad.Layout.Spacing (spacingRaw, Border(Border)) +import XMonad.Layout.GridVariants (Grid(Grid)) +import XMonad.Layout.ResizableTile #+end_src * Terminal @@ -54,7 +54,7 @@ The preferred terminal program, which is used in a binding below and by certain contrib modules. #+begin_src haskell :tangle xmonad.hs - myTerminal = "alacritty" +myTerminal = "alacritty" #+end_src * Window Behavior & Appearance @@ -64,15 +64,15 @@ certain contrib modules. Whether focus follows the mouse pointer. #+begin_src haskell :tangle xmonad.hs - myFocusFollowsMouse :: Bool - myFocusFollowsMouse = True +myFocusFollowsMouse :: Bool +myFocusFollowsMouse = True #+end_src Whether clicking on a window to focus also passes the click to the window #+begin_src haskell :tangle xmonad.hs - myClickJustFocuses :: Bool - myClickJustFocuses = False +myClickJustFocuses :: Bool +myClickJustFocuses = False #+end_src ** Window Border Size @@ -80,7 +80,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 :tangle xmonad.hs - myBorderWidth = 2 +myBorderWidth = 2 #+end_src ** Window Border Colors @@ -88,8 +88,8 @@ Width of the window border in pixels. Border colors for unfocused and focused windows, respectively. #+begin_src haskell :tangle xmonad.hs - myNormalBorderColor = "#4D4D4D" - myFocusedBorderColor = "#BD93F9" +myNormalBorderColor = "#4D4D4D" +myFocusedBorderColor = "#BD93F9" #+end_src * Workspaces @@ -102,19 +102,19 @@ of this list. *NOT IN USE: A tagging example:* #+begin_src haskell :tangle no - workspaces = ["web", "irc", "code" ] ++ map show [4..9] +workspaces = ["web", "irc", "code" ] ++ map show [4..9] #+end_src *NOT IN USE: Workspace Names w/ Icons:* #+begin_src haskell :tangle no - myWorkspaces = ["\xf868\x2081", "\xfd2c\x2082", "\xf2ce\x2083", "\xf1bc\x2084", "\xfa9e\x2085", "\xe795\x2086", "\xf667\x2087", "\xf11b\x2088", "\xf085\x2089"] - myWorkspaces = ["1:\xf868", "2:\xfd2c", "3:\xf2ce", "4:\xf1bc", "5:\xfa9e", "6:\xe795", "7:\xf667", "8:\xf11b", "9:\xf085"] +myWorkspaces = ["\xf868\x2081", "\xfd2c\x2082", "\xf2ce\x2083", "\xf1bc\x2084", "\xfa9e\x2085", "\xe795\x2086", "\xf667\x2087", "\xf11b\x2088", "\xf085\x2089"] +myWorkspaces = ["1:\xf868", "2:\xfd2c", "3:\xf2ce", "4:\xf1bc", "5:\xfa9e", "6:\xe795", "7:\xf667", "8:\xf11b", "9:\xf085"] #+end_src *Actual Workspace Definition:* #+begin_src haskell :tangle xmonad.hs - myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] +myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"] #+end_src * Keybindings @@ -127,7 +127,7 @@ is mod1Mask ("left alt"). You may also consider using mod3Mask "windows key" is usually mod4Mask. #+begin_src haskell :tangle xmonad.hs - myModMask = mod4Mask +myModMask = mod4Mask #+end_src ** Default Keybindings @@ -137,187 +137,187 @@ These default keybindings are left for reference, but are not actually used in m *NOT IN USE* #+begin_src haskell :tangle no - myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ - -- launch a terminal - [ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) +myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ + -- launch a terminal + [ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) - -- launch rofi drun - , ((modm, xK_p ), spawn "rofi -show drun") + -- launch rofi drun + , ((modm, xK_p ), spawn "rofi -show drun") - -- close focused window - , ((modm .|. shiftMask, xK_c ), kill) + -- close focused window + , ((modm .|. shiftMask, xK_c ), kill) - -- Rotate through the available layout algorithms - , ((modm, xK_space ), sendMessage NextLayout) + -- Rotate through the available layout algorithms + , ((modm, xK_space ), sendMessage NextLayout) - -- Reset the layouts on the current workspace to default - , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) + -- Reset the layouts on the current workspace to default + , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) - -- Resize viewed windows to the correct size - , ((modm, xK_n ), refresh) + -- Resize viewed windows to the correct size + , ((modm, xK_n ), refresh) - -- Move focus to the next window - , ((modm, xK_Tab ), windows W.focusDown) + -- Move focus to the next window + , ((modm, xK_Tab ), windows W.focusDown) - -- Move focus to the next window - , ((modm, xK_j ), windows W.focusDown) + -- Move focus to the next window + , ((modm, xK_j ), windows W.focusDown) - -- Move focus to the previous window - , ((modm, xK_k ), windows W.focusUp ) + -- Move focus to the previous window + , ((modm, xK_k ), windows W.focusUp ) - -- Move focus to the master window - , ((modm, xK_m ), windows W.focusMaster ) + -- Move focus to the master window + , ((modm, xK_m ), windows W.focusMaster ) - -- Swap the focused window and the master window - , ((modm, xK_Return), windows W.swapMaster) + -- Swap the focused window and the master window + , ((modm, xK_Return), windows W.swapMaster) - -- Swap the focused window with the next window - , ((modm .|. shiftMask, xK_j ), windows W.swapDown ) + -- Swap the focused window with the next window + , ((modm .|. shiftMask, xK_j ), windows W.swapDown ) - -- Swap the focused window with the previous window - , ((modm .|. shiftMask, xK_k ), windows W.swapUp ) + -- Swap the focused window with the previous window + , ((modm .|. shiftMask, xK_k ), windows W.swapUp ) - -- Shrink the master area - , ((modm, xK_h ), sendMessage Shrink) + -- Shrink the master area + , ((modm, xK_h ), sendMessage Shrink) - -- Expand the master area - , ((modm, xK_l ), sendMessage Expand) + -- Expand the master area + , ((modm, xK_l ), sendMessage Expand) - -- Push window back into tiling - , ((modm, xK_t ), withFocused $ windows . W.sink) + -- Push window back into tiling + , ((modm, xK_t ), withFocused $ windows . W.sink) - -- Increment the number of windows in the master area - , ((modm, xK_i ), sendMessage (IncMasterN 1)) + -- Increment the number of windows in the master area + , ((modm, xK_i ), sendMessage (IncMasterN 1)) - -- Deincrement the number of windows in the master area - , ((modm, xK_d), sendMessage (IncMasterN (-1))) + -- Deincrement the number of windows in the master area + , ((modm, xK_d), sendMessage (IncMasterN (-1))) - -- Quit xmonad - , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) + -- Quit xmonad + , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) - -- Restart xmonad - , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") + -- Restart xmonad + , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") - -- Run xmessage with a summary of the default keybindings (useful for beginners) - , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) - ] - ++ + -- Run xmessage with a summary of the default keybindings (useful for beginners) + , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) + ] + ++ - -- mod-[1..9], Switch to workspace N - -- mod-shift-[1..9], Move client to workspace N - [((m .|. modm, k), windows $ f i) - | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] - , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] - ++ + -- mod-[1..9], Switch to workspace N + -- mod-shift-[1..9], Move client to workspace N + [((m .|. modm, k), windows $ f i) + | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] + , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] + ++ - -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 - -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 - [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) - | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] - , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] + -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 + -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 + [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) + | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] + , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] #+end_src ** EZConfig Keybindings #+begin_src haskell :tangle xmonad.hs - myKeys = - [ - -- dwm-like add window to a specific workspace - ("M-" ++ m ++ k, windows $ f i) - | (i, k) <- zip (myWorkspaces) (map show [1 :: Int ..]) - , (f, m) <- [(W.view, ""), (W.shift, "S-"), (copy, "S-C-")] - ] - ++ - [ - -- dwm-like add/remove window to/from all workspaces - ("M-C-S-a", windows copyToAll) -- copy window to all workspaces - , ("M-C-S-z", killAllOtherCopies) -- kill copies of window on other workspaces +myKeys = + [ + -- dwm-like add window to a specific workspace + ("M-" ++ m ++ k, windows $ f i) + | (i, k) <- zip (myWorkspaces) (map show [1 :: Int ..]) + , (f, m) <- [(W.view, ""), (W.shift, "S-"), (copy, "S-C-")] + ] + ++ + [ + -- dwm-like add/remove window to/from all 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 - , ("M-z", sendMessage MirrorExpand) -- increase vertical window size + -- modify tiled window size + , ("M-a", sendMessage MirrorShrink) -- decrease vertical window size + , ("M-z", sendMessage MirrorExpand) -- increase vertical window size - -- toggle struts for xmobar - , ("M-s", sendMessage ToggleStruts) + -- toggle struts for xmobar + , ("M-s", sendMessage ToggleStruts) - -- full mode w/ all gaps - , ("M-f", sequence_ - [ sendMessage $ JumpToLayout "Full" - , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- full mode w/ all gaps and flatten floating windows - , ("M-S-f", sequence_ - [ withFocused $ windows . W.sink - , refresh - , sendMessage $ JumpToLayout "Full" - , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- full mode w/ no gaps and flatten floating windows - , ("M-C-S-f", sequence_ - [ withFocused $ windows . W.sink - , refresh - , sendMessage $ JumpToLayout "Full" - , sendMessage $ SetStruts [] [minBound .. maxBound]]) - -- tall mode w/ all gaps - , ("M-t", sequence_ - [ sendMessage $ JumpToLayout "Spacing ResizableTall" - , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- tall mode w/ all gaps and flatten floating windows - , ("M-S-t", sequence_ - [ withFocused $ windows . W.sink - , refresh - , sendMessage $ JumpToLayout "Spacing ResizableTall" - , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- grid mode w/ all gaps - , ("M-g", sequence_ - [ sendMessage $ JumpToLayout "Spacing Grid" - , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- grid mode w/ all gaps and flatten floating windows - , ("M-S-g", sequence_ - [ withFocused $ windows . W.sink - , refresh - , sendMessage $ JumpToLayout "Spacing Grid" - , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- full mode w/ all gaps + , ("M-f", sequence_ + [ sendMessage $ JumpToLayout "Full" + , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- full mode w/ all gaps and flatten floating windows + , ("M-S-f", sequence_ + [ withFocused $ windows . W.sink + , refresh + , sendMessage $ JumpToLayout "Full" + , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- full mode w/ no gaps and flatten floating windows + , ("M-C-S-f", sequence_ + [ withFocused $ windows . W.sink + , refresh + , sendMessage $ JumpToLayout "Full" + , sendMessage $ SetStruts [] [minBound .. maxBound]]) + -- tall mode w/ all gaps + , ("M-t", sequence_ + [ sendMessage $ JumpToLayout "Spacing ResizableTall" + , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- tall mode w/ all gaps and flatten floating windows + , ("M-S-t", sequence_ + [ withFocused $ windows . W.sink + , refresh + , sendMessage $ JumpToLayout "Spacing ResizableTall" + , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- grid mode w/ all gaps + , ("M-g", sequence_ + [ sendMessage $ JumpToLayout "Spacing Grid" + , sendMessage $ SetStruts [minBound .. maxBound] []]) + -- grid mode w/ all gaps and flatten floating windows + , ("M-S-g", sequence_ + [ withFocused $ windows . W.sink + , refresh + , sendMessage $ JumpToLayout "Spacing Grid" + , sendMessage $ SetStruts [minBound .. maxBound] []]) - -- cycle & move between screens - , ("M-,", prevScreen) - , ("M-S-,", shiftPrevScreen) - , ("M-C-S-,", swapPrevScreen) - , ("M-.", nextScreen) - , ("M-S-.", shiftNextScreen) - , ("M-C-S-.", swapNextScreen) + -- 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-S-p", spawn "/home/sravan/.scripts/control-center.sh --rofi") - , ("M-c", spawn "rofi -show clipboard") - , ("M-b", spawn "rofi-rbw") + -- launch rofi + , ("M-p", spawn "rofi -show combi") + , ("M-S-p", spawn "/home/sravan/.scripts/control-center.sh --rofi") + , ("M-c", spawn "rofi -show clipboard") + , ("M-b", spawn "rofi-rbw") - -- volume control - , ("", spawn "/home/sravan/.scripts/pactl.sh --raise") -- increase volume - , ("", spawn "/home/sravan/.scripts/pactl.sh --lower") -- decrease volume - , ("", spawn "/home/sravan/.scripts/pactl.sh --mute") -- mute volume - , ("M-v", spawn "/home/sravan/.scripts/pactl.sh --rofi") -- rofi menu + -- volume control + , ("", spawn "/home/sravan/.scripts/pactl.sh --raise") -- increase volume + , ("", spawn "/home/sravan/.scripts/pactl.sh --lower") -- decrease volume + , ("", spawn "/home/sravan/.scripts/pactl.sh --mute") -- mute volume + , ("M-v", spawn "/home/sravan/.scripts/pactl.sh --rofi") -- rofi menu - -- media control - , ("", spawn "/home/sravan/.scripts/playerctl.sh --play-pause") -- play / pause - , ("M-m", spawn "/home/sravan/.scripts/playerctl.sh --rofi") -- rofi menu + -- media control + , ("", spawn "/home/sravan/.scripts/playerctl.sh --play-pause") -- play / pause + , ("M-m", spawn "/home/sravan/.scripts/playerctl.sh --rofi") -- rofi menu - -- notification control - , ("M-n", spawn "/home/sravan/.scripts/dunst.sh --rofi") -- rofi menu + -- notification control + , ("M-n", spawn "/home/sravan/.scripts/dunst.sh --rofi") -- rofi menu - -- session control - , ("M-q", spawn "/home/sravan/.scripts/session.sh --rofi") -- rofi menu - , ("M-S-q", io (exitWith ExitSuccess)) + -- session control + , ("M-q", spawn "/home/sravan/.scripts/session.sh --rofi") -- rofi menu + , ("M-S-q", io (exitWith ExitSuccess)) - -- close focused window - , ("M-S-c", kill) -- regular kill - , ("M-C-S-c", spawn "xkill") -- force kill + -- close focused window + , ("M-S-c", kill) -- regular kill + , ("M-C-S-c", spawn "xkill") -- force kill - -- compositor control - , ("M-", spawn "/home/sravan/.scripts/picom.sh --rofi") + -- compositor control + , ("M-", spawn "/home/sravan/.scripts/picom.sh --rofi") - -- screenshot - , ("", spawn "flameshot gui") - ] + -- screenshot + , ("", spawn "flameshot gui") + ] #+end_src ** Mouse Bindings @@ -325,21 +325,21 @@ 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 :tangle xmonad.hs - myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ +myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ - -- mod-button1, Set the window to floating mode and move by dragging - [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w - >> windows W.shiftMaster)) + -- mod-button1, Set the window to floating mode and move by dragging + [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w + >> windows W.shiftMaster)) - -- mod-button2, Raise the window to the top of the stack - , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) + -- mod-button2, Raise the window to the top of the stack + , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) - -- mod-button3, Set the window to floating mode and resize by dragging - , ((modm, button3), (\w -> focus w >> mouseResizeWindow w - >> windows W.shiftMaster)) + -- mod-button3, Set the window to floating mode and resize by dragging + , ((modm, button3), (\w -> focus w >> mouseResizeWindow w + >> windows W.shiftMaster)) - -- you may also bind events to the mouse scroll wheel (button4 and button5) - ] + -- you may also bind events to the mouse scroll wheel (button4 and button5) + ] #+end_src * Layouts @@ -353,81 +353,81 @@ The available layouts. Note that each layout is separated by |||, which denotes layout choice. #+begin_src haskell :tangle xmonad.hs - myLayout = - -- remove borders on floating windows that cover the whole screen - lessBorders OnlyScreenFloat - -- avoid struts (status bar) - $ avoidStruts ( tiled ||| grid ||| monocle ) - where - -- Gaps around and between windows - -- Changes only seem to apply if I log out then in again - -- Dimensions are given as (Border top bottom right left) - mySpacing = spacingRaw False -- Only for >1 window - -- The bottom edge seems to look narrower than it is - (Border 15 15 15 15) -- Size of screen edge gaps - True -- Enable screen edge gaps - (Border 10 10 10 10) -- Size of window gaps - True -- Enable window gaps +myLayout = + -- remove borders on floating windows that cover the whole screen + lessBorders OnlyScreenFloat + -- avoid struts (status bar) + $ avoidStruts ( tiled ||| grid ||| monocle ) + where + -- Gaps around and between windows + -- Changes only seem to apply if I log out then in again + -- Dimensions are given as (Border top bottom right left) + mySpacing = spacingRaw False -- Only for >1 window + -- The bottom edge seems to look narrower than it is + (Border 15 15 15 15) -- Size of screen edge gaps + True -- Enable screen edge gaps + (Border 10 10 10 10) -- Size of window gaps + True -- Enable window gaps - -- default tiling algorithm partitions the screen into two panes - nmaster = 1 - delta = 3/100 - tiled_ratio = 1/2 - tiled = mySpacing $ ResizableTall nmaster delta tiled_ratio [] + -- default tiling algorithm partitions the screen into two panes + nmaster = 1 + delta = 3/100 + tiled_ratio = 1/2 + tiled = mySpacing $ ResizableTall nmaster delta tiled_ratio [] - -- grid - grid_ratio = 16/9 - grid = mySpacing $ Grid grid_ratio + -- grid + grid_ratio = 16/9 + grid = mySpacing $ Grid grid_ratio - -- monocle - -- monocle = smartBorders (Full) - monocle = noBorders (Full) + -- monocle + -- monocle = smartBorders (Full) + monocle = noBorders (Full) #+end_src * Window Rules - Execute arbitrary actions and WindowSet manipulations when managing - a new window. You can use this to, for example, always float a - particular program, or have a client always appear on a particular - workspace. - - To find the property name associated with a program, use - > xprop | grep WM_CLASS - and click on the client you're interested in. - - To match on the WM_NAME, you can use 'title' in the same way that - 'className' and 'resource' are used below. +Execute arbitrary actions and WindowSet manipulations when managing +a new window. You can use this to, for example, always float a +particular program, or have a client always appear on a particular +workspace. - #+begin_src haskell :tangle xmonad.hs - myManageHook = composeAll - [ className =? "MPlayer" --> doFloat - , className =? "Gimp" --> doFloat - , resource =? "desktop_window" --> doIgnore - , resource =? "kdesktop" --> doIgnore - , title =? "Picture in picture" --> doFloat - , title =? "Origin" --> doFloat - ] - #+end_src +To find the property name associated with a program, use +> xprop | grep WM_CLASS +and click on the client you're interested in. - Automatically place floating windows using ~myPlacement~. +To match on the WM_NAME, you can use 'title' in the same way that +'className' and 'resource' are used below. + +#+begin_src haskell :tangle xmonad.hs +myManageHook = composeAll + [ className =? "MPlayer" --> doFloat + , className =? "Gimp" --> doFloat + , resource =? "desktop_window" --> doIgnore + , resource =? "kdesktop" --> doIgnore + , title =? "Picture in picture" --> doFloat + , title =? "Origin" --> doFloat + ] +#+end_src + +Automatically place floating windows using ~myPlacement~. 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 :tangle xmonad.hs - myPlacement = withGaps (16,0,16,0) (smart (0.5,0.5)) - #+end_src +#+begin_src haskell :tangle xmonad.hs +myPlacement = withGaps (16,0,16,0) (smart (0.5,0.5)) +#+end_src * Event Handling - *NOTE*: EwmhDesktops users should change this to ewmhDesktopsEventHook - - Defines a custom handler function for X Events. The function should - return (All True) if the default handler is to be run afterwards. To - combine event hooks use mappend or mconcat from Data.Monoid. +*NOTE*: EwmhDesktops users should change this to ewmhDesktopsEventHook - #+begin_src haskell :tangle xmonad.hs - myEventHook = ewmhDesktopsEventHook <+> fullscreenEventHook - #+end_src +Defines a custom handler function for X Events. The function should +return (All True) if the default handler is to be run afterwards. To +combine event hooks use mappend or mconcat from Data.Monoid. + +#+begin_src haskell :tangle xmonad.hs +myEventHook = ewmhDesktopsEventHook <+> fullscreenEventHook +#+end_src * Logging @@ -437,19 +437,19 @@ See the ~XMonad.Hooks.DynamicLog~ extension for examples. *NOT IN USE* #+begin_src haskell :tangle no - myLogHook = return () +myLogHook = return () #+end_src * Startup ** Hook - Perform an arbitrary action each time xmonad starts or is restarted - with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize - per-workspace layout choices. +Perform an arbitrary action each time xmonad starts or is restarted +with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize +per-workspace layout choices. #+begin_src haskell :tangle xmonad.hs - myStartupHook = return() +myStartupHook = return() #+end_src ** Main @@ -459,29 +459,29 @@ 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 :tangle xmonad.hs - main = do - -- launches polybar - spawn "/home/sravan/.xmonad/polybar/launch.sh &" +main = do + -- 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 - , borderWidth = myBorderWidth - , terminal = myTerminal - , modMask = myModMask - , normalBorderColor = myNormalBorderColor - , focusedBorderColor = myFocusedBorderColor - , handleEventHook = myEventHook - , focusFollowsMouse = myFocusFollowsMouse - , clickJustFocuses = myClickJustFocuses - , workspaces = myWorkspaces - , mouseBindings = myMouseBindings - -- , logHook = myLogHook - -- , keys = myKeys - } - `additionalKeysP` myKeys + -- launches xmonad + xmonad $ docks $ ewmh desktopConfig + { manageHook = manageDocks <+> myManageHook <+> placeHook myPlacement <+> manageHook desktopConfig + , startupHook = myStartupHook + , layoutHook = myLayout + , borderWidth = myBorderWidth + , terminal = myTerminal + , modMask = myModMask + , normalBorderColor = myNormalBorderColor + , focusedBorderColor = myFocusedBorderColor + , handleEventHook = myEventHook + , focusFollowsMouse = myFocusFollowsMouse + , clickJustFocuses = myClickJustFocuses + , workspaces = myWorkspaces + , mouseBindings = myMouseBindings + -- , logHook = myLogHook + -- , keys = myKeys + } + `additionalKeysP` myKeys #+end_src ** Default Keybindings Reference @@ -489,55 +489,55 @@ Run xmonad with the settings you specify. No need to modify this. Finally, a copy of the default bindings in simple textual tabular format. #+begin_src haskell :tangle xmonad.hs - help :: String - help = unlines ["The default modifier key is 'alt'. Default keybindings:", - "", - "-- launching and killing programs", - "mod-Shift-Enter Launch xterminal", - "mod-p Launch dmenu", - "mod-Shift-p Launch gmrun", - "mod-Shift-c Close/kill the focused window", - "mod-Space Rotate through the available layout algorithms", - "mod-Shift-Space Reset the layouts on the current workSpace to default", - "mod-n Resize/refresh viewed windows to the correct size", - "", - "-- move focus up or down the window stack", - "mod-Tab Move focus to the next window", - "mod-Shift-Tab Move focus to the previous window", - "mod-j Move focus to the next window", - "mod-k Move focus to the previous window", - "mod-m Move focus to the master window", - "", - "-- modifying the window order", - "mod-Return Swap the focused window and the master window", - "mod-Shift-j Swap the focused window with the next window", - "mod-Shift-k Swap the focused window with the previous window", - "", - "-- resizing the master/slave ratio", - "mod-h Shrink the master area", - "mod-l Expand the master area", - "", - "-- floating layer support", - "mod-t Push window back into tiling; unfloat and re-tile it", - "", - "-- increase or decrease number of windows in the master area", - "mod-comma (mod-,) Increment the number of windows in the master area", - "mod-period (mod-.) Deincrement the number of windows in the master area", - "", - "-- quit, or restart", - "mod-Shift-q Quit xmonad", - "mod-q Restart xmonad", - "mod-[1..9] Switch to workSpace N", - "", - "-- Workspaces & screens", - "mod-Shift-[1..9] Move client to workspace N", - "mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", - "mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", - "", - "-- Mouse bindings: default actions bound to mouse events", - "mod-button1 Set the window to floating mode and move by dragging", - "mod-button2 Raise the window to the top of the stack", - "mod-button3 Set the window to floating mode and resize by dragging"] +help :: String +help = unlines ["The default modifier key is 'alt'. Default keybindings:", + "", + "-- launching and killing programs", + "mod-Shift-Enter Launch xterminal", + "mod-p Launch dmenu", + "mod-Shift-p Launch gmrun", + "mod-Shift-c Close/kill the focused window", + "mod-Space Rotate through the available layout algorithms", + "mod-Shift-Space Reset the layouts on the current workSpace to default", + "mod-n Resize/refresh viewed windows to the correct size", + "", + "-- move focus up or down the window stack", + "mod-Tab Move focus to the next window", + "mod-Shift-Tab Move focus to the previous window", + "mod-j Move focus to the next window", + "mod-k Move focus to the previous window", + "mod-m Move focus to the master window", + "", + "-- modifying the window order", + "mod-Return Swap the focused window and the master window", + "mod-Shift-j Swap the focused window with the next window", + "mod-Shift-k Swap the focused window with the previous window", + "", + "-- resizing the master/slave ratio", + "mod-h Shrink the master area", + "mod-l Expand the master area", + "", + "-- floating layer support", + "mod-t Push window back into tiling; unfloat and re-tile it", + "", + "-- increase or decrease number of windows in the master area", + "mod-comma (mod-,) Increment the number of windows in the master area", + "mod-period (mod-.) Deincrement the number of windows in the master area", + "", + "-- quit, or restart", + "mod-Shift-q Quit xmonad", + "mod-q Restart xmonad", + "mod-[1..9] Switch to workSpace N", + "", + "-- Workspaces & screens", + "mod-Shift-[1..9] Move client to workspace N", + "mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", + "mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", + "", + "-- Mouse bindings: default actions bound to mouse events", + "mod-button1 Set the window to floating mode and move by dragging", + "mod-button2 Raise the window to the top of the stack", + "mod-button3 Set the window to floating mode and resize by dragging"] #+end_src * Status Bar @@ -547,37 +547,37 @@ Finally, a copy of the default bindings in simple textual tabular format. *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" - , border = TopB - , bgColor = "black" - , fgColor = "white" - , alpha = 255 - , position = Top - , textOffset = -1 - , iconOffset = -1 - , lowerOnStart = True - , pickBroadest = False - , persistent = False - , hideOnStart = False - , iconRoot = "." - , allDesktops = True - , overrideRedirect = True - , commands = [ Run Weather "K7D2" ["-t",": F","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000 - , Run Network "wlp0s20f3" ["-L","0","-H","32","--normal","green","--high","red"] 10 - , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 - , Run Memory ["-t","Mem: %"] 10 - , Run Swap [] 10 - , Run Com "uname" ["-s","-r"] "" 36000 - , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 - , Run StdinReader - ] - , sepChar = "%" - , alignSep = "}{" - , template = "%StdinReader% }\ - \{ %cpu% | %memory% * %swap% | %wlp0s20f3% | %date% | %uname%" - } +Config { font = "xft:FiraCode Nerd Font Mono:weight=bold:pixelsize=12:antialias=true:hinting=true" + , additionalFonts = [] + , borderColor = "black" + , border = TopB + , bgColor = "black" + , fgColor = "white" + , alpha = 255 + , position = Top + , textOffset = -1 + , iconOffset = -1 + , lowerOnStart = True + , pickBroadest = False + , persistent = False + , hideOnStart = False + , iconRoot = "." + , allDesktops = True + , overrideRedirect = True + , commands = [ Run Weather "K7D2" ["-t",": F","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000 + , Run Network "wlp0s20f3" ["-L","0","-H","32","--normal","green","--high","red"] 10 + , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 + , Run Memory ["-t","Mem: %"] 10 + , Run Swap [] 10 + , Run Com "uname" ["-s","-r"] "" 36000 + , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 + , Run StdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = "%StdinReader% }\ + \{ %cpu% | %memory% * %swap% | %wlp0s20f3% | %date% | %uname%" + } #+end_src ** Polybar @@ -589,64 +589,64 @@ To learn more about how to configure Polybar go to https://github.com/polybar/po **** 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} +[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} +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} +; left +powermenu = ${self.blue} - 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} +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} +media-playing = ${self.green} - ; center - date = ${self.blue} - time = ${self.yellow} +; center +date = ${self.blue} +time = ${self.yellow} - ; right - user-kernel = ${self.purple} - updates = ${self.green} - cpu = ${self.yellow} - memory = ${self.pink} - filesystem = ${self.blue} - dunst-notification-status = ${self.red} +; right +user-kernel = ${self.purple} +updates = ${self.green} +cpu = ${self.yellow} +memory = ${self.pink} +filesystem = ${self.blue} +dunst-notification-status = ${self.red} #+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} +[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 @@ -654,254 +654,254 @@ To learn more about how to configure Polybar go to https://github.com/polybar/po Define module update intervals in seconds. #+begin_src conf :tangle polybar/config.ini - [intervals] - cpu = 1 - date = 1 - time = 1 - filesystem = 900 - memory = 1 - updates = 900 - media-playing = 1 - dunst-notification-status = 1 +[intervals] +cpu = 1 +date = 1 +time = 1 +filesystem = 900 +memory = 1 +updates = 900 +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 +[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 +; 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} +[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 = +; 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 +; 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 +; 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 +; 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 +; 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 +; 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} +; 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 +; 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} +; Background ARGB color (e.g. #f00, #ff992a, #ddff1023) +background = ${colors.background} - ; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) - foreground = ${colors.foreground} +; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023) +foreground = ${colors.foreground} - ; Background gradient (vertical steps) - ; background-[0-9]+ = #aarrggbb - ; background-0 = +; 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 +; 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 +; 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 = +; 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 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} +; 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" +; 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 dunst-notification-status +; 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 dunst-notification-status - ; The separator will be inserted between the output of each module - separator = " " +; 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 +; 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 +; 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 = +; 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 +; 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} +; 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 +; 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} +; 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 +; 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} +; 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 +; 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} +; Pad the sides of each tray icon +tray-padding = ${self.module-margin} - ; Scale factor for tray clients - tray-scale = ${sizes.tray-scale} +; 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 +; 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} +; 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 +; 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 = +; 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 +; 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 @@ -909,124 +909,124 @@ Define module update intervals in seconds. **** Power Menu #+begin_src conf :tangle polybar/config.ini - [module/powermenu] - type = custom/text - content = " " +[module/powermenu] +type = custom/text +content = " " - ; "content" has the same properties as "format-NAME" - ; content-background = #000 - content-foreground = ${colors.powermenu} - content-padding = ${bar/mybar.module-margin} +; "content" has the same properties as "format-NAME" +; content-background = #000 +content-foreground = ${colors.powermenu} +content-padding = ${bar/mybar.module-margin} - ; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND" - ; click-left = notify-send left - ; click-middle = notify-send middle - ; click-right = notify-send right - click-left = "rofi -show combi" - click-right = "/home/sravan/.scripts/control-center.sh --rofi" +; "click-(left|middle|right)" will be executed using "/bin/sh -c $COMMAND" +; click-left = notify-send left +; click-middle = notify-send middle +; click-right = notify-send right +click-left = "rofi -show combi" +click-right = "/home/sravan/.scripts/control-center.sh --rofi" - ; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND" - ; scroll-up = notify-send scroll up - ; scroll-down = notify-send scroll down +; "scroll-(up|down)" will be executed using "/bin/sh -c $COMMAND" +; scroll-up = notify-send scroll up +; scroll-down = notify-send scroll down #+end_src **** EWMH #+begin_src conf :tangle polybar/config.ini - [module/ewmh] - type = internal/xworkspaces +[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 +; 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 click handler used to focus desktop +; Default: true +enable-click = true - ; Create scroll handlers used to cycle desktops - ; Default: true - enable-scroll = 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; ₉ +; 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 tags: +; +; - gets replaced with +; Default: +format = - ; Available tokens: - ; %name% - ; Default: %name% - label-monitor = %name% +; 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-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-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-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} +; 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 **** Media Playing (Playerctl) @@ -1034,189 +1034,189 @@ Define module update intervals in seconds. ***** Module #+begin_src conf :tangle polybar/config.ini - [module/media-playing] - type = custom/script +[module/media-playing] +type = custom/script - ; Available tokens: - ; %counter% - ; Command to be executed (using "/bin/sh -c [command]") - exec = ~/.xmonad/polybar/scripts/get-media-playing.sh +; Available tokens: +; %counter% +; Command to be executed (using "/bin/sh -c [command]") +exec = ~/.xmonad/polybar/scripts/get-media-playing.sh - ; Conditional command that, if defined, needs to exit successfully - ; before the main exec command is invoked. - ; Default: "" - ; exec-if = pgrep -x myservice +; Conditional command that, if defined, needs to exit successfully +; before the main exec command is invoked. +; Default: "" +; exec-if = pgrep -x myservice - ; Will the script output continous content? - ; Default: false - tail = false +; Will the script output continous content? +; Default: false +tail = false - ; Seconds to sleep between updates - ; Default: 5 (0 if `tail = true`) - interval = ${intervals.media-playing} +; Seconds to sleep between updates +; Default: 5 (0 if `tail = true`) +interval = ${intervals.media-playing} - ; Available tags: - ; - deprecated - ;