Created
August 7, 2020 14:02
-
-
Save coproduto/4051a1087da8b684e423a7e5165f7f41 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 qualified Data.Map as M | |
myStatusBar = "xmobar" | |
myStatusBarPP = xmobarPP | |
{ ppCurrent = xmobarColor "#429942" "" . wrap "<" ">" } | |
-- Key binding to toggle the gap for the bar. | |
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b) | |
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $ | |
[ -- Screenshot key bindings | |
--take a screenshot of entire display | |
((modMask, xK_Print ), spawn "scrot screen_%Y-%m-%d-%H-%M-%S.png -d 1") | |
--take a screenshot of focused window | |
, ((modMask .|. controlMask, xK_Print ), spawn "scrot window_%Y-%m-%d-%H-%M-%S.png -d 1-u") | |
] | |
myConfig = def | |
{ terminal = "urxvt" | |
, modMask = mod4Mask | |
} | |
main = xmonad =<< statusBar myStatusBar myStatusBarPP toggleStrutsKey myConfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment