Skip to content

Instantly share code, notes, and snippets.

@fumieval
Created October 24, 2011 09:16
Show Gist options
  • Save fumieval/1308647 to your computer and use it in GitHub Desktop.
Save fumieval/1308647 to your computer and use it in GitHub Desktop.
Xmonad オススメ設定(KDE)
{-# LANGUAGE TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses #-}
import XMonad
import XMonad.Config.Kde
import XMonad.Config.Desktop (desktopLayoutModifiers)
import XMonad.Layout.MultiToggle
import XMonad.Util.EZConfig
import qualified XMonad.StackSet as W
myKeys = -- キーバインド
[("M-f", sendMessage $ Toggle FULLM) -- mod-Fで現在のウィンドウをフルスクリーンにする
]
tall = Tall 1 (3/100) (1/2)
myLayoutHook = id
. mkToggle (single FULLM)
$ desktopLayoutModifiers
$ tall ||| Mirror tall -- お好きなレイアウトをどうぞ
-- `xprop | grep WM_CLASS` でクラス名を取得できる
myFloats = ["Plasma-desktop", "Knotes"] -- 起動時にフロートする
myUnFloats = [] -- 起動時にフロートを解除
myIgnores = ["desktop_window", "kdesktop"] -- 管理しない
data MyTransformers = FULLM
deriving (Read, Show, Eq, Typeable)
instance Transformer MyTransformers Window where
transform FULLM _ k = k $ desktopLayoutModifiers $ Full
main = xmonad $ kdeConfig
{
modMask = mod4Mask -- WindowsボタンをModキーとして設定
,manageHook = manageHook kdeConfig <+> myManageHook
,layoutHook = myLayoutHook
} `additionalKeysP` myKeys where
myManageHook = composeAll . concat $ [
[className =? c --> doFloat | c <- myFloats]
,[className =? c --> unFloat | c <- myUnFloats]
,[resource =? c --> doIgnore | c <- myIgnores]
]
unFloat = ask >>= doF . W.sink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment