1
0
Fork 0
mirror of https://gitlab.com/dwt1/dotfiles.git synced 2023-02-13 20:55:19 -05:00

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
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset 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
------------------------------------------------------------------------ ------------------------------------------------------------------------
---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
@ -131,69 +133,70 @@ spawnSelected' lst = gridselect conf lst >>= flip whenJust spawn
------------------------------------------------------------------------ ------------------------------------------------------------------------
dtXPKeymap :: M.Map (KeyMask,KeySym) (XP ()) dtXPKeymap :: M.Map (KeyMask,KeySym) (XP ())
dtXPKeymap = M.fromList $ dtXPKeymap = M.fromList $
map (first $ (,) controlMask) -- control + <key> map (first $ (,) controlMask) -- control + <key>
[ (xK_z, killBefore) -- kill line backwards [ (xK_z, killBefore) -- kill line backwards
, (xK_k, killAfter) -- kill line fowards , (xK_k, killAfter) -- kill line fowards
, (xK_a, startOfLine) -- move to the beginning of the line , (xK_a, startOfLine) -- move to the beginning of the line
, (xK_e, endOfLine) -- move to the end of the line , (xK_e, endOfLine) -- move to the end of the line
, (xK_m, deleteString Next) -- delete a character foward , (xK_m, deleteString Next) -- delete a character foward
, (xK_b, moveCursor Prev) -- move cursor forward , (xK_b, moveCursor Prev) -- move cursor forward
, (xK_f, moveCursor Next) -- move cursor backward , (xK_f, moveCursor Next) -- move cursor backward
, (xK_BackSpace, killWord Prev) -- kill the previous word , (xK_BackSpace, killWord Prev) -- kill the previous word
, (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> ++
[ (xK_BackSpace, killWord Prev) -- kill the prev word map (first $ (,) altMask) -- meta key + <key>
, (xK_f, moveWord Next) -- move a word forward [ (xK_BackSpace, killWord Prev) -- kill the prev word
, (xK_b, moveWord Prev) -- move a word backward , (xK_f, moveWord Next) -- move a word forward
, (xK_d, killWord Next) -- kill the next word , (xK_b, moveWord Prev) -- move a word backward
, (xK_n, moveHistory W.focusUp') , (xK_d, killWord Next) -- kill the next word
, (xK_p, moveHistory W.focusDown') , (xK_n, moveHistory W.focusUp') -- move up thru history
] , (xK_p, moveHistory W.focusDown') -- move down thru history
++ ]
map (first $ (,) 0) -- <key> ++
[ (xK_Return, setSuccess True >> setDone True) map (first $ (,) 0) -- <key>
, (xK_KP_Enter, setSuccess True >> setDone True) [ (xK_Return, setSuccess True >> setDone True)
, (xK_BackSpace, deleteString Prev) , (xK_KP_Enter, setSuccess True >> setDone True)
, (xK_Delete, deleteString Next) , (xK_BackSpace, deleteString Prev)
, (xK_Left, moveCursor Prev) , (xK_Delete, deleteString Next)
, (xK_Right, moveCursor Next) , (xK_Left, moveCursor Prev)
, (xK_Home, startOfLine) , (xK_Right, moveCursor Next)
, (xK_End, endOfLine) , (xK_Home, startOfLine)
, (xK_Down, moveHistory W.focusUp') , (xK_End, endOfLine)
, (xK_Up, moveHistory W.focusDown') , (xK_Down, moveHistory W.focusUp')
, (xK_Escape, quit) , (xK_Up, moveHistory W.focusDown')
] , (xK_Escape, quit)
]
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- XPROMPT SETTINGS -- XPROMPT SETTINGS
------------------------------------------------------------------------ ------------------------------------------------------------------------
dtXPConfig = def dtXPConfig = def
{ font = "xft:Mononoki Nerd Font:size=9" { font = "xft:Mononoki Nerd Font:size=9"
, bgColor = "#292d3e" , bgColor = "#292d3e"
, fgColor = "#d0d0d0" , fgColor = "#d0d0d0"
, bgHLight = "#c792ea" , bgHLight = "#c792ea"
, fgHLight = "#000000" , fgHLight = "#000000"
, borderColor = "#535974" , borderColor = "#535974"
, promptBorderWidth = 1 , promptBorderWidth = 1
, promptKeymap = dtXPKeymap , promptKeymap = dtXPKeymap
, position = Top , position = Top
-- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 } -- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 }
, height = 20 , height = 20
, historySize = 256 , historySize = 256
, historyFilter = id , historyFilter = id
, defaultText = [] , defaultText = []
, autoComplete = Just 100000 -- set Just 100000 for .1 sec , autoComplete = Just 100000 -- set Just 100000 for .1 sec
, showCompletionOnTab = False , showCompletionOnTab = False
, searchPredicate = isPrefixOf , searchPredicate = isPrefixOf
, alwaysHighlight = True , alwaysHighlight = True
, maxComplRows = Nothing -- set to Just 5 for 5 rows , maxComplRows = Nothing -- set to Just 5 for 5 rows
} }
------------------------------------------------------------------------ ------------------------------------------------------------------------
---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
@ -460,5 +462,5 @@ main = do
, ppExtras = [windowCount] -- # of windows current workspace , ppExtras = [windowCount] -- # of windows current workspace
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t] , ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t]
} }
} `additionalKeysP` myKeys } `additionalKeysP` myKeys