diff options
| author | Josh Rahm <rahm@google.com> | 2025-03-07 10:22:30 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2025-03-07 10:22:30 -0700 |
| commit | f466c55f363f43cd00f9fe9f04595920d73823e3 (patch) | |
| tree | 417d450a52d1989e2f04fe88c8c54bba11523b96 /src | |
| parent | 61e8ccf2eab183587605cce4c5126258571b5294 (diff) | |
| download | rde-f466c55f363f43cd00f9fe9f04595920d73823e3.tar.gz rde-f466c55f363f43cd00f9fe9f04595920d73823e3.tar.bz2 rde-f466c55f363f43cd00f9fe9f04595920d73823e3.zip | |
Rename dzen selection to workspaceWheel
Diffstat (limited to 'src')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 10 | ||||
| -rw-r--r-- | src/Rahm/Desktop/WorkspaceWheel.hs | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 2085c22..9a6d895 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -60,7 +60,6 @@ import Rahm.Desktop.Common ) import Rahm.Desktop.DMenu (runDMenu) import qualified Rahm.Desktop.Dragging as D -import Rahm.Desktop.WorkspaceWheel (displayDzenSelection, displayDzenSelectionAtPoint, displayDzenSelectionInCenter) import Rahm.Desktop.History ( historyBack, historyForward, @@ -119,6 +118,7 @@ import Rahm.Desktop.SwapMaster (swapMaster) import Rahm.Desktop.Theater ( restoreTheater, ) +import Rahm.Desktop.WorkspaceWheel (displayWorkspaceWheel, displayWorkspaceWheelAtPoint, displayWorkspaceWheelInCenter) import Rahm.Desktop.Workspaces ( accompaningWorkspace, next, @@ -1101,12 +1101,12 @@ bindings = do bind xK_o $ do justMod $ - doc "Select a workspace using dzen" displayDzenSelectionInCenter + doc "Select a workspace using dzen" displayWorkspaceWheelInCenter bind button10 $ do noMod $ doc "Select a workspace using dzen" $ do - noWindow displayDzenSelection + noWindow displayWorkspaceWheel bind button14 $ do noMod $ @@ -1213,7 +1213,7 @@ bindings = do noMod $ doc "Show dzen selection" $ noWindow $ do - displayDzenSelection + displayWorkspaceWheel escape bind button14 $ @@ -1307,7 +1307,7 @@ cornersConfig :: Map ScreenCorner (X ()) cornersConfig = Map.fromList [ ( SCUpperLeft, - displayDzenSelection + displayWorkspaceWheel ) ] diff --git a/src/Rahm/Desktop/WorkspaceWheel.hs b/src/Rahm/Desktop/WorkspaceWheel.hs index d8f6dfd..eef0ccc 100644 --- a/src/Rahm/Desktop/WorkspaceWheel.hs +++ b/src/Rahm/Desktop/WorkspaceWheel.hs @@ -30,8 +30,8 @@ dzenSize = 100 data ScreenType = Current | Visible | Hidden -displayDzenSelection :: X () -displayDzenSelection = uncurry displayDzenSelectionAtPoint =<< pointerLocation +displayWorkspaceWheel :: X () +displayWorkspaceWheel = uncurry displayWorkspaceWheelAtPoint =<< pointerLocation data Ring a = Ring [a] (Maybe a) [a] @@ -52,18 +52,18 @@ ringPrev :: Ring a -> Ring a ringPrev (Ring (p : ps) Nothing ns) = Ring ps (Just p) ns ringPrev (Ring (p : ps) (Just a) ns) = Ring ps (Just p) (a : ns) -displayDzenSelectionInCenter :: X () -displayDzenSelectionInCenter = +displayWorkspaceWheelInCenter :: X () +displayWorkspaceWheelInCenter = mapM_ ( \(W.screenDetail -> (SD (Rectangle x y w h))) -> - displayDzenSelectionAtPoint + displayWorkspaceWheelAtPoint (fromIntegral $ x + (fromIntegral w `div` 2)) (fromIntegral $ y + (fromIntegral h `div` 2)) ) =<< pointerScreen -displayDzenSelectionAtPoint :: Int -> Int -> X () -displayDzenSelectionAtPoint px py = do +displayWorkspaceWheelAtPoint :: Int -> Int -> X () +displayWorkspaceWheelAtPoint px py = do click (W.StackSet cur vis other _floating) <- gets windowset @@ -99,7 +99,7 @@ displayDzenSelectionAtPoint px py = do if | b == button1 -> do gotoWorkspace ws - return (displayDzenSelectionAtPoint px py) + return (displayWorkspaceWheelAtPoint px py) | b == button3 -> do selection <- getAndResetWindowSelectionOrCurrent withWindowsUnpinned selection $ @@ -107,7 +107,7 @@ displayDzenSelectionAtPoint px py = do appEndo $ mconcat (map (Endo . W.shiftWin ws) selection) - return (displayDzenSelectionAtPoint px py) + return (displayWorkspaceWheelAtPoint px py) | b == 13 -> do winSet <- gets windowset let mWs = find ((== ws) . W.tag) (W.workspaces winSet) @@ -125,7 +125,7 @@ displayDzenSelectionAtPoint px py = do map (Endo . W.delete) allWindows X.refresh - return (displayDzenSelectionAtPoint px py) + return (displayWorkspaceWheelAtPoint px py) | otherwise -> return stop Nothing -> return stop Just (KeyPress _ sym _ _) -> do @@ -224,7 +224,7 @@ displayDzenSelectionAtPoint px py = do pipe <- spawnPipe ( printf - "dzen2 -fn \"Monofur Nerd Font:size=15:style=bold\" -x %d -y %d -w %d -h %d -bg '#222' -fg '%s'" + "dzen2 -fn \"Monofur Nerd Font:size=15\" -x %d -y %d -w %d -h %d -bg '#222' -fg '%s'" x y w |