2016-09-16 15:38:11 -06:00
|
|
|
import System.Taffybar.Hooks.PagerHints (pagerHints)
|
|
|
|
|
2016-09-15 22:47:23 -06:00
|
|
|
import XMonad hiding ( (|||) )
|
2016-09-16 13:53:09 -06:00
|
|
|
import XMonad.Actions.WindowBringer
|
2016-09-15 17:57:12 -06:00
|
|
|
import XMonad.Config ()
|
2016-09-13 03:50:25 -06:00
|
|
|
import XMonad.Hooks.EwmhDesktops
|
2016-09-13 13:51:06 -06:00
|
|
|
import XMonad.Hooks.ManageDocks
|
2016-09-15 22:47:23 -06:00
|
|
|
import XMonad.Layout.LayoutCombinators
|
2016-09-15 02:49:15 -06:00
|
|
|
import XMonad.Layout.MultiToggle
|
|
|
|
import XMonad.Layout.MultiToggle.Instances
|
2016-09-14 17:56:37 -06:00
|
|
|
import XMonad.Layout.NoBorders
|
|
|
|
import XMonad.Layout.Spacing
|
2016-09-21 21:31:44 -06:00
|
|
|
import XMonad.Layout.MultiColumns
|
2016-09-16 13:50:53 -06:00
|
|
|
import qualified XMonad.StackSet as W
|
2016-09-15 22:47:23 -06:00
|
|
|
import XMonad.Util.CustomKeys
|
2016-09-14 17:56:37 -06:00
|
|
|
|
2016-09-16 15:38:11 -06:00
|
|
|
main = xmonad $ ewmh $ pagerHints def
|
2016-09-15 17:57:12 -06:00
|
|
|
{ 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
|
2016-09-16 15:33:37 -06:00
|
|
|
, handleEventHook = docksEventHook <+> fullscreenEventHook
|
2016-09-13 13:51:06 -06:00
|
|
|
, startupHook = myStartup
|
2016-09-15 17:57:12 -06:00
|
|
|
, keys = customKeys delKeys addKeys
|
|
|
|
}
|
2016-09-09 18:48:28 -06:00
|
|
|
|
2016-09-15 17:57:12 -06:00
|
|
|
delKeys _ = []
|
2016-09-15 02:49:15 -06:00
|
|
|
|
2016-09-16 13:50:53 -06:00
|
|
|
shiftThenView i = W.greedyView i . W.shift i
|
|
|
|
|
|
|
|
addKeys conf@XConfig {modMask = modm} =
|
2016-09-15 17:57:12 -06:00
|
|
|
[ ((modm, xK_p), spawn "rofi -show drun")
|
2016-09-19 12:07:03 -06:00
|
|
|
, ((modm .|. shiftMask, xK_p), spawn "rofi -show run")
|
2016-09-15 17:57:12 -06:00
|
|
|
, ((modm, xK_g), spawn "rofi -show window")
|
2016-09-19 21:03:30 -06:00
|
|
|
, ((modm .|. controlMask, xK_t), spawn "restart.sh taffybar")
|
2016-09-15 17:57:12 -06:00
|
|
|
-- TODO: Change this to bringing the window to the current workspace
|
2016-09-16 13:53:09 -06:00
|
|
|
, ((modm, xK_b), bringMenuArgs' "rofi" ["-dmenu"])
|
2016-09-15 22:47:23 -06:00
|
|
|
, ((modm .|. controlMask, xK_space), sendMessage $ JumpToLayout "Full")
|
|
|
|
, ((modm, xK_slash), sendMessage $ Toggle MIRROR)
|
2016-09-16 13:50:53 -06:00
|
|
|
] ++
|
|
|
|
-- 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)]]
|
2016-09-15 17:57:12 -06:00
|
|
|
|
2016-09-21 21:31:44 -06:00
|
|
|
layouts = tiled ||| Full ||| multiCol [1, 1] 2 0.01 (1/3)
|
2016-09-15 17:57:12 -06:00
|
|
|
where
|
|
|
|
tiled = Tall 1 (3/100) (1/2)
|
|
|
|
|
|
|
|
myLayoutHook = avoidStruts . smartSpacing 10 . noBorders
|
2016-09-15 22:47:23 -06:00
|
|
|
. mkToggle (MIRROR ?? EOT) $ layouts
|
2016-09-13 18:51:12 -06:00
|
|
|
|
2016-09-13 13:51:06 -06:00
|
|
|
myStartup = do
|
2016-09-19 13:09:58 -06:00
|
|
|
spawn "taffybar"
|
2016-09-13 13:51:06 -06:00
|
|
|
spawn "xsetroot -solid black"
|
|
|
|
-- TODO: Figure out how to set different backgrounds for different x
|
|
|
|
-- monitors
|
|
|
|
-- spawn "feh --bg-scale /usr/share/backgrounds/gnome/Blinds.jpg"
|
2016-09-16 13:08:01 -06:00
|
|
|
|
|
|
|
-- Local Variables:
|
|
|
|
-- flycheck-ghc-args: ("-Wno-missing-signatures")
|
|
|
|
-- End:
|