aboutsummaryrefslogtreecommitdiff
path: root/.config/XMonad
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-12-12 12:21:56 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-12-12 12:21:56 +0530
commit483d65a9cf024dd50d4009c3e33362108117d10d (patch)
tree3318fafe957b9b5a532b9c51cb9669e3ca7c7a7f /.config/XMonad
parent422e961b23a37464a6902ea3d6ef43490631e901 (diff)
layout-specific keybindings
Diffstat (limited to '.config/XMonad')
-rw-r--r--.config/XMonad/lib/Keybindings.hs32
-rw-r--r--.config/XMonad/xmonad.hs3
2 files changed, 21 insertions, 14 deletions
diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs
index 7e65e81..9b3eaaa 100644
--- a/.config/XMonad/lib/Keybindings.hs
+++ b/.config/XMonad/lib/Keybindings.hs
@@ -40,8 +40,20 @@ myMouseKeybindings = [
, ((myModShiftMask, 5), \w -> shiftToNext >> nextWS)
]
-myKeybindings :: [((KeyMask, KeySym), X ())]
-myKeybindings = [
+myFnKeybindingsP :: [(String, X())]
+myFnKeybindingsP = [
+ ("<XF86MonBrightnessUp>", spawn backlightUp)
+ , ("<XF86MonBrightnessDown>", spawn backlightDown)
+ , ("<XF86AudioRaiseVolume>", spawn volUp)
+ , ("<XF86AudioLowerVolume>", spawn volDown)
+ , ("<XF86AudioMute>", spawn volMute)
+ , ("<XF86AudioPlay>", spawn pausePlay)
+ , ("<XF86AudioPause>", spawn pausePlay)
+ , ("<Pause>", spawn pausePlay)
+ ]
+
+myKeybindingsQWERTY :: [((KeyMask, KeySym), X ())]
+myKeybindingsQWERTY = [
((myModMask, xK_Return), spawn myTerminal)
, ((myModShiftMask, xK_Return), spawn myLockscreen)
, ((myModMask .|. shiftMask, xK_q), kill1)
@@ -151,19 +163,11 @@ myKeybindings = [
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
]
-myKeybindingsP :: [(String, X())]
-myKeybindingsP = [
- ("<XF86MonBrightnessUp>", spawn backlightUp)
- , ("<XF86MonBrightnessDown>", spawn backlightDown)
- , ("<XF86AudioRaiseVolume>", spawn volUp)
- , ("<XF86AudioLowerVolume>", spawn volDown)
- , ("<XF86AudioMute>", spawn volMute)
- , ("<XF86AudioPlay>", spawn pausePlay)
- , ("<XF86AudioPause>", spawn pausePlay)
- , ("<Pause>", spawn pausePlay)
+myKeybindingsQWERTYP :: [(String, X())]
+myKeybindingsQWERTYP = [
-- actions
-- TODO: add reboot, shutdown, logout, copy, cut, paste
- , ("M-a w", spawn wifiOff)
+ ("M-a w", spawn wifiOff)
, ("M-a S-w", spawn wifiOn)
, ("M-a s", spawn customScreenshot)
, ("M-a S-s", spawn fullScreenshot)
@@ -261,4 +265,4 @@ myKeybindingsP = [
, ("M-q S-j", sendMessage $ ShrinkFrom D)
, ("M-q S-k", sendMessage $ ShrinkFrom U)
, ("M-q S-l", sendMessage $ ShrinkFrom R)
- ]
+ ] ++ myFnKeybindingsP
diff --git a/.config/XMonad/xmonad.hs b/.config/XMonad/xmonad.hs
index 6a4626d..8da1c12 100644
--- a/.config/XMonad/xmonad.hs
+++ b/.config/XMonad/xmonad.hs
@@ -14,6 +14,9 @@ import Keybindings
import Defaults
import Hooks
+myKeybindings = myKeybindingsQWERTY
+myKeybindingsP = myKeybindingsQWERTYP ++ myFnKeybindingsP
+
main :: IO ()
main = do
-- myLemonbar <- statusBarPipe myLemonbarCmd (pure myLemonbarPP)