diff options
| author | Josh Rahm <rahm@google.com> | 2023-12-06 13:47:27 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2023-12-06 13:47:27 -0700 |
| commit | 32e6904dcac06a60d14c9d7e304c3528aaadfa1d (patch) | |
| tree | c031d424ca33cd7344f562f89f3e6509b027d17a /src/Rahm/Desktop/Common.hs | |
| parent | 8d67f1ea8c614f12ddfc77d5727fb7fd8472484b (diff) | |
| download | rde-32e6904dcac06a60d14c9d7e304c3528aaadfa1d.tar.gz rde-32e6904dcac06a60d14c9d7e304c3528aaadfa1d.tar.bz2 rde-32e6904dcac06a60d14c9d7e304c3528aaadfa1d.zip | |
Bunch of changes. Not good git ettiquite
- Added ShiftAndSwap functionality, which allows user to shift a
<windowset> to a <workspace> and then swap that workspace with
another <workspace>
e.g. move Spotify to workspace 's' and put workspace 's' on the last
monitor.
This replaces the shift-and-follow as this is more powerful (shift
and follow just puts the "shifted-to" workspace on the current
monitor.)
ofc if the two workspaces to swap are not visible, this just operates
as a normal shift command.
- Moved more dragging functionality to the Dragging.hs file and cleaned
it up a little. More is certainly needed.
- With the more powerful dragging functionality, many bindings are made
redundant. I replaced one of these redundant bindings (button13 ->
mouseWheel). This used to move the focused window around the stack,
but this has been made redundant by the drag-to-swap functionality
(button14 -> left-click-drag), so now it changes the master region
size.
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs index c3a6a31..5c29a1c 100644 --- a/src/Rahm/Desktop/Common.hs +++ b/src/Rahm/Desktop/Common.hs @@ -48,7 +48,6 @@ import qualified Rahm.Desktop.StackSet as S workspaces, ) import Text.Printf (printf) -import qualified XMonad as X import XMonad ( ScreenId, Window, @@ -69,6 +68,7 @@ import XMonad withFocused, withWindowSet, ) +import qualified XMonad as X import XMonad.Prompt (XPrompt (commandToComplete, showXPrompt)) import XMonad.Util.XUtils (pixelToString, stringToPixel) @@ -80,8 +80,8 @@ data Location = Location deriving (Read, Show, Eq, Ord) focusLocation :: Location -> X () -focusLocation (Location ws Nothing) = windows $ S.greedyView ws -focusLocation (Location _ (Just win)) = windows $ S.focusWindow win +focusLocation (Location ws mWin) = + windows $ maybe id S.focusWindow mWin . S.greedyView ws masterWindow :: MaybeT X Window masterWindow = MaybeT $ @@ -225,4 +225,3 @@ click = do (dpy, root) <- asks $ (,) <$> display <*> X.theRoot (_, _, window, _, _, _, _, _) <- io $ X.queryPointer dpy root focus window - |