wallpaper2

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

wallpaper2

#1 Post by Nathan F »

First release for testing. Alpha status, please don't try it if you don't know how to put things back together again. That said, I really think this has the potential to be an even better program than the original version, which is now completely out of date. The old interface was cluttered and ungainly. This one's nice and clean, just giving the average user what they need and no more.

You must have some development tools to install, at the very least "make". I'll distribute official packages when it's well tested. Typical source type distribution except no "./configure". See the INSTALL and README files.

It has 2 backends at the moment for setting the wallpaper. In a brand new install it will default to using feh, but you can change that by clicking the "Options" tab and clicking the combobox over to "rox" for use in Puppy.

The directory will default to /usr/share/backgrounds or the first directory under it that contains any files. You can add other directories to the list by typing them into the combobox and pressing Enter, or by clicking the folder icon to bring up a file browser. Once you've opened a new directory the program remembers it for later visits.

All comments welcome. Contributions are welcome, but please keep the following in mind.

My preference for code submissions are in this order:
1) pull requests on bitbucket
2) pull requests on github once I get it mirrored there
3) patch files created with "diff -Naur"
4) My least favorite is raw code pasted on the forum. I'll look it over but please at least comment it well.

Anything that goes in MUST be portable code that would work on any OS with a bourne shell and gtkdialog. No assumption of other tools being installed or whether or not the user is root.

Download the tarball from bitbucket

================================
EDIT: next alpha release

See attached pet package
Attachments
wallpaper2-2.0a2.pet
(4.52 KiB) Downloaded 439 times
wallpaper2-2.png
(157.65 KiB) Downloaded 859 times
Last edited by Nathan F on Sat 10 Aug 2013, 16:14, edited 1 time in total.
Bring on the locusts ...

User avatar
koulaxizis
Posts: 452
Joined: Sun 17 Jul 2011, 18:43
Location: Greece
Contact:

#2 Post by koulaxizis »

Just tried it! Nice one! :) Do you want me to translate it into Greek? :)
[b]Christos Koulaxizis[/b]
[i]Woof woof from Greece![/i]

[color=darkred][url=https://sourceforge.net/projects/puppystuff/][ Puppy Stuff Repository ][/url][/color]

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#3 Post by Nathan F »

Eventually that would be great. For now, it's in an unfinished state. I haven't prepared it for gettext yet, but will be doing so fairly soon.
Bring on the locusts ...

simargl

Re: wallpaper2

#4 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:28, edited 1 time in total.

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#5 Post by Keef »

Works well, but found a little quirk...
When I navigate to a different folder, the first image is displayed, but the list box is blank. If I use the drop down box (recently used locations) and select the current directory, it will display the list.
Also, the recently used list is repeating the same directory when I re-visit it. Hardly a show stopper, but it would be cleaner if 'repeats' got zapped.
Oh, the terminal shows:

Code: Select all

ls: cannot access : No such file or directory
I think this shows up when I go to a different location - maybe why the file list is not shown??
Tried it on Wary 5.5 and Precise 5.7.1 using rox backend.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#6 Post by Nathan F »

@Keef - thanks for reporting it. I'll get those two issues fixed. I was aware of the first, but not the second.

@Simargl - sounds like a good plan. Was planning for an esetroot backend and perhaps wmsetbg, but I'll look into imlibsetbg too. I assume by the name it uses imlib, so it's probably a good candidate.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#7 Post by Nathan F »

I just committed the following to bitbucket.
1) Changed the file list from a list widget to a tree widget as list is deprecated in gtk3. Thanks to Zigbert for the tip. A side effect, at least until I figure out a workaround, is that the tree widget is not automatically selecting the first entry upon opening, so you continue to see the preview for the last selected image until you click on another one.
2) Zap duplicate entries in the directory list on program startup. You will still have dups within the same session if you press enter twice, but they get removed the next time the program starts.
3) The behavior of the backend has been slightly changed to make it easier to use separately from the gui, per Sunburnt's request. The script <prefix>/lib wallpaper now takes <mode> as arg1 and <file> as arg2. I intend this to be stable moving forward, as he expressed an interest in possibly creating an alternate gui.
4) This part is the trickiest so far. It seems that refreshing the comboboxentry widget -always- puts a blank line into the active cell, unless I'm missing something. In layman's terms it was causing the directory and contents list to vanish when you manually type a directory and press enter to save it, as Keef described.

My solution to 4) is not ideal. The current code no longer refreshes the widget. It will still take you to that directory, and it will still save the contents, but the new entry will not show up in the dropdown list until the next time you start the program.

TODO:
1) I'm going to experiment with placing a few of the widgets into eventbox enclosures in order to get a tooltip when you hover the mouse cursor over them. The goal is to provide some usage hints to the user without cluttering up the gui. This is another Zigbert suggestion.
2) Various new backends
3) Sanity checking for the backends so they will only be available if the needed programs are installed.
4) Documentation
5) gettextize everything for localization

