darcs patch: Layout.Spacing: Outer window edges now get as much spa...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

darcs patch: Layout.Spacing: Outer window edges now get as much spa...

felixc@felixcrux.com
Hello XMonad contributors!

I've attached here my first patch to XMonadContrib; specifically to the
Layout.Spacing component. This change makes it so that all edges of all
windows have the same amount of space around them, regardless of whether
they're up against the edge of the screen.

This matches my personal preference, but I don't know whether the original
behaviour was by design or if this style of spacing was already considered
and rejected. I'd welcome any discussion on the pros and cons of doing things
this way, as well as finding out whether anyone objects to this change. At
the end of the day it's up to you whether this patch should be included.

Thank you to geekosaur and fizzie in #xmonad for their help with the tricky
question of determining whether a Workspace has just one window on it, for
the smartSpacing part.

All the best,

Felix


1 patch for repository http://code.haskell.org/XMonadContrib:

Thu Dec 18 20:47:34 EST 2014  Felix Crux <felixc at felixcrux.com>
  * Layout.Spacing: Outer window edges now get as much spacing as inner ones
 
  Layout.Spacing applies a customizable amount of space around the outside of each
  window. At window edges where two windows meet, the total distance between them
  is therefore twice the customized value (one space value from each window). At
  the edge of the screen, however, the spacing is only applied once. This results
  in uneven amounts of spacing and differently-sized gaps on the screen.
 
  This patch extends the Spacing layout to include a further gap all around the
  edge of the screen, thus making all spaces around windows equal in size.
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 1705 bytes
Desc: Patch preview
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20141218/f8e367cd/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout_spacing_-outer-window-edges-now-get-as-much-spacing-as-inner-ones.dpatch
Type: application/x-darcs-patch
Size: 26134 bytes
Desc: A darcs patch for your repository!
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20141218/f8e367cd/attachment-0003.bin>

Reply | Threaded
Open this post in threaded view
|

darcs patch: Layout.Spacing: Outer window edges now get as much spa...

Brandon Allbery
On Thu, Dec 18, 2014 at 9:16 PM, <felixc at felixcrux.com> wrote:
>
> This matches my personal preference, but I don't know whether the original
> behaviour was by design or if this style of spacing was already considered
> and rejected.
>

There's at least three variations of this module that have been requested;
and, oddly, everyone proposing a variant thinks that it is intuitively
obvious that it's the only sensible one and wonders why nobody else ever
considered it or if there's some technical reason why it's not already
"the" implementation.

In other words, you should be providing an *alternative* instead of
replacing the existing implementation, because your "obviously correct" is
not obvious to everyone else.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20141219/494e8abd/attachment.html>

Reply | Threaded
Open this post in threaded view
|

darcs patch: Layout.Spacing: Outer window edges now get as much spa...

felixc@felixcrux.com
On Fri, Dec 19 09:35, Brandon Allbery wrote:
> There's at least three variations of this module that have been requested;
> and, oddly, everyone proposing a variant thinks that it is intuitively
> obvious that it's the only sensible one and wonders why nobody else ever
> considered it or if there's some technical reason why it's not already
> "the" implementation.

Hm; I must not have expressed myself clearly. My intention in labelling the
change as "personal preference", asking whether there were existing reasons
for having it the current way, and putting it up for discussion, was
precisely to indicate that I *don't* think this is the only sensible way,
and that I suspect someone *has* considered different ways.

> In other words, you should be providing an *alternative* instead of
> replacing the existing implementation, because your "obviously correct" is
> not obvious to everyone else.

Again, when I said "personal preference", I did not expect it to be taken
as implying I believe it to be "obviously correct".

I have attached a modified patch that adds this behaviour as a separate
option that does not replace the existing behaviour.

Cheers,

--
Felix
-------------- next part --------------
1 patch for repository http://code.haskell.org/XMonadContrib:

Fri Dec 19 17:36:46 EST 2014  Felix Crux <felixc at felixcrux.com>
  * Layout.Spacing: Outer window edges now get as much spacing as inner ones
 
  Layout.Spacing applies a customizable amount of space around the outside of each
  window. At window edges where two windows meet, the total distance between them
  is therefore twice the customized value (one space value from each window). At
  the edge of the screen, however, the spacing is only applied once. This results
  in uneven amounts of spacing and differently-sized gaps on the screen.
 
  This patch extends the Spacing layout to include a further gap all around the
  edge of the screen, thus making all spaces around windows equal in size.
 

New patches:

[Layout.Spacing: Outer window edges now get as much spacing as inner ones
Felix Crux <felixc at felixcrux.com>**20141219223646
 Ignore-this: 61363e97939fe857876c8252ac5f0302
 
 Layout.Spacing applies a customizable amount of space around the outside of each
 window. At window edges where two windows meet, the total distance between them
 is therefore twice the customized value (one space value from each window). At
 the edge of the screen, however, the spacing is only applied once. This results
 in uneven amounts of spacing and differently-sized gaps on the screen.
 
 This patch extends the Spacing layout to include a further gap all around the
 edge of the screen, thus making all spaces around windows equal in size.
 
] {
hunk ./XMonad/Layout/Spacing.hs 21
                                -- $usage
 
                                spacing, Spacing,
+                               spacingWithEdge, SpacingWithEdge,
                                smartSpacing, SmartSpacing,
hunk ./XMonad/Layout/Spacing.hs 23
+                               smartSpacingWithEdge, SmartSpacingWithEdge,
 
                              ) where
 
hunk ./XMonad/Layout/Spacing.hs 29
 import Graphics.X11 (Rectangle(..))
 import Control.Arrow (second)
+import XMonad.Core (runLayout)
+import XMonad.StackSet (up, down, Workspace(..))
 import XMonad.Util.Font (fi)
 
 import XMonad.Layout.LayoutModifier
hunk ./XMonad/Layout/Spacing.hs 58
 
     modifierDescription (Spacing p) = "Spacing " ++ show p
 
+-- | Surround all windows by a certain number of pixels of blank space, and
+-- additionally adds the same amount of spacing around the edge of the screen.
+spacingWithEdge :: Int -> l a -> ModifiedLayout SpacingWithEdge l a
+spacingWithEdge p = ModifiedLayout (SpacingWithEdge p)
+
+data SpacingWithEdge a = SpacingWithEdge Int deriving (Show, Read)
+
+instance LayoutModifier SpacingWithEdge a where
+
+    pureModifier (SpacingWithEdge p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
+
+    modifyLayout (SpacingWithEdge p) w r = runLayout w (shrinkRect p r)
+
+    modifierDescription (SpacingWithEdge p) = "SpacingWithEdge " ++ show p
+
 shrinkRect :: Int -> Rectangle -> Rectangle
 shrinkRect p (Rectangle x y w h) = Rectangle (x+fi p) (y+fi p) (w-2*fi p) (h-2*fi p)
 
hunk ./XMonad/Layout/Spacing.hs 89
     pureModifier (SmartSpacing p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
 
     modifierDescription (SmartSpacing p) = "SmartSpacing " ++ show p
+
+-- | Surrounds all windows with blank space, and adds the same amount of spacing
+-- around the edge of the screen, except when the window is the only visible
+-- window on the current workspace.
+smartSpacingWithEdge :: Int -> l a -> ModifiedLayout SmartSpacingWithEdge l a
+smartSpacingWithEdge p = ModifiedLayout (SmartSpacingWithEdge p)
+
+data SmartSpacingWithEdge a = SmartSpacingWithEdge Int deriving (Show, Read)
+
+instance LayoutModifier SmartSpacingWithEdge a where
+
+    pureModifier _ _ _ [x] = ([x], Nothing)
+    pureModifier (SmartSpacingWithEdge p) _ _ wrs = (map (second $ shrinkRect p) wrs, Nothing)
+
+    modifyLayout (SmartSpacingWithEdge p) w r
+        | maybe False (\s -> null (up s) && null (down s)) (stack w) = runLayout w r
+        | otherwise = runLayout w (shrinkRect p r)
+
+    modifierDescription (SmartSpacingWithEdge p) = "SmartSpacingWithEdge " ++ show p
}

Context:

[X.C.Prime: doc tweaks
Devin Mullins <devin.mullins at gmail.com>**20141002075939
 Ignore-this: 20d6b829b810f48b5e4b4c161b39b312
]
[X.A.Navigation2D: add convenience functions for setting config & keybindings
Devin Mullins <devin.mullins at gmail.com>**20141002075757
 Ignore-this: ed01137f03a531f73315ed503d1eb6ef
 1. Added 'additionalNav2DKeys' which adds keybindings for the cartesian product
    of direction keys and (modifier, action) pairs given.
 2. Added 'navigation2D' which combines that with 'withNavigation2DConfig'.
 3. Added 'additionalNav2DKeysP' and 'navigation2DP' which do the same, but use
    the 'additionalKeysP' syntax.
]
[X.C.Prime: doc fixes
Devin Mullins <devinmullins at gmail.com>**20141001075855
 Ignore-this: dbbe00791b04df61dcd595c50333fba
]
[X.C.Prime: add 'withScreens' and friends
Devin Mullins <devinmullins at gmail.com>**20141001075250
 Ignore-this: eba37b1ff3da265a4dcc509f538fce4d
 The screen equivalent of 'withWorkspaces' lets you more easily define keys that
 move/swap between screens.
 
 Also, rename wsKeyspecs to wsKeys, and make a couple of doc tweaks.
]
[Implement proper handling of dynamically changing hostname
Anton Vorontsov <anton at enomsg.org>**20140901072158
 Ignore-this: 2aeac6d2161e666d40cda6a09f78b208
 
 The module implements a proper way of finding out whether the window is
 remote or local.
 
 Just checking for a hostname and WM_CLIENT_MACHINE being equal is often
 not enough because the hostname is a changing subject (without any
 established notification mechanisms), and thus WM_CLIENT_MACHINE and the
 hostname can diverge even for a local window.
 
 This module solves the problem. As soon as there is a new window created,
 we check the hostname and WM_CLIENT_MACHINE, and then we cache the result
 into the XMONAD_REMOTE property.
 
 Notice that XMonad itself does not know anything about hostnames, nor does
 it have any dependency on Network.* modules. For this module it is not a
 problem: you can provide a mean to get the hostname through your config
 file (see usage). Or, if you don't like the hassle of handling dynamic
 hostnames (suppose your hostname never changes), it is also fine: this
 module will fallback to using environment variables.
]
[Add Stoppable layout for power saving
Anton Vorontsov <anton at enomsg.org>**20140901072141
 Ignore-this: a52805d9f3095cd7af48507847ed2fe3
 
 This module implements a special kind of layout modifier, which when
 applied to a layout, causes xmonad to stop all non-visible processes. In a
 way, this is a sledge-hammer for applications that drain power. For
 example, given a web browser on a stoppable workspace, once the workspace
 is hidden the web browser will be stopped.
 
 Note that the stopped application won't be able to communicate with X11
 clipboard. For this, the module actually stops applications after a
 certain delay, giving a chance for a user to complete copy-paste sequence.
 By default, the delay equals to 15 seconds, it is configurable via
 'Stoppable' constructor.
 
 The stoppable modifier prepends a mark (by default equals to "Stoppable")
 to the layout description (alternatively, you can choose your own mark and
 use it with 'Stoppable' constructor). The stoppable layout (identified by
 a mark) spans to multiple workspaces, letting you to create groups of
 stoppable workspaces that only stop processes when none of the workspaces
 are visible, and conversely, unfreezing all processes even if one of the
 stoppable workspaces are visible.
 
 To stop the process we use signals, which works for most cases. For
 processes that tinker with signal handling (debuggers), another
 (Linux-centric) approach may be used. See
 https://www.kernel.org/doc/Documentation/cgroups/freezer-subsystem.txt
]
[X.C.Prime: doc changes
Devin Mullins <devinmullins at gmail.com>**20140925203037
 Ignore-this: 51204c1a9f2e6ed21228d2910417fd21
]
[X.C.Prime: add withWorkspaces et al.
Devin Mullins <devinmullins at gmail.com>**20140925203034
 Ignore-this: 65f691270110cc5de13c950d9dcb0c17
 This allows easier configuration of workspaces and their keybindings. Required
 generalizing the 'Prime' type, so lots of other lines changed in rather trivial
 ways.
]
[X.C.Prime: add ifThenElse binding
Devin Mullins <devinmullins at gmail.com>**20140924191509
 Ignore-this: ae775c418c27301b9c12d2a233502cec
 This is necessary for if-then-else support in the user's config.
]
[X.C.Prime: doc fixes
Devin Mullins <devinmullins at gmail.com>**20140915080601
 Ignore-this: 15e3c445a99d3b2d3a235aa76119797
]
[X.C.Prime: fix 'def' hyperlink in doc
Devin Mullins <devinmullins at gmail.com>**20140914075352
 Ignore-this: a1de1d81a5f140ab7d90edbf393e9bda
]
[XMonad.Config.Prime, a do-notation for config
Devin Mullins <devinmullins at gmail.com>**20140914064828
 Ignore-this: f7397aa6e6efe5d76acebfa22c567baa
 Note that the use of RebindableSyntax is because of the need to vary the
 layoutHook type throughout the config. The alternative, using the existential
 Layout type, was rejected because it required TemplateHaskell in order to look
 nice, and TemplateHaskell is not portable.
 
 I've tried to make a version of (>>) that also worked on normal monads, but
 have had no luck as of yet. Maybe some intrepid soul can add it later.
]
[X.P.Shell: fix doc typo
me at twifkak.com**20130317115516
 Ignore-this: bdd385a9142ed039a917d135e76293fe
]
[reverse workspaces, so that switching to a dynamic workspace group restores the focus to the screen that was focused at group creation time
nwfilardo at gmail.com**20140913174118
 Ignore-this: b74c02b1892159694827e35122c2d517
]
[add filepath dependency, needed by new X.P.Pass module
me at twifkak.com**20140913070926
 Ignore-this: fec97086c1e66cf8a036265bd1a970a8
]
[add-new-xmonad-prompt-pass
eniotna.t at gmail.com**20140829131928
 Ignore-this: 11e85dfe3d24cef88d8d89f4e7b1ec0b
 This module provides 3 <XMonad.Prompt> to ease passwords manipulation (generate, read, remove):
 
 - one to lookup passwords in the password-storage.
 
 - one to generate a password for a given password label that the user inputs.
 
 - one to delete a stored password for a given password label that the user inputs.
 
 All those prompts benefit from the completion system provided by the module <XMonad.Prompt>.
 
 The password store is setuped through an environment variable PASSWORD_STORE_DIR.
 If this is set, use the content of the variable.
 Otherwise, the password store is located on user's home @$HOME\/.password-store at .
 
 
 Source:
 
 - The password storage implementation is <http://git.zx2c4.com/password-store the password-store cli>.
 
 - Inspired from <http://babushk.in/posts/combining-xmonad-and-pass.html>
]
[use Data.Map instead of Data.Map.Strict to support containers < 0.5
Adam Vogt <vogt.adam at gmail.com>**20140815043141
 Ignore-this: 436d18657d8499f4ce57311e84503d9f
]
[config-mate
allbery.b at gmail.com**20140803020659
 Ignore-this: d5de258c0a28cd5ba64a59cf37cd480a
 Initial support for the Mate desktop environment (http://mate-desktop.org).
 Based on existing Gnome 2 support, since Mate is a maintained fork of
 Gnome 2.
]
[debug-managehook
allbery.b at gmail.com**20140803020601
 Ignore-this: 51f9255b496cca79e4a53e274c400ecc
 A set of hooks, and convenience combinators, to help with ManageHook debugging.
 Ordinary users may well want to use debugManageHookOn in normal configs,
 specifying a key sequence which can be pressed before running a command in
 order to capture debug information just for that command's main window.
 
 This is especially useful when trying to diagnose issues such as programs
 that do not play well with SpawnOn, or ManageHook matching on 'title' when
 the program does not set the window title until after it is mapped.
]
[debug-debug
allbery.b at gmail.com**20140803020530
 Ignore-this: cbb2b1d99293e3a4d02a256c2733aeb0
 Various fixes and enhancements to DebugWindow and DebugStack. ManageDebug
 requires these fixes, but some of them are significant even if not using
 ManageDebug.
]
[derive Applicative instances to suppress AMP warning
Adam Vogt <vogt.adam at gmail.com>**20140710163950
 Ignore-this: c2110d07bccc61462c3fbf73c900aaa1
]
[clean up cabal file and drop support for base < 3
Adam Vogt <vogt.adam at gmail.com>**20140710013255
 Ignore-this: 76b142e2b114604feac9b8e41cf71ab
]
[add-duck-duck-go-search-engine
eniotna.t at gmail.com**20140617174246
 Ignore-this: 29bbfb2d07d9ddf36bf0268a4e255f81
]
[XSelection: getSelection: fix connection exhaustion bug (issue #573); include warning
gwern at gwern.net**20140601025019
 Ignore-this: add21190fc07338b243c2241cc746119
]
[Fix dbus-send call in XMonad.Config.Gnome
md143rbh7f at gmail.com**20140129032114
 Ignore-this: ed62458b55c8b34b77f73027eeee1a73
 dbus-send --print-reply=string is invalid, but it was silently ignored until recently:
 http://cgit.freedesktop.org/dbus/dbus/commit/tools/dbus-send.c?id=c690ee4351f99ed5e629ffcf5f4a2edcd418d103
 I've changed XMonad.Config.Gnome to run --print-reply=literal, since that's what the old behavior was.
]
[warning police (unused variables)
Adam Vogt <vogt.adam at gmail.com>**20140505001242
 Ignore-this: a15b4d844b1da4f1f1f9b6095c968705
]
[This patch makes the Ssh extension works with **user** arguments in ssh, .e.g ssh admin at localhost.
linxray at gmail.com**20140504091120
 Ignore-this: 297673e11d3049c4f127aac3e172d361
]
[remove trailing whitespace in L.BinarySpacePartition
Adam Vogt <vogt.adam at gmail.com>**20140501011943
 Ignore-this: 8dd677978992e0854801b8f254463dc2
]
[replace Bound with the equivalent Direction2D
Adam Vogt <vogt.adam at gmail.com>**20140501011540
 Ignore-this: b1f1c256aba07f70918fe1d693c8087b
]
[remove unused extension in BSP
Adam Vogt <vogt.adam at gmail.com>**20140501011455
 Ignore-this: a4962486b2aa3980536bff19a537451e
]
[Add BinarySpacePartition layout
benweitzman at gmail.com**20140430205848
 Ignore-this: a85d1dc51bf54c59ae2bd9d948cc1088
]
[X.Actions.DynamicWorkspaceGroups: export new function addRawWSGroup
Brent Yorgey <byorgey at cis.upenn.edu>**20140428142901
 Ignore-this: a487882c9571bf91ff921d6561bb4cc6
]
[Remove unneeded context with the IfMax layout instance
Adam Vogt <vogt.adam at gmail.com>**20140422221105
 Ignore-this: 3b8ac316f56df6a84420754db769fb0
 
 Extra constraints on instances are about as useful as -XDataTypeContexts
]
[Adding side tabs and replacing TabbarLocation with Direction2D.
nrujac at gmail.com**20140219200811
 Ignore-this: edabeec973b4e0d61515818367689843
]
[warning police
Daniel Wagner <daniel at wagner-home.com>**20140316183747
 Ignore-this: fd16435ccdd3fee8924723cc690cc239
]
[New module: XMonad.Util.WindowState
Dmitry Bogatov <KAction at gnu.org>**20140218100229
 Ignore-this: 14a6fa263c423cd8cca3b2645b3930d7
 
 Save almost arbitary data per window
]
[Add side tabs to the tabbed layout.
nrujac at gmail.com**20140213215247
 Ignore-this: f81bafe9cb75a30ed6bbbe68cf5d66c0
]
[SpawnNamedPipe hlint cleanup
cwills.dev at gmail.com**20140202213613
 Ignore-this: dbb68c4c5522026bd108d0158e747b48
]
[document and cleanup SpawnNamedPipe
cwills.dev at gmail.com**20140202211000
 Ignore-this: b264278f1f1ab1f18b37245a5ff33136
]
[Added SpawnNamedPipe
cwills.dev at gmail.com**20140202143415
 Ignore-this: 87797ffffc8d0fd088482bd0c5baf0e
]
[Make commandToComplete in XMonad.Prompt.Shell complete last word
md143rbh7f at gmail.com**20140130200050
 Ignore-this: b0fe22fdd7b9409835fd0ca069f2e01a
 
 The following change from 2013-02-09 breaks shell completion for me:
     hunk ./XMonad/Prompt/Shell.hs 65
     +    commandToComplete _ c = c
 
 It seems to be passing the entire string into compgen in order to get the file completions, but it should only pass the last word. I propose reverting this change. Comments are appreciated.
]
[expose and document X.L.IndependentScreens.marshallSort
Daniel Wagner <daniel at wagner-home.com>**20140128212844
 Ignore-this: 90c1437c6ffe1dbd8f4a4ed192097ec
]
[ServerMode properly indent
Adam Vogt <vogt.adam at gmail.com>**20131219201440
 Ignore-this: 761b39c3e3c90b6123f068e8b1d34e5d
]
[remove ServerMode tabs
Adam Vogt <vogt.adam at gmail.com>**20131219201000
 Ignore-this: f21448c248ec0ac289c309ed964ebcff
]
[fix -Wall ServerMode
Adam Vogt <vogt.adam at gmail.com>**20131219181030
 Ignore-this: 708dd5fc60f43dee3d1da085002052f
]
[documentation note that ServerMode is similar to wmctrl
Adam Vogt <vogt.adam at gmail.com>**20131219180748
 Ignore-this: 3215bdf1c698c798eca8ed7f62a0f591
]
[Generalized XMonad.Hooks.ServerMode
polson2 at hawk.iit.edu**20131216025100
 Ignore-this: e58da3b168a1058f32982833ea25a739
]
[IfMax-Layout
Ilya Portnov <portnov84 at rambler.ru>**20131201072634
 Ignore-this: dac53f2a0505e740f05fdf03f1db0c21
 This adds a new ("conditional") layout, IfMax, which simply runs one layout, if there are <= N windows, and else runs another layout.
]
[fix UrgencyHook and add filterUrgencyHook
Adam Vogt <vogt.adam at gmail.com>**20130924224738
 Ignore-this: 3b7c62275701e6758397977c5c09b744
]
[export XMonad.Hooks.UrgencyHook.clearUrgency (issue 533)
Adam Vogt <vogt.adam at gmail.com>**20130923031349
 Ignore-this: dafe5763d9abcfa606f5c1a8cf5c57d6
]
[minor documentation fix: manageDocks doesn't do anything with struts, so don't claim it does
Daniel Wagner <daniel at wagner-home.com>**20130814125106
 Ignore-this: a2610d6c1318ac0977abfc21d1b91632
]
[don't pretend to be LG3D in X.C.Dmwit because this confuses modern GTK
Daniel Wagner <daniel at wagner-home.com>**20130813211636
 Ignore-this: 8f728dc1b4bf5e472d99419cc5920e51
]
[XMonad.Actions.UpdatePointer: generalise updatePointer
Liyang HU <git at liyang.hu>**20130730071007
 Ignore-this: 3374a62b6c63dcc152dbf843cd0577f0
 
]
[XMonad.Actions.UpdatePointer: document TowardsCentre
Liyang HU <git at liyang.hu>**20130730053746
 Ignore-this: 2d684b12e4fff0ebec254bea4a4546a3
 
]
[Haddock formatting in H.Minimize
Adam Vogt <vogt.adam at gmail.com>**20130723155658
 Ignore-this: 5db3186a51dec58f78954466ded339cb
]
[Bump version (and xmonad dependency) to 0.12
Adam Vogt <vogt.adam at gmail.com>**20130720205857
 Ignore-this: ce165178ca916223501f266339f1de39
 
 This makes a breakage due to missing patches in core a bit more obvious.
 Previously you would have a build failure regarding some missing identifiers
 (def re-exported by XMonad from Data.Default), while after applying this patch
 it will be clear that xmonad-core needs to be updated.
]
[Fix issue 551 by also getting manpath without -g flag.
Adam Vogt <vogt.adam at gmail.com>**20130716030536
 Ignore-this: ded2d51eb7b7697c0fdfaa8158d612df
 
 Instead of taking Ondrej's approach of figuring out which man (man-db or
 http://primates.ximian.com/~flucifredi/man/) is used by the system, just try
 both sets of flags.
]
[Escape dzen markup and remove xmobar tags from window titles by default.
Adam Vogt <vogt.adam at gmail.com>**20130708144813
 Ignore-this: cf56bff752fbf78ea06d5c0cb755f615
 
 The issue was that window titles, such as those set by, for example a browser,
 could set the window title to display something like
 
    <action=malicious shell command>normal title</action>
 
 Which could be executed by xmobar (or dzen).
 
 This adds a ppTitleSanitize which does the above functions. This way when users
 override ppTitle, the benefits are not lost.
 
 Thanks to Ra?l Benencia and Joachim Breitner for bringing this to my attention.
]
[DynamicBars-use-ExtensibleState
gopsychonauts at gmail.com**20130618074755
 Ignore-this: afacba51af2be8ede65b9bcf9b002a7
 
 Hooks.DynamicBars was previously using an MVar and the unsafePerformIO hack (
 http://www.haskell.org/haskellwiki/Top_level_mutable_state ) to store bar
 state. Since ExtensibleState exists to solve these sorts of problems, I've
 switched the file over to use unsafePerformIO instead.
 
 Some functions' types had to be changed to allow access to XState, but the
 public API is unchanged.
 
]
[Catch exceptions when finding commands on PATH in Prompt.Shell
Thomas Tuegel <ttuegel at gmail.com>**20130616230219
 Ignore-this: 5a4d08c80301864bc14ed784f1054c3f
]
[Fix haddock parse error in X.A.LinkWorkspaces
Adam Vogt <vogt.adam at gmail.com>**20130528133448
 Ignore-this: 42f05cf8ca9e6d1ffae3bd20666d87ab
]
[use Data.Default wherever possible, and deprecate the things it replaces
Daniel Wagner <daniel at wagner-home.com>**20130528013909
 Ignore-this: 898458b1d2868a70dfb09faf473dc7aa
]
[eliminate references to defaultConfig
Daniel Wagner <daniel at wagner-home.com>**20130528005825
 Ignore-this: 37ae613e4b943e99c5200915b9d95e58
]
[minimal change needed to get xmonad-contrib to build with xmonad's data-default patch
Daniel Wagner <daniel at wagner-home.com>**20130528001040
 Ignore-this: 291e4f6cd74fc2b808062e0369665170
]
[Remove unneeded XSync call in Layout.ShowWName
Francesco Ariis <fa-ml at ariis.it>**20130517153341
 Ignore-this: 4d107c680572eff464c8f6ed9fabdd41
]
[Remove misleading comment: we definitely don't support ghc-6.6 anymore
Adam Vogt <vogt.adam at gmail.com>**20130514215851
 Ignore-this: 2d071cb05709a16763d039222264b426
]
[Fix module name in comment of X.L.Fullscreen
Adam Vogt <vogt.adam at gmail.com>**20130514215727
 Ignore-this: cb5cf18c301c5daf5e1a2527da1ef6bf
]
[Minor update to cabal file (adding modules & maintainership)
Adam Vogt <vogt.adam at gmail.com>**20130514215632
 Ignore-this: 82785e02e544e1f797799bed5b5d9be2
]
[Remove trailing whitespace in X.A.LinkWorkspaces
Adam Vogt <vogt.adam at gmail.com>**20130514215421
 Ignore-this: 5015ab4468e7931876eb66b019af804c
]
[Update documentation of LinkWorkspaces Module
quesel at informatik.uni-oldenburg.de**20110328072813
 Ignore-this: da863534931181f551c9c54bc4076c05
]
[Added a module for linking workspaces
quesel at informatik.uni-oldenburg.de**20110210165018
 Ignore-this: 1dba2164cc3387409873d33099596d91
 
 This module provides a way to link certain workspaces in a multihead setup.
 That way, when switching to the first one the other heads display the linked
 workspaces.
]
[Cache results from calcGap in ManageDocks
Adam Vogt <vogt.adam at gmail.com>**20130425155811
 Ignore-this: e5076fdbdfc68bc159424dd4e0f14456
 
 http://www.haskell.org/pipermail/xmonad/2013-April/013670.html
]
[Remove unnecessary contexts from L.MultiToggle
Adam Vogt <vogt.adam at gmail.com>**20130217163356
 Ignore-this: 6b0e413d8c3a58f62088c32a96c57c51
]
[Generalises modWorkspace to take any layout-transforming function
gopsychonauts at gmail.com**20130501151425
 Ignore-this: 28c7dc1f6216bb1ebdffef5434ccbcbd
 
 modWorkspace already was capable of modifying the layout with an arbitrary
 layout -> layout function, but its original type restricted it such that it
 could only apply a single LayoutModifier; this was often inconvenient, as for
 example it was not possible simply to compose LayoutModifiers for use with
 modWorkspace.
 
 This patch also reimplements onWorkspaces in terms of modWorkspaces, since with
 the latter's less restrictive type this is now possible.
]
[since XMonad.Config.Dmwit mentions xmobar, we should include the associated .xmobarrc file
Daniel Wagner <daniel at wagner-home.com>**20130503194055
 Ignore-this: 2f6d7536df81eb767262b79b60eb1b86
]
[warning police
Daniel Wagner <daniel at wagner-home.com>**20130502012700
 Ignore-this: ae7412ac77c57492a7ad6c5f8f50b9eb
]
[XMonad.Config.Dmwit
Daniel Wagner <daniel at wagner-home.com>**20130502012132
 Ignore-this: 7402161579fd2e191b60a057d955e5ea
]
[minor fixes to the haddock markup in X.L.IndependentScreens
Daniel Wagner <daniel at wagner-home.com>**20130411193849
 Ignore-this: b6a139aa43fdb39fc1b86566c0c34c7a
]
[add whenCurrentOn to X.L.IndependentScreens
Daniel Wagner <daniel at wagner-home.com>**20130408225251
 Ignore-this: ceea3d391f270abc9ed8e52ce19fb1ac
]
[Allow to specify the initial gaps' states in X.L.Gaps
Paul Fertser <fercerpav at gmail.com>**20130222072232
 Ignore-this: 31596d918d0050e36ce3f64f56205a64
]
[should bump X11 dependency, too, to make sure we have getAtomName
Daniel Wagner <daniel at wagner-home.com>**20130225180527
 Ignore-this: 260711f27551f18cc66afeb7b4846b9f
]
[getAtomName is now defined in the X11 library
Daniel Wagner <daniel at wagner-home.com>**20130225180323
 Ignore-this: 3b9e17c234679e98752a47c37132ee4e
]
[Allow to limit maximum row count in X.Prompt completion window
Paul Fertser <fercerpav at gmail.com>**20130221122050
 Ignore-this: 923656f02996f2de2b1336275392c5f9
 
 On a keyboard-less device (such as a smartphone), where one has to use
 an on-screen keyboard, the maximum completion window height must be
 limited to avoid overlapping the keyboard.
]
[Note in U.NameActions that xmonad core can list default keys now
Adam Vogt <vogt.adam at gmail.com>**20130217233026
 Ignore-this: 937bff636fa88171932d5192fe8e290b
]
[Export U.NamedActions.addDescrKeys per evaryont's request.
Adam Vogt <vogt.adam at gmail.com>**20130217232619
 Ignore-this: a694a0a3ece70b52fba6e8f688d86344
]
[Add EWMH DEMANDS_ATTENTION support to UrgencyHook.
Maarten de Vries <maarten at de-vri.es>**20130212181229
 Ignore-this: 5a4b314d137676758fad9ec8f85ce422
 
 Add support for the _NET_WM_STATE_DEMANDS_ATTENTION atom
 by treating it the same way as the WM_HINTS urgency flag.
 
]
[Unconditionally set _NET_WORKAREA in ManageDocks
Adam Vogt <vogt.adam at gmail.com>**20130117180851
 Ignore-this: 9f57e53fba9573d8a92cf153beb7fe7a
]
[spawn command when no completion is available (if alwaysHighlight is True); changes commandToComplete in Prompt/Shell to complete the whole word instead of using getLastWord
c.lopez at kmels.net**20130209190456
 Ignore-this: ca7d354bb301b555b64d5e76e31d10e8
]
[order-unindexed-ws-last
matthewhague at zoho.com**20120703222726
 Ignore-this: 4af8162ee8b16a60e8fd62fbc915d3c0
 
 Changes the WorkspaceCompare module's comparison by index to put workspaces without an index last (rather than first).
]
[SpawnOn modification for issue 523
Adam Vogt <vogt.adam at gmail.com>**20130114014642
 Ignore-this: 703f7dc0f800366b752f0ec1cecb52e5
 
 This moves the function to help clean up the `Spawner' to the ManageHook
 rather than in functions like spawnOn. Probably it makes no difference, the
 reason is because there's one manageSpawn function but many different so this
 way there are less functions to write.
]
[Update L.TrackFloating.useTransient example code
Adam Vogt <vogt.adam at gmail.com>**20130112041239
 Ignore-this: e4e31cf1db742778c1d59d52fdbeed7a
 
 Suggest useTransient goes to the right of trackFloating which is the
 configuration actually tested.
]
[Adapt ideas of issue 306 patch to a new modifier in L.TrackFloating
Adam Vogt <vogt.adam at gmail.com>**20130112035701
 Ignore-this: d54d27b71b97144ef0660f910fd464aa
]
[Make X.A.CycleWS not rely on hidden WS order
Dmitri Iouchtchenko <johnnyspoon at gmail.com>**20130109023328
 Ignore-this: 8717a154b33253c5df4e9a0ada4c2c3e
]
[Add X.H.WorkspaceHistory
Dmitri Iouchtchenko <johnnyspoon at gmail.com>**20130109023307
 Ignore-this: c9e7ce33a944facc27481dde52c7cc80
]
[Allow removing arbitrary workspaces
Dmitri Iouchtchenko <johnnyspoon at gmail.com>**20121231214343
 Ignore-this: 6fce4bd3d0c5337e5122158583138e74
]
[Remove first-hidden restriction from X.A.DynamicWorkspaces.removeWorkspace'
Dmitri Iouchtchenko <johnnyspoon at gmail.com>**20121231214148
 Ignore-this: 55fb0859e9a5f476a834ecbdb774aac8
]
[Add authorspellings file for `darcs show authors'.
Adam Vogt <vogt.adam at gmail.com>**20130101040031
 Ignore-this: c3198072ebc6a71d635bec4d8e2c78fd
 
 This authorspellings file includes a couple people who've contributed to xmonad
 (not XMonadContrib). When people have multiple addresses, the most recent one
 has been picked.
]
[TAG 0.11
Adam Vogt <vogt.adam at gmail.com>**20130101014231
 Ignore-this: 57cf32412fd1ce912811cb7fafe930f5
]
Patch bundle hash:
18f8e520bfbbbddddc046b8ed7ef1f5290e949fb

Reply | Threaded
Open this post in threaded view
|

darcs patch: Layout.Spacing: Outer window edges now get as much spa...

Adam Vogt
Hi Felix,

I've pushed your patch. But here's an idea:

In my config I have a:

data ExpandEdges a = ExpandEdges Int deriving (Read,Show)

instance LayoutModifier ExpandEdges Window where
    modifyLayout (ExpandEdges n) ws (Rectangle x y w h) = let
            bigRect = Rectangle (x - fromIntegral n) (y - fromIntegral n)
                                (w + 2*fromIntegral n) (h + 2*fromIntegral n)
        in
        runLayout ws bigRect

-- | push edges off-screen, or towards the center of the screen for
negative numbers.
expandEdges ::  Int -> l a -> ModifiedLayout ExpandEdges l a
expandEdges n layout = ModifiedLayout (ExpandEdges n) layout


So we could define:

spacingWithEdge n = expandEdges (-n) . spacing n

This implementation is worse because the description is probably too
long. But it does suggest that we're missing the combination that
leaves no gaps at the screen edge:

spacingOnlyBetweenWindows n = expandEdges n . spacing n

Then again there's not too much point in defining extra things in
contrib that nobody actually uses.

Regards,
Adam

Reply | Threaded
Open this post in threaded view
|

darcs patch: Layout.Spacing: Outer window edges now get as much spa...

felixc@felixcrux.com
On Sun, Dec 21, 2014, at 21:52, adam vogt wrote:
> I've pushed your patch.

Thank you! Much appreciated.

> But here's an idea:
> ...<snip>...

I really like the approach of having a more use-case-agnostic approach like
the one you suggest. I have to admit I can barely read Haskell though, and I
don't know anything about XMonad internals, so I can't comment on the actual
implementation. I think it looks like a good idea, but someone other than me
would be needed to pursue it. Maybe it could even be generalized further in
relation to XMonad.Layout.Gaps.

> Then again there's not too much point in defining extra things in
> contrib that nobody actually uses.

Well, if it's of comparable complexity to the current implementation, the
cost wouldn't seem to be too high, and it might save someone some time in
the future.

Cheers,

--
Felix