Created
October 30, 2013 08:29
-
-
Save jarohen/7228968 to your computer and use it in GitHub Desktop.
XMonad conf - 2013-10-30
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
| Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" | |
| , bgColor = "black" | |
| , fgColor = "grey" | |
| , position = Top | |
| , allDesktops = True | |
| , lowerOnStart = True | |
| , commands = [ Run Weather "EGLC" ["-t","<station>: <tempC>C, <skyCondition>","-L","2","-H","25","--normal","green","--high","red","--low","blue"] 18000 | |
| , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 5 | |
| , Run Memory ["-t","Mem: <usedratio>%"] 10 | |
| , Run DynNetwork ["-t", "<dev>: <rx> kB/<tx> kB "] 5 | |
| , Run Swap [] 10 | |
| , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 | |
| , Run StdinReader | |
| -- , Run BatteryP ["BAT0"] ["-t", "<acstatus><watts> (<left>%)", | |
| -- "-L", "10", "-H", "80", "-p", "3", | |
| -- "--", "-O", "<fc=green>On</fc> - ", "-i", "", | |
| -- "-L", "-15", "-H", "-5", | |
| -- "-l", "red", "-m", "blue", "-h", "green"] | |
| -- 600 | |
| ] | |
| , sepChar = "%" | |
| , alignSep = "}{" | |
| , template = "%StdinReader% | %cpu% | %memory% * %swap% }{ %dynnetwork% | %EGLC% | <fc=#ee9a00>%date%</fc>" | |
| } |
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.Config.Desktop | |
| import System.IO | |
| import XMonad.Layout.Tabbed | |
| import XMonad.Layout.NoBorders | |
| import XMonad.Layout.Reflect | |
| import XMonad.Layout.Spacing | |
| import XMonad.Hooks.SetWMName | |
| import XMonad.Hooks.ManageDocks | |
| import XMonad.Hooks.DynamicLog | |
| import XMonad.Util.Run(spawnPipe) | |
| import XMonad.Util.EZConfig (additionalKeysP, removeKeysP) | |
| import XMonad.Hooks.ManageDocks (avoidStruts, manageDocks) | |
| spotify command = spawn ("dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player." ++ command) | |
| myLayout = avoidStruts $ (simpleTabbed ||| tiled ||| Mirror tiled) | |
| where | |
| tiled = spacing 3 $ Tall nMaster resize ratio | |
| nMaster = 1 | |
| resize = 3/100 | |
| ratio = 1/2 | |
| main = do | |
| xmproc <- spawnPipe "pkill xmobar; xmobar" | |
| xmonad $ desktopConfig { modMask = mod4Mask | |
| , terminal = "konsole" | |
| , layoutHook = myLayout | |
| , startupHook = setWMName "LG3D" | |
| , normalBorderColor = "black" | |
| , focusedBorderColor = "#080" | |
| , borderWidth = 3 | |
| , logHook = dynamicLogWithPP xmobarPP { ppOutput = hPutStrLn xmproc | |
| , ppLayout = const "" | |
| , ppHiddenNoWindows = xmobarColor "#666666" "" | |
| , ppVisible = xmobarColor "#bbbb00" "" . wrap "(" ")" | |
| , ppTitle = (const "")} | |
| } | |
| `additionalKeysP` [ ("M-x", spawn "dmenu_run") | |
| , ("C-M-e", spawn "emacsclient -cq") | |
| , ("C-M-v", spawn "konsole -e vim") | |
| , ("C-M-w", spawn "chromium") | |
| , ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume 1 -- -2dB") | |
| , ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume 1 -- +2dB") | |
| , ("<XF86HomePage>", spawn "chromium") | |
| , ("<XF86Mail>", spawn "emacsclient -cq") | |
| , ("<XF86Search>", spawn "systemctl suspend") | |
| , ("<XF86AudioPlay>", spotify "PlayPause") | |
| , ("<XF86Back>", spotify "Previous") | |
| , ("<XF86Forward>", spotify "Next") | |
| , ("<XF86AudioPrevious>", spotify "Previous") | |
| , ("<XF86AudioNext>", spotify "Next") | |
| , ("C-M-l", spawn "xscreensaver-command -lock") | |
| , ("M-<D>", spawn "amixer -c 0 set Master 2dB-") | |
| , ("M-<U>", spawn "amixer -c 0 set Master 2dB+") | |
| , ("M-<Insert>", spotify "PlayPause") | |
| , ("M-<L>", spotify "Previous") | |
| , ("M-<R>", spotify "Next")] | |
| `removeKeysP` ["M-Q"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment