diff options
author | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2014-07-23 00:08:22 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander.sulfrian@fu-berlin.de> | 2014-07-23 00:08:22 +0200 |
commit | beed9b602ab5c5aa44345831313486bd6053ae7a (patch) | |
tree | 26a81e5d1ff83cef2bf90fe83896284754d94179 | |
parent | 22b828dff88bbdf5f4f6d7bbf7861a5af04863ed (diff) | |
download | xmonad-config-beed9b602ab5c5aa44345831313486bd6053ae7a.tar.gz xmonad-config-beed9b602ab5c5aa44345831313486bd6053ae7a.tar.xz xmonad-config-beed9b602ab5c5aa44345831313486bd6053ae7a.zip |
Australien does not have a key for mod4
-rw-r--r-- | xmonad.hs | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -58,6 +58,9 @@ import XMonad.Util.Replace (replace) import Control.Monad (when) import System.Environment (getArgs) +-- for hostname handling (no windows key on "Australien") +import Network.HostName + -- custom modules import HistoryGrid import EZConfig @@ -75,7 +78,10 @@ browser = "viewurl-opera.sh" myWorkspaces :: [String] myWorkspaces = ["1:web", "2:mail" ,"3:irc", "4:im", "5:code"] ++ map show [6 .. 9 :: Int] ++ ["0", "video", "music"] -modM = mod4Mask -- mod1Mask = Alt, mod2Mask = , mod3Mask= , mod4Mask = Win, mod5Mask = AltGr +modM :: String -> KeyMask +-- mod1Mask = Alt, mod2Mask = , mod3Mask= , mod4Mask = Win, mod5Mask = AltGrk +modM "Australien" = mod1Mask +modM _ = mod4Mask myDzenUrgencyConfig = DzenUrgencyHook { args = ["-bg", "red", "-fg", "black", "-fn", font, @@ -89,15 +95,16 @@ main = do dzenStatusDir <- getAppUserDataDirectory "xmonad" dzenStatusFile <- openFile (dzenStatusDir ++ "/dzenStatus") WriteMode + hostname <- getHostName xmonad -- Do _not_ use "ewhm" here, this would add the ewhm hooks to the -- end of your custom hooks (esp. the startup hook) and this would -- overwrite the setWMName "LG3D" and some Java apps will not work. $ withUrgencyHook myDzenUrgencyConfig - $ myConfig dzenStatusFile + $ myConfig dzenStatusFile hostname -myConfig statusFile = defaultConfig - { modMask = modM +myConfig statusFile hostname = defaultConfig + { modMask = modM hostname , terminal = term , borderWidth = 1 , normalBorderColor = "#545454" @@ -105,7 +112,7 @@ myConfig statusFile = defaultConfig , logHook = myLogHook statusFile , manageHook = myManageHook , keys = \c -> mkKeymap c $ myKeys c - , mouseBindings = \c -> M.union (M.fromList $ myMouse c) $ mouseBindings defaultConfig c + , mouseBindings = \c -> M.union (M.fromList $ myMouse (modM hostname) c) $ mouseBindings defaultConfig c , layoutHook = myLayout , workspaces = myWorkspaces , handleEventHook = myEventHook @@ -418,14 +425,14 @@ myKeys c = (m, f) <- [("M-", W.view), ("M-S-", W.shift), ("M-C-", copy)] ] -myMouse c = - [ ((modM, button1), +myMouse modm c = + [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w >> snapMagicMove (Just 50) (Just 50) w)) - , ((modM .|. shiftMask, button1), + , ((modm .|. shiftMask, button1), (\w -> focus w >> mouseMoveWindow w >> snapMagicMouseResize 0.8 (Just 50) (Just 50) w)) - , ((modM, button3), + , ((modm, button3), (\w -> focus w >> Flex.mouseWindow Flex.resize w)) ] |