Compare commits

...
4 Commits
Author SHA1 Message Date
Daniele Fucini a41afe4983 Enlarge xmobar font to 10 and fit the bar's contents to its width
Workspaces show only their icon, layouts show an icon instead of their name, and window titles share a 60-character budget (8–30 each), so more windows get shorter titles instead of overflowing the bar.
2026-10-28 19:50:11 +01:00
Daniele Fucini 4e431d6710 Make xmobar and trayer 24px tall and match trayer's background to xmobar
xmobar was auto-sized (17px) and trayer 18px; both are now 24px. trayer only
honours --tint with --transparent, so it drew the GTK background instead.
2026-10-26 17:55:26 +01:00
Daniele Fucini 68bbcaeb82 Add a keybinding list on M-F1; match games by class pattern; update workspace icons
All keys get descriptions (NamedActions) and M-F1 lists them in dmenu. Proton
and Wine games go to ws 3 by class prefix/suffix instead of one rule per game;
GIMP and Audacity go to ws 5; small tools float; new icons for ws 2-7.
2026-10-26 17:49:04 +01:00
Daniele Fucini efea899ccb Pause dunst while the screen is locked; add notification history keys
screen-lock holds notifications until unlock, and M-S-l now goes through
loginctl lock-session so it uses the same locker. M-S-n pops dunst history,
M-C-n closes all notifications.
2026-10-26 17:31:03 +01:00
6 changed files with 161 additions and 64 deletions

No files matched your search

