dotfiles/dotfiles/xmonad/xmonad.hs

67 lines
2.4 KiB
Haskell
Raw Normal View History

import System.Taffybar.Hooks.PagerHints (pagerHints)
import XMonad hiding ( (|||) )
import XMonad.Actions.WindowBringer
import XMonad.Config ()
import XMonad.Hooks.EwmhDesktops
2016-09-13 13:51:06 -06:00
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.FadeInactive
2016-10-03 15:57:58 -06:00
import XMonad.Layout.BoringWindows
import XMonad.Layout.LayoutCombinators
2016-10-03 15:57:58 -06:00
import XMonad.Layout.Minimize
2016-09-27 18:27:03 -06:00
import XMonad.Layout.MultiColumns
2016-09-15 02:49:15 -06:00
import XMonad.Layout.MultiToggle
import XMonad.Layout.MultiToggle.Instances
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
import qualified XMonad.StackSet as W
import XMonad.Util.CustomKeys
main = xmonad $ ewmh $ pagerHints def
{ modMask = mod4Mask
2016-09-13 13:51:06 -06:00
, terminal = "urxvt"
2016-09-13 18:51:12 -06:00
, manageHook = manageDocks <+> manageHook def
, layoutHook = myLayoutHook
, logHook = myLogHook
2016-09-16 15:33:37 -06:00
, handleEventHook = docksEventHook <+> fullscreenEventHook
2016-09-13 13:51:06 -06:00
, startupHook = myStartup
2016-10-03 15:57:58 -06:00
, keys = customKeys (\x -> []) addKeys
}
2016-09-09 18:48:28 -06:00
myLogHook :: X()
myLogHook = fadeInactiveLogHook 0.9
shiftThenView i = W.greedyView i . W.shift i
addKeys conf@XConfig {modMask = modm} =
[ ((modm, xK_p), spawn "rofi -show drun")
2016-09-19 12:07:03 -06:00
, ((modm .|. shiftMask, xK_p), spawn "rofi -show run")
, ((modm, xK_g), spawn "rofi -show window")
, ((modm .|. controlMask, xK_t), spawn "systemctl --user restart taffybar.service")
-- TODO: Change this to bringing the window to the current workspace
, ((modm, xK_b), bringMenuArgs' "rofi" ["-dmenu"])
2016-10-03 18:49:44 -06:00
, ((modm, xK_v), spawn "copyq paste")
, ((mod3Mask, xK_v), spawn "copyq_rofi.sh")
, ((modm .|. controlMask, xK_space), sendMessage $ JumpToLayout "Full")
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
2016-10-03 15:57:58 -06:00
, ((modm, xK_m), withFocused minimizeWindow)
, ((modm .|. shiftMask, xK_m), sendMessage RestoreNextMinimizedWin)
] ++
-- Replace original moving stuff around + greedy view bindings
[((additionalMask .|. modm, key), windows $ function workspace)
| (workspace, key) <- zip (workspaces conf) [xK_1 .. xK_9]
, (function, additionalMask) <-
[ (W.greedyView, 0)
, (W.shift, shiftMask)
, (shiftThenView, controlMask)]]
layouts = tiled ||| Full ||| multiCol [1, 1] 2 0.01 (-0.5)
where
tiled = Tall 1 (3/100) (1/2)
2016-10-03 15:57:58 -06:00
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders . minimize
. boringWindows . mkToggle (MIRROR ?? EOT) $ layouts
2016-09-13 18:51:12 -06:00
2016-10-03 18:14:42 -06:00
myStartup = do
spawn "systemctl --user start wm.target"