From 4e65de6ab0c7a0ea5026de1a05edd2215a8ccdeb Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 21 May 2022 02:06:54 +0530 Subject: Updated modal keybindings --- .config/XMonad/lib/Keybindings.hs | 89 ++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 15 deletions(-) (limited to '.config/XMonad/lib/Keybindings.hs') diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs index 184e7f9..15b8e2f 100644 --- a/.config/XMonad/lib/Keybindings.hs +++ b/.config/XMonad/lib/Keybindings.hs @@ -1,6 +1,6 @@ module Keybindings where - import XMonad +import XMonad.Operations import qualified XMonad.StackSet as W import System.Exit import System.IO @@ -11,6 +11,7 @@ import qualified Data.Map as M -- actions import XMonad.Actions.CopyWindow +import XMonad.Actions.WithAll import XMonad.Actions.CycleWS import XMonad.Actions.GridSelect import XMonad.Actions.SwapWorkspaces @@ -58,13 +59,13 @@ myKeybindings :: [((KeyMask, KeySym), X ())] myKeybindings = [ ((myModMask, xK_Return), spawn myTerminal) , ((myModMask .|. shiftMask, xK_q), kill1) + , ((myModShiftMask, xK_p), spawn myLauncher) -- scratchpads - , ((myModMask, xK_u), myScratchpad "Term 0") - , ((myModMask, xK_i), myScratchpad "Term 1") - , ((myModMask, xK_o), myScratchpad "Term 2") - , ((myModMask, xK_p), myScratchpad "Term 3") - + , ((myModMask, xK_u), myScratchpad "Term 0") + , ((myModMask, xK_i), myScratchpad "Term 1") + , ((myModMask, xK_o), myScratchpad "Term 2") + , ((myModMask, xK_p), myScratchpad "Term 3") -- volume keys , ((myModMask, xK_equal), spawn volUp) , ((myModMask, xK_minus), spawn volDown) @@ -162,18 +163,76 @@ myKeybindings = [ myKeybindingsP :: [(String, X())] myKeybindingsP = [ - -- fn keys ("", spawn backlightUp) , ("", spawn backlightDown) , ("", spawn volUp) , ("", spawn volDown) , ("", spawn volMute) - , ("M-S-p", spawn "dmenu_run") - -- scratchpads - , ("M-m", namedScratchpadAction myScratchpads "BPYTOP") - , ("M-S-m", namedScratchpadAction myScratchpads "calc") - , ("M-n", namedScratchpadAction myScratchpads "pavucontrol") - , ("M-S-n", namedScratchpadAction myScratchpads "arandr") - , ("M-b", namedScratchpadAction myScratchpads "blueman") - , ("M-S-r", namedScratchpadAction myScratchpads "wallpaper") + -- actions + -- TODO: add reboot, shutdown, logout, copy, cut, paste + , ("M-a w", spawn volMute) + , ("M-a S-w", spawn wifiOn) + , ("M-a s", spawn wifiOff) + , ("M-a S-s", spawn fullScreenshot) + , ("M-a m", spawn volMute) + -- media + , ("M-m w", myScratchpad "wallpaper") + , ("M-m o", spawn "obs") + , ("M-m S-o", spawn "osu") + , ("M-m s", spawn "syncplay") + , ("M-m g", spawn "gimp") + , ("M-m k", spawn "kdenlive") + , ("M-m l", spawn "lutris") + , ("M-m v", spawn "vlc") + , ("M-m m", spawn "minecraft-launcher") + -- system apps/scratchpads + , ("M-b t", spawn myTorrentClient) + , ("M-b i", spawn myBrowser) + , ("M-b d", myScratchpad "aarandr") + , ("M-b c", myScratchpad "calc") + , ("M-b b", myScratchpad "blueman") + , ("M-b p", myScratchpad "pavucontrol") + , ("M-b m", myScratchpad "BPYTOP") + , ("M-b n", myScratchpad "nmtui") + -- websites + , ("M-n y", spawn $ myBrowser ++ " https://youtube.com") + , ("M-n d", spawn $ myBrowser ++ " https://duckduckgo.com") + , ("M-n g", spawn $ myBrowser ++ " https://google.com") + , ("M-n S-g", spawn $ myBrowser ++ " https://github.com") + , ("M-n j", spawn $ myBrowser ++ " https://www.youtube.com/playlist?list=PL8lRJQHQWddu55nsz8CezmJJ-GRVISZ1E") + , ("M-n k", spawn $ myBrowser ++ " https://www.youtube.com/playlist?list=PL8lRJQHQWddvzCv02lClCfDfUo97wzX1A") + , ("M-n c", spawn $ myBrowser ++ " https://www.youtube.com/playlist?list=PL8lRJQHQWdduy2V0DQQ4Lm0P572XJFVB9") + , ("M-n v", spawn $ myBrowser ++ " https://vidhukant.xyz") + , ("M-n S-v", spawn $ myBrowser ++ " https://blog.vidhukant.xyz") + , ("M-n m", spawn $ myBrowser ++ " https://myanimelist.net/profile/0ZeroTsu") + -- other apps + -- TODO: add scrcpy + , ("M-y t", spawn myTorrentClient) + , ("M-y S-t", spawn "torbrowser-launcher") + , ("M-y i", spawn myBrowser) + , ("M-y d", spawn "discord") + , ("M-y f", spawn "firefox") + , ("M-y v", spawn "virt-manager") + , ("M-y b", spawn "brave") + , ("M-y p", spawn myFileManager) + , ("M-y S-p", spawn $ myTerminal' ++ " -e " ++ myFileManager') + -- XMonad + , ("M-q q", gridselectWindow myGridSelect >>= flip whenJust (\w -> killWindow w)) + , ("M-q S-q", killAll) + , ("M-q r", sendMessage Rotate) + , ("M-q t", sendMessage ToggleStruts) + , ("M-q s", sendMessage BSP.Swap) + , ("M-q g", goToSelected myGridSelect) + , ("M-q c", windows copyToAll) + , ("M-q S-c", killAllOtherCopies) + , ("M-q b", bringSelected myGridSelect) + -- resize windows + , ("M-q h", sendMessage $ ExpandTowards L) + , ("M-q j", sendMessage $ ExpandTowards D) + , ("M-q k", sendMessage $ ExpandTowards U) + , ("M-q l", sendMessage $ ExpandTowards R) + , ("M-q S-h", sendMessage $ ShrinkFrom L) + , ("M-q S-j", sendMessage $ ShrinkFrom D) + , ("M-q S-k", sendMessage $ ShrinkFrom U) + , ("M-q S-l", sendMessage $ ShrinkFrom R) ] -- cgit v1.2.3