diff options
-rw-r--r-- | xmonad.hs | 42 |
1 files changed, 35 insertions, 7 deletions
@@ -1,6 +1,6 @@ import XMonad import qualified XMonad.StackSet as W -import XMonad hiding ((|||)) +-- import XMonad hiding ((|||)) -- actions import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen) @@ -15,26 +15,33 @@ import XMonad.Actions.WindowBringer -- layouts modifiers import XMonad.Layout.Spacing import XMonad.Layout.LayoutModifier -import XMonad.Layout.LayoutCombinators ((|||)) +-- import XMonad.Layout.LayoutCombinators ((|||)) +import XMonad.Layout.Renamed +-- import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) -- import XMonad.Layout.Gaps -- import XMonad.Layout.ShowWName +import XMonad.Layout.Renamed -- Layouts -import XMonad.Layout.GridVariants (Grid(Grid)) +import XMonad.Layout.Grid import XMonad.Layout.SimplestFloat import XMonad.Layout.Spiral import XMonad.Layout.ResizableTile import XMonad.Layout.Tabbed import XMonad.Layout.ThreeColumns + -- hooks import XMonad.Hooks.SetWMName +import XMonad.Hooks.ManageDocks -- import XMonad.Hooks.WallpaperSetter -- utilities import XMonad.Util.SpawnOnce import XMonad.Util.EZConfig (additionalKeys) - +import XMonad.Util.Cursor +import XMonad.Util.Paste +import XMonad.Util.Run myStartupHook :: X () myStartupHook = do @@ -44,6 +51,7 @@ myStartupHook = do -- spawnOnce "firefox &" spawnOnce "sxhkd &" setWMName "XMonad" + setDefaultCursor xC_left_ptr @@ -79,7 +87,8 @@ myBorderWidth = 2 myExtraWorkspaces = [(xK_0, "10")] -- ,(xK_minus, "tmp"),(xK_equal, "swap")] myWorkspaces = ["1","2","3","4","5","6","7","8", "9"] ++ (map snd myExtraWorkspaces) -myLayoutHook = windowGaps 2 3 +myLayoutHook = avoidStruts $ Grid + @@ -99,6 +108,7 @@ myKeys = [ ((mod4Mask, xK_Return), spawn myTerminal), ((mod1Mask, xK_w), kill1), ((mod1Mask .|. shiftMask, xK_k), kill1), + ((mod4Mask, xK_p), spawnOnce "run_dmenu"), -- view prev/next workspaces ((mod1Mask, xK_h), prevWS), @@ -137,7 +147,18 @@ myKeys = [ -- windowbringer ((mod1Mask, xK_b), bringMenu), - ((mod1Mask, xK_g), gotoMenu) + ((mod1Mask, xK_g), gotoMenu), + + -- paste x selection + ((0, xK_Insert), pasteSelection), + + -- toggle layouts + ((mod4Mask, xK_t ), cycleThroughLayouts ["Grid", "Mirror Tall"]), + + -- toggle bars + ((mod1Mask, xK_backslash), sendMessage ToggleStruts), -- toggle both bars + ((mod1Mask, xK_bracketleft), sendMessage $ ToggleStrut D), -- toggle bottom bar + ((mod1Mask, xK_bracketright), sendMessage $ ToggleStrut U) -- toggle top bar ] ++ [ -- for extra workspace(s) ((myModMask, key), (windows $ W.greedyView ws)) @@ -152,9 +173,16 @@ myKeys = [ -- ~keybindings~ +-- layouts + + + +-- ~layouts~ + main = do - xmonad $ def + xmproc <- spawnPipe "xmobar -b -x 0 /home/zt/.xmonad/xmobarrc" + xmonad $ docks def { terminal = myTerminal, focusFollowsMouse = True, |