Last active
February 24, 2021 23:15
-
-
Save imalsogreg/5c8b431c3f5626c4e533 to your computer and use it in GitHub Desktop.
My xmonad config - programmer's dvorak ok workspace switching, caps=ctrl, working matlab, laptop volume keys
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 qualified Data.Map as M | |
import XMonad | |
import qualified XMonad as XMonad | |
import XMonad.Hooks.SetWMName | |
import qualified XMonad.StackSet as W | |
myWorkspaces = map show [1..9] | |
myNumRow = [xK_ampersand | |
, xK_bracketleft | |
, xK_braceleft | |
, xK_braceright | |
, xK_parenleft | |
, xK_equal | |
, xK_asterisk | |
, xK_parenright | |
, xK_plus] | |
myKeys :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ()) | |
myKeys conf@(XConfig {modMask = modm}) = | |
M.fromList $ [((m.|. modm, k), windows $ f i) | |
| (i,k) <- zip (XMonad.workspaces conf) myNumRow | |
, (f,m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] | |
++ [((noModMask, 0x1008ff12), getMute >>= \m -> setMute (not m :: Bool) >> return ()) | |
,((noModMask, 0x1008ff11), setMute False >> lowerVolume 4 >> return ()) | |
,((noModMask, 0x1008ff13), setMute False >> raiseVolume 4 >> return ()) | |
] | |
-- Matlab Java gui workaround. | |
myStartupHook = setWMName "LG3D" | |
------------------------------------------------------------------------------ | |
main = xmonad $ defaultConfig { terminal = "gnome-terminal" | |
, modMask = mod4Mask | |
, keys = \c -> myKeys c `M.union` | |
(keys defaultConfig c) | |
, startupHook = myStartupHook | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
noob here. xmona gets angry and throws a bunch of Not in scope error relating to get/set Mute and lower/Raise volume. What do I do?