You are not logged in.

#1 2016-05-09 09:24:12

0x29a
Member
Registered: 2012-09-28
Posts: 101

Nice help screen?

Hi there!

For a while I've been doing this little Arch remix for myself - in case of some serious foobar to occur, you know, to reinstall and re-setup system automatically. But, as it turns out, it can grow into something more general, something like a neat console-oriented remix that other people might find useful.

Since it involves some custom control scheme for X, I was wondering what is the best way to include some on-demand help screen, like this one , this one, or maybe this one.

Note: I don't want to use Conky. Also, I'd like to avoid everything that's not WM-agnostic.

Thanks in advance for any ideas

Offline

#2 2016-05-09 11:48:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Nice help screen?

xsetroot.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-05-09 12:10:10

0x29a
Member
Registered: 2012-09-28
Posts: 101

Re: Nice help screen?

DESCRIPTION
       The xsetroot program allows you to tailor the appearance of the background ("root") window on a workstation display running X.

Thanks.
I was thinking about it previously, but it won't cut it. I don't want to make "help" part of  the "wallpaper", but rather a separate window that'd appear and disappear on demand.

Last edited by 0x29a (2016-05-09 12:10:31)

Offline

#4 2016-05-09 12:13:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Nice help screen?

If you want it above other windows, then just make a window with a image background.

If you just want it toggleable, you can use xsetroot in key binding that will show the help when one key is pressed, then show the normal background again after some delay.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-05-09 13:58:27

0x29a
Member
Registered: 2012-09-28
Posts: 101

Re: Nice help screen?

Hmmm... Actually, it's not that bad of an idea. Could mix it up a bit:

#First, generate blurred screenshot of what's currently on the monitor screen 
FILE="/tmp/screenshot.png"
scrot $FILE
convert $FILE -blur 2x9 $FILE 
#maybe just cut it down a little and do some other stuff with the picture, so it'll fit nicely below control bars and such 
# thank you guys @ useful oneliners thread!  

#Second, put the help text within the picture in a way that's both readable and well justified 
## Not even a slightest idea how to pull it off

#Third, display the picture as regular file user can close with a click of a button or a key
stroke, position it properly and put on top with WM rules, easy part

feh $FILE 

That second part bugs me... Not only I don't know how to put text inside the picture ( however quick reading through imagemagick man gave me some ideas ), but the worst part is - how to make it appear equally good and readable on all type of screens ?

BTW. thanks for kind reply, Trilby

Offline

#6 2016-05-09 14:05:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Nice help screen?

Is this text dynamic?  Or do you know what it will be ahead of time?  If the latter, just make an image of the text (e.g., a png with transparent background) then this can be overlaid on the blurred background image (imagemagick's `composite` command).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2016-05-09 18:23:43

0x29a
Member
Registered: 2012-09-28
Posts: 101

Re: Nice help screen?

Thanks, it seems to be the only way. So far I don't plan any kind of translation, so it should be sufficient.
I'll try it out tomorrow and if it'll all work out, I'll mark this thread as solved

Offline

#8 2016-05-09 18:32:11

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Nice help screen?

osd_cat (part of the xosd package) can be used to display text on the root window.

Offline

#9 2016-05-10 21:24:05

0x29a
Member
Registered: 2012-09-28
Posts: 101

Re: Nice help screen?

Thank you all very much.

I also found this neat little script: https://awesome.naquadah.org/wiki/Document_keybindings
Very clever, indeed. I'll try this one, too, altough I'm not sure how it handles mouse bindings

Offline

#10 2016-05-10 23:10:44

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: Nice help screen?

The way I see it, by not wanting to use conky, you're making this less and less wm-agnostic. Conky will scale well, conky will take care of showing it well everywhere, conky will handle all fonts, sizes and translations you throw at it and it will just work. Why would you want to go down the path of root window hacking, only to find that some DEs like to do arcane stuff that will always be above the root window? What if someone has a very large or very small screen, how will you scale the text?

On the other hand, I suppose your keybindings are all wm-specific, so I guess the wm-agnostic goal would be rather pointless in the first place.

EDIT: On rechecking this, it seems you don't want this to be on the wallpaper at all, so I guess this post is quite useless... my bad. A top-level conky window could still be done but it kind of loses the benefits I described above.

Last edited by Steef435 (2016-05-10 23:18:56)

Offline

#11 2016-05-11 10:23:04

0x29a
Member
Registered: 2012-09-28
Posts: 101

Re: Nice help screen?

Hi there, Steef435

I completely understand all of the things you've said. However, I don't want to use Conky because of the following reasons:
1) Conky is a very popular software, therefore many users would like to install it and configure it their way
2) In order to achieve what I want, I'd probably need to constrain Conky to set of very specific WM rules, which will be contrary with desired Conky behaviour for most users.

However, now I see that WM_CLASS is possible to set by hand, so maybe it'll work out after all.

Offline

#12 2016-05-11 11:18:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Nice help screen?

I also really wondered about Steef's second point: why would a help screen specific to a configured system with a specific wm installed need to be wm-agnostic?  I also agree that conky would be best, but I was trying to give options that fit your criteria.  I was thinking more of writing your own tool to show the window just the way you want to be honest.

Now it seems though that you may have ruled out conky due to misconceptions in how it works.  One can run multiple conky instances with completely distinct configurations.  You could have your help-info conky completely isolated from any normal conky config that the end-user would want to configure.  Just put your config somewhere they do not have permission to modify.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB