You are not logged in.
I've been setting my background image by using "feh --bg-fill [path to image]" but I would like to move to a simpler alternative such as imlibsetroot, hsetroot, xsetbg, etc. The problem is that I haven't been able to find a way to get any of these programs to do exactly what feh's --bg-fill option does. That is, the image should scale up or down, while maintaining its aspect ratio, until either its horizontal or vertical edges meet the sides of the screen and there is no empty space visible. Basically, I want the program to push part of the image off the screen if that's what it takes to fill the whole thing.
Is there a way to do this that I'm just missing?
Last edited by zcal (2012-08-05 16:29:50)
Offline
hsetroot -fill <imgfile> seems to work for me
(edit) I was wrong. it changes the aspect ratio.
Last edited by 2ManyDogs (2012-07-29 17:53:25)
Offline
If feh does exactly what you want, does it get any simpler than that...?
Offline
There are a few very simple applications for setting background in the AUR, but I'm sure you have already found them, haven't you?
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Just trying to get down to one application per...well, application. I've found sxiv more to my liking than feh for image browsing and viewing, so I'd like to get rid of feh in favor of a simpler application for setting the background.
Offline
# pacman -S nitrogen
Start the program, add a folder and choose your wallpaper:
$ nitrogen
Then place this in ~/.config/openbox/autostart, or ~/.xinitrc, whatever:
nitrogen --restore &
I've been using it for over two years now.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Yeah, I get what you're trying to do, but you still mention the word "simpler application". Do you have a less abstract notion for what you want? Smaller (as in installed bytes), smaller (as in less memory footprint)? A program that can do less? Right now it looks to me like you have one app per need: feh for setting the background and sxiv for image browsing and viewing
If you want to find out whether sxiv can do what
feh --bg-fill /foo/bar
does, then maybe you should ask the people who made sxiv?
Offline
@DSpider
Thanks much for the suggestion, but I should have also specified that I'd like to stick to command line-only programs. Sorry for being picky!
@mariusmeyer
Preferably smaller as in installed size, and simpler in that it is built specifically for the task of setting images/colors on the root window. feh does the job, but it's also an image viewer, image browser, something of an image file manager, etc. Alternatives like imlibsetroot and hsetroot would be perfect but for the fact that I haven't been able to have them scale images like I want. That is unless I'm overlooking some creative solution, which is part of what I'm looking for help with.
ber_t, the creator of sxiv, has already stated that he's uninterested in adding such functionality to the program.
Offline
I use imlibsetroot, can be found in the AUR. It also supports xinerama.
imlibsetroot -x e -s '/path/to/image'
Last edited by Army (2012-07-30 06:06:11)
Offline
@DSpider
Thanks much for the suggestion, but I should have also specified that I'd like to stick to command line-only programs. Sorry for being picky!
@mariusmeyer
Preferably smaller as in installed size...
Command-line tools for an Xorg environment?
$ pacman -Qi nitrogen | grep "Installed Size"
Installed Size : 372.00 KiB
$ pacman -Qi feh | grep "Installed Size"
Installed Size : 436.00 KiB
They're both still under half a megabyte.
For contrast...
$ pacman -Qi leafpad | grep "Installed Size"
Installed Size : 424.00 KiB
$ pacman -Qi nano | grep "Installed Size"
Installed Size : 1521.00 KiB
(yes, the GUI takes up a lot less space than the command-line)
This is a moot point. I'm not posting anymore. I've made my case.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
I use esetroot from AUR - it Eterm's root setter, packaged separately.
Comes in at 40k - uses imlib2 which is quite big but is the same library that sxiv uses, so you'll have it anyway.
Might be better, worse or no different to any of the suggestions above, as I haven't used any of them.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
@Army
imlibsetroot is exactly what I want minus the fill functionality. Thought maybe there was a magic trick to get it to work but I haven't had any luck.
@skanky
Thanks for the tip on esetroot! I hadn't found that one yet. Doesn't seem to do what I'm looking for, though. Other than the missing fill option, the *setroot programs are just about perfect. Oh well.
Last edited by zcal (2012-08-02 00:13:23)
Offline
Use an image editor to scale/stretch your image to match your screen's resolution. Then use one of the *setroots.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
@Army
imlibsetroot is exactly what I want minus the fill functionality. Thought maybe there was a magic trick to get it to work but I haven't had any luck.
@skanky
Thanks for the tip on esetroot! I hadn't found that one yet. Doesn't seem to do what I'm looking for, though. Other than the missing fill option, the *setroot programs are just about perfect. Oh well.
I use -scale, but thought that was what -fit did - though it's been a long time since I've played with it, so I'm not surprised my recall was wrong.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Use an image editor to scale/stretch your image to match your screen's resolution. Then use one of the *setroots.
This was my first thought, but I move between three separate screens of different resolutions. I've resigned myself to being stuck with feh for now. Thanks for your suggestion, though!
Edit:
Worked up a solution similar to this but that doesn't require editing any image files. imlibsetroot has an option (-s X,Y) for scaling an image to a set X and Y number of pixels. Since I use a couple of custom shortcuts to toggle screens with xrandr, I just tacked on imlibsetroot with the appropriate number of pixels for each screen. This allows me to set the image width or height to be wider or higher than the screen if necessary to completely fill up the background, it just means I need to do some simple math to get the right dimensions.
Here's an example for an image of 1440x864 on my 1280x1024 monitor:
xrandr --output LVDS --off --output VGA-0 --auto && imlibsetroot -s 1707,1024 -p c ~/look/background
Admittedly this solution would suck if I changed my background on a regular basis, but I don't.
Last edited by zcal (2012-08-05 16:32:25)
Offline