# setroot **Repository Path**: colin4124/setroot ## Basic Information - **Project Name**: setroot - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-03-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README NAME ---- *setroot* - sets your wallpaper. VERSION ------- `release: version 2.0 - 2016-03-13` ABOUT ----- This program was written as a way for me to learn some C, and also to serve as a personal replacement to the excellent `imlibsetroot` and `feh` programs. I liked `feh` 's syntax, but I had no use for its image viewing capabilities, so I tried out `imlibsetroot`. I encountered some segfaults/Imlib errors during usage, so I started hacking it, but ended up just writing my own program based off of it, stripped of extraneous features I saw no need for. This program in no way constitutes good code. I have absolutely no experience in formal programming or software development, I am merely a lowly math major. Please, if you have stumbled upon this repository somehow and actually use this program, feel free to critique the hell out of my code and help me improve. My ego died many ages ago in undergrad. INSTALLATION ------------ If you have `libxinerama` installed: ---- sudo make xinerama=1 sudo make install (clean) ---- If you don't have `libxinerama` installed: ---- sudo make xinerama=0 sudo make install (clean) ---- DEPENDENCIES ------------ `imlib2` `libxinerama` is an optional dependency (see section *INSTALLATION*). INVOCATION ---------- *setroot* [_storage flag_] [_global flag_] { [_image flags, manipulations, options_] }+ [_monitor flag_] The order of the filenames determines which monitor the wallpaper is set to. The first invoked filename is set to the first Xinerama monitor, the second to the second, and so on. If more than one image option is applied, the last one takes effect. If _n_ filenames are supplied for _k_ monitors, where _n_ > _k_, any invoked filename after the first _k_ will be ignored, unless it is passed a valid `--on` option (see section *IMAGE_FLAGS*). An illegal invocation sequence will result in setroot terminating with exit status 1. STORAGE FLAGS ------------- *--store*:: creates executable file `.setroot-restore` located in directory `${XDG_CONFIG_HOME:-$HOME/.config}/setroot` If the directory path and/or file does not exist, it will be created (see section *FILES*) *--restore*:: looks for `${XDG_CONFIG_HOME:-$HOME/.config}/setroot/.setroot-restore` and executes it in shell (restores your previously set wallpapers and options) GLOBAL FLAGS ------------ *--blank-color* _#RRGGBB_:: sets background color of blank walls, unless overriden by _--bg-color_ option IMAGE FLAGS ----------- *--span*:: have image span all screens (no cropping). If more than one image is specified, the later image will be spanned. Note that this overrides the _--on_ option. Note also that further images that are set (in the case of multiple monitors) will "cover" the spanned image. *--bg-color* _#RRGGBB_:: set empty space around image to color *--on* _n_:: assign image to be wallpaper on Xinerama monitor _n_ If not all images are passed this option, the unassigned walls will be placed on monitors by their position in the invocation sequence. Images which do have a specified assignment will then be assigned to their monitors, replacing any images which may have already been assigned. If _--on_ is supplied a screen which does not exist, no error is raised and the other walls are set as normal. This can be used with `setroot --store` to "preset" an unconnected monitor's wallpaper. If `setroot` was not compiled with Xinerama support (see section *INSTALLATION*) then `--on` is considered an invalid command and the program will terminate with exit status 1. IMAGE MANIPULATIONS ------------------- *--blur* __:: blur image *--sharpen* __:: sharpen image *--brighten* __:: modify image brightness by amount (between -1 and 1) *--contrast* __:: modify contrast of image by amount (between -100 and 100) *--flip*[_hvd_]:: flip image [_h_]orizontally, [_v_]ertically, or [_d_]iagonally *--tint* _#RRGGBB_:: tint image with color _#RRGGBB_ (also accepts valid XColor) *--greyscale*:: renders image as greyscale (uses luminosity algorithm) IMAGE OPTIONS ------------- *-c, --center*:: place unscaled image centered and cropped to screen *-t, --tiled*:: tile image on invoked screen (Xinerama aware) *-s, --stretch*:: stretch image (disregard aspect) on invoked screen *-z, --zoom*:: scale image (preserve aspect) to fit screen completely (could cut off image) *-f, --fit*:: scale image (preserve aspect) to fit screen (entire image on screen) - default *-fh, --fit-height*:: scale image (preserve aspect) until height matches invoked screen *-fw, --fit-width*:: scale image (preserve aspect) until width matches invoked screen *-sc, --solid-color #RRGGBB*:: set background to solid color #RRGGBB (hex code) MONITOR FLAGS ------------- *--use-x-geometry*:: number Xinerama monitors from leftmost to rightmost *--use-y-geometry*:: number Xinerama monitors from topmost to bottommost FILES ----- `setroot` creates the directory `${XDG_CONFIG_HOME:-$HOME/.config}/setroot` and places an executable file `.setroot-restore` there when `setroot --store` is invoked for the first time. `setroot --restore` executes this file to restore the most recent (valid) invocation of `setroot`. AUTHOR ------ *(C) 2014*-2016* Tim Zhou ACKNOWLEDGMENTS --------------- `set_pixmap_property()` is *(C) 1998* Michael Jennings `find_desktop()` is a modification of `get_desktop_window()` + *(C) 2004-2012* Jonathan Koren