Last active
December 11, 2015 02:18
-
-
Save axelGschaider/4529065 to your computer and use it in GitHub Desktop.
just my xmonad.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Named | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Actions.CopyWindow | |
import XMonad.StackSet as W | |
import XMonad.Layout.MouseResizableTile | |
import XMonad.Layout.PositionStoreFloat | |
import XMonad.Layout.NoFrillsDecoration | |
import XMonad.Layout.BorderResize | |
import System.IO | |
import qualified Data.Map as M | |
main = do | |
spawn "unclutter" | |
spawn "hsetroot -solid '#002b36'" | |
xmonad $ ewmh defaultConfig | |
{ manageHook = manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ myLayouts | |
, modMask = mod4Mask | |
, keys = myKeys | |
, focusFollowsMouse = False | |
, focusedBorderColor = "#cb4b16" | |
, normalBorderColor = "#657b83" | |
, borderWidth = 2 | |
, terminal = "urxvt" | |
} | |
keysToAdd x = [ ((mod4Mask, xK_a), sequence_ $ [windows $ copy i | i <- XMonad.workspaces defaultConfig]) -- copy window to all workspaces | |
, ((mod4Mask .|. shiftMask, xK_a), windows $ kill8) -- remove window from all workspaces except the current one | |
, ((mod4Mask, xK_u), sendMessage ShrinkSlave) | |
, ((mod4Mask, xK_i), sendMessage ExpandSlave) | |
] ++ (keysForMoving x) | |
keysForMoving x = [((m .|. mod4Mask, k), windows $ f i) | |
| (i, k) <- zip (XMonad.workspaces x) [xK_1 ..] | |
, (f, m) <- [(W.view, 0), (W.shift, shiftMask), (copy, shiftMask .|. controlMask)]] | |
keysToDel x = [] | |
newKeys x = M.union (keys defaultConfig x) (M.fromList (keysToAdd x)) | |
myKeys x = foldr M.delete (newKeys x) (keysToDel x) | |
myLayouts = avoidStruts $ smartBorders $ ( | |
tiled1 ||| | |
tiled2 ||| | |
fullscreen ||| | |
floating1 | |
) | |
floating1 = borderResize $ positionStoreFloat | |
tiled1 = mouseResizableTile | |
tiled2 = mouseResizableTileMirrored | |
fullscreen = Full | |
kill8 ss | Just w <- W.peek ss = (W.insertUp w) $ W.delete w ss | otherwise = ss | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment