Commit Graph

347 Commits

Author SHA1 Message Date
Benno Fünfstück
0949b9ec91 DynamicProperty: execute other hooks
All False short-cuts the default behavior for the event, which leads to a non-functioning window manager. Returning mempty ensures that the default action is still executed,
2016-12-09 22:35:11 +01:00
Bogdan Sinitsyn
fcb57bd657 Move modifyXS to X.U.ExtensibleState 2016-10-25 08:22:02 +03:00
Tomas Janousek
e38fb3bdb8 Make usage of ManageDocks simpler and more robust
As it now consists of a startup hook, a manage hook, an event hook and
a layout modifier, and behaves erratically when any one component is not
included in a user's config (which happens to be the case for all
configs from xmonad-contrib 0.12 since the startup hook is a new
inclusion), it's probably wise to have a single function that adds
all the hooks to the config instead.

NB: This will need a release notes entry anyway!
2016-09-07 13:26:58 +03:00
Bogdan Sinitsyn
c48d81e378 Fix caching issues in ManageDocks
Commits d638dc8b and a5e87e38 introduced a per-AvoidStruts-instance
strut cache that

a) didn't get initialized at startup,
b) didn't get reinitialized after layout reset and
c) didn't get updates if it wasn't the active layout, for example when
   layoutHook = avoidStruts tall ||| avoidStruts (mirror tall)

a) + b) could be fixed by using the docksStartupHook introduced in
28e9f8bc, although this wasn't documented and having to call
docksStartupHook after setLayout is far from obvious.

