-
-
Save wiedzmin/2e67e4f205cd43d5c826f88949d4cdf6 to your computer and use it in GitHub Desktop.
xmonad
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:Droid Sans Mono:size=9:bold:antialias=true" | |
bgColor = "#000000", | |
fgColor = "#ffffff", | |
position = Top, | |
lowerOnStart = True, | |
commands = [ | |
Run CommandReader "~/Projects/pymodoro/pymodoro.py" "pomodoro" | |
,Run Kbd [("us", "US"), ("ru", "RU")] | |
,Run Date "%Y.%m.%d %H:%M:%S" "date" 10 | |
,Run BatteryN ["BAT1"] ["-t", "<left>% <timeleft>"] 60 "battery" | |
,Run StdinReader | |
], | |
sepChar = "%", | |
alignSep = "}{", | |
template = "%StdinReader% }{ %pomodoro% | %battery% | %kbd% | <fc=#FFFFCC>%date%</fc> " | |
} |
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 System.IO | |
import XMonad | |
import XMonad.Config.Desktop | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.SetWMName | |
import XMonad.Layout.Fullscreen | |
import XMonad.Layout.NoBorders | |
import XMonad.Util.EZConfig(additionalKeys) | |
import XMonad.Util.Run(spawnPipe) | |
-- Colors and Borders | |
xmobarTitleColor = "#FFB6B0" -- Current window title | |
xmobarCurrentWorkspaceColor = "#CEFFAC" -- Current workspace | |
defaults = defaultConfig { | |
modMask = mod4Mask, | |
terminal = "urxvt", | |
manageHook = composeAll [ | |
className =? "mpv" --> doFloat, | |
isFullscreen --> doFullFloat, | |
manageHook defaultConfig], | |
layoutHook = avoidStruts $ smartBorders $ layoutHook desktopConfig, | |
handleEventHook = fullscreenEventHook, | |
startupHook = setWMName "LG3D" | |
} `additionalKeys` myKeys | |
myKeys = [ | |
((mod4Mask, xK_n), spawn "touch ~/.pomodoro_session"), | |
((mod4Mask .|. shiftMask, xK_n), spawn "rm ~/.pomodoro_session"), | |
((mod4Mask, xK_apostrophe), sendMessage ToggleStruts) | |
] | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar ~/.xmonad/xmobar.hs" | |
xmonad . docks $ defaults { | |
logHook = dynamicLogWithPP $ defaultPP { | |
ppOutput = System.IO.hPutStrLn xmproc | |
, ppTitle = xmobarColor xmobarTitleColor "" . shorten 100 | |
, ppCurrent = xmobarColor xmobarCurrentWorkspaceColor "" . wrap "[" "]" | |
, ppSep = " " | |
, ppWsSep = " " | |
, ppLayout = (\ x -> case x of | |
"Spacing 6 Mosaic" -> "[:]" | |
"Spacing 6 Mirror Tall" -> "[M]" | |
"Spacing 6 Hinted Tabbed Simplest" -> "[T]" | |
"Spacing 6 Full" -> "[ ]" | |
_ -> x ) | |
, ppHiddenNoWindows = showNamedWorkspaces | |
} | |
} where showNamedWorkspaces wsId = if any (`elem` wsId) ['a'..'z'] | |
then pad wsId | |
else "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment