Giter Site home page Giter Site logo

Comments (7)

anko avatar anko commented on May 24, 2024 1

Consider checking out progrium/topframe

Thanks for link, I didn't know this existed. I said hi, and added a readme link.

from hudkit.

anko avatar anko commented on May 24, 2024

It's doable, but tricky. Braindump:

While GTK has a "keep above" flag (that I'm using here), it has no "keep below" flag, because exactly how to distinguish the set of windows that are part of "the desktop" is not standardised in the full cross-platform context that GTK tries to cover.

On Linux specifically, the EWMH standard specifies a _NET_WM_STATE_BELOW state, intended for windows that are overlaid on the desktop below other windows. So while GTK doesn't expose that underlying (ha ha) functionality, on Linux you could get an X11 handle on the GTK window (gdk_x11_drawable_get_xid) and set that state on it, to make it behave this way in all sane desktop environments.

Or if you wanted to stay at GTK-ish-level, you could use libwnck, and subscribe to the window-stacking-changed event. Whenever anything changes, call wnck_screen_get_windows_stacked and decide on which window is the first one above "the desktop" (you'll have to decide where and how to draw that line), then call gtk_window_set_keep_below on that to make the hudkit window unable to be raised above it.

If you just want to do this for a "carboard + hot glue" prototype to see if the above effort makes sense, the simplest way to do this might be to delete the line that sets the "keep above" flag, recompile, and start hudkit on startup. That puts the window just above the desktop, and because the window has override-redirect set, window managers shouldn't raise it when clicked, so any windows that are created after it will always be on top of it. This will definitely break in edge cases though, (e.g. if you restart hudkit, or restart the WM without quitting X, or in WMs that misinterpret "override-redirect" as meaning "this is a right-click context menu; put it on top", etc.).


I'd like to add this functionality at some point. If you hack it up before I do, PR appreciated! ✨

from hudkit.

anko avatar anko commented on May 24, 2024

Related, but maybe not quite what you're asking about: Xwinwrap lets you make whatever window your desktop background. I think the way it works is by parenting it onto the root window.

from hudkit.

vviikk avatar vviikk commented on May 24, 2024

WOWWOW. I like it when a dev is as supportive as this. And will try to use Xwinwrap but will also see if I can play about with your code. Ya see, the reason why I ask this is Gnome shell doesn't allow different wallpapers for different workspaces and there are extensions that change the wallpapaer when you change workspaces. The issue here is that it's a fade animation while the windows 'slide'. It's a weird effect. So I was wondering if I could use an app, that only stays as the bottom of the stack and does nothing but display an image. Maybe I'm reaching out in the wrong direction.

EDIT: Seems like Xwinwrap might be having some issues with Gnome but will test it later after office hours :)
mmhobi7/xwinwrap#5

from hudkit.

anko avatar anko commented on May 24, 2024

It definitely sounds to me like Xwinwrap or similar is the right tool for that. Hudkit does transparency and overlays, but for a background, you would need neither.

from hudkit.

elimisteve avatar elimisteve commented on May 24, 2024

@anko Very cool tool! We need more things like this; I'm glad you're thinking outside the box, which is so rare.

@vviikk Consider checking out https://github.com/progrium/topframe , too 🙂 . Jeff Lindsay (progrium) also thinks big and finds simple ways of doing amazing things; he invented WebHooks, dokku, and more.

from hudkit.

elimisteve avatar elimisteve commented on May 24, 2024

@anko Great! Thank you.

from hudkit.

Related Issues (16)

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.