aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/WorkspaceWheel.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2025-03-07 10:22:30 -0700
committerJosh Rahm <rahm@google.com>2025-03-07 10:22:30 -0700
commitf466c55f363f43cd00f9fe9f04595920d73823e3 (patch)
tree417d450a52d1989e2f04fe88c8c54bba11523b96 /src/Rahm/Desktop/WorkspaceWheel.hs
parent61e8ccf2eab183587605cce4c5126258571b5294 (diff)
downloadrde-f466c55f363f43cd00f9fe9f04595920d73823e3.tar.gz
rde-f466c55f363f43cd00f9fe9f04595920d73823e3.tar.bz2
rde-f466c55f363f43cd00f9fe9f04595920d73823e3.zip
Rename dzen selection to workspaceWheel
Diffstat (limited to 'src/Rahm/Desktop/WorkspaceWheel.hs')
-rw-r--r--src/Rahm/Desktop/WorkspaceWheel.hs22
1 files changed, 11 insertions, 11 deletions
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