I'm not going to create a new tarball just yet, but anyone wanting to try it with the latest changes is welcome to download the automatically created zipfile from my bitbucket site (see top post). My plan is to incorporate a few of the proposed changes (particularly the tooltips and localization) and get alpha2 up by the end of the weekend.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#8 Post by Nathan F »

One last commit today. I added esetroot and imlibsetroot backends. I can see adding fbsetbg, wmsetbg, and maybe icewmbg. That should provide some pretty good coverage for a ton of different scenarios. Any other suggestions?
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#9 Post by Nathan F »

OK I lied. I fixed a couple issues.
1) The preview is automatically updated again when changing directory, as in the first alpha.
2) Potential bug - previously multiple files could be selected. This has been changed to allow only one selection at a time.

The README is also updated. That is all.
Bring on the locusts ...

simargl

#10 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:28, edited 1 time in total.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#11 Post by Nathan F »

Ack, the dreaded spaces in filenames bug...I'll fix it. Forgot some quotes somewhere.

As for the suggestions:
1) Merging into one file -is- doable, but I don't want to as it would require some extra sed'ding and I like it fast. I could, however, place those particular files into a subdirectory (say, <configdir>/state or <configdir>/cache)
2) A specific icon is a good idea, and I would welcome somebody offering to help with it. I'd request it be in svg format so I can resize for different uses.
3) Name - I was actually thinking shorter and sweeter. I use dwb, dmenu, and dwm a lot and love not having to type long names. I was thinking "wp" for a possible command line interface and "gwp" for the gui. Very Unix-ey
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#12 Post by Nathan F »

I pushed a small changeset that fixes the spaces in filenames bug. As I thought, just forgot some quotes. While I was at it I fixed the error messages that were being thrown in the terminal while typing into the combobox to enter a new path.

Off the bed.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#13 Post by Nathan F »

@Simargl - after some experimentation I realized it would be a lot easier to create a single "state" file than I realized. No promises as to when it will happen, but I'll try to make the required changes because it really would be more tidy.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#14 Post by Nathan F »

OK that change was less work than I imagined. There are now only 3 files created in the config directory.
1) current.png - a soft link to the image currently selected in the file browser
2) wp-dirs - the list of saved directories, basically like a bookmarks file
3) state - tells the next session what backend and mode were chosen by the user as well as the directory that was open

That's nice and clean, and frankly it's actually less code than the previous versions.

Done for now. Next project will be to gettext-ize it.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#15 Post by Nathan F »

New changeset:
* The name is officially gwp.
* The tabs are now just "Images" and "Options"
* It should be prepared for translation using gettext now. There is a gwp.pot template included in the package.
* Various minor fixes and cleanups to help maintainability

A beta release is on the horizon. Will create a .pet when I do.
Bring on the locusts ...

simargl

#16 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:27, edited 1 time in total.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#17 Post by Nathan F »

I can institute writing the last wallpaper commandline used somewhere, and then create an option to set the last from the commandline.

Sunburnt expressed some interest in creating an alternate gui if the frontend/backend is reasonably separated (which it is) and even did a mockup Hug gui which looks pretty cool. That got me thinking I'd like to create a commandline-only tool to access the program internals, because it would be rather handy to have the various backends abstracted to use a single syntax. Anyway, it's probably in the pipeline sometime.

As for the current.png file itself, that is intentional behavior, as it's how the gui gives you a preview when you click on another item.

I'll look into your suggestion about the resize behavior as it makes a lot of sense.
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#18 Post by Nathan F »

@Simargl - I did a small proof of concept commit for you to try out. There's now two programs:
gwp (Graphical WallPaper setter) - the gui interface
cwp (Commandline WallPaper setter) - a new cli interface

The cwp program is just a stub for now, with the only function being to set the previous wallpaper. The gui now saves the current backend, mode, and wallpaper in (userconfigdir)/last when you click Apply. To try it out you will need to re-run the gui and set your wallpaper to create the file. Then add this to .xinitrc (or whatever you run during an X-session startup):

Code: Select all

cwp --last
Bring on the locusts ...

simargl

#19 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:27, edited 1 time in total.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#20 Post by Nathan F »

I just committed a fairly major overhaul. There is now a menubar with options for launching external programs, an "About" dialog, a stub for a future slideshow feature, and a barebones "preferences" dialog. The preferences dialog only currently supports setting the height of the image previews, going from 150px to 500px in several steps.

That's just about as busy as I'd like the main window to ever get, and it was almost painful to do it at that.

The program launchers should pick up a number of common image viewing or editing programs and let you open the currently selected image in the external programs from the "Tools" menu. There are probably a number of programs I've missed adding, so let me know if anything else should be there.

One or two other small tweaks. The window is not resizable now, although it will automatically resize to accomodate different aspect ratios for the preview. Also the image can now be set by doubleclicking an item in the list as well as clicking on "Apply".
Bring on the locusts ...

Post Reply