aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Keys
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rahm/Desktop/Keys')
-rw-r--r--src/Rahm/Desktop/Keys/Wml.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs
index 1c8d073..10f2b5f 100644
--- a/src/Rahm/Desktop/Keys/Wml.hs
+++ b/src/Rahm/Desktop/Keys/Wml.hs
@@ -34,6 +34,7 @@ import Rahm.Desktop.Marking
import qualified Rahm.Desktop.StackSet as W
import Rahm.Desktop.Submap
import Rahm.Desktop.Workspaces
+import Rahm.Desktop.XMobarLog.PendingBuffer
import System.Exit (ExitCode (..), exitWith)
import Text.Printf
import XMonad
@@ -182,7 +183,10 @@ class (Monad m) => KeyFeeder m where
instance KeyFeeder X where
fromX = id
- readNextKey = mapNextStringWithKeysym
+ readNextKey fn = mapNextStringWithKeysym $
+ \mask sym str -> do
+ lift $ fromX $ addStringToPendingBuffer str
+ fn mask sym str
newtype FeedKeys a = FeedKeys {unFeedKeys :: StateT KeyString X a}
deriving (Monad, Functor, Applicative)
@@ -229,7 +233,7 @@ readNextWorkspaceName = joinMaybe $ workspaceName <$> readNextWorkspace
-- Returns the next workspaces associated with the next set of keystrokes.
readNextWorkspace :: (KeyFeeder m) => MaybeT m Workspace
readNextWorkspace =
- readNextKey $ \mask sym str ->
+ readNextKey $ \mask sym str -> do
case (mask, sym, str) of
(_, e, _) | e == xK_Escape -> MaybeT $ return Nothing
(_, _, [ch]) | isAlphaNum ch || ch == '*' -> return $ justWorkspace [ch]