diff options
| author | Josh Rahm <rahm@google.com> | 2022-03-29 12:32:25 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-03-29 12:32:25 -0600 |
| commit | a9286e8c39cc8de56de7a723c9ddabd78ac64198 (patch) | |
| tree | 112116f82364714a544028614c83a2f843453a09 /src | |
| parent | 8678e0b8e6e2d25db7eebf2a90c78687530eb711 (diff) | |
| download | rde-a9286e8c39cc8de56de7a723c9ddabd78ac64198.tar.gz rde-a9286e8c39cc8de56de7a723c9ddabd78ac64198.tar.bz2 rde-a9286e8c39cc8de56de7a723c9ddabd78ac64198.zip | |
Remove trailing whitespace
Diffstat (limited to 'src')
| -rw-r--r-- | src/Internal/CornerLayout.hs | 6 | ||||
| -rw-r--r-- | src/Internal/Keys.hs | 12 | ||||
| -rw-r--r-- | src/Internal/Layout.hs | 16 | ||||
| -rw-r--r-- | src/Internal/LayoutDraw.hs | 4 | ||||
| -rw-r--r-- | src/Internal/Lib.hs | 2 | ||||
| -rw-r--r-- | src/Internal/Logger.hs | 2 | ||||
| -rw-r--r-- | src/Internal/Marking.hs | 2 | ||||
| -rw-r--r-- | src/Internal/PassMenu.hs | 4 | ||||
| -rw-r--r-- | src/Internal/Windows.hs | 2 |
9 files changed, 27 insertions, 23 deletions
diff --git a/src/Internal/CornerLayout.hs b/src/Internal/CornerLayout.hs index b3898fc..5545aef 100644 --- a/src/Internal/CornerLayout.hs +++ b/src/Internal/CornerLayout.hs @@ -21,15 +21,15 @@ instance LayoutClass Corner a where vn = (length ws - 1) `div` 2 hn = (length ws - 1) - vn - in + in case ws of [a] -> [(a, screen)] [a, b] -> [ (a, Rectangle x y w' h), (b, Rectangle (x + fromIntegral w') y (w - w') h)] - _ -> + _ -> zip ws $ map ( - \(Rectangle x' y' w h) -> Rectangle (x + x') (y + y') w h) $ + \(Rectangle x' y' w h) -> Rectangle (x + x') (y + y') w h) $ corner : splitVert vertRect vn ++ splitHoriz horizRect hn diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 21988f8..ad3d6b8 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -233,7 +233,7 @@ keymap = runKeys $ do bind xK_q $ do shiftMod $ spawn "xmonad --recompile && xmonad --restart" - + justMod $ subkeys $ do bind xK_q $ @@ -246,7 +246,7 @@ keymap = runKeys $ do if (x' - x) < 0 then mediaPrev else mediaNext - + bind xK_r $ do justMod runDMenu shiftMod $ sendMessage DoRotate @@ -459,7 +459,7 @@ mouseMap = runButtons $ do bind button15 $ do noMod $ subMouse $ do - + bind button15 $ do noMod $ const jumpToLast @@ -561,6 +561,10 @@ windowSpecificBindings = do -- Experimental. noMod $ logs "This is a test" + -- Add a binding to xev as a test. + configureIf (title =? "Event Tester") $ + bind xK_F2 $ + noMod $ sendKey (controlMask, xK_F2) w where browsers = ["Google-chrome", "Brave-browser", "firefox-default"] @@ -585,7 +589,7 @@ windowBindings xconfig = manageHook = (doQuery >> return (Endo id)) <> manageHook xconfig } - + where doQuery :: Query () doQuery = do diff --git a/src/Internal/Layout.hs b/src/Internal/Layout.hs index a077872..8613284 100644 --- a/src/Internal/Layout.hs +++ b/src/Internal/Layout.hs @@ -1,5 +1,5 @@ {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} -module Internal.Layout where +module Internal.Layout where import Internal.CornerLayout (Corner(..)) import Control.Arrow (second) @@ -27,7 +27,7 @@ import qualified XMonad.StackSet as W myLayout = fullscreenFull $ - avoidStruts $ + avoidStruts $ spacingRaw True (Border 5 5 5 5) True (Border 5 5 5 5) True $ ModifiedLayout (Zoomable False 0.05 0.05) $ ModifiedLayout (Flippable False) $ @@ -134,7 +134,7 @@ instance (Eq a) => LayoutModifier Rotateable a where zero (Rectangle x y w h) = Rectangle (x - x') (y - y') w h unzero (Rectangle x y w h) = Rectangle (x + x') (y + y') w h - scaleRect (Rectangle x y w h) = + scaleRect (Rectangle x y w h) = Rectangle (x * fi sw `div` fi sh) (y * fi sh `div` fi sw) (w * sw `div` sh) @@ -154,14 +154,14 @@ instance (Eq a) => LayoutModifier Rotateable a where instance (Eq a) => LayoutModifier Flippable a where pureModifier (Flippable flip) (Rectangle sx _ sw _) stack returned = - if flip + if flip then (map (second doFlip) returned, Nothing) else (returned, Nothing) where doFlip (Rectangle x y w h) = Rectangle ((sx + fromIntegral sw) - x - fromIntegral w + sx) y w h - pureMess (Flippable flip) message = + pureMess (Flippable flip) message = case fromMessage message of Just FlipLayout -> Just (Flippable (not flip)) Nothing -> Nothing @@ -174,14 +174,14 @@ instance (Eq a) => LayoutModifier Flippable a where instance (Eq a) => LayoutModifier HFlippable a where pureModifier (HFlippable flip) (Rectangle _ sy _ sh) stack returned = - if flip + if flip then (map (second doFlip) returned, Nothing) else (returned, Nothing) where doFlip (Rectangle x y w h) = Rectangle x ((sy + fromIntegral sh) - y - fromIntegral h + sy) w h - pureMess (HFlippable flip) message = + pureMess (HFlippable flip) message = case fromMessage message of Just HFlipLayout -> Just (HFlippable (not flip)) Nothing -> Nothing @@ -191,7 +191,7 @@ instance (Eq a) => LayoutModifier HFlippable a where if flipped then descr ++ " HFlipped" else descr - + instance (Eq a) => LayoutModifier Zoomable a where redoLayout (Zoomable doit ws hs) (Rectangle x y w h) stack returned = diff --git a/src/Internal/LayoutDraw.hs b/src/Internal/LayoutDraw.hs index 131b32b..a105c98 100644 --- a/src/Internal/LayoutDraw.hs +++ b/src/Internal/LayoutDraw.hs @@ -114,7 +114,7 @@ drawXpmIO l = do -- -- Create's an XPM, purely. Returns a string with the XPM contents. -- Takes as arguments --- +-- -- - dimensions of the icon. -- - list of (color, rectangle) pairs. -- - The amount to shrink the windows by for those pretty gaps. @@ -134,7 +134,7 @@ drawXpm (w, h) rects' shrinkAmt = execWriter $ do forM_ [0 .. h - 1] $ \y -> do tell "\"" - forM_ [0 .. w - 1] $ \x -> + forM_ [0 .. w - 1] $ \x -> (case find (matches x y) zipRects of Nothing -> tell "%" Just (chr, _) -> tell [chr]) diff --git a/src/Internal/Lib.hs b/src/Internal/Lib.hs index d8784ea..e608bb0 100644 --- a/src/Internal/Lib.hs +++ b/src/Internal/Lib.hs @@ -132,7 +132,7 @@ relativeWorkspaceShift (Selector selector) = do next :: Selector next = Selector $ \a l -> select a l l - where select n (x:y:xs) _ | n == x = y + where select n (x:y:xs) _ | n == x = y select n [x] (y:_) | n == x = y select n (x:xs) orig = select n xs orig select n _ _ = n diff --git a/src/Internal/Logger.hs b/src/Internal/Logger.hs index 1dbd493..e5824a4 100644 --- a/src/Internal/Logger.hs +++ b/src/Internal/Logger.hs @@ -26,7 +26,7 @@ logs s = do return handle Just (NoPersist h) -> return h - + io $ do hPutStrLn handle s hFlush handle diff --git a/src/Internal/Marking.hs b/src/Internal/Marking.hs index e37e241..dcf3c05 100644 --- a/src/Internal/Marking.hs +++ b/src/Internal/Marking.hs @@ -22,7 +22,7 @@ type Mark = Char data MarkState = MarkState { - markStateMap :: Map Mark Window + markStateMap :: Map Mark Window , markLast :: Maybe Window } deriving (Read, Show) diff --git a/src/Internal/PassMenu.hs b/src/Internal/PassMenu.hs index bb3bc4d..5b031c0 100644 --- a/src/Internal/PassMenu.hs +++ b/src/Internal/PassMenu.hs @@ -7,7 +7,7 @@ import Control.Monad runPassMenu :: X () runPassMenu = void $ safeSpawn "rofi-pass" [ - "-p", "Password ", + "-p", "Password ", "-theme-str", "* {theme-color: #f54245;}"] - + diff --git a/src/Internal/Windows.hs b/src/Internal/Windows.hs index c6a2b8b..98baa51 100644 --- a/src/Internal/Windows.hs +++ b/src/Internal/Windows.hs @@ -53,7 +53,7 @@ forAllWindows fn = do mapM_ fn (allWindows stackSet) {- Finds a Window and returns the screen its on and the workspace its on. - - Returns nothing if the window doesn't exist. + - Returns nothing if the window doesn't exist. - - If the window is not a screen Just (Nothing, workspace) is returned. - If the window is a floating window Just (Nothing, Nothing) is returned. -} |