From bcbad1c6911be513adc8f8664372d228ecf4cfb2 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 29 Nov 2021 01:56:37 +0530 Subject: added keybindings for each treeselect menu --- .config/XMonad/xmonad.hs | 71 ++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 30 deletions(-) (limited to '.config/XMonad') diff --git a/.config/XMonad/xmonad.hs b/.config/XMonad/xmonad.hs index 4561748..85d13db 100644 --- a/.config/XMonad/xmonad.hs +++ b/.config/XMonad/xmonad.hs @@ -115,27 +115,27 @@ gamingTS = ] myGamingTS a = TS.treeselectAction a gamingTS +scratchpadTS = + [ Node (TS.TSNode "Term 0" "" (namedScratchpadAction myScratchpads "Term 0")) [] + , Node (TS.TSNode "Term 1" "" (namedScratchpadAction myScratchpads "Term 1")) [] + , Node (TS.TSNode "Term 2" "" (namedScratchpadAction myScratchpads "Term 2")) [] + , Node (TS.TSNode "OBS" "" (namedScratchpadAction myScratchpads "OBS")) [] + , Node (TS.TSNode "lf" "" (namedScratchpadAction myScratchpads "lf")) [] + , Node (TS.TSNode "BPYTOP" "" (namedScratchpadAction myScratchpads "BPYTOP")) [] + , Node (TS.TSNode "Calculator" "" (namedScratchpadAction myScratchpads "calc")) [] + , Node (TS.TSNode "Arandr" "" (namedScratchpadAction myScratchpads "arandr")) [] + ] +myScratchpadTS a = TS.treeselectAction a scratchpadTS + xmonadTS = - [ Node (TS.TSNode "Scratchpads" "" (return())) - [ Node (TS.TSNode "Term 0" "" (namedScratchpadAction myScratchpads "Term 0")) [] - , Node (TS.TSNode "Term 1" "" (namedScratchpadAction myScratchpads "Term 1")) [] - , Node (TS.TSNode "Term 2" "" (namedScratchpadAction myScratchpads "Term 2")) [] - , Node (TS.TSNode "OBS" "" (namedScratchpadAction myScratchpads "OBS")) [] - , Node (TS.TSNode "lf" "" (namedScratchpadAction myScratchpads "lf")) [] - , Node (TS.TSNode "BPYTOP" "" (namedScratchpadAction myScratchpads "BPYTOP")) [] - , Node (TS.TSNode "Calculator" "" (namedScratchpadAction myScratchpads "calc")) [] - , Node (TS.TSNode "Arandr" "" (namedScratchpadAction myScratchpads "arandr")) [] - ] - , Node (TS.TSNode "Window/Layout" "" (return())) - [ Node (TS.TSNode "Go To Window" "" (goToSelected defaultGSConfig)) [] - , Node (TS.TSNode "Bring Window" "" (bringSelected defaultGSConfig)) [] - , Node (TS.TSNode "Rotate Windows" "" (sendMessage Rotate)) [] - , Node (TS.TSNode "Swap Windows" "" (sendMessage BSP.Swap)) [] - , Node (TS.TSNode "Un/Maximize" "" (withFocused (sendMessage . maximizeRestore))) [] - , Node (TS.TSNode "Sink Window" "" (withFocused $ windows . W.sink)) [] - , Node (TS.TSNode "Sticky Window" "" (windows copyToAll)) [] - , Node (TS.TSNode "Un-sticky Window" "" (killAllOtherCopies)) [] - ] + [ Node (TS.TSNode "Go To Window" "" (goToSelected defaultGSConfig)) [] + , Node (TS.TSNode "Bring Window" "" (bringSelected defaultGSConfig)) [] + , Node (TS.TSNode "Rotate Windows" "" (sendMessage Rotate)) [] + , Node (TS.TSNode "Swap Windows" "" (sendMessage BSP.Swap)) [] + , Node (TS.TSNode "Un/Maximize" "" (withFocused (sendMessage . maximizeRestore))) [] + , Node (TS.TSNode "Sink Window" "" (withFocused $ windows . W.sink)) [] + , Node (TS.TSNode "Sticky Window" "" (windows copyToAll)) [] + , Node (TS.TSNode "Un-sticky Window" "" (killAllOtherCopies)) [] ] myXmonadTS a = TS.treeselectAction a xmonadTS @@ -162,15 +162,18 @@ utilTS = myUtilTS a = TS.treeselectAction a utilTS myTreeMenu a = TS.treeselectAction a - ([Node (TS.TSNode "Utilities" "" (return())) utilTS - , Node (TS.TSNode "Networking" "" (return())) networkingTS - , Node (TS.TSNode "Development" "" (return())) devTS - , Node (TS.TSNode "Virtual Machines" "" (return())) vmTS - , Node (TS.TSNode "XMonad" "" (return())) xmonadTS - , Node (TS.TSNode "Gaming" "" (return())) gamingTS - , Node (TS.TSNode "Media" "" (return())) mediaTS - , Node (TS.TSNode "Power" "" (return())) powerTS - , Node (TS.TSNode "Screenshot" "" (spawn "spectacle")) [] + ([Node (TS.TSNode "Utilities" "" (return())) utilTS + , Node (TS.TSNode "Networking" "" (return())) networkingTS + , Node (TS.TSNode "Development" "" (return())) devTS + , Node (TS.TSNode "Virtual Machines" "" (return())) vmTS + , Node (TS.TSNode "XMonad" "" (return())) + [ Node (TS.TSNode "Window/Layout" "" (return())) xmonadTS + , Node (TS.TSNode "Scratchpads" "" (return())) scratchpadTS + ] + , Node (TS.TSNode "Gaming" "" (return())) gamingTS + , Node (TS.TSNode "Media" "" (return())) mediaTS + , Node (TS.TSNode "Power" "" (return())) powerTS + , Node (TS.TSNode "Screenshot" "" (spawn "spectacle")) [] ]) sGap = 4 -- screen gap @@ -295,6 +298,14 @@ main = do ) `additionalKeysP` [ ("M-c", spawn myColorPicker) -- Launchers - , ("M-p", myTreeMenu myTSConfig) + , ("M-u", myDevTS myTSConfig) + , ("M-x", myXmonadTS myTSConfig) + , ("M-e", myMediaTS myTSConfig) + , ("M-S-e", myGamingTS myTSConfig) + , ("M-w", myScratchpadTS myTSConfig) + , ("M-o", myUtilTS myTSConfig) + , ("M-i", myNetworkingTS myTSConfig) + , ("M-S-", myPowerTS myTSConfig) + , ("M-p", myTreeMenu myTSConfig) , ("M-S-p", spawn "dmenu_run") ] -- cgit v1.2.3