aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-10-29 15:53:16 -0600
committerJosh Rahm <rahm@google.com>2021-10-29 19:53:26 -0600
commit70b1acbce0c873ec9643ccfb59352b73d2521bfb (patch)
tree800d2793f4800a62293deb52f88f9a5da4dc5e16
parent42f81370dfe278a18e61e1a6a8e5caa580be37d7 (diff)
downloadrde-70b1acbce0c873ec9643ccfb59352b73d2521bfb.tar.gz
rde-70b1acbce0c873ec9643ccfb59352b73d2521bfb.tar.bz2
rde-70b1acbce0c873ec9643ccfb59352b73d2521bfb.zip
Change Mod key to hyper & pimp out my DMenu.
-rw-r--r--package.yaml1
-rw-r--r--src/Internal/DMenu.hs10
-rw-r--r--src/Internal/Keys.hs6
-rw-r--r--src/Main.hs4
4 files changed, 17 insertions, 4 deletions
diff --git a/package.yaml b/package.yaml
index 4826708..686aaa7 100644
--- a/package.yaml
+++ b/package.yaml
@@ -18,3 +18,4 @@ dependencies:
- bytestring
- cryptohash
- listsafe
+ - X11
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 }