mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Merge pull request #795 from TheMC47/feat/start-sbs
X.H.StatusBar: Added startAllStatusBars
This commit is contained in:
commit
339dbbf2fd
@ -172,6 +172,9 @@
|
|||||||
some status bars (see this
|
some status bars (see this
|
||||||
[polybar issue](https://github.com/polybar/polybar/issues/2603)).
|
[polybar issue](https://github.com/polybar/polybar/issues/2603)).
|
||||||
|
|
||||||
|
* `XMonad.Hooks.StatusBar`
|
||||||
|
- Added `startAllStatusBars` to start the configured status bars.
|
||||||
|
|
||||||
### Other changes
|
### Other changes
|
||||||
|
|
||||||
## 0.17.1 (September 3, 2022)
|
## 0.17.1 (September 3, 2022)
|
||||||
|
@ -56,6 +56,7 @@ module XMonad.Hooks.StatusBar (
|
|||||||
spawnStatusBar,
|
spawnStatusBar,
|
||||||
killStatusBar,
|
killStatusBar,
|
||||||
killAllStatusBars,
|
killAllStatusBars,
|
||||||
|
startAllStatusBars,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Exception (SomeException, try)
|
import Control.Exception (SomeException, try)
|
||||||
@ -564,3 +565,9 @@ spawnStatusBar cmd = do
|
|||||||
killAllStatusBars :: X ()
|
killAllStatusBars :: X ()
|
||||||
killAllStatusBars =
|
killAllStatusBars =
|
||||||
XS.gets (M.elems . getPIDs) >>= io . traverse_ killPid >> XS.put (StatusBarPIDs mempty)
|
XS.gets (M.elems . getPIDs) >>= io . traverse_ killPid >> XS.put (StatusBarPIDs mempty)
|
||||||
|
|
||||||
|
-- | Start all status bars. Note that you do not need this in your startup hook.
|
||||||
|
-- This can be bound to a keybinding for example to be used in tandem with
|
||||||
|
-- `killAllStatusBars`.
|
||||||
|
startAllStatusBars :: X ()
|
||||||
|
startAllStatusBars = XS.get >>= traverse_ (sbStartupHook . snd) . getASBs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user