mirror of
https://github.com/basecamp/omarchy.git
synced 2025-08-04 07:39:24 +00:00
Prevent Waybar stacking on resume (#448)
* Create omarchy-cmd-restart-waybar * Replace -SIGUSR2 waybar instances * Add migration * Add or statment in case waybar is dead * Just use omarchy-restart-waybar --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
@ -4,4 +4,4 @@ omarchy-refresh-config waybar/config.jsonc
|
|||||||
omarchy-refresh-config waybar/style.css
|
omarchy-refresh-config waybar/style.css
|
||||||
|
|
||||||
# Restart waybar
|
# Restart waybar
|
||||||
pkill -SIGUSR2 waybar
|
omarchy-restart-waybar
|
||||||
|
4
bin/omarchy-restart-waybar
Executable file
4
bin/omarchy-restart-waybar
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
killall waybar || true
|
||||||
|
setsid uwsm app -- waybar &>/dev/null &
|
@ -44,7 +44,7 @@ touch "$HOME/.config/alacritty/alacritty.toml"
|
|||||||
|
|
||||||
# Restart components to apply new theme
|
# Restart components to apply new theme
|
||||||
pkill -SIGUSR2 btop
|
pkill -SIGUSR2 btop
|
||||||
pkill -SIGUSR2 waybar
|
"$HOME/.local/share/omarchy/bin/omarchy-restart-waybar"
|
||||||
pkill swayosd-server
|
pkill swayosd-server
|
||||||
setsid uwsm app -- swayosd-server &>/dev/null &
|
setsid uwsm app -- swayosd-server &>/dev/null &
|
||||||
makoctl reload
|
makoctl reload
|
||||||
|
@ -2,7 +2,7 @@ general {
|
|||||||
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||||
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||||
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||||
on_unlock_cmd = pkill -SIGUSR2 waybar # prevent stacking of waybar when waking
|
on_unlock_cmd = omarchy-restart-waybar # prevent stacking of waybar when waking
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
|
@ -2,5 +2,5 @@ echo "Fixing persistent workspaces in waybar config"
|
|||||||
|
|
||||||
if [[ -f ~/.config/waybar/config ]]; then
|
if [[ -f ~/.config/waybar/config ]]; then
|
||||||
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
|
sed -i 's/"persistent_workspaces":/"persistent-workspaces":/' ~/.config/waybar/config
|
||||||
pkill -SIGUSR2 waybar
|
omarchy-restart-waybar
|
||||||
fi
|
fi
|
||||||
|
10
migrations/1754113760.sh
Normal file
10
migrations/1754113760.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
echo "Change reload Waybar on unlock command to prevent stacking"
|
||||||
|
|
||||||
|
if ! grep -q 'on_unlock_cmd *= *omarchy-restart-waybar' ~/.config/hypr/hypridle.conf; then
|
||||||
|
sed -i \
|
||||||
|
'/^ on_unlock_cmd = pkill -SIGUSR2 waybar[[:space:]]*# prevent stacking of waybar when waking$/c\
|
||||||
|
on_unlock_cmd = omarchy-restart-waybar # prevent stacking of waybar when waking' \
|
||||||
|
~/.config/hypr/hypridle.conf
|
||||||
|
|
||||||
|
omarchy-restart-waybar
|
||||||
|
fi
|
Reference in New Issue
Block a user