aboutsummaryrefslogtreecommitdiff
path: root/.config/XMonad/lib/Keybindings.hs
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-03-23 12:48:35 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-03-23 12:48:35 +0530
commit499bb6a2d9f08c3fad40297a13d63c35c42ec260 (patch)
tree55dd5d5f6f1fd66a099ac6535bfbd37de0b72256 /.config/XMonad/lib/Keybindings.hs
parent71803f75116a63aed35ff3175fe86bb254e38d97 (diff)
added a TreeSelect Menu
Diffstat (limited to '.config/XMonad/lib/Keybindings.hs')
-rw-r--r--.config/XMonad/lib/Keybindings.hs99
1 files changed, 54 insertions, 45 deletions
diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs
index bc1aa99..224139a 100644
--- a/.config/XMonad/lib/Keybindings.hs
+++ b/.config/XMonad/lib/Keybindings.hs
@@ -23,6 +23,7 @@ import XMonad.Hooks.ManageDocks
import Util
import Defaults
+import TreeSelect
import Scratchpads
myMouseKeybindings :: [((ButtonMask, Button), Window -> X ())]
@@ -37,12 +38,21 @@ myFnKeybindingsP :: [(String, X())]
myFnKeybindingsP = [
("<XF86MonBrightnessUp>", spawn backlightUp)
, ("<XF86MonBrightnessDown>", spawn backlightDown)
+
, ("<XF86AudioRaiseVolume>", spawn volUp)
, ("<XF86AudioLowerVolume>", spawn volDown)
, ("<XF86AudioMute>", spawn volMute)
+
+ , ("<XF86AudioPrev>", spawn prevTrack)
+ , ("<XF86AudioNext>", spawn nextTrack)
+ , ("<XF86AudioStop>", spawn stopTrack)
, ("<XF86AudioPlay>", spawn pausePlay)
, ("<XF86AudioPause>", spawn pausePlay)
, ("<Pause>", spawn pausePlay)
+
+ , ("<XF86Calculator>", spawn myCalculator)
+ , ("<XF86Display>", spawn myDisplayMenu)
+ , ("<XF86Mail>", spawn myEmailClient)
]
myKeybindings :: [((KeyMask, KeySym), X ())]
@@ -50,72 +60,71 @@ myKeybindings = [
((myModMask, xK_Return), spawn myTerminal)
, ((myModShiftMask, xK_Return), spawn myLockscreen)
, ((myModMask .|. shiftMask, xK_c), kill1)
- , ((myModMask, xK_s), spawn myLauncher)
+
+ , ((myModMask, xK_s), showTS myMainTS)
+ , ((myModShiftMask, xK_s), spawn myLauncher)
-- view prev/next workspaces
- , ((myModShiftMask, xK_Tab ), prevWS)
- , ((myModMask, xK_Tab ), nextWS)
- --, ((myModMask, xK_semicolon ), prevWS)
- --, ((myModMask, xK_apostrophe), nextWS)
- --, ((myModMask', xK_h ), prevWS)
- --, ((myModMask', xK_l ), nextWS)
+ , ((myModMask', xK_h ), prevWS)
+ , ((myModMask', xK_l ), nextWS)
-- move to prev/next workspaces
- --, ((myModShiftMask', xK_h ), shiftToPrev >> prevWS)
- --, ((myModShiftMask', xK_l ), shiftToNext >> nextWS)
- --, ((myModShiftMask', xK_semicolon ), shiftToPrev >> prevWS)
- --, ((myModShiftMask', xK_apostrophe), shiftToNext >> nextWS)
+ , ((myModShiftMask', xK_h ), shiftToPrev >> prevWS)
+ , ((myModShiftMask', xK_l ), shiftToNext >> nextWS)
-- toggle maximize
- --, ((myModMask, xK_f), withFocused (sendMessage . maximizeRestore))
+ , ((myModMask, xK_f), withFocused (sendMessage . maximizeRestore))
-- unfloat windows
- --, ((myModMask .|. shiftMask, xK_f), withFocused $ windows . W.sink)
+ , ((myModMask .|. shiftMask, xK_f), withFocused $ windows . W.sink)
-- cycle through windows
- --, ((myModMask', xK_j), windows W.focusDown)
- --, ((myModMask', xK_k), windows W.focusUp)
+ , ((myModMask, xK_Tab), windows W.focusUp)
+ , ((myModShiftMask, xK_Tab), windows W.focusDown)
-- 2D navigation
- , ((myModMask, xK_n), sendMessage $ Go R)
- , ((myModMask, xK_d), sendMessage $ Go L)
- , ((myModMask, xK_t), sendMessage $ Go U)
- , ((myModMask, xK_h), sendMessage $ Go D)
+ , ((myModMask, xK_l), sendMessage $ Go R)
+ , ((myModMask, xK_h), sendMessage $ Go L)
+ , ((myModMask, xK_k), sendMessage $ Go U)
+ , ((myModMask, xK_j), sendMessage $ Go D)
-- swap windows
- , ((myModShiftMask, xK_n), sendMessage $ WN.Swap R)
- , ((myModShiftMask, xK_d), sendMessage $ WN.Swap L)
- , ((myModShiftMask, xK_t), sendMessage $ WN.Swap U)
- , ((myModShiftMask, xK_h), sendMessage $ WN.Swap D)
+ , ((myModShiftMask, xK_l), sendMessage $ WN.Swap R)
+ , ((myModShiftMask, xK_h), sendMessage $ WN.Swap L)
+ , ((myModShiftMask, xK_k), sendMessage $ WN.Swap U)
+ , ((myModShiftMask, xK_j), sendMessage $ WN.Swap D)
-- resize
- , ((myModMask .|. myModMask', xK_n), sendMessage $ ExpandTowards R)
- , ((myModMask .|. myModMask', xK_d), sendMessage $ ExpandTowards L)
- , ((myModMask .|. myModMask', xK_h), sendMessage $ ExpandTowards D)
- , ((myModMask .|. myModMask', xK_t), sendMessage $ ExpandTowards U)
- , ((myModMask .|. myModShiftMask', xK_n), sendMessage $ ShrinkFrom R)
- , ((myModMask .|. myModShiftMask', xK_d), sendMessage $ ShrinkFrom L)
- , ((myModMask .|. myModShiftMask', xK_h), sendMessage $ ShrinkFrom D)
- , ((myModMask .|. myModShiftMask', xK_t), sendMessage $ ShrinkFrom U)
- --, ((myModMask, xK_B), windows $ W.greedyView "十")
+ , ((myModMask .|. myModMask', xK_h), sendMessage $ ExpandTowards R)
+ , ((myModMask .|. myModMask', xK_l), sendMessage $ ExpandTowards L)
+ , ((myModMask .|. myModMask', xK_j), sendMessage $ ExpandTowards D)
+ , ((myModMask .|. myModMask', xK_k), sendMessage $ ExpandTowards U)
+ , ((myModMask .|. myModShiftMask', xK_h), sendMessage $ ShrinkFrom R)
+ , ((myModMask .|. myModShiftMask', xK_l), sendMessage $ ShrinkFrom L)
+ , ((myModMask .|. myModShiftMask', xK_j), sendMessage $ ShrinkFrom D)
+ , ((myModMask .|. myModShiftMask', xK_k), sendMessage $ ShrinkFrom U)
] ++ [
-- workspace switching
- ((myModMask, key), windows $ W.greedyView ws) | (key,ws) <- myExtraWorkspaces
- -- ] ++ [
- -- -- moving window to workspace
- -- ((myModShiftMask, key), windows $ W.shift ws) | (key,ws) <- myWorkspaces
- -- ] ++ [
- -- -- to swap workspace
- -- ((myModShiftMask', key), windows $ swapWithCurrent ws) | (key, ws) <- myWorkspaces
+ ((myModMask, key), windows $ W.greedyView ws)
+ | (key,ws) <- myExtraWorkspaces
+ ] ++ [
+ -- moving window to workspace
+ ((myModShiftMask, key), windows $ W.shift ws)
+ | (key,ws) <- myExtraWorkspaces
+ ] ++ [
+ -- to swap workspace
+ -- TODO: try to change this into a key chord
+ ((myModShiftMask', key), windows $ swapWithCurrent ws)
+ | (key, ws) <- zip [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_8, xK_0] myWorkspaces
-- ] ++ [
-- -- copy
-- ((m .|. myModMask, key), windows $ f ws) | (key, ws) <- myWorkspaces, (f, m) <- [(copy, myModShiftMask')]
-- ] ++ [
-- -- for not swapping tags while using multihead
-- ((m .|. myModMask, key), windows $ f ws) | (key, ws) <- myWorkspaces, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
- ] -- ++ [ -- directly focus monitors instead of cycling
- -- ((m .|. myModMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
- -- | (key, sc) <- zip [xK_e, xK_w] [0..]
- -- , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
- --]
+ ] ++ [ -- directly focus monitors instead of cycling
+ ((m .|. myModMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
+ | (key, sc) <- zip [xK_m, xK_w] [0..]
+ , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
+ ]
myKeybindingsP :: [(String, X())]
-myKeybindingsP = [] \ No newline at end of file
+myKeybindingsP = []