aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2022-06-21 13:50:42 +0300
committerla-ninpre <leobrekalini@gmail.com>2022-06-21 13:50:42 +0300
commit8ae378b9126b806d0dd6c618f760d5a351d5f3f4 (patch)
tree7bbcb21d465ce9351b905f998d32d991cd5e5931
parent2b9608c9779758a9417e475e24f1d60a428b805d (diff)
downloadxmonad-config-8ae378b9126b806d0dd6c618f760d5a351d5f3f4.tar.gz
xmonad-config-8ae378b9126b806d0dd6c618f760d5a351d5f3f4.zip
add sublayouts and a bunch of things
these changes are not so atomic, i know. i don't care though :)
-rw-r--r--lib/LaNinpreConfig.hs12
-rw-r--r--xmonad.hs53
2 files changed, 52 insertions, 13 deletions
diff --git a/lib/LaNinpreConfig.hs b/lib/LaNinpreConfig.hs
index 893699a..14f5994 100644
--- a/lib/LaNinpreConfig.hs
+++ b/lib/LaNinpreConfig.hs
@@ -221,11 +221,11 @@ myManageHook = composeAll
, className =? "dialog" --> doFloat
, className =? "download" --> doFloat
, className =? "error" --> doFloat
- , className =? "Gimp" --> doFloat
, className =? "notification" --> doFloat
, className =? "pinentry-gtk-2" --> doFloat
, className =? "splash" --> doFloat
, className =? "toolbar" --> doFloat
+ , className =? "Gimp" --> doFloat
, className =? "Cadence" --> doFloat
, className =? "Steam" --> doFloat
, className =? "Image Lounge" --> doFloat
@@ -237,8 +237,8 @@ myManageHook = composeAll
, className =? "qutebrowser" --> doShift ( myWorkspaces !! 1 )
-- doc workspace
, className =? "Geary" --> doShift ( myWorkspaces !! 3 )
- , className =? "libreoffice-writer" --> doShift ( myWorkspaces !! 3 )
- , className =? "libreoffice-impress" --> doShift ( myWorkspaces !! 3 )
+ , className =? "libreoffice" --> doShift ( myWorkspaces !! 3 )
+ -- , className =? "libreoffice-impress" --> doShift ( myWorkspaces !! 3 )
-- vm workspace
, className =? "VirtualBox Manager" --> doShift ( myWorkspaces !! 4 )
-- chat workspace
@@ -399,12 +399,12 @@ myBorderWidth = 1
-- | app grid for 'GridSelect' layout
myAppGrid :: [(String,String)]
-myAppGrid = [ ("discord" ,"discord" )
- , ("steam" ,"steam" )
+myAppGrid = [ ("files" ,"thunar" )
, ("mail" ,"thunderbird")
- , ("files" ,"thunar" )
, ("blender" ,"blender-3.1")
, ("inkscape" ,"inkscape" )
+ , ("discord" ,"discord" )
+ , ("steam" ,"steam" )
, ("obs" ,"obs" )
, ("gimp" ,"gimp" )
, ("ardour" ,"ardour6" )
diff --git a/xmonad.hs b/xmonad.hs
index 8179a96..c9a8919 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -9,6 +9,7 @@ import XMonad.Actions.WithAll
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.EwmhDesktops
+import XMonad.Hooks.ManageDocks
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
@@ -17,10 +18,16 @@ import XMonad.Util.EZConfig
import XMonad.Util.NamedScratchpad
import XMonad.Layout.BoringWindows hiding (Replace)
+import XMonad.Layout.NoBorders
import XMonad.Layout.Renamed
+import XMonad.Layout.ResizableTile
+import XMonad.Layout.ResizableThreeColumns
+import XMonad.Layout.Simplest
import XMonad.Layout.Spacing
-import XMonad.Layout.ThreeColumns
+import XMonad.Layout.SubLayouts
+import XMonad.Layout.Tabbed
import XMonad.Layout.ToggleLayouts
+import XMonad.Layout.WindowNavigation
import LaNinpreConfig
@@ -28,6 +35,7 @@ myKeys :: [(String, X ())]
myKeys = [ ("M-<Return>", spawn myTerminal)
, ("M-w", spawn myBrowser)
, ("M-p", spawn "dmenu_run")
+ , ("M-<Delete>", spawn "slock")
, ("<Print>", spawn "scrot_cmd -f")
, ("C-<Print>", spawn "scrot_cmd -a")
, ("M1-<Print>", spawn "scrot_cmd -w")
@@ -43,9 +51,19 @@ myKeys = [ ("M-<Return>", spawn myTerminal)
, ("M-S-c", kill)
, ("M-<Space>", sendMessage NextLayout)
- , ("M-f", sendMessage ToggleLayout)
+ , ("M-f", sendMessage ToggleLayout >> sendMessage ToggleStruts)
, ("M-h", sendMessage Shrink)
, ("M-l", sendMessage Expand)
+ , ("M-C-j", sendMessage MirrorShrink)
+ , ("M-C-k", sendMessage MirrorExpand)
+ , ("M-M1-h", sendMessage $ pullGroup L)
+ , ("M-M1-j", sendMessage $ pullGroup D)
+ , ("M-M1-k", sendMessage $ pullGroup U)
+ , ("M-M1-l", sendMessage $ pullGroup R)
+ , ("M-M1-u", withFocused $ sendMessage . UnMerge)
+ , ("M-M1-m", withFocused $ sendMessage . UnMergeAll)
+ , ("M-M1-,", onGroup W.focusDown')
+ , ("M-M1-.", onGroup W.focusUp')
, ("M-j", focusDown)
, ("M-k", focusUp)
, ("M-S-j", swapDown)
@@ -91,15 +109,35 @@ mySB :: StatusBarConfig
mySB = statusBarProp "xmobar"
$ clickablePP $ filterOutWsPP [scratchpadWorkspaceTag] myXmobarPP
-myLayout = boringWindows
+myTabTheme :: Theme
+myTabTheme = def
+ { fontName = head myFonts
+ , activeTextColor = col_fg_alt def
+ , activeColor = col_bg_alt def
+ , activeBorderWidth = myBorderWidth
+ , inactiveTextColor = col_fg def
+ , inactiveColor = col_bg def
+ , inactiveBorderWidth = myBorderWidth
+ , urgentTextColor = col_bg_alt def
+ , urgentColor = col_fg_alt def
+ , urgentBorderWidth = myBorderWidth
+ }
+
+myLayout = windowNavigation
+ $ boringWindows
$ toggleLayouts full
+ $ smartBorders
$ tiled ||| threeCol
where
tiled = renamed [Replace "lawa"]
- $ spacingWithEdge space $ Tall nmaster delta ratio
+ $ addTabs shrinkText myTabTheme
+ $ subLayout [] (Simplest)
+ $ spacingWithEdge space $ ResizableTall nmaster delta ratio []
threeCol = renamed [Replace "supa"]
- $ spacingWithEdge space $ ThreeColMid nmaster delta ratio
- full = renamed [Replace "suli"] $ Full
+ $ addTabs shrinkText myTabTheme
+ $ subLayout [] (Simplest)
+ $ spacingWithEdge space $ ResizableThreeColMid nmaster delta ratio []
+ full = renamed [Replace "suli"] $ noBorders Full
nmaster = 1
ratio = 1/2
delta = 3/100
@@ -109,12 +147,13 @@ myConfig = def
{ terminal = myTerminal
, modMask = myModMask
, layoutHook = myLayout
- , manageHook = myManageHook <+> namedScratchpadManageHook myScratchPads
+ , manageHook = myManageHook
, workspaces = myWorkspaces
, borderWidth = myBorderWidth
, keys = const M.empty -- discard default keybindings
, normalBorderColor = col_bg def
, focusedBorderColor = col_bg_alt def
+ , startupHook = return () >> checkKeymap myConfig myKeys
} `additionalKeysP` myKeys
main :: IO ()