Created
January 18, 2012 01:20
-
-
Save shomah4a/1630188 to your computer and use it in GitHub Desktop.
xmonad confs
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
Config { font = "xft:Sans-9:bold", | |
bgColor = "black", | |
fgColor = "grey", | |
position = TopW L 80, | |
lowerOnStart = False, | |
commands = [ | |
Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10, | |
Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10, | |
Run Memory ["-t","Mem: <usedratio>%"] 10, | |
Run Swap [] 10, | |
Run Com "uname" ["-s","-r"] "" 36000, | |
Run Date "%a %b %_d %Y %H:%M:%S" "date" 10, | |
Run StdinReader | |
], | |
sepChar = "%", | |
alignSep = "}{", | |
template = "%cpu% | %memory% * %swap% | %eth0% } %StdinReader%{ <fc=#ee9a00>%date%</fc>| %uname%" | |
} |
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
#-*- mode:sh -*- | |
xrandr --output VGA1 --mode 1920x1200 | |
# Set up an icon tray | |
trayer --edge top --align right --SetDockType true --SetPartialStrut true \ | |
--expand true --width 10 --transparent true --tint 0x191970 --height 12 & | |
# Set the background color | |
gnome-screensaver | |
gnome-settings-daemon & | |
xsetroot -solid "#008080" | |
# Fire up apps | |
# gajim & | |
xscreensaver -no-splash & | |
eval `dbus-launch --sh-syntax` | |
export DBUS_SESSION_BUS_ADDRESS | |
export DBUS_SESSION_BUS_PID | |
gconftool-2 --spawn | |
dropbox start | |
if [ -x /usr/bin/nm-applet ] ; then | |
nm-applet --sm-disable & | |
fi | |
if [ -x /usr/bin/bluetooth-applet ] ; then | |
bluetooth-applet & | |
fi | |
if [ -x /usr/bin/gnome-power-manager ] ; then | |
sleep 3 | |
gnome-power-manager & | |
fi | |
nautilus & | |
gnome-terminal & |
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 | |
-- 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") | |
] | |
myLogHook dest = dynamicLogWithPP defaultPP { ppOutput = hPutStrLn dest, | |
ppVisible = wrap "(" ")" | |
} | |
myPP = xmobarPP { ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" } | |
toggleStrutsKey XConfig { XMonad.modMask = modMask } = ( modMask, xK_b ) | |
defaults xmproc = defaultConfig | |
{ | |
manageHook = manageHook', | |
modMask = myModMask, | |
startupHook = setWMName "LG3D", | |
logHook = myLogHook xmproc | |
} `additionalKeysP` myKeys | |
myBar conf = statusBar "xmobar" myPP toggleStrutsKey conf | |
main :: IO () | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar $HOME/.xmobarrc" | |
xmproc <- spawnPipe "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" | |
xmproc <- spawnPipe "$HOME/files/.dropbox-dist/dropboxd" | |
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