pekpipes - sh pipemenu scripts for pekwm

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

pekpipes - sh pipemenu scripts for pekwm

#1 Post by Nathan F »

These are variants of my other pipemenu scripts for icewm and openbox. All are written in sh so require nothing more than pekwm, a bourne compatible shell and basic system utilities.

pekdate.sh - Displays a submenu showing the current date and time and a monthly calendar. Works best with a monospace font.

pekfb.sh - Adds a directory browser menu to your pekwm menu. Browse-able both up and down, with hidden files and folders in separate subfolders. This allows you to jump easily to any part of the filesystem and open a filemanager or terminal, or open files directly using a mime-opener such as xdg-open,exo-open or even rox.

pekmpd.sh - Control music player daemon from your pekwm menu. Requires a running mpd and the command line mpc client.

pekplaces.sh - This started out as just a mimic of the gnome2 places menu but is now substantially more comprehensive. Differences include rox bookmark support and the ability to make your home directory browse-able via pekfb.sh.

pekwp.sh - Sets your wallpaper from the pekwm menu. This can launch somewhat slowly the first time as it will be busy generating thumbnails of the images in your wallpaper directories.

All of these scripts will require the user to edit the preferences block with a text editor to set some sane defaults for your particular setup. In particular you will probably want to set your preferred filemanager and terminal, plus the directory where you keep your wallpapers. You will also have to manually add them to your pekwm menu.

Tip - for icons in the menus, add icons matching what the scripts call for into ~/.pekwm/icons (unless you have changed the default configuration). It should be possible to get full icon coverage.

This project is following closely my icepipes and obpipes projects and shares a similar roadmap. This is likely to be the only "standalone" release (unless bugfixes are needed) as I am planning on implementing a common configuration file and library of shell functions for code sharing between the scripts. However, they're functional now so feel free to try them out.
Attachments
pempd.jpg
The mpd menu open displaying volume settings.
(42.11 KiB) Downloaded 606 times
pekplaces.jpg
The places menu plus filebrowser menu open.
(159.77 KiB) Downloaded 559 times
pekpipes-0.3.tar.bz2
(4.81 KiB) Downloaded 439 times
Bring on the locusts ...

simargl

#2 Post by simargl »

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

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

#3 Post by Nathan F »

I was unaware you had done that already. I did basically the same thing last week and put it up on bitbucket and Arch aur. Maybe next time some collaboration would be beneficial?

Since the thread just got bumped anyway, here's the latest status of this particular project. I've implemented bash function libraries for pipemenu creation for icewm|pekwm|openbox that allow a single script to create a menu for all three. Almost all of the standalone scripts are ported over to the new framework, just have to do the filebrowser and finish the Makefile for the "source" package.

The part I find kinda cool about how I did it is that the scripts work as multi-call executables, sort of like busybox but in sh form. Call it as "pekmpd.sh" and you get the pekwm version. And it only sources the functions for the WM it's targeting, so there's not much overhead. It actually eliminates a significant amount of size over the standalone versions, and it's more maintainable and easier to implement the same menu for all 3 WM's.

When I re-implement the filebrowser I'm going to implement some directory contents caching to speed it up on subsequent executions. That part of the code is in outline stage.

Having fun with it, and more to come.
Bring on the locusts ...

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

#4 Post by Nathan F »

Current state of development is on bitbucket here. You'd need mercurial to check it out, or alternatively I'll post a tarball in a day or so. The tarball that's up already is several versions behind.

I haven't tested it "live" yet but the fb script is now properly caching directory contents, so any subsequent entrances into a directory should be nice and fast if the contents haven't changed since the last write. It currently caches the following in ~/.config/wmpipe/fb_cache:
* The modification (mtime) of the directory in the "directory" file
* The dotfiles, files, dotdirs, and subdirs in fb_cache/<inode-of-directory>{.dotfiles,.files,.dotdirs,.dirs}
* The actual menu written

Since it caches the directory contents and not just the menu, if you go to the same directory with another WM's version of the script it runs faster than it would if starting from scratch, as it doesn't have to run "find" 4 times to separate dirs/files/dotfiles/dotdirs.

I know that's all technical jibberish, sorry. The point is it's a fairly significant improvement over the old version in a lot of ways.

I also added two more nice new features over the previous standalone version. Each directory listing also has a menu entry to bookmark the directory, which creates a gtk-bookmark. And it also now supports just about any terminal you would want to use with it.

Last but not least, there are now global prefs rather than in each script, making setup a heck of a lot quicker. And out of courtesy I included a config for puppy, with the icons mapped somewhat to what Puppy actually includes.

Tarball fairly soon, and possibly packages to follow.
Bring on the locusts ...

simargl

#5 Post by simargl »

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

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

#6 Post by Nathan F »

Interesting yes, but I always start with 0.1 release and the name seemed appropriate. Newer version, yes (I checked out your source package after your post). All of the various xdg generators we used to have in Puppy no longer compile with newer libs, so I thought I'd give a go at actually maintaining this.

"Source" package for my wmpipe project is up on bitbucket now. Ran down a number of typos and bugs, seems to be working well for me now. https://bitbucket.org/nfisher1226/wmpip ... 0.2.tar.gz
Simple installation with the included Makefile. If you like you can set PREFIX and SYSCONFDIR on the command line to install into /etc and /usr instead of the default of all in /usr/local. Also supports DESTDIR for packaging. I've made a PKGBUILD for arch but not uploading until I've tested a bit more and proofread a bit. I may make a pet package, maybe not.
Bring on the locusts ...

simargl

#7 Post by simargl »

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

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

#8 Post by Nathan F »

Must be a library version thing. I had already done an update, both of openbox-menu and of my "hack". Both work fine for me with an up-to-date Arch.

I wish I knew where Mimas had his devel repo so I could track it closer. He jumped right over 0.4 to 0.5. He made some fairly extensive changes.

This time around I stripped out his "get_safe_name" function, as it's only required to safegaurd XML against illegal characters, and the startup-notification code. I went ahead and just bumped the version of pekwm-menu to match that of openbox-menu.
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 »

Out of curiosity I tried specifying the menu file on the command line and it doesn't work. That means you must have a menu named applications.menu in /etc/xdg/menus. So yes, it's obviously broken. I'll check into the code a bit when I have some more free time.
Bring on the locusts ...

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

#10 Post by Nathan F »

OK, it seems that it was only if I entered the full path that it errored. I can specify gnome-applications.menu or xfce-applications.menu on the command line and it works.
Bring on the locusts ...

Post Reply