Cleaning up the spacing in the config.

This commit is contained in:
Derek Taylor
2020-05-22 00:14:58 -05:00
parent d22949f6fe
commit 03e0d0403f
2 changed files with 79 additions and 77 deletions

View File

@@ -216,7 +216,7 @@ colors:
# Normal colors # Normal colors
normal: normal:
black: '0x282a36' black: '0x292d3e'
red: '0xf07178' red: '0xf07178'
green: '0xc3e88d' green: '0xc3e88d'
yellow: '0xffcb6b' yellow: '0xffcb6b'

View File

@@ -1,10 +1,10 @@
-- The xmonad configuration of Derek Taylor (DistroTube) -- The xmonad configuration of Derek Taylor (DistroTube)
-- http://www.youtube.com/c/DistroTube -- My YouTube: http://www.youtube.com/c/DistroTube
-- http://www.gitlab.com/dwt1/ -- My GitLab: http://www.gitlab.com/dwt1/
-- For more information on Xmonad, visit: https://xmonad.org -- For more information on Xmonad, visit: https://xmonad.org
------------------------------------------------------------------------ ------------------------------------------------------------------------
---IMPORTS -- IMPORTS
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Base -- Base
import XMonad import XMonad
@@ -79,18 +79,20 @@ import XMonad.Layout.ZoomRow (zoomRow, zoomIn, zoomOut, zoomReset, ZoomMessage(Z
import XMonad.Layout.IM (withIM, Property(Role)) import XMonad.Layout.IM (withIM, Property(Role))
------------------------------------------------------------------------ ------------------------------------------------------------------------
---VARIABLES -- VARIABLES
------------------------------------------------------------------------ ------------------------------------------------------------------------
myFont = "xft:Mononoki Nerd Font:regular:pixelsize=12" myFont = "xft:Mononoki Nerd Font:regular:pixelsize=11"
myModMask = mod4Mask -- Sets modkey to super/windows key myModMask = mod4Mask -- Sets modkey to super/windows key
altMask = mod4Mask --this is the super key, but I have it remapped
myTerminal = "alacritty" -- Sets default terminal myTerminal = "alacritty" -- Sets default terminal
myTextEditor = "nvim" -- Sets default text editor myTextEditor = "nvim" -- Sets default text editor
myBorderWidth = 2 -- Sets border width for windows myBorderWidth = 2 -- Sets border width for windows
myNormColor = "#292d3e" -- Border color of normal windows
myFocusColor = "#bbc5ff" -- Border color of focused windows
altMask = mod1Mask -- Setting this for use in xprompts
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
------------------------------------------------------------------------ ------------------------------------------------------------------------
---AUTOSTART -- AUTOSTART
------------------------------------------------------------------------ ------------------------------------------------------------------------
myStartupHook = do myStartupHook = do
spawnOnce "nitrogen --restore &" spawnOnce "nitrogen --restore &"
@@ -102,7 +104,7 @@ myStartupHook = do
setWMName "LG3D" setWMName "LG3D"
------------------------------------------------------------------------ ------------------------------------------------------------------------
---GRID SELECT -- GRID SELECT
------------------------------------------------------------------------ ------------------------------------------------------------------------
myColorizer :: Window -> Bool -> X (String, String) myColorizer :: Window -> Bool -> X (String, String)
myColorizer = colorRangeFromClassName myColorizer = colorRangeFromClassName
@@ -143,14 +145,15 @@ dtXPKeymap = M.fromList $
, (xK_y, pasteString) -- paste a string , (xK_y, pasteString) -- paste a string
, (xK_g, quit) -- quit out of prompt , (xK_g, quit) -- quit out of prompt
, (xK_bracketleft, quit) , (xK_bracketleft, quit)
] ++ ]
++
map (first $ (,) altMask) -- meta key + <key> map (first $ (,) altMask) -- meta key + <key>
[ (xK_BackSpace, killWord Prev) -- kill the prev word [ (xK_BackSpace, killWord Prev) -- kill the prev word
, (xK_f, moveWord Next) -- move a word forward , (xK_f, moveWord Next) -- move a word forward
, (xK_b, moveWord Prev) -- move a word backward , (xK_b, moveWord Prev) -- move a word backward
, (xK_d, killWord Next) -- kill the next word , (xK_d, killWord Next) -- kill the next word
, (xK_n, moveHistory W.focusUp') , (xK_n, moveHistory W.focusUp') -- move up thru history
, (xK_p, moveHistory W.focusDown') , (xK_p, moveHistory W.focusDown') -- move down thru history
] ]
++ ++
map (first $ (,) 0) -- <key> map (first $ (,) 0) -- <key>
@@ -193,7 +196,7 @@ dtXPConfig = def
} }
------------------------------------------------------------------------ ------------------------------------------------------------------------
---KEYBINDINGS -- KEYBINDINGS
------------------------------------------------------------------------ ------------------------------------------------------------------------
myKeys = myKeys =
-- Xmonad -- Xmonad
@@ -238,9 +241,8 @@ myKeys =
, ("Surf Browser", "surf suckless.org") , ("Surf Browser", "surf suckless.org")
, ("Xonotic", "xonotic-glx") , ("Xonotic", "xonotic-glx")
]) ])
, ("M-S-g", goToSelected $ mygridConfig myColorizer) -- goto selected
, ("M-S-g", goToSelected $ mygridConfig myColorizer) , ("M-S-b", bringSelected $ mygridConfig myColorizer) -- bring selected
, ("M-S-b", bringSelected $ mygridConfig myColorizer)
-- Windows navigation -- Windows navigation
, ("M-m", windows W.focusMaster) -- Move focus to the master window , ("M-m", windows W.focusMaster) -- Move focus to the master window
@@ -347,7 +349,7 @@ myKeys =
nonEmptyNonNSP = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "nsp")) nonEmptyNonNSP = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "nsp"))
------------------------------------------------------------------------ ------------------------------------------------------------------------
---WORKSPACES -- WORKSPACES
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- My workspaces are clickable meaning that the mouse can be used to switch -- My workspaces are clickable meaning that the mouse can be used to switch
-- workspaces. This requires xdotool. -- workspaces. This requires xdotool.
@@ -430,7 +432,7 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
l = 0.95 -w l = 0.95 -w
------------------------------------------------------------------------ ------------------------------------------------------------------------
---MAIN -- MAIN
------------------------------------------------------------------------ ------------------------------------------------------------------------
main = do main = do
-- Launching three instances of xmobar on their monitors. -- Launching three instances of xmobar on their monitors.
@@ -446,8 +448,8 @@ main = do
, layoutHook = myLayoutHook , layoutHook = myLayoutHook
, workspaces = myWorkspaces , workspaces = myWorkspaces
, borderWidth = myBorderWidth , borderWidth = myBorderWidth
, normalBorderColor = "#292d3e" , normalBorderColor = myNormColor
, focusedBorderColor = "#bbc5ff" , focusedBorderColor = myFocusColor
, logHook = dynamicLogWithPP xmobarPP , logHook = dynamicLogWithPP xmobarPP
{ ppOutput = \x -> hPutStrLn xmproc0 x >> hPutStrLn xmproc1 x >> hPutStrLn xmproc2 x { ppOutput = \x -> hPutStrLn xmproc0 x >> hPutStrLn xmproc1 x >> hPutStrLn xmproc2 x
, ppCurrent = xmobarColor "#c3e88d" "" . wrap "[" "]" -- Current workspace in xmobar , ppCurrent = xmobarColor "#c3e88d" "" . wrap "[" "]" -- Current workspace in xmobar