+1 -2
View File
@@ -15,8 +15,7 @@ alias sort='sort -n'
alias scrcpy='scrcpy --disable-screensaver' alias scrcpy='scrcpy --disable-screensaver'
alias ssh='kitten ssh' alias ssh='kitten ssh'
alias sudo='doas' alias sudo='doas'
#alias trayer='trayer -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --tint 0x232634 --height 18 --monitor 1' alias trayer='trayer -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --alpha 0 --tint 0x24283b --height 24 --monitor 1'
alias trayer='trayer -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0x232634 --height 18 --monitor 1'
alias trc='trash-empty' alias trc='trash-empty'
alias trl='trash-list' alias trl='trash-list'
alias trm='trash-rm' alias trm='trash-rm'
+2 -2
View File
@@ -1,9 +1,9 @@
Config { overrideRedirect = True Config { overrideRedirect = True
, lowerOnStart = True , lowerOnStart = True
, font = "Jetbrains Mono Nerd Font Bold 9" , font = "Jetbrains Mono Nerd Font Bold 10"
, bgColor = "#24283b" , bgColor = "#24283b"
, fgColor = "#737aa2" , fgColor = "#737aa2"
, position = Top , position = TopH 24
, border = NoBorder , border = NoBorder
, borderColor = "#24283b" , borderColor = "#24283b"
, allDesktops = True , allDesktops = True
+2 -2
View File
@@ -1,9 +1,9 @@
Config { overrideRedirect = True Config { overrideRedirect = True
, lowerOnStart = True , lowerOnStart = True
, font = "Jetbrains Mono Nerd Font Bold 9" , font = "Jetbrains Mono Nerd Font Bold 10"
, bgColor = "#24283b" , bgColor = "#24283b"
, fgColor = "#737aa2" , fgColor = "#737aa2"
, position = Top , position = TopH 24
, border = NoBorder , border = NoBorder
, borderColor = "#24283b" , borderColor = "#24283b"
, allDesktops = True , allDesktops = True
+141 -55
View File
@@ -1,7 +1,7 @@
-- Import -- Import
import Data.Monoid import Data.Monoid
import Graphics.X11.ExtraTypes.XF86 import Data.Char (toLower)
import Control.Monad (forM_, liftM2, when) import Control.Monad (forM_, liftM2, when)
import Data.Maybe (isJust) import Data.Maybe (isJust)
import XMonad import XMonad
@@ -27,9 +27,11 @@ import XMonad.Util.ClickableWorkspaces
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
import qualified XMonad.Util.Hacks as Hacks import qualified XMonad.Util.Hacks as Hacks
import XMonad.Util.Loggers import XMonad.Util.Loggers
import XMonad.Util.NamedActions
import XMonad.Util.NamedScratchpad import XMonad.Util.NamedScratchpad
import XMonad.Util.Run (runProcessWithInput) import XMonad.Util.Run (runProcessWithInput, spawnPipe)
import XMonad.Util.SpawnOnce import XMonad.Util.SpawnOnce
import System.IO (hClose, hPutStr)
-- Main -- Main
main :: IO () main :: IO ()
@@ -105,7 +107,7 @@ myScratchpads =
-- Config -- Config
myConfig = myConfig =
def addDescrKeys' ((myModMask, xK_F1), showKeys) myKeys $ def
{ modMask = myModMask, { modMask = myModMask,
terminal = myTerminal, terminal = myTerminal,
workspaces = myWorkspaces, workspaces = myWorkspaces,
@@ -117,42 +119,96 @@ myConfig =
handleEventHook = myHandleEventHook, handleEventHook = myHandleEventHook,
logHook = myLogHook logHook = myLogHook
} }
`additionalKeysP` [ ("M-b", sendMessage ToggleStruts),
("M-S-l", spawn "slock"), -- Keys
("<Print>", unGrab *> spawn ("scrot " ++ myScreenshotDir ++ myScreenshotName)), -- xmonad's described defaults minus the ones overridden here, so M-<F1> lists each key once
("S-<Print>", unGrab *> spawn ("scrot -s " ++ myScreenshotDir ++ myScreenshotName)), myKeys :: XConfig Layout -> [((KeyMask, KeySym), NamedAction)]
("M-S-<Print>", unGrab *> spawn ("scrot -u " ++ myScreenshotDir ++ myScreenshotName)), myKeys c = dropEmptyGroups (filter ((`notElem` overridden) . fst) (defaultKeysDescr c)) ++ custom
("M-d", spawn "dmenu_run"), where
("M-p", spawn "passmenu -i"), custom = myCustomKeys c
("M-f", sendMessage $ JumpToLayout "Tabbed"), -- M-r/M-S-r: there's no third screen
("M-i", spawn $ "setxkbmap" ++ myKeyboardLayoutIT), overridden = (myModMask, xK_r) : (myModMask .|. shiftMask, xK_r) : filter (/= (0, 0)) (map fst custom)
("M-u", spawn $ "setxkbmap" ++ myKeyboardLayoutUS), -- (0, 0) is a subtitle or separator; drop it when nothing follows before the next one
("M-s", spawn $ "setxkbmap" ++ myKeyboardLayoutSK), dropEmptyGroups (((0, 0), _) : rest@(((0, 0), _) : _)) = dropEmptyGroups rest
("M-S-v", namedScratchpadAction myScratchpads "Riseup-vpn"), dropEmptyGroups [((0, 0), _)] = []
("M-S-s", namedScratchpadAction myScratchpads "Terminal"), dropEmptyGroups (x : rest) = x : dropEmptyGroups rest
("M-S-a", namedScratchpadAction myScratchpads "Cal"), dropEmptyGroups [] = []
("M-o", namedScratchpadAction myScratchpads "Btop"),
("M-x", spawn "bluetoothctl connect F4:9D:8A:B9:8C:EE"), myCustomKeys :: XConfig Layout -> [((KeyMask, KeySym), NamedAction)]
("M-S-x", spawn "bluetoothctl disconnect F4:9D:8A:B9:8C:EE") myCustomKeys c =
] concatMap
`additionalKeys` [ ((0, xF86XK_AudioMute), spawn "pactl set-sink-mute $(pactl get-default-sink) toggle"), (\(t, ks) -> subtitle t : mkNamedKeymap c ks)
((0, xF86XK_AudioLowerVolume), spawn "pactl set-sink-volume $(pactl get-default-sink) -10%"), [ ( "launchers",
((0, xF86XK_AudioRaiseVolume), spawn "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 10%+"), [ ("M-d", addName "Run a program (dmenu)" $ spawn "dmenu_run"),
((0, xF86XK_AudioPlay), spawn "playerctl play-pause"), ("M-p", addName "Passwords (passmenu)" $ spawn "passmenu -i"),
((0, xF86XK_AudioPause), spawn "playerctl pause"), ("<XF86HomePage>", addName "Browser" $ spawn myBrowser),
((0, xF86XK_AudioStop), spawn "playerctl stop"), ("<XF86Calculator>", addName "Calculator" $ spawn "qalculate-gtk")
((0, xF86XK_AudioNext), spawn "playerctl next"), ]
((0, xF86XK_AudioPrev), spawn "playerctl previous"), ),
((0, xF86XK_Calculator), spawn "qalculate-gtk"), ( "scratchpads",
((0, xF86XK_HomePage), spawn myBrowser), [ ("M-S-s", addName "Terminal" $ namedScratchpadAction myScratchpads "Terminal"),
((0, xF86XK_Mail), namedScratchpadAction myScratchpads "Mail"), ("M-S-a", addName "Calendar (calcurse)" $ namedScratchpadAction myScratchpads "Cal"),
((0, xF86XK_Tools), namedScratchpadAction myScratchpads "Music") ("M-o", addName "btop" $ namedScratchpadAction myScratchpads "Btop"),
] ("M-S-v", addName "RiseupVPN" $ namedScratchpadAction myScratchpads "Riseup-vpn"),
++ [ ((myModMask .|. mask, key), f sc) ("<XF86Mail>", addName "Mail (mutt)" $ namedScratchpadAction myScratchpads "Mail"),
| (key, sc) <- zip [xK_w, xK_e] [0 ..], ("<XF86Tools>", addName "Music (ncmpcpp)" $ namedScratchpadAction myScratchpads "Music")
(f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)] ]
] ),
++ [((myModMask, key), windows $ safeView ws) | (ws, key) <- zip myWorkspaces [xK_1 .. xK_9]] ( "session and layout",
[ ("M-S-l", addName "Lock the screen" $ spawn "loginctl lock-session"),
("M-S-n", addName "Show older notification" $ spawn "dunstctl history-pop"),
("M-C-n", addName "Close all notifications" $ spawn "dunstctl close-all"),
("M-b", addName "Toggle the status bar gap" $ sendMessage ToggleStruts),
("M-f", addName "Tabbed layout" $ sendMessage $ JumpToLayout "Tabbed"),
("M-i", addName "Keyboard: Italian" $ spawn $ "setxkbmap" ++ myKeyboardLayoutIT),
("M-u", addName "Keyboard: US" $ spawn $ "setxkbmap" ++ myKeyboardLayoutUS),
("M-s", addName "Keyboard: Slovak" $ spawn $ "setxkbmap" ++ myKeyboardLayoutSK),
("M-x", addName "Connect earbuds" $ spawn "bluetoothctl connect F4:9D:8A:B9:8C:EE"),
("M-S-x", addName "Disconnect earbuds" $ spawn "bluetoothctl disconnect F4:9D:8A:B9:8C:EE")
]
),
( "screenshots",
[ ("<Print>", addName "Whole screen" $ unGrab *> spawn ("scrot " ++ myScreenshotDir ++ myScreenshotName)),
("S-<Print>", addName "Select an area" $ unGrab *> spawn ("scrot -s " ++ myScreenshotDir ++ myScreenshotName)),
("M-S-<Print>", addName "Focused window" $ unGrab *> spawn ("scrot -u " ++ myScreenshotDir ++ myScreenshotName))
]
),
( "media keys",
[ ("<XF86AudioMute>", addName "Mute" $ spawn "pactl set-sink-mute $(pactl get-default-sink) toggle"),
("<XF86AudioLowerVolume>", addName "Volume down" $ spawn "pactl set-sink-volume $(pactl get-default-sink) -10%"),
("<XF86AudioRaiseVolume>", addName "Volume up" $ spawn "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 10%+"),
("<XF86AudioPlay>", addName "Play/pause" $ spawn "playerctl play-pause"),
("<XF86AudioPause>", addName "Pause" $ spawn "playerctl pause"),
("<XF86AudioStop>", addName "Stop" $ spawn "playerctl stop"),
("<XF86AudioNext>", addName "Next track" $ spawn "playerctl next"),
("<XF86AudioPrev>", addName "Previous track" $ spawn "playerctl previous")
]
),
( "workspaces and screens",
[ (m ++ show n, addName (d ++ show n ++ " (" ++ name ++ ")") $ windows $ f ws)
| (n, ws, name) <- zip3 [1 :: Int ..] myWorkspaces ["terminal", "web", "games", "chat", "media", "docs", "VM", "free", "free"],
(m, d, f) <- [("M-", "Workspace ", safeView), ("M-S-", "Send window to workspace ", W.shift)]
]
++ [ (m ++ k, addName (d ++ side) $ f def sc)
| (k, sc, side) <- [("w", 0, "left screen"), ("e", 1, "right screen")],
(m, d, f) <- [("M-", "Focus ", viewScreen), ("M-S-", "Send window to ", sendToScreen)]
]
)
]
-- Shows the key list in dmenu (type to filter; picking a line does nothing).
-- spawnPipe rather than runProcessWithInput, which would block xmonad while dmenu is open.
showKeys :: [((KeyMask, KeySym), NamedAction)] -> NamedAction
showKeys ks = addName "Show keybindings" $ do
h <- spawnPipe "dmenu -i -l 30 -p Keys"
io $ hPutStr h (unlines $ map tidy $ filter (not . null) $ lines $ unlines $ showKm ks) >> hClose h
where
-- showKm writes the mod key as M4- (it doesn't know modMask); re-pad after shortening it
tidy l@('>' : _) = l
tidy l = let (k, d) = break (== ' ') l in take 24 (fixMod k ++ repeat ' ') ++ dropWhile (== ' ') d
fixMod ('M' : '4' : '-' : r) = "M-" ++ fixMod r
fixMod (x : r) = x : fixMod r
fixMod [] = []
-- greedyView that keeps wsGames on screen 0 (HDMI): Wine games lose the mouse when moved between screens -- greedyView that keeps wsGames on screen 0 (HDMI): Wine games lose the mouse when moved between screens
safeView :: WorkspaceId -> WindowSet -> WindowSet safeView :: WorkspaceId -> WindowSet -> WindowSet
@@ -183,14 +239,15 @@ safeRescreen = do
myWorkspaces :: [String] myWorkspaces :: [String]
myWorkspaces = [wsTerm, wsWeb, wsGames, wsChat, wsMedia, wsDocs, wsVM] ++ map show [8, 9] myWorkspaces = [wsTerm, wsWeb, wsGames, wsChat, wsMedia, wsDocs, wsVM] ++ map show [8, 9]
-- Icons spill past their advance in the non-Mono Nerd Font: keep them ~1000-1160 units wide or gaps look uneven
wsTerm, wsWeb, wsGames, wsChat, wsMedia, wsDocs, wsVM :: String wsTerm, wsWeb, wsGames, wsChat, wsMedia, wsDocs, wsVM :: String
wsTerm = "1:\xf489 " wsTerm = "1:\xf489 "
wsWeb = "2:\xe743 " wsWeb = "2:\xf0ac "
wsGames = "3:\xf1b6 " wsGames = "3:\xf11b "
wsChat = "4:\xf10b " wsChat = "4:\xf086 "
wsMedia = "5:\xead9 " wsMedia = "5:\xefab "
wsDocs = "6:\xeb69 " wsDocs = "6:\xede2 "
wsVM = "7:\xea7a " wsVM = "7:\xf108 "
-- Layout -- Layout
myLayoutHook = onWorkspace wsWeb myWebLayout $ onWorkspace wsGames myGamesLayout $ onWorkspace wsMedia myVideoLayout myDefaultLayout myLayoutHook = onWorkspace wsWeb myWebLayout $ onWorkspace wsGames myGamesLayout $ onWorkspace wsMedia myVideoLayout myDefaultLayout
@@ -242,17 +299,41 @@ myXmobarPP =
ppHidden = cultured . wrap " " "", ppHidden = cultured . wrap " " "",
ppHiddenNoWindows = outerspace . wrap " " "", ppHiddenNoWindows = outerspace . wrap " " "",
ppUrgent = sunsetorange . wrap (keylime "!") (keylime "!"), ppUrgent = sunsetorange . wrap (keylime "!") (keylime "!"),
-- Show "1:<icon>" as just the icon; tags stay as they are (clickablePP uses the index)
ppRename = \tag _ -> case break (== ':') tag of
(_, ':' : icon) -> icon
_ -> tag,
-- NamedScratchpad never removes NSP once created; hide it while it's empty -- NamedScratchpad never removes NSP once created; hide it while it's empty
ppSort = (. filter (\w -> W.tag w /= scratchpadWorkspaceTag || isJust (W.stack w))) <$> ppSort def, ppSort = (. filter (\w -> W.tag w /= scratchpadWorkspaceTag || isJust (W.stack w))) <$> ppSort def,
ppOrder = \[ws, l, _, wins] -> [ws, l, wins], ppOrder = \[ws, l, _, wins] -> [ws, l, wins],
ppExtras = [logTitles formatFocused formatUnfocused] ppLayout = layoutIcon,
ppExtras = [budgetTitles]
} }
where where
formatFocused = wrap (cultured "[") (cultured "]") . pink . ppWindow layoutIcon :: String -> String
formatUnfocused = wrap (outerspace "[") (outerspace "]") . cultured . ppWindow layoutIcon l = case l of
"Tall" -> "\xf0bcc"
"Mirror Tall" -> "\xf0bcb"
"Tabbed" -> "\xf04e9"
"ThreeCol" -> "\xf056d"
"Grid" -> "\xf0570"
"Spiral" -> "\xf056e"
"Full" -> "\xf0293"
_ -> l
ppWindow :: String -> String -- Titles share one width budget, so more windows get shorter titles instead of overflowing the bar
ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 20 budgetTitles :: Logger
budgetTitles = do
n <- gets $ length . W.integrate' . W.stack . W.workspace . W.current . windowset
let width = max 8 . min 30 $ 60 `div` max 1 n
logTitles (formatFocused width) (formatUnfocused width)
formatFocused, formatUnfocused :: Int -> String -> String
formatFocused w = wrap (cultured "[") (cultured "]") . pink . ppWindow w
formatUnfocused w = wrap (outerspace "[") (outerspace "]") . cultured . ppWindow w
ppWindow :: Int -> String -> String
ppWindow w = xmobarRaw . (\t -> if null t then "untitled" else t) . shorten' "…" w
outerspace, pink, sunsetorange, cultured, keylime :: String -> String outerspace, pink, sunsetorange, cultured, keylime :: String -> String
pink = xmobarColor "#ff79c6" "" pink = xmobarColor "#ff79c6" ""
@@ -288,10 +369,15 @@ myStartupHook = do
myManageHook :: ManageHook myManageHook :: ManageHook
myManageHook = myManageHook =
composeAll composeAll
[ className =? "Gpodder" --> doShift wsMedia, [ -- Proton games are steam_app_<id>; Wine windows are named after their .exe
className ^? "steam_app_" --> doShift wsGames,
className $? ".exe" --> doShift wsGames,
className =? "Gpodder" --> doShift wsMedia,
className =? "An Anime Game Launcher" --> doShift wsGames, className =? "An Anime Game Launcher" --> doShift wsGames,
className =? "Qalculate-gtk" --> doFloat, className =? "Qalculate-gtk" --> doFloat,
title =? "Genshin Impact" --> doShift wsGames, title =? "Genshin Impact" --> doShift wsGames,
classIn ["gimp", "audacity"] --> doShift wsMedia,
classIn ["pavucontrol", "org.pulseaudio.pavucontrol", "zenity", "org.gnome.zenity", "lxappearance", "qt5ct", "qt6ct"] --> doFloat,
className =? "Signal" --> doShift wsChat, className =? "Signal" --> doShift wsChat,
className =? "Spotify" --> doShift wsMedia, className =? "Spotify" --> doShift wsMedia,
className =? "Transmission-gtk" --> doShift wsWeb, className =? "Transmission-gtk" --> doShift wsWeb,
@@ -301,7 +387,6 @@ myManageHook =
className =? "Xreader" --> doShift wsDocs, className =? "Xreader" --> doShift wsDocs,
className =? "calibre" --> doShift wsDocs, className =? "calibre" --> doShift wsDocs,
className =? "discord" --> doShift wsChat, className =? "discord" --> doShift wsChat,
className =? "explorer.exe" --> doShift wsGames,
className =? "feh" --> doFloat, className =? "feh" --> doFloat,
title =? "glxgears" --> doFloat, title =? "glxgears" --> doFloat,
className =? "library_manager" --> doShift wsDocs, className =? "library_manager" --> doShift wsDocs,
@@ -314,9 +399,7 @@ myManageHook =
className =? "scrcpy" --> doShift wsMedia, className =? "scrcpy" --> doShift wsMedia,
className =? "steam" --> doShift wsGames, className =? "steam" --> doShift wsGames,
className =? "steam_app_109600" --> doFloat, className =? "steam_app_109600" --> doFloat,
className =? "steam_app_109600" --> doShift wsGames,
className =? "steam_app_289070" --> doFloat, className =? "steam_app_289070" --> doFloat,
className =? "steam_app_289070" --> doShift wsGames,
className =? "VirtualBox Machine" --> doShift wsVM, className =? "VirtualBox Machine" --> doShift wsVM,
className =? "VirtualBox Machine" --> doFullFloat, className =? "VirtualBox Machine" --> doFullFloat,
className =? "VirtualBox Manager" --> doShift wsVM, className =? "VirtualBox Manager" --> doShift wsVM,
@@ -326,7 +409,10 @@ myManageHook =
isFullscreen --> doFullFloat isFullscreen --> doFullFloat
] ]
<+> namedScratchpadManageHook myScratchpads <+> namedScratchpadManageHook myScratchpads
where viewShift = doF . liftM2 (.) safeView W.shift where
viewShift = doF . liftM2 (.) safeView W.shift
-- Case-insensitive, as GTK4 and firejailed apps capitalise their class differently
classIn names = (`elem` names) . map toLower <$> className
-- Handle event hook -- Handle event hook
myHandleEventHook :: Event -> X All myHandleEventHook :: Event -> X All
+1 -1
View File
@@ -22,5 +22,5 @@ pkill -x trayer
while pgrep -x trayer > /dev/null; do sleep 0.1; done while pgrep -x trayer > /dev/null; do sleep 0.1; done
trayer -l --edge top --align right --SetDockType true \ trayer -l --edge top --align right --SetDockType true \
--SetPartialStrut true --expand true --widthtype request \ --SetPartialStrut true --expand true --widthtype request \
--tint 0x232634 --height 18 --monitor "$tray" > /dev/null 2>&1 & --transparent true --alpha 0 --tint 0x24283b --height 24 --monitor "$tray" > /dev/null 2>&1 &
disown disown
+14 -2
View File
@@ -3,12 +3,24 @@
image=/usr/share/backgrounds/arch_1920x1080.png image=/usr/share/backgrounds/arch_1920x1080.png
# Hold notifications while locked; dunst shows them on unlock. A signal to this
# script is passed on to i3lock, as the old exec did.
was_paused=$(dunstctl is-paused 2>/dev/null)
dunstctl set-paused true 2>/dev/null
trap 'kill "$pid" 2>/dev/null' INT TERM HUP
# -n: stay in the foreground, as xss-lock needs to see when the screen is unlocked. # -n: stay in the foreground, as xss-lock needs to see when the screen is unlocked.
# --indicator keeps the ring (and the layout text) visible before typing. # --indicator keeps the ring (and the layout text) visible before typing.
# The layout's default spot (dx:dy+30) falls inside the ring: put it below. # The layout's default spot (dx:dy+30) falls inside the ring: put it below.
exec i3lock -n -i "$image" -F -c 000000ff \ i3lock -n -i "$image" -F -c 000000ff \
-e -f --indicator --keylayout 0 \ -e -f --indicator --keylayout 0 \
--layout-pos='ix:iy+r+40' --layout-color=ffffffff \ --layout-pos='ix:iy+r+40' --layout-color=ffffffff \
--layout-size=24 \ --layout-size=24 \
--time-color=ffffffff --date-color=ffffffff --date-str='%A, %d %B' \ --time-color=ffffffff --date-color=ffffffff --date-str='%A, %d %B' \
--ring-color=1793d1ff --line-uses-ring "$@" --ring-color=1793d1ff --line-uses-ring "$@" &
pid=$!
# A trapped signal interrupts the first wait; the second waits for i3lock to exit.
wait "$pid"
wait "$pid" 2>/dev/null
[ "$was_paused" = true ] || dunstctl set-paused false 2>/dev/null