Skip to content

Commit

Permalink
[XMonad] Don't magnify in tabbed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
colonelpanic8 committed Aug 5, 2021
1 parent d8ffcc5 commit 29584ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion dotfiles/config/xmonad/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import XMonad.Hooks.TaffybarPagerHints
import XMonad.Hooks.WorkspaceHistory
import XMonad.Layout.Accordion
import XMonad.Layout.BoringWindows
import XMonad.Layout.ConditionalModifier
import XMonad.Layout.Cross
import XMonad.Layout.Grid
import XMonad.Layout.LayoutCombinators
Expand Down Expand Up @@ -266,11 +267,21 @@ data MyToggles
| MAGNIFY
deriving (Read, Show, Eq, Typeable)

data DisableOnTabbedCondition = DisableOnTabbedCondition deriving (Read, Show)

instance ModifierCondition DisableOnTabbedCondition where
shouldApply _ = do
not . isInfixOf "Tabbed" . description . W.layout <$> currentWorkspace

disableOnTabbed = ConditionalLayoutModifier DisableOnTabbedCondition

myMagnify = ModifiedLayout $ disableOnTabbed (Mag 1 (1.3, 1.3) On (AllWins 1))

instance Transformer MyToggles Window where
transform LIMIT x k = k (limitSlice 2 x) unmodifyLayout
transform GAPS x k = k (smartSpacing 5 x) unmodifyLayout
transform MAGICFOCUS x k = k (magicFocus x) unmodifyLayout
transform MAGNIFY x k = k (magnify (1.3) (AllWins 1) True x) unmodifyLayout
transform MAGNIFY x k = k (myMagnify x) unmodifyLayout

myToggles = [LIMIT, GAPS, MAGICFOCUS, MAGNIFY]
otherToggles = [NBFULL, MIRROR, NOBORDERS, SMARTBORDERS]
Expand Down

0 comments on commit 29584ee

Please sign in to comment.