-
Notifications
You must be signed in to change notification settings - Fork 14
Feat/cosmic applet #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This is awesome, thank you! I'll start digging into it next week. |
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
86c4099 to
f8509ad
Compare
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
4b5117e to
85fa27a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the icons have a weird box shadow thing going, is that normal for cosmic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you send a screenshot because i don't see any shadow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also be just a rasteriser issuer / artifact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? On X11, the startup latency is just terrible so keeping the application around is necessary to avoid the stuttery feeling of opening the clipboard. IIRC on Wayland startup was so fast that it didn't make a difference. If that's the case, I think I'd prefer to avoid keeping the application around to not hog memory (for example image buffers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The application keeps running anyway, because the icon in the top panel wouldn't show up otherwise. I could clear the data saved in memory when closing the popup do reduce the memory usage in idle. The IPC is also required to make it possible to open the clipboard with a global keyboard shortcut, because it is running in the panel continuously and not exited when the popup is closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that makes sense. I'll switch to using egui's notification mechanism with your toggle idea which is quite nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: get rid of watcher utils crate and move into SDK under feature gate. Move startup code from egui into SDK under feature gate. Use toggle command to try and open existing instance with PID check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to keep in mind that cosmic applets are launched once per screen where the panel is enabled and the toggle needs to be received by multiple apps and not just by one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, I thought that sounded crazy but you're right, I see every applet duplicated. Like surely it can't be that hard to make clicking the icon open one process and move the window around appropriately? Maybe there's an issue with dpi changes? Seems like a waste of resources.
Anyway, the current approach is broken though: if I have 3 monitors, I don't want the shortcut to open up the popup on all 3 monitors. Do you know if there's a way to detect which display you're on? Or more accurately which status bar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, one insane idea would be to make the main GUI not an applet but rather just be a normal libcosmic app. And then the applet is actually just a thin wrapper that launches said GUI. This is maybe nice because you can then keep the clipboard open and move it around rather than having it pinned to the panel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The weird part is it only opens on one monitor when pressing the shortcut at the moment. And i checked, the toggle is received by every instance of the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And even weirder it always opens on the correct monitor
|
Oh fascinating, I wonder how that works.
I'm still thinking of doing the non-applet + applet shortcut idea as the
primary benefit I see from this project is using libcosmic to get themeing
and use the same design language as the OS. Or do you think there's an
appeal to having the application literally displayed in an applet panel?
Hmmm, I guess if you're using tiling then the normal application will
squeeze in and be irritating as opposed to the floating window. So maybe
actually this does need to stay in the applet. I'll think about it.
…On Thu, Oct 23, 2025, 03:04 ProviDev ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
On cosmic-applet/src/ipc.rs
<#73 (comment)>
:
And even weirder it always opens on the correct monitor
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACINCJCRSD4LOVIIVAC6FM33ZB4XHAVCNFSM6AAAAACJRT3H5SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGNRYGUYDCNBVGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
You don't need a seperate app for the icon because there is https://github.com/pop-os/cosmic-applets/tree/master/cosmic-panel-button which takes a desktop file as an argument and just is a simple app that displayes an icon in the panel. The cosmic-launcher and also other apps in cosmic work like this. The only big thing you need to change for that would be to integrate the settings into the main window because there is no right click for the cosmic-panel-button when you use it. |
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
cosmic-applet/src/logging.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the journald logging? When the app is running in normal release model an is installed on a system you can't get any logs from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning on getting rid of all logging. Anything worth logging in a GUI should be surfaced to the user IMO. The rest is just for devs and you can add pruntlns as neede when debugging stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but printlns are useless when testing the application launched by cosmic directly in the panel, because you don't have the stdout of the process
cce0aca to
510e35f
Compare

Add an applet for the Cosmic Desktop. Closes #11
Functionality:
ringboard-cosmic-applet toggleKnown Issues (also documented in the README of the applet):