Created
July 11, 2015 09:54
-
-
Save zakky-dev/25b35dd8053f110f76ce to your computer and use it in GitHub Desktop.
XMonadの設定
This file contains hidden or 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.EwmhDesktops | |
import qualified XMonad.Hooks.ManageDocks as MD | |
import XMonad.Util.EZConfig | |
import XMonad.Layout.Named | |
import XMonad.Layout.ToggleLayouts | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Spacing | |
import XMonad.Layout.ResizableTile | |
import XMonad.Layout.GridVariants | |
import XMonad.Layout.Magnifier | |
import XMonad.Actions.GridSelect | |
import XMonad.Actions.WindowGo | |
import XMonad.Actions.WindowBringer | |
colorBlue = "#857da9" | |
colorGreen = "#88b986" | |
colorGray = "#676767" | |
colorWhite = "#d3d7cf" | |
colorGrayAlt = "#313131" | |
colorNormalbg = "#1a1e1b" | |
myLayoutSpace = 2 | |
tallGrid = TallGrid 2 1 (1/2) (16/10) (2/100) | |
spacedTallGrid = spacing myLayoutSpace $ tallGrid | |
resizableTall = ResizableTall 1 (3/100) (1/2) [] | |
spacedResizableTall = spacing myLayoutSpace $ resizableTall | |
myLayout = (named "MTG" (magnifier $ spacedTallGrid)) | |
||| (named "TG" spacedTallGrid) | |
||| (named "RT" spacedResizableTall) | |
||| (named "MRT" (magnifier $ spacedResizableTall)) | |
||| (named "F"(spacing myLayoutSpace $ Full)) | |
myStartupHook = do | |
spawn "~/share/wallpapers/wallpaper.sh" | |
myDefaultConfig = | |
defaultConfig | |
{ terminal = "urxvt" | |
, normalBorderColor = colorGray | |
, focusedBorderColor = colorGreen | |
, modMask = mod4Mask | |
, layoutHook = toggleLayouts (noBorders Full) $ MD.avoidStruts $ myLayout | |
, startupHook = myStartupHook | |
} | |
`additionalKeysP` | |
[ ("M-a", sendMessage MirrorShrink) | |
, ("M-z", sendMessage MirrorExpand) | |
, ("M-s", gotoMenu) | |
, ("M-g", goToSelected defaultGSConfig) | |
, ("M-q", spawn "killall wallpaper.sh; xmonad --recompile && xmonad --restart") | |
, ("M-l", spawn "systemctl suspend") | |
, ("M-S-t", runOrRaise "uxrvt" (className =? "URxvt")) | |
, ("M-S-e", runOrRaise "emacs" (className =? "Emacs")) | |
, ("M-S-f", runOrRaise "firefox" (className =? "Firefox")) | |
, ("M-S-m", runOrRaise "thunderbird" (className =? "Thunderbird")) | |
, ("M-S-v", runOrRaise "virtualbox" (className =? "VirtualBox")) | |
] | |
myBar = "xmobar ~/.xmonad/xmobarrc" | |
myPP = xmobarPP { ppCurrent = xmobarColor colorGreen "" . wrap "[" "]" } | |
toggleStrutsKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b) | |
myConfig = ewmh myDefaultConfig | |
main :: IO () | |
main = do | |
xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment