[lug] fvwm: was virtual screens on gnome?

Steve Litt slitt at troubleshooters.com
Mon Feb 12 17:53:28 MST 2018


On Mon, 12 Feb 2018 15:18:48 -0700
"Jed S. Baer" <blug at jbaer.cotse.net> wrote:

> On Sun, 11 Feb 2018 17:09:17 -0500
> Steve Litt wrote:
> 
> > Try hotkeying Suckless Tools' dmenu into your environment. It's much
> > more discoverable than the command prompt, and usually requires
> > fewer keystrokes. Dmenu is a productivity fountain.  
> 
> On my main box, dmenu seems totally broken. It's version 4.5. It's
> also very poorly documented, at least using the supplied man pages,
> and looking around at what I could quickly find on the web. I have a
> newer Mint version running in a VM, and dmenu 4.6 has at least basic
> functionality there.
> 
> Using version 4.5, it displays itself, but offers no choices at all,
> and ignores the -fn flag, using either the old Xfont syntax, or newer
> (whatever it's called now) syntax.

Hi Jed,

Some distros do a lousy job with dmenu. Sometimes you need to compile
it yourself. Like all other Suckless Tools programs, this is easy: very
few dependencies.

Dmenu 4.5 and earlier used only the old style fonts (listed by
xfontsel). 4.6 and newer use only the new style (listed by fc-list).
The newer fonts are MUCH easier to deal with: If your distro bestows
4.5 or below, grab the latest (I think 4.7) from Suckless Tools and
compile.

To get the feel for what dmenu does, make file with temp.tmp three lines
containing the words one, two, and three. Then do the following:

cat temp.tmp | dmenu -l 20

The preceding gives you a menu you can manipulate with arrow keys, and
choose with the Enter key, or bail out with the Esc key. If you hit
Enter, `dmenu -l 20` gives you the text of the line you pressed Enter
on, and $? returns 0. If you press Esc, `dmenu -l 20` returns no text,
and $? is 1. Note that if you press letter keys, the letter keys
eliminate choices without the letter sequence you've typed in so far,
so that with very few keystrokes the menu consists of one command to
press Enter on.

So basically the way you use dmenu as a program runner is you
pipe a list of all programs, on the execution path, that permissioned as
executable, in sorted order, into dmenu. If dmenu returns 0 then it
succeeded, and you execute the program name that was chosen. If it
returns 1, then nothing is executed. Look at dmenu_run, and perhaps
dmenu_path, but remember, some distros see fit to change these in ways
that fail.

I've written some dmenu docs at:

* http://troubleshooters.com/linux/ctwm/dmenu.htm

* http://www.troubleshooters.com/linux/dmenu/bestpractices.htm

* http://troubleshooters.com/linux/devuan_docs/devuan_dmenu.html

*
  http://www.troubleshooters.com/lpm/201406/201406.htm#use_faster_tools_dmenu

Some of those contradict each other to some extent, but it can be
figured out, and I guarantee you, once you've had dmenu up and runnning
for a week, you'll never be without it again.

SteveT


More information about the LUG mailing list