Created
December 29, 2014 14:44
-
-
Save shomah4a/dd6ef868c7c04205ee82 to your computer and use it in GitHub Desktop.
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(additionalKeys, additionalKeysP) | |
import System.IO | |
-- import System | |
import qualified XMonad.StackSet as W | |
import qualified System.Cmd as C | |
import XMonad.Hooks.SetWMName | |
import XMonad.Hooks.EwmhDesktops | |
import qualified XMonad.Hooks.ICCCMFocus as ICCCMFocus | |
-- mod キーを super に | |
myModMask = mod4Mask | |
myManageHook = composeAll . concat $ | |
[ | |
[ className =? c --> doFloat | c <- myFloats ], | |
[ title =? t --> doFloat | t <- myOtherFloats ], | |
[ resource =? r --> doIgnore | r <- myIgnores ], | |
[ className =? "Gran Paradiso" --> doF (W.shift "3:Web") ], | |
[ className =? "Opera" --> doF (W.shift "3:Web") ], | |
[ className =? "Gimp" --> doF (W.shift "7:Video") <+> doF (W.swapUp) ], | |
[ className =? "gvim" --> doF (W.shift "2:Vim") ], | |
[ className =? "MPlayer" --> doF (W.shift "6:Video") ], | |
[ className =? "Transmission" --> doF (W.shift "3:Web") ], | |
[ className =? "Pidgin" --> doF (W.shift "5:Chat") ], | |
[ className =? "Thunar" --> doF (W.shift "4:Thunar") ], | |
[ (title =? "ncmpc" <&&> className =? "URxvt") --> doF (W.shift "1:Main" ) ] | |
] | |
where | |
myIgnores = ["panel", "trayer", "xfce4-notifyd"] | |
myFloats = ["feh", "Gimp", "Xmessage", "Pidgin", "pcmanfm", "Totem", "Sonata"] | |
myOtherFloats = ["alsamixer", "Gran Paradiso Preferences", "Session Manager - Mozilla Firefox", | |
"Gran Paradiso Add-on Updates", "Clear Private Data", "Downloads" | |
] | |
manageHook' :: ManageHook | |
manageHook' = (doF W.swapDown) <+> manageDocks <+> manageHook defaultConfig <+> myManageHook | |
myKeys = [("M-S-l", spawn "gnome-screensaver-command -l") | |
] | |
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" } | |
toggleStrutsKey XConfig { XMonad.modMask = modMask } = ( modMask, xK_b ) | |
defaults xmproc = defaultConfig | |
{ | |
manageHook = manageHook', | |
modMask = myModMask, | |
startupHook = ewmhDesktopsStartup >> setWMName "LG3D", | |
logHook = ICCCMFocus.takeTopFocus -- for Android Studio | |
} `additionalKeysP` myKeys | |
myBar conf = statusBar "xmobar" myPP toggleStrutsKey conf | |
main :: IO () | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar $HOME/.xmobarrc" | |
xmproc <- spawnPipe "/usr/bin/xmodmap $HOME/.Xmodmap" | |
xmproc <- spawnPipe "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" | |
xmproc <- spawnPipe "$HOME/files/.dropbox-dist/dropboxd" | |
xmproc <- spawnPipe "dropbox start" | |
xmproc <- spawnPipe "trayer --edge bottom --align right --SetDockType true --SetPartialStrut true --expand true --width 20 --transparent true --tint 0x191970 --height 12" | |
xmproc <- spawnPipe "gconftool-2 --spawn" | |
xmproc <- spawnPipe "nautilus" | |
xmproc <- spawnPipe "nm-applet --sm-disable" | |
xmproc <- spawnPipe "bluetooth-applet" | |
xmproc <- spawnPipe "gnome-sound-applet" | |
xmproc <- spawnPipe "gnome-session" | |
-- xmproc <- spawnPipe "gnome-session &" | |
xmproc <- spawnPipe "gnome-power-manager" | |
let conf = defaults xmproc | |
myBar conf >>= xmonad | |
return () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment