aboutsummaryrefslogtreecommitdiff
path: root/xmonad/xmonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'xmonad/xmonad.hs')
-rw-r--r--xmonad/xmonad.hs43
1 files changed, 26 insertions, 17 deletions
diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs
index 0c55e5c..c356091 100644
--- a/xmonad/xmonad.hs
+++ b/xmonad/xmonad.hs
@@ -1,5 +1,7 @@
import XMonad
+import qualified XMonad.StackSet as W
+
import XMonad.Actions.UpdatePointer
import XMonad.Actions.CycleWS
import XMonad.Actions.DwmPromote
@@ -21,10 +23,12 @@ import XMonad.Layout.Grid
import XMonad.Util.Cursor
import XMonad.Util.EZConfig
import XMonad.Util.Loggers
-import XMonad.Util.Ungrab
import System.Exit (exitSuccess)
+dmenuFormatting :: String -> String
+dmenuFormatting command = command ++ " -fn 'JetBrains Mono NF:style=medium:size=11' -nb '#282828' -nf '#ebdbb2' -sb '#d3869b' -sf '#282828'"
+
main :: IO ()
main = xmonad
. ewmh
@@ -39,10 +43,12 @@ myConfig = def
, startupHook = setDefaultCursor xC_left_ptr -- sets the cursor
, handleEventHook = swallowEventHook (className =? "Alacritty") (return True) -- make alacritty swallowable
, workspaces = myWorkspaces -- workspace names
- , logHook = updatePointer (0.5, 0.5) (0, 0) -- warp pointer to center of window on focus
+ -- , logHook = dynamicLogWithPP myXmobarPP {
+ -- ppOutput = hPutStrLn description
+ -- } >> historyHook
, borderWidth = 2
- , normalBorderColor = "#3c3836"
- , focusedBorderColor = "#928374"
+ , normalBorderColor = "#282828"
+ , focusedBorderColor = "#fe8019"
}
`additionalKeysP`
[ -- executables
@@ -55,13 +61,15 @@ myConfig = def
, ("M-<F7>", spawn "brightness-down")
, ("M-<F8>", spawn "brightness-up")
, ("M-<F11>", spawn "screenshot")
- , ("M-p", spawn "dmenu_run_history -fn 'JetBrains Mono NF:style=medium:size=11' -nb '#3c3836' -nf '#ebdbb2' -sb '#504945' -sf '#ebdbb2'")
+ , ("M-p", spawn (dmenuFormatting "dmenu_run_history"))
, ("M-S-<Return>", spawn "spawn-alacritty")
+ , ("M-S-e", spawn "emac")
-- XMonad calls
, ("M-<Tab>", toggleWS)
, ("M-<Return>", dwmpromote)
-- layout jumps
- , ("M-t", sendMessage $ JumpToLayout "Normal")
+ , ("M-S-t", sendMessage $ JumpToLayout "Normal")
+ , ("M-a", sendMessage $ JumpToLayout "Accrdin")
-- rebound quit call
, ("M-S-<Backspace>", io exitSuccess)
]
@@ -75,33 +83,34 @@ myWorkspaces = [ "!", "@", "#", "$", "%", "^", "&", "*", "(" ]
myLayout = tiled ||| full ||| threeCol ||| accordion ||| grid
where
- tiled = renamed [Replace "Normal"] $ spaced $ Tall nmaster delta ratio
- full = renamed [Replace "Full"] $ spaced $ Full
- threeCol = renamed [Replace "ThreeCol"] $ spaced $ ThreeColMid nmaster delta ratio
- accordion = renamed [Replace "Accrdin"] $ spaced $ Accordion
- grid = renamed [Replace "Grid"] $ spaced $ Grid
+ tiled = renamed [Replace "Normal"] $ Tall nmaster delta ratio
+ full = renamed [Replace "Full"] $ Full
+ threeCol = renamed [Replace "ThreeCol"] $ ThreeColMid nmaster delta ratio
+ accordion = renamed [Replace "Accrdin"] $ Accordion
+ grid = renamed [Replace "Grid"] $ Grid
nmaster = 1 -- Default number of windows in the master pane
ratio = 6/10 -- Default proportion of screen occupied by master pane
delta = 2/100 -- Percent of screen to increment by when resizing panes
- spaced = spacing 2
+ -- spaced = spacing 0
myManageHook :: ManageHook
myManageHook = composeAll
- [ className =? "Gimp" --> doFloat
- , isDialog --> doFloat
+ [
+ -- className =? "Gimp" --> doFloat
+ isDialog --> doFloat
]
myXmobarPP :: PP
myXmobarPP = def
{ ppSep = magenta " • "
, ppTitleSanitize = xmobarStrip
- , ppCurrent = wrap "" "" . xmobarBorder "Top" "#8be9fd" 2
+ , ppCurrent = wrap "" "" . xmobarBorder "Top" "#83a598" 2
, ppUrgent = red . wrap (yellow "!") (yellow "!")
, ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
, ppExtras = [logTitles formatFocused formatUnfocused]
}
where
- formatFocused = wrap (white "{") (white "}") . aqua . ppWindow . shorten 80
+ formatFocused = wrap (blue "{ ") (blue " }") . aqua . ppWindow . shorten 80
formatUnfocused = wrap (lowWhite "<") (lowWhite ">") . lowWhite . ppWindow . shorten 40
-- | Windows should have *some* title, which should not not exceed a
@@ -117,4 +126,4 @@ myXmobarPP = def
red = xmobarColor "#fb4934" ""
green = xmobarColor "#b8bb26" ""
lowWhite = xmobarColor "#a89984" ""
- aqua = xmobarColor "#8ec07c" "" \ No newline at end of file
+ aqua = xmobarColor "#8ec07c" ""