Last active
October 30, 2019 16:34
-
-
Save qizwiz/aca03e38e485109db19a026c43239400 to your computer and use it in GitHub Desktop.
my first xmonad config file
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 Data.Char | |
import XMonad | |
import XMonad.Actions.WindowGo | |
import XMonad.Config.Desktop | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Prompt | |
import XMonad.Prompt.RunOrRaise | |
import XMonad.Util.EZConfig (additionalKeysP) | |
xpConfig :: XPConfig | |
xpConfig = def | |
{ | |
position = CenteredAt 0.5 0.27 | |
, font = "xft:Bitstream Vera Sans Mono:size=14:bold:antialias=true" | |
, searchPredicate = ignoreCase | |
} | |
where ignoreCase p s = searchPredicate def (ic p) (ic s) | |
ic = map toLower | |
keyfix :: [Char] -> [Char] | |
keyfix value = "amixer -D pulse set Master " ++ value | |
main :: IO () | |
main = | |
xmonad $ desktopConfig | |
{ | |
manageHook = manageDocks <+> manageHook desktopConfig | |
, layoutHook = avoidStruts $ layoutHook desktopConfig | |
, modMask = mod4Mask | |
} `additionalKeysP` | |
[ ("M-S z" , spawn "xscreensaver-command -lock") | |
,("C-<Print>" , spawn "sleep 0.2; scrot -s") | |
,("<Print>" , spawn "scrot") | |
,("<XF86AudioLowerVolume>" , spawn $ keyfix "2%-") | |
,("<XF86AudioRaiseVolume>" , spawn $ keyfix "2%+") | |
,("<XF86AudioMute>" , spawn $ keyfix "toggle") | |
,("M1-S-b" , raiseBrowser) | |
,("M1-S-e" , raiseEditor) | |
,("M1-<Space>" , runOrRaisePrompt xpConfig) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment