swww-img(1)

πŸ“¦ version 0.9.5, in opensuse-leap 16.0

πŸ’… swww-img β€” like, the image-sending page for swww 🌸

okay bestie, welcome to the swww-img corner of the manual. this is the swww img command, and it's genuinely the one you'll use every single day, so let's get into it ✨

✨ SYNOPSIS ✨

swww img [OPTIONS] <path/to/img>

that's it. that's the whole vibe. you give it a path, it gives you a wallpaper πŸŽ€


πŸ¦‹ OPTIONS πŸ¦‹

  • -f, --filter <FILTER> β€” the filter we use when scaling images 🧚

the available options are:

Nearest | Bilinear | CatmullRom | Mitchell | Lanczos3

these are all coming at you courtesy of the fast_image_resize crate (https://docs.rs/fast_image_resize/2.5.0/fast_image_resize/). Nearest is the one I recommend for pixel art stuff, and ONLY for pixel art stuff. it's also the fastest filter, no cap.

for non-pixel-art stuff, I'd usually point you at one of the last three, but honestly you're gonna have to experiment a little to see which one you like best πŸ’–

note you can also pass the flag --no-resize, explained below, and in that case the --filter flag will have literally no effect.

default is Lanczos3.

  • --no-resize β€” do not resize the image. equivalent to --resize no.

if this is set, the image won't be resized, and will be centralized in the middle of the screen instead 🫢 if it's smaller than the screen's size, it will be padded with the value of --fill_color, below.

  • --resize <RESIZE> β€” whether to resize the image, and the method by which we resize it.

possible values:

  • no: do not resize the image
  • crop: resize the image to fill the whole screen, cropping out the parts that don't fit
  • fit: resize the image to fit inside the screen, preserving the original aspect ratio

default is crop.

  • --fill-color <RRGGBB> β€” which color to fill the padding with when not resizing 🎨

default is 000000.

  • -o, --outputs β€” a comma separated list of outputs to display the image at. use swww query to know which outputs are currently being used πŸ‘€

if it isn't set, the image is displayed on all outputs.

  • -t, --transition-type <TRANSITION_TYPE> β€” [environment variable $SWWW_TRANSITION]

sets the type of transition. default is simple, which fades into the new image.

the possible transitions are (so many, I'm obsessed):

  • none
  • simple
  • fade
  • left
  • right
  • top
  • bottom
  • wipe
  • wave
  • grow
  • center
  • any
  • outer
  • random

none will complete the transition instantly ⚑

fade is like simple but uses bezier curves while fading the image β€” it's a more polished looking version of simple with less artifacts ✨

the left, right, top and bottom options make the transition happen from that position to its opposite on the screen.

wipe is similar to left but lets you specify the angle for the transition with the --transition-angle flag.

wave is similar to wipe but the sweeping line is wavy 🌊 you can control the "waviness" with --transition-wave.

grow causes a growing circle to transition across the screen and allows changing the circle's center position with the --transition-pos flag.

center is an alias to grow with the position set to the center of the screen.

any is an alias to grow with the position set to a random point on screen.

outer is the same as grow but the circle shrinks instead of growing.

and finally, random will select a transition effect at random 🎲

  • --transition-step <0-255> β€” [environment variable $SWWW_TRANSITION_STEP]

how fast the transition approaches the new image.

the transition logic works by adding or subtracting from the current rgb values until the old image transforms into the new one. this controls by how much we add or subtract.

for example, if pixel A is 000010, and we need it to transition to pixel B, which is 000020, if transition-step is 2, then in one frame pixel A will turn to 000012, in the next frame to 000014, and so on.

larger values will make the transition faster, but more abrupt. a value of 255 will always switch to the new image immediately 😳

default is 90. if transition-type is simple, default is 2.

  • --transition-duration <seconds (can have decimals)> β€” [environment variable $SWWW_TRANSITION_DURATION]

how long the transition takes to complete, in seconds ⏱️

note this doesn't work with the simple transition.

default is 3.

  • --transition-fps <frames per second (max 255)> β€” [environment variable: $SWWW_TRANSITION_FPS]

frame rate for the transition effect.

note there is no point in setting this to a value smaller than what your monitor supports.

also note this is different from the transition-step. that one controls by how much we approach the new image every frame.

default is 30.

  • --transition-angle <angle, in degrees (parsed as a float)> β€” [environment variable: SWWW_TRANSITION_ANGLE]

this is used for the wipe and wave transitions. it controls the angle of the wipe πŸ“

note that the angle is in degrees, where '0' is right to left and '90' is top to bottom, and '270' bottom to top.

default is 45.

  • --transition-pos <x,y> β€” [environment variable: SWWW_TRANSITION_POS]

this is only used for the grow and outer transitions. it controls the center of the circle (default is center) 🎯

position values can be given in both percentage values and pixel values: float values are interpreted as percentages and integer values as pixel values. eg.: 0.5,0.5 means 50% of the screen width and 50% of the screen height, while 200,400 means 200 pixels from the left and 400 pixels from the bottom.

the value can also be an alias, which will set the position accordingly:

  • center
  • top
  • left
  • right
  • bottom
  • top-left
  • top-right
  • bottom-left
  • bottom-right

default is center.

  • --invert-y <bool> β€” [environment variable: SWWW_INVERT_Y]

inverts the y position sent in the transiiton_pos flag πŸ™ƒ

  • --transition-bezier <f1,f2,f3,f4 (all floats)> β€” [environment variable: SWWW_TRANSITION_BEZIER]

bezier curve to use for the transition animation. https://cubic-bezier.com is a good website to get these values from πŸ’œ

eg: 0.0,0.0,1.0,1.0 for linear animation

default is .54,0,.34,.99

  • --transition-wave <width,height (both floats)> β€” [environment variable: SWWW_TRANSITION_WAVE]

currently only used for the wave transition, to control the width and height of each wave 🌊

default is: 20,20

  • -h, --help β€” print help (see a summary with -h) 🫢

🌈 DESCRIPTION 🌈

sends an image (or animated gif) for the daemon to display. you can also use - to read from stdin instead πŸ’–


πŸŽ€ ABOUT THE CACHE πŸŽ€

the images sent will be cached at $XDG_CACHE_HOME/swww or $HOME/.cache/swww if $XDG_CACHE_HOME does not exist. for each monitor, there will be a file in those locations corresponding to the current image/animation being displayed. importantly, cache will only be loaded during initialization if you use swww init. that is, calling swww-daemon directly will NOT load the cache, but calling swww-init will πŸ‘‘

the swww-daemon will actually wait until the first image has been set before trying to load the cache.

finally, the cache will keep preprocessed versions of gifs. so, if you load a large gif, you'd have to pay the price for its processing the first time 😭 if you constantly load large gifs, this could cause the cache to get very big. you can simply run swww clean-cache if that happens ✨

fr fr do the swww clean-cache thing if your cache starts looking like a whole situation πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

swww-clear-cache(1) swww-daemon(1) swww-query(1)


okay that's the whole page, bestie, you're basically a swww expert now πŸ’…βœ¨ this was swww-img(1), dated 2024-05-05 β€” go forth and set some iconic wallpapers, ily πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from