Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hyprland stop working with somthing else then swaybg #656

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions data/scripts/set_wallpaper
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,13 @@ if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} "
nitrogen --set-zoom-fill --save "$WP" 2> /dev/null
fi
fi

if [[ -n $SWAYSOCK || $XDG_CURRENT_DESKTOP == "Hyprland" ]]; then
PID=`pidof swaybg`
if [[ -n $PID ]]; then
# If swaybg is available, use it as prevents system freeze.
# See https://github.com/swaywm/sway/issues/5606
if command -v "swaybg" >/dev/null 2>&1; then
# Grey background flicker is prevented by killing old swaybg process after new one.
# See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720
PID=`pidof swaybg`
swaybg -i "$WP" -m fill &
if [ ! -z "$PID" ]; then
sleep 1
Expand Down