From 70b1acbce0c873ec9643ccfb59352b73d2521bfb Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 29 Oct 2021 15:53:16 -0600 Subject: Change Mod key to hyper & pimp out my DMenu. --- src/Internal/DMenu.hs | 10 ++++++++++ src/Internal/Keys.hs | 6 ++++-- src/Main.hs | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/Internal/DMenu.hs (limited to 'src') diff --git a/src/Internal/DMenu.hs b/src/Internal/DMenu.hs new file mode 100644 index 0000000..1ece347 --- /dev/null +++ b/src/Internal/DMenu.hs @@ -0,0 +1,10 @@ +module Internal.DMenu where + +import XMonad +import XMonad.Util.Run +import Control.Monad + +runDMenu :: X () +runDMenu = void $ do + safeSpawn "/usr/bin/dmenu_run" [ + "-p", "Execute ", "-l", "12", "-dim", "0.4"] diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 44f4481..ead1394 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -30,6 +30,7 @@ import qualified Data.Map as Map import qualified XMonad.StackSet as W import Internal.Lib +import Internal.DMenu type KeyMap l = XConfig l -> Map (KeyMask, KeySym) (X ()) @@ -70,13 +71,14 @@ newKeys markContext = , ((modm, xK_F11), (void $ spawn "spotify-control prev")) , ((modm, xK_semicolon), scratchpadSpawnActionTerminal "scratchpad") , ((modm, xK_F10), (void $ spawn "spotify-control play")) - , ((modm, xK_r), (void $ spawn "dmenu_run")) + , ((modm, xK_r), runDMenu) , ((modm .|. shiftMask, xK_r), (void $ spawn "gmrun")) , ((modm .|. mod1Mask, xK_l), (void $ spawn "xsecurelock")) , ((modm .|. mod1Mask, xK_s), (void $ spawn "sudo systemctl suspend")) , ((modm .|. shiftMask, xK_c), kill) , ((modm .|. shiftMask, xK_t), withFocused $ windows . W.sink) - , ((modm, xK_t), (void $ spawn (terminal config))) + , ((mod4Mask, xK_Escape), (void $ spawn (terminal config))) + , ((mod3Mask, xK_t), (void $ spawn (terminal config))) , ((modm, xK_m), (submap $ mapAlpha modm (markCurrentWindow markContext))) , ((modm, xK_w), runXPlus markContext config windowJump) , ((modm, xK_apostrophe), (submap $ diff --git a/src/Main.hs b/src/Main.hs index 2234a97..eab10dc 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -25,7 +25,7 @@ main = do config <- applyKeys $ def { terminal = "alacritty" - , modMask = mod4Mask + , modMask = mod3Mask , borderWidth = 2 , keys = \config -> mempty , focusedBorderColor = "#ff6c00" @@ -71,4 +71,4 @@ main = do in icons ++ etc } toggleStructsKey - config { modMask = mod4Mask } + config { modMask = mod3Mask } -- cgit