nwg-piotr/nwg-wrapper

Allow different layer for wraper

quack-o opened this issue · 13 comments

Feature request : to have an option to show wrapper in bottom or top layer.

infact having an option like waybar where you can send a custom signal to a module will be awesome. an id can be given to wraper window which can be used to toggle surface layer . It sounds a bit over the edge but will be an aweosme option to have

Well, I could add the -l | --layer argument to select the initial layer (1 and 2 for bottom and top) and switch them on SIGUSR1. I'll take a look at this.

Could you check if it meets your expectations? Use pkill -USR1 nwg-wrapper to switch layers.

awesome, it works as expected, except that toggle is applied globally to all windows, while its sufficient for my usecase, a better implementation will be to give all windows an Id (N) and trigger using pkill -USRN nwg-wrapper or something similar

If I understand their wiki well, Waybar allows to choose The signal number used to update the module, not a "window ID", whatever you mean.

yeah, I meant in that context, every wrapper window should've its own unique id which could be toggled using a signal

This is very useful. Is there, or can we add, an hide signal as well?

I mean I want to send a signal to nwg-wrapper so it become invisible but the process is still running.

Consecutive pkill -f -usr1 nwg-wrapper switches the layer both ways.

I got that but meant fully hide as in not visible even if no window is open.

Of course it could be done by just window.hide() / window.show(). Could you give me a use case to justify the new feature?

To be honest this would be feature request 1/2 to implement my use case.

I want to use the wrapper as a sort of waybar substitute in which when I hold a key the wrapper show me information such as Current Window Title, Time and Weather. But when I release it the wrapper is hidden.

It is already possible to do something like that but I would enjoy to have my background fully visible when no window is open.

My second feature request would be an update signal or an update frequency. So the wrapper can be running in the background but updating time and weather at predetermined frequency.

Couldn't the latter be done inside the script?

I'll take a closer look at this soon. I had some surgery done last Friday, and can't focus well enough on the code at the moment. Will get back to it as soon as I can.

Yeah, thinking about it more deeply I think I can just send a kill signal when I release the key. Will try that.

I wish you the best recovery. Hopefully everything went well in your procedure.

So, testing the idea of killing and reopening I remember the problem I was facing. It is slow.

Things like requesting weather condition takes like 1s which beats the purpose of being a quick reference. If I could update it I can open the quick reference and let the weather update arrives when it can.