From 483d65a9cf024dd50d4009c3e33362108117d10d Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 12 Dec 2023 12:21:56 +0530 Subject: layout-specific keybindings --- .config/XMonad/lib/Keybindings.hs | 32 ++++++++++++++++++-------------- .config/XMonad/xmonad.hs | 3 +++ 2 files changed, 21 insertions(+), 14 deletions(-) (limited to '.config/XMonad') 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 = [ + ("", spawn backlightUp) + , ("", spawn backlightDown) + , ("", spawn volUp) + , ("", spawn volDown) + , ("", spawn volMute) + , ("", spawn pausePlay) + , ("", spawn pausePlay) + , ("", 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 = [ - ("", spawn backlightUp) - , ("", spawn backlightDown) - , ("", spawn volUp) - , ("", spawn volDown) - , ("", spawn volMute) - , ("", spawn pausePlay) - , ("", spawn pausePlay) - , ("", 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) -- cgit v1.2.3