By moving the strut cache from AvoidStruts instances to a global state,
b) and c) are fixed. One still has to invoke the docksStartupHook for
a), and this will be addressed in the next commit.
2016-09-07 13:26:50 +03:00
Ben Boeckel
8fd8c5d02d warnings: remove unused variables 2016-07-16 13:22:34 -04:00
Ben Boeckel
d414c76da8 warnings: rename shadowing variables 2016-07-16 13:22:12 -04:00
Ben Boeckel
cc77b5019d DynamicBars: improve documentation 2016-06-12 20:03:22 -04:00
Ben Boeckel
e698e5fe53 X.H.DynamicBars: support per-monitor cleanup
Add functions to allow cleaning up only screens which disappear. This
works better where killing the statusbar for a specific screen is
possible. The old way is still relevant for setups which do not have
such a method (e.g., safeSpawn xmobar/spawnPipe xmonadpropwrite).
2016-05-22 17:28:46 -04:00
seanstrom
1452c9e273 add new multiPPFormat function 2016-04-03 16:04:49 -07:00
Adam Vogt
15c645d9f2 use traverse_ instead of traverse in DynamicBars 2016-02-26 19:08:57 -05:00
Kurnevsky Evgeny
a6f286dbdc Documentation fix. 2016-02-14 12:59:29 +03:00
Bogdan Sinitsyn
5e96324d80 send all docks messages only from event hook 2016-01-18 12:02:40 +03:00
Bogdan Sinitsyn
5df7ba160e some minor fixes in X.H.ManageDocks 2016-01-18 10:37:04 +03:00
Bogdan Sinitsyn
431fd66527 fix slowdown when removing docks 2016-01-17 18:15:41 +03:00
Bogdan Sinitsyn
f79e3fadea handle docks remove correctly 2016-01-17 16:32:56 +03:00
Bogdan Sinitsyn
28e9f8bce7 add docksStartupHook for handling docks when restarted 2016-01-17 11:55:59 +03:00
Bogdan Sinitsyn
f73eb1c938 handle PropertyNotify events on docks 2016-01-17 11:46:53 +03:00
Bogdan Sinitsyn
83ee18ad94 add new dock if it hasn't strut properties 2016-01-17 10:53:55 +03:00
Bogdan Sinitsyn
f4d4bde026 typo 2016-01-17 10:38:51 +03:00
Bogdan Sinitsyn
f1b9a0c193 add calcGapForAll for other modules 2016-01-17 10:35:26 +03:00
Bogdan Sinitsyn
34beb76562 fix X.H.PositionStoreHooks for new signature of calcGaps 2016-01-17 10:14:51 +03:00
Bogdan Sinitsyn
028ad6d6ec minor fixes in X.H.ManageDocks 2016-01-17 10:08:20 +03:00
Bogdan Sinitsyn
a5e87e3894 never query all the tree in X.H.ManageHook 2016-01-17 10:03:07 +03:00
Bogdan Sinitsyn
68cfa84b91 fix build with older ghc 2016-01-15 21:21:47 +03:00
Bogdan Sinitsyn
d638dc8b0a fix xmonad/xmonad#21 2016-01-03 12:41:15 +03:00
Kurnevsky Evgeny
dfb1c52c66 Add layout hook for ScreenCorners. 2015-12-08 08:39:55 +03:00
geekosaur
32f3fbdb2f Merge pull request #2 from vrs/master
X.H.DynamicLog: make xmobarStrip actually strip xmobar tags
2015-09-11 17:03:05 -04:00
vrs
0a7ae19f90 X.H.DynamicLog: make xmobarStrip actually strip xmobar tags
consider the old implementation:
> xmobarStrip "<<fc=#f00>fc=#f00>foo</</fc>fc>"
"<fc=#f00>foo</fc>"
2015-09-07 22:59:38 +02:00
Dmitri Iouchtchenko
42a69bfa98 Use existing connection in X.H.DynamicBars
Adapted from patch attributed to geekosaur
(https://code.google.com/p/xmonad/issues/detail?id=538).
2015-08-24 01:56:46 -04:00
allbery.b
e41d7135a9 ewmh-hook-order
Reorder the application of hooks so that users' config is honored.
Notably, this means setWMName works in startupHook instead of
needing to do it repeatedly in logHook.
2015-04-23 15:44:36 +00:00
allbery.b
d3ffb1661a dynamicproperty
Run a ManageHook from handleEventHook when a window property changes.
You would use this to match e.g. browser windows whose title is not
"final" until after the on-load hooks of the loaded document complete.
2015-04-14 15:36:57 +00:00
Adam Vogt
8ba4e0bed2 add instance Default WallpaperConf 2015-03-10 21:42:46 +00:00
Adam Vogt
9bb1f3b91e remove warnings and text dependency from H.WallpaperSetter 2015-03-10 19:29:33 +00:00
anton.pirogov
dcbff492fe Added the new hook WallpaperSetter 2015-02-28 16:23:35 +00:00
Adam Vogt
0903f339b6 address another bitSize/finiteBitSize warning 2014-12-22 03:33:00 +00:00
Adam Vogt
8a195a2a48 use FiniteBitSize with ghc >= 7.8 2014-08-15 05:11:36 +00:00
allbery.b
56c6b9fef5 debug-managehook
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.
2014-08-03 02:06:01 +00:00
allbery.b
ec0fb3ba8a debug-debug
Various fixes and enhancements to DebugWindow and DebugStack. ManageDebug
requires these fixes, but some of them are significant even if not using
ManageDebug.
2014-08-03 02:05:30 +00:00
Adam Vogt
11265ad69b derive Applicative instances to suppress AMP warning 2014-07-10 16:39:50 +00:00
Adam Vogt
df824edf5f ServerMode properly indent 2013-12-19 20:14:40 +00:00
Adam Vogt
78ed2e1a9e remove ServerMode tabs 2013-12-19 20:10:00 +00:00
Adam Vogt
f453a9a375 fix -Wall ServerMode 2013-12-19 18:10:30 +00:00
Adam Vogt
c6b91b546e documentation note that ServerMode is similar to wmctrl 2013-12-19 18:07:48 +00:00
polson2
7ccac6a9a0 Generalized XMonad.Hooks.ServerMode 2013-12-16 02:51:00 +00:00
Adam Vogt
ab3f5b3d5d fix UrgencyHook and add filterUrgencyHook 2013-09-24 22:47:38 +00:00
Adam Vogt
075b7d69ed export XMonad.Hooks.UrgencyHook.clearUrgency (issue 533) 2013-09-23 03:13:49 +00:00
Daniel Wagner
95372520bb minor documentation fix: manageDocks doesn't do anything with struts, so don't claim it does 2013-08-14 12:51:06 +00:00
Adam Vogt
8f712f0a04 Haddock formatting in H.Minimize 2013-07-23 15:56:58 +00:00
Adam Vogt
d3b2a01e3d Escape dzen markup and remove xmobar tags from window titles by default.
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.
2013-07-08 14:48:13 +00:00
gopsychonauts
129e98773e DynamicBars-use-ExtensibleState
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.
2013-06-18 07:47:55 +00:00