I was playing with a program which changes the background image of root window, and I needed to change it back to default black, which was quite simple:
$ xsetroot -solid black
After that, I decided to explore a bit using only xsetroot.
1 Solid background color
The syntax is
$ xsetroot -<gray|grey> $ xsetroot -solid <color_name|#RGB|#RRGGBB>
Some examples:
$ xsetroot -gray $ xsetroot -solid gray $ xsetroot -solid black $ xsetroot -solid '#333' $ xsetroot -solid '#334455'
2 Grid pattern
$ xsetroot -mod <1-16> <1-16> [-fg <color>] [-bg <color>]
Example:
$ xsetroot -mod 5 12 -fg black -bg gray
3 Bitmap for pattern
The option is:
$ xsetroot -bitmap <image>
I believe that you need to give it a 2-color, black-and-white, and no bigger than 16x16 XBM (X Bitmap) file. It uses bitmap for pattern, not for image. If you want to show off wallpaper, you need to use other tools, such as feh or xv.
You can use convert from ImageMagick for the conversion, for example:
$ convert -type Bilevel -colors 2 source_image pattern.xbm $ xsetroot -bitmap pattern.xbm
Using this blog’s favicon:
If xsetroot isn’t happy with the file, it says something like:
xsetroot: bad bitmap format file: pattern.xbm
You can also use bitmap(1) to design the pattern and set to the saved file.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.