Merge pull request #289 from berkeleyinc/improved-left-right-tabbed

Improved tabbedRight and tabbedLeft in XMonad.Layout.Tabbed
This commit is contained in:
Brent Yorgey
2019-09-16 16:47:28 -05:00
committed by GitHub
2 changed files with 10 additions and 2 deletions

View File

@@ -39,6 +39,10 @@
### Bug Fixes and Minor Changes
* `XMonad.Layout.Tabbed`
tabbedLeft and tabbedRight will set their tabs' height and width according to decoHeight/decoWidth
* `XMonad.Prompt`
Added `sorter` to `XPConfig` used to sort the possible completions by how

View File

@@ -226,8 +226,12 @@ instance Eq a => DecorationStyle TabbedDecoration a where
ny = n y hh
upperTab = Rectangle nx y wid (fi ht)
lowerTab = Rectangle nx (y + fi (hh - ht)) wid (fi ht)
leftTab = Rectangle x ny (fi wt) hid
rightTab = Rectangle (x + fi (wh - wt)) ny (fi wt) hid
fixHeightLoc i = y + fi (((fi ht) * fi i))
fixHeightTab k = Rectangle k
(maybe y (fixHeightLoc)
$ w `elemIndex` ws) (fi wt) (fi ht)
rightTab = fixHeightTab (x + fi (wh - wt))
leftTab = fixHeightTab x
numWindows = length ws
shrink (Tabbed loc _ ) (Rectangle _ _ dw dh) (Rectangle x y w h)
= case loc of