Skip to content

Commit

Permalink
fix: workaround for web render with chromium headless mode
Browse files Browse the repository at this point in the history
Chrome 128 change default headless mode to `new`.
The new headless mode has issue with window-size.
This is a temporary workaround that swiches back to the old headless mode while upstream fixes the issue.

See also #17
  • Loading branch information
jNullj committed Aug 31, 2024
1 parent fdebb1d commit 165a469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fox-neat-wallpaper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ generate_wallpaper () {
RENDER_URL="${RENDER_URL}&font=${config[font-family]}"
# generate image of background text
# chromium spams lots of undesired output while attempting to use gpu acceleration. to avoid that output is redirected to /dev/null
chromium --headless --hide-scrollbars --window-size="$IMAGE_SIZE_X,$IMAGE_SIZE_Y" --screenshot=$IMG_NAME "$RENDER_URL" &> /dev/null
chromium --headless=old --hide-scrollbars --window-size="$IMAGE_SIZE_X,$IMAGE_SIZE_Y" --screenshot=$IMG_NAME "$RENDER_URL" &> /dev/null
# add logo to the background
magick $IMG_NAME -size $(expr $IMAGE_SIZE_X \* $LOGO_SIZE_PRECENT / 100)x -background none ${config[logo-image]} -gravity center -extent $IMAGE_SIZE -layers flatten $IMG_NAME
# move the created wallpaper to user folder
Expand Down

0 comments on commit 165a469

Please sign in to comment.