You are not logged in.
Pages: 1
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
xsetroot.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
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
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
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
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
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
osd_cat (part of the xosd package) can be used to display text on the root window.
Offline
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
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
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
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
Pages: 1