aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 }