diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2021-11-22 23:29:16 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 45d817f69e5b0f47ef5104df12932dabfbef750d (patch) | |
| tree | 52973b297934e064a0b9a6b00acfe3437751319b /src/Internal/Keys.hs | |
| parent | 4a225d2819cb5c891a36694bb8552337b36beae0 (diff) | |
| download | rde-45d817f69e5b0f47ef5104df12932dabfbef750d.tar.gz rde-45d817f69e5b0f47ef5104df12932dabfbef750d.tar.bz2 rde-45d817f69e5b0f47ef5104df12932dabfbef750d.zip | |
Add some support of the XF86 keys.
Diffstat (limited to 'src/Internal/Keys.hs')
| -rw-r--r-- | src/Internal/Keys.hs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 439986c..0dd8760 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -1,6 +1,7 @@ {-# LANGUAGE RankNTypes #-} module Internal.Keys (applyKeys) where +import Graphics.X11.ExtraTypes.XF86; import Internal.KeysM import Internal.SwapMaster (swapMaster) import XMonad.Hooks.ManageDocks @@ -207,10 +208,11 @@ keymap = runKeys $ do bind xK_z $ do justMod $ subkeys $ do + + -- Double-tap Z to toggle zoom. bind xK_z $ do noMod -|- justMod $ sendMessage ToggleZoom - -- Z is reserved to create sub keybindings to do various things. -- I don't really use these at the moment. bind xK_h $ do @@ -223,6 +225,29 @@ keymap = runKeys $ do -- modifier. shiftMod $ sendMessage ToggleZoom + bind xF86XK_AudioLowerVolume $ do + noMod $ spawn "pactl set-sink-volume @DEFAULT_SINK@ -1%" + justMod $ spawn "spotify-control prev" + + bind xF86XK_AudioRaiseVolume $ do + noMod $ spawn "pactl set-sink-volume @DEFAULT_SINK@ +1%" + justMod $ spawn "spotify-control next" + + bind xF86XK_AudioMute $ do + noMod $ spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle" + + bind xF86XK_AudioPlay $ do + noMod $ spawn "spotify-control play" + + bind xF86XK_AudioNext $ do + noMod $ spawn "spotify-control next" + + bind xF86XK_AudioPrev $ do + noMod $ spawn "spotify-control prev" + + bind xF86XK_AudioPrev $ do + noMod $ spawn "spotify-control prev" + mouseMap :: ButtonsMap l mouseMap = runButtons $ do bind button1 $ do |