summaryrefslogtreecommitdiffhomepage
path: root/src/Signal.hs
AgeCommit message (Collapse)Author
2014-02-18Add support for multiple actions per item, activated depending on mouse ↵Marcin Mikołajczyk
button clicked
2013-03-13Introduce ActionsAlexander Polakov
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).
2012-08-22Make it possible to delay Hide, Reveal and Toggle signalsJochen Keil
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.
2012-08-22Refactor MVar SignalType to TMVar SignalTypeJochen Keil
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.
2012-08-16Update src/Signal.hssoul9
Fix build failure: safeHead is needed even when dbus isn't.
2012-08-13Missing file headers and lintingJose Antonio Ortega Ruiz
2012-08-10Move the IsVariant SignalType instance to Signal moduleJochen Keil
This belongs here, otherwise ghc will complain about orphaned instances
2012-08-10New SignalType TogglePersistentJochen Keil
By sending a TogglePersistent signal the configuration option "persistent" can be changed. Thus it is possible to hide or show xmobar constantly.
2012-08-09Add signals for {show,hid,toggl}ingJochen Keil
Also make them {Read,Show}able which can be useful for printf debugging and does not hurt otherwise.
2012-08-09Move signal handler and data types to own moduleJochen Keil
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.