LinuxCommandLibrary

hsetroot

TLDR

Set solid color background

$ hsetroot -solid "[#1a1b26]"
copy
Set wallpaper (fill)
$ hsetroot -fill [wallpaper.jpg]
copy
Set wallpaper (center)
$ hsetroot -center [wallpaper.png]
copy
Set wallpaper (tile)
$ hsetroot -tile [pattern.png]
copy
Set gradient
$ hsetroot -add "[#1a1b26]" -add "[#24283b]" -gradient [0]
copy
Set with cover mode
$ hsetroot -cover [wallpaper.jpg]
copy

SYNOPSIS

hsetroot [options]

DESCRIPTION

hsetroot sets the X11 root window background. It's commonly used with minimal window managers that don't include wallpaper functionality, like dwm, bspwm, or i3.
The tool supports solid colors, images with various scaling modes, and gradients. It's lightweight and scriptable.

PARAMETERS

-solid color

Solid color background.
-fill image
Scale to fill screen.
-center image
Center image.
-tile image
Tile image.
-cover image
Cover screen, preserve aspect.
-add color
Add color to gradient.
-gradient angle
Create gradient at angle.
-screens n
Apply to n screens.
-brightness value
Adjust brightness.
-contrast value
Adjust contrast.

EXAMPLES

$ # Gradient background
hsetroot -add "#1a1b26" -add "#24283b" -gradient 45

# Fill with brightness adjustment
hsetroot -fill wallpaper.jpg -brightness -0.1

# Center on transparent background
hsetroot -solid "#000000" -center logo.png
copy

CAVEATS

X11 only; doesn't work with Wayland. Some compositors may override. Requires Imlib2. Color formats: #RRGGBB or names.

HISTORY

hsetroot is a fork/rewrite of various root background setters. It's commonly used in the minimal/tiling window manager community where dedicated wallpaper handling is needed.

SEE ALSO

feh(1), nitrogen(1), xwallpaper(1), xsetroot(1)

Copied to clipboard