Age | Commit message (Collapse) | Author |
|
button clicked
|
|
Actions are event re-actions.
Currently only ButtonPress event is handled by Actions and only
one action is defined, which is called Spawn (run external command).
Type (and parser) can be extended to EWMH actions (switch to desktop,
close window, whatever).
|
|
Previously Hide, Reveal and Toggle were immediate actions. This is the
same behaviour as if called now with 0 as parameter.
If the parameter is a positive non zero value it is taken as a delay for
the requested action.
After the delay (implemented using threadDelay) a new signal is sent
with zero with no timeout being effective immediately. This is necessary
to evaluate the persistency flag after the delay because it might have
changed in the meantime.
Effectively this means that it is possible to cancel the delayed
operation by calling TogglePersistent.
|
|
Replace MVar with TMVar from the STM package. This is common for ghc
now. Since STM is used everywhere else in the src it also adds no
additional dependencies.
The main reason for this switch is, that readMVar, swapMVar, etc. are
only atomically if there is no other producer for this MVar i.e.
putMVar. For example readMVar is a combination of putMVar and takeMVar.
Due to scheduling and readMVar's non-atomicity it is possible that
values written to the MVar appear in the wrong order.
Using TMVar fixes this problem, since it allows really atomical
read/swap operations.
|
|
Fix build failure: safeHead is needed even when dbus isn't.
|
|
|
|
This belongs here, otherwise ghc will complain about orphaned instances
|
|
By sending a TogglePersistent signal the configuration option
"persistent" can be changed. Thus it is possible to hide or show xmobar
constantly.
|
|
Also make them {Read,Show}able which can be useful for printf debugging
and does not hurt otherwise.
|
|
This is necessary to make SignalType available for other modules without
import loops. This also decoupels the modules and their functionality a
bit more so this is generally a cleaner solution.
|