Compare commits

..
4 Commits
Author SHA1 Message Date
Daniele Fucini 3e77c8be34 Start dunst through its systemd user unit from XMonad
Gives it journal logging, and D-Bus activation already uses the same unit.
2026-10-13 19:00:29 +02:00
Daniele Fucini fbd2312eee Start fehbg.timer from XMonad instead of enabling it
The timer needs X, so its countdown should start with the X session.
2026-10-13 18:58:29 +02:00
Daniele Fucini a858e92b50 Restart all xmobars on every XMonad screen change
dynamicEasySBs kept bars for existing screen ids, so the bar started
before screen-layout ran kept the laptop config on HDMI.
2026-10-13 18:56:33 +02:00
Daniele Fucini ba720116a6 Make ICON first fallback in forecast brief 2026-10-12 17:34:09 +02:00
2 changed files with 23 additions and 11 deletions

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
# run and isn't STALE. The bar names the model when it isn't IFS, and adds a red "!" when it is stale. # run and isn't STALE. The bar names the model when it isn't IFS, and adds a red "!" when it is stale.
# AIFS/AIGEFS are left out: AIFS comes through the same ECMWF pipeline as IFS and fails with it. # AIFS/AIGEFS are left out: AIFS comes through the same ECMWF pipeline as IFS and fails with it.
MODELS=(ecmwf_ifs025 ncep_gefs025 icon_seamless_eps google_weathernext2_ensemble) MODELS=(ecmwf_ifs025 icon_seamless_eps ncep_gefs025 google_weathernext2_ensemble)
declare -A LABEL=([ncep_gefs025]=GEFS [icon_seamless_eps]=ICON [google_weathernext2_ensemble]=Google) declare -A LABEL=([ncep_gefs025]=GEFS [icon_seamless_eps]=ICON [google_weathernext2_ensemble]=Google)
# pick DAYS: sets $line (the --brief output) and $model. IFS unless it is STALE; a fallback only if its # pick DAYS: sets $line (the --brief output) and $model. IFS unless it is STALE; a fallback only if its
+22 -10
View File
@@ -35,7 +35,8 @@ main =
. ewmhFullscreen . ewmhFullscreen
. setEwmhSwitchDesktopHook W.greedyView . setEwmhSwitchDesktopHook W.greedyView
. ewmh . ewmh
. dynamicEasySBs myStatusBars . docks
. addAfterRescreenHook restartStatusBars
. addRandrChangeHook (spawn myScreenHotplug) . addRandrChangeHook (spawn myScreenHotplug)
$ myConfig $ myConfig
@@ -182,13 +183,20 @@ myLayoutHook = onWorkspace wsWeb myWebLayout $ onWorkspace wsGames myGamesLayout
delta = 3 / 100 delta = 3 / 100
-- Xmobar -- Xmobar
-- One bar per connected screen. The laptop config leaves room for trayer, so it -- The laptop config leaves room for trayer, so it goes on the laptop screen,
-- goes on the laptop screen, which is screen 1 with HDMI and screen 0 without. -- which is screen 1 with HDMI and screen 0 without.
myStatusBars :: ScreenId -> X StatusBarConfig myStatusBar :: Int -> Int -> String
myStatusBars (S i) = do myStatusBar nScreens i = "xmobar -x " ++ show i ++ " ~/.config/xmobar/" ++ rc
nScreens <- gets (length . W.screens . windowset) where
let rc = if nScreens > 1 && i /= 1 then "xmobarrc_hdmi" else "xmobarrc_laptop" rc = if nScreens > 1 && i /= 1 then "xmobarrc_hdmi" else "xmobarrc_laptop"
pure $ statusBarProp ("xmobar -x " ++ show i ++ " ~/.config/xmobar/" ++ rc) (clickablePP myXmobarPP)
-- One bar per screen, all restarted on every screen change: the right config for a
-- screen id depends on the screen count, and dynamicSBs would keep the old bar
restartStatusBars :: X ()
restartStatusBars = do
killAllStatusBars
screens <- gets (W.screens . windowset)
forM_ screens $ \s -> let S i = W.screen s in spawnStatusBar (myStatusBar (length screens) i)
myXmobarPP :: PP myXmobarPP :: PP
myXmobarPP = myXmobarPP =
@@ -219,7 +227,9 @@ myXmobarPP =
-- Autostart -- Autostart
myStartupHook :: X () myStartupHook :: X ()
myStartupHook = do myStartupHook = do
restartStatusBars
spawnOnce myScreenSetup spawnOnce myScreenSetup
spawnOnce "systemctl --user start fehbg.timer"
spawnOnce "xsetroot -cursor_name left_ptr" spawnOnce "xsetroot -cursor_name left_ptr"
spawnOnce "xautolock -time 10 -locker slock -detectsleep" spawnOnce "xautolock -time 10 -locker slock -detectsleep"
spawnOnce "systemctl --user start xautolock-inhibit" spawnOnce "systemctl --user start xautolock-inhibit"
@@ -228,7 +238,7 @@ myStartupHook = do
spawnOnce "nm-applet" spawnOnce "nm-applet"
spawnOnce "arch-audit-gtk" spawnOnce "arch-audit-gtk"
spawnOnce "calcurse --daemon" spawnOnce "calcurse --daemon"
spawnOnce "dunst" spawnOnce "systemctl --user start dunst"
spawnOnce "lxpolkit" spawnOnce "lxpolkit"
spawnOnce "numlockx" spawnOnce "numlockx"
spawnOnce "blueman-applet" spawnOnce "blueman-applet"
@@ -289,7 +299,9 @@ myHandleEventHook =
-- Log hook -- Log hook
myLogHook :: X () myLogHook :: X ()
myLogHook = raiseDiscoverOverlay myLogHook = do
raiseDiscoverOverlay
xmonadPropLog =<< dynamicLogString =<< clickablePP myXmobarPP
-- discover-overlay's windows are override-redirect, so xmonad doesn't manage them and -- discover-overlay's windows are override-redirect, so xmonad doesn't manage them and
-- raising a floating window (e.g. a game) covers them; put them back on top after every change -- raising a floating window (e.g. a game) covers them; put them back on top after every change