Code Monkey home page Code Monkey logo

nwg-wrapper's Introduction

Hi, Iā€™m Piotr - a middle-aged clerk and after-hours FOSS developer. Iā€™m interested in Linux, Wayland & GTK.

  • I use sway and Hyprland on Arch Linux;
  • I have been working on the GTK shell for sway and Hyprland called nwg-shell;
  • I prefer python to shell scripting and golang to C.

How to reach me:

  • Join the nwg-shell Discussions, or
  • submit an issue on GitHub on the appropriate project page, or
  • find me in the nwg-shell Matrix space, or
  • drop me a line by email.

Do not invite me to a live chat, unless you have diction like sir John Vincent Hurt. I'm quite useless at listening to English.

If you'd like to buy me a coffee, you may use GitHub Sponsors (link in the left column) or Liberapay:

Donate using Liberapay

nwg-wrapper's People

Contributors

bhepple avatar ever-stream avatar melihdarcanxyz avatar nwg-piotr avatar xpmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nwg-wrapper's Issues

Signalling 8 to refresh doesn't work

As the title says, script doesn't refresh when I signal 8 with pkill. But instead, if I run nwg-wrapper with --sig_refresh 7 flag, it does work if I signal 7. I have no idea why. Also, 7 is just random and 8 is the default of nwg_wrapper. Any help appreciated. Thanks.

Document power usage

Thank you for having written this great piece of software!

I use nwg-wrapper to display the time on my desktop (and nothing else). The script run is

time=$(date +'%H:%M')
day=$(date +'%A, %e %b')

cat<<EOF
<span size="60000" foreground="black" weight="light"> $time </span>
<span size="35000" foreground="black" weight="light">  $day </span>
EOF

To appear nicely synchronous, I set the refresh time to 100 i.e. 10 refreshes per second.

I only realised a long time afterwards, that this is costs a lot of energy: 2 Watts (perhaps over proportionally so?)

My laptop's base energy consumption is around 7 Watts. Light usage uses around 10 Watts.

With nwg-wrapper -r 100 power consumption was around 2 Watts higher. nwg-wrapper -r 5000 costs only 0.1 Watts.

It seems very high, that 10fps refreshes costs, ~30% of the energy to run the rest of the OS(?)

My particular problem is solved, by setting a lower refresh rate. However, perhaps this is something that should be documented?

CAVA support

Is it possible, to display cava with this? Or any other program?
Thanks in advance

support for application windows

Hey there,
I've been searching a tool for quite a while now, that allows me to put an application window into any screen layer.
I think it would be a perfect fit for this project. It would allow me to use programs like mpv (bad example, already has a standalone implementation) as a wallpaper.
Could this be done?
Thanks!

port i3bgwin

it would be nicer if we can have a real terminal embedded in the background like i3bgwin which i've been searching for alternative since i started using sway ayear ago

Support specifying output by "make model serial", not just name

The output names (like eDP-1) are unpredictable, and depend on the order in which you connect your external monitors. So the established way of binding programs and settings to outputs is to address the monitors by "Make model serial" (for example, Goldstar Company Ltd LG IPS FULLHD 604NTDV33634) which are unique. This is how Sway and Kanshi do it, for example.

Can you please add the support for this to nwg-wrapper? I'd like to be able to do nwg-wrapper -o 'Goldstar Company Ltd LG IPS FULLHD 604NTDV33634' and have the overlay drawn on the specified monitor.

https://git.sr.ht/~emersion/kanshi/tree/eddaeac2/item/main.c#L25

Here, you can find an example of how Kanshi implements the matching logic. (Maybe you could even borrow the code from there.)

Ivan

Adding actions

Hi.

I'd like to add some actions to a nwg-wrapper to use it as a real desktop widget. For example, open a web link when I clicks or to change workspace with mouse wheel via swaymsg, etc. Is it possible?

Thanks for the code!

I need to sleep 1

I've found that if I 'sleep 0.5' after nwg-wrapper and before running swaylock/gtklock, it doesn't always display correctly. Increasing the sleep to 1 second fixes it. I daresay this depends on the CPU speed etc, but it might be a good idea to document it in the README

Allow different layer for wraper

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

Display on top of swaylock?

I use swaylock to display a random image while locked:

swaylock --daemonize --image "$IMAGE" &

Is there any way to have nwg-wrapper display some text 'on top of' that image. I tried --layer=2 but it does not display (until I unlock!).

Sixel support

It is almost ready to be full-on conky support, but one crutial pice is missing - graphs.
And this "renderer" being so rightfully unixway I don't see a justification to implement something like custom protocol, no, but I also see that there is no way to render output of programs that already can draw them.
Therefore I ask for sixel suppopt, that would make it a lot easier.
And you can also render regular images with it.

Config files

I want to able able to define a config for wrapper instance in .ini file, so that this (for example) very verbose string
nwg-wrapper -s swaylock-time.sh -o eDP-1 -r 1000 -c timezones.css -p right -mr 50 -a start -mt 0 -j right -l 3 -sq 31
can become that
nwg-wrapper ~/.config/nwg-wrapper/time.ini

with config file being in that format

[wrapper]
script=swaylock-time.sh
output=eDP-1
refresh=1000
css=timezones.css
position=right
margin_right=50
margin_top=0
justify=right
layer=3
sig_quit=31

I can implement that feature.

Upgrade to Python 3.10

How can we make this happen?
I upgraded python to 3.10 on my computer and NWG stopped working due to pygobject not being compiled to support python 3.9.

I wanna help. :D

--layer needs doco

There's a note in the README about layer 3, but nothing in 'nwg-wrapper --help' output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.