diff options
Diffstat (limited to 'src/Rahm/Desktop')
| -rw-r--r-- | src/Rahm/Desktop/Common.hs | 7 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 4 |
2 files changed, 11 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 diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 8df6e3b..5aad26d 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -53,6 +53,7 @@ import Rahm.Desktop.Common pointerWindow, pointerWorkspace, runMaybeT_, + setBorderWidth, ) import Rahm.Desktop.DMenu (runDMenu) import qualified Rahm.Desktop.Dragging as D @@ -764,6 +765,9 @@ bindings = do justMod $ doc "Toggles respect for struts." $ sendMessage ToggleStruts + shiftMod $ + doc "Remove the border from the focused window" $ + withFocused $ setBorderWidth 0 . (: []) bind xK_g $ (noMod -|- justMod) $ |