aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Keys.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-11-03 17:18:57 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:45 -0600
commit3793479ac06bca54653c1aca0019e3100b334ef1 (patch)
treec69db92b7707b57e967f1764d1ef274b13630e1f /src/Internal/Keys.hs
parent9cd7bd6f86c132fa14d229b166cd76983c8a99f2 (diff)
downloadrde-3793479ac06bca54653c1aca0019e3100b334ef1.tar.gz
rde-3793479ac06bca54653c1aca0019e3100b334ef1.tar.bz2
rde-3793479ac06bca54653c1aca0019e3100b334ef1.zip
Add ability to truncate xmobar output.
This is done by removing all visible characters after a certain point. Right now that's set to 70, which was found just via trial-and-error. This will break if something has '>' or '<' and this will not be able to handle xmobar's 'raw' tag, but it's good enough.
Diffstat (limited to 'src/Internal/Keys.hs')
-rw-r--r--src/Internal/Keys.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs
index cf7846d..75c70a3 100644
--- a/src/Internal/Keys.hs
+++ b/src/Internal/Keys.hs
@@ -101,6 +101,8 @@ newKeys markContext =
, ((modm, xK_t), (void $ spawn (terminal config)))
, ((modm, xK_m), (submap $ mapAlpha modm (markCurrentWindow markContext)))
, ((modm, xK_w), runXPlus markContext config windowJump)
+ , ((modm, xK_space), sendMessage NextLayout)
+ , ((modm .|. shiftMask, xK_space), sendMessage FirstLayout)
, ((modm, xK_apostrophe), (submap $
Map.insert
(modm, xK_apostrophe)