Comments (7)
Consider checking out progrium/topframe
Thanks for link, I didn't know this existed. I said hi, and added a readme link.
from hudkit.
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.
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.
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.
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.
@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.
@anko Great! Thank you.
from hudkit.
Related Issues (16)
- Hot cool demonstration GIF in the readme HOT 2
- multi-monitor support seems to not work HOT 5
- "Frame load interrupted" error when loading pages directly from filesystem, with the `file://` protocol HOT 1
- Compiling with Nix toolchain HOT 4
- shell subprocessing + keyboard support? questions HOT 6
- Hudkit going behind windows? HOT 3
- Overlay extends off-monitor HOT 2
- On WSL2: Cannot clickthrough example hud HOT 1
- multi-display bug and feature request HOT 3
- Add support for Wayland (if needed) HOT 5
- Feature request: Recognise keyboard button presses globally, and pass them to addEventListener in page JS HOT 1
- Continuous integration testing HOT 6
- Research brain-dump: Possible implementation paths for handling input events while also passing them through HOT 1
- The JS API is callback-based; async/await would be prettier HOT 1
- Feedback on using with Linux Mint (mentioning clang in dependencies is necessary?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hudkit.