You are not logged in.

#1 2011-08-15 03:48:57

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Openbox Multihead pager (single head too) - dynamic workspaces

Hello again... My apologies for my third topic in community contributions in the last few days, but I've been busy! I would have posted this in my recent "Openbox Multihead" thread, but this will also work for single head users using regular Openbox. (It will not work well for users of regular Openbox with multiple heads; you'll need openbox-multihead (AUR) for that.)

This is a pager written in Python (that I started two days ago!) specifically targeted to support the _NET_VISIBLE_DESKTOPS hint that is used Openbox Multihead. The idea is that there is one desktop visible for each monitor activated. It is configured in Python too. It is designed to make managing your workspaces completely dynamic; so that your available workspaces can change as your work changes.

Dependencies: pygtk, pango, python-keybinder, xpybutil

Features:

- Vertical or horizontal orientation.

- Completely themeable. (Change fonts, text color/sizes, border colors, background colors, etc.)

- Acts as a dock and sets struts appropriately. (It will automatically account for dead area on your desktop too.)

- Supports adding and removing desktops. This differs from Openbox's typical "add desktop" and "remove last desktop." This pager provides dynamic workspace support; meaning you can add a new desktop with any name you like and remove any desktop you like. The idea is to let the available set of desktops reflect your workflow. Instead of statically declaring your list of workspaces once, you can modify them as your work changes.

- Supports showing prompts with any arbitrary list of data with auto-completion/tabbing. For example, you might have a lot of browser windows open across many workspaces. Showing the window list prompt and typing "chrome" will narrow the list down automatically to all windows that include "chrome" in the title; you can then tab through it. See it in action here and here.

- Prompts are also themeable.

- Comes with a desktop list prompt and a window list prompt. If you know Python, new prompts can be added very easily.

- Configured in Python, which includes two files: config.py and keymousebind.py. config.py is fairly straight-forward and contains general settings and theme options. keymousebind.py contains all of the keybindings used to manage your desktops: switching between them, adding new ones, moving windows to other desktops, focusing other windows, removing desktops, etc.

For example, I've bound <Ctrl><Alt>a, <Ctrl><Alt>b, ..., <Ctrl><Alt>z to functions that search the current list of desktops for names starting with the respective letter. You can then cycle through each of those desktops upon subsequent keypresses. For example, say you have two desktops named 'mail' and 'music'. Pressing '<Ctrl><Alt>m' once will bring you to 'mail'. Pressing it again will bring you to 'music'. The functions used for this are all included in keymousebind.py so that you can tinker with them to fit your exact needs :-)

Most of these ideas have been lifted directly from Xmonad; particularly the Prompt and DynamicWorkspaces contrib modules.

It's in the AUR.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#2 2011-09-14 02:32:00

jon
Member
Registered: 2002-11-28
Posts: 87

Re: Openbox Multihead pager (single head too) - dynamic workspaces

Absolutely love your pager, it seems like one of the few decent pagers for Openbox!!

I have noticed one small bug, when I delete my desktops (except for 1 -- call it "Main"), I cannot add desktops anymore.  I get the following error, if I run pager-multihead from an xterm:

 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pagermh/prompt.py", line 243, 
in do_result_fun
    self.cb(content)
  File "/home/jon/.config/pager-multihead/keymousebind.py", line 103, in 
fun
    names.append(name)
AttributeError: 'str' object has no attribute 'append'

However, if I add a desktop from the standard Openbox menu, (and thus have 2 desktops) I can then add desktops with no error.

Anyway, thanks again. I hope you keep developing the pager!!

Offline

Board footer

Powered by FluxBB