diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-01-05 06:49:28 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-01-30 21:02:57 -0700 |
| commit | 32ced7e1ae51b2c7f431e4c627479c7973187f62 (patch) | |
| tree | 98cb57685498cf1ee9d8788c52b9a749bcad3334 /src/Rahm/Desktop/Common.hs | |
| parent | ab92f9e3005218fce2bd6bc668417d3edce2a1cc (diff) | |
| download | rde-32ced7e1ae51b2c7f431e4c627479c7973187f62.tar.gz rde-32ced7e1ae51b2c7f431e4c627479c7973187f62.tar.bz2 rde-32ced7e1ae51b2c7f431e4c627479c7973187f62.zip | |
Add Keybinding to remove the border from a window.
In the future I would like to auto-detect when a window is large enough
to be fullscreen and remove the border in that case, but that will take
more work. For now a manual action is sufficient.
Diffstat (limited to 'src/Rahm/Desktop/Common.hs')
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Rahm/Desktop/Common.hs b/src/Rahm/Desktop/Common.hs index 44587d3..125d651 100644 --- a/src/Rahm/Desktop/Common.hs +++ b/src/Rahm/Desktop/Common.hs @@ -5,6 +5,7 @@ module Rahm.Desktop.Common duplWindow, pointerWorkspace, getString, + setBorderWidth, askWindowId, windowJump, withBorderWidth, @@ -141,6 +142,12 @@ windowJump = mapM_ focus . headM =<< askWindowId headM :: [a] -> Maybe a headM = head +setBorderWidth :: Int -> [Window] -> X () +setBorderWidth width wins = do + d <- asks display + forM_ wins $ \window -> + io $ setWindowBorderWidth d window $ fromIntegral width + withBorderWidth :: Int -> [Window] -> X a -> X a withBorderWidth width ws fn = do d <- asks display |