aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Keys.hs
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2022-01-14 00:34:41 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-01-14 00:34:41 -0700
commitd3354e4a7099bd7b70973a66b836ba4f63b60bd6 (patch)
tree73518e32a1b78aedeedbae4b596d04713c5908e0 /src/Internal/Keys.hs
parent0f05c8b099cc6a1f6299f095d96e6a79d4a96b4c (diff)
parent0bde08d5180d08ef102d3d5bff0f50f2e7533e4e (diff)
downloadrde-d3354e4a7099bd7b70973a66b836ba4f63b60bd6.tar.gz
rde-d3354e4a7099bd7b70973a66b836ba4f63b60bd6.tar.bz2
rde-d3354e4a7099bd7b70973a66b836ba4f63b60bd6.zip
Merge branch 'v017' of josher.dev:rde into v017
Diffstat (limited to 'src/Internal/Keys.hs')
-rw-r--r--src/Internal/Keys.hs33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs
index bf9b62c..27315cd 100644
--- a/src/Internal/Keys.hs
+++ b/src/Internal/Keys.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE RankNTypes #-}
module Internal.Keys (applyKeys) where
+import Control.Monad.Fix (fix)
import Graphics.X11.ExtraTypes.XF86;
import Internal.KeysM
import Internal.SwapMaster (swapMaster)
@@ -171,7 +172,7 @@ keymap = runKeys $ do
bind xK_minus $ do
justMod $ sendMessage (IncMasterN (-1))
- shiftMod $ withFocused $ sendMessage . expandWindowAlt
+ shiftMod $ withFocused $ sendMessage . shrinkWindowAlt
bind xK_m $ do
justMod $ subkeys $
@@ -206,6 +207,23 @@ keymap = runKeys $ do
shiftMod $ withFocused $ windows . W.sink
altMod $ spawn (terminal config ++ " -t Floating\\ Term")
+ bind xK_v $
+ -- Allows repeated strokes of M-h and M-l to reduce and increase volume
+ -- respectively.
+ justMod $ fix $ \recur -> subkeys $ do
+ bind xK_h $ do
+ justMod $ do
+ spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%"
+ recur
+
+ bind xK_l $ do
+ justMod $ do
+ spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%"
+ recur
+
+ bind xK_v $ do
+ justMod $ recur
+
bind xK_w $ do
justMod windowJump
@@ -228,6 +246,9 @@ keymap = runKeys $ do
str
(show (map ord str))
+ bind xK_n $ do
+ (justMod -|- noMod) $ spawn (terminal config ++ " -t Notes -e notes new")
+
bind xK_c $ do
shiftMod CopyWindow.killAllOtherCopies
@@ -237,6 +258,16 @@ keymap = runKeys $ do
bind xK_a $
(justMod -|- noMod) $ spawn "set-sink.sh"
+
+ bind xK_w $
+ (justMod -|- noMod) $ spawn "networkmanager_dmenu"
+
+ bind xK_o $
+ (justMod -|- noMod) $ spawn "library-view.sh"
+
+ bind xK_v $ do
+ (justMod -|- noMod) $ spawn "set-volume.sh"
+ (shiftMod -|- rawMask shiftMask) $ spawn "set-volume.sh -a"
-- Double-tap Z to toggle zoom.