feat: Configurable anchor positioning for cosmic launcher (top, center). - #405
feat: Configurable anchor positioning for cosmic launcher (top, center).#405l-const wants to merge 1 commit into
Conversation
|
@maria-komarova do you have any thoughts/input on this? at the moment, it is set only by config files. here is how it looks with all 3 positions set (top, center, bottom) : |
|
I am not sure I can see the benefit of having bottom position but it seems fine to add top center and center to the config. |
|
I generally tried to make the text input close to the center which is exactly the opossite of what your describing: @git-f0x . I do admit the bottom might not be that useful @maria-komarova , i just tried to take into consideration what other lauchers do without creating to much future tech debt for the maintaners. Maybe an additional Ok, so i think I am close to 22.04 "center" configuration from what i've seen here: https://youtu.be/Cs4QRBm0C_8?t=308 . Of course, it would be readjusted in the future i just care to have the option to have it in the center. |
|
Personally, the current Center looks to low and isn't good for ergonomics (since the top of the screen should be in line with eyes per OSHA guidelines, so the text input shouldn't be too low). Also the arbitrary margin numbers might not scale well with different resolutions or aspect ratios. |
2e4d739 to
949317a
Compare
|
Ok, so I updated to remove the extra config and the "bottom" option as you suggested @git-f0x @maria-komarova @garrettjwilke . There is only the |
949317a to
5166613
Compare
|
If you anchor to both the top and bottom edges instead, you'd probably have a much easier time positioning the text input in the center. You could use a column with a vertical space and container heights set using FillPortion to adjust the height in a way that consistently places the input. You'd have to add mouse areas to catch the input above and below the launcher interface so that you can detect mouse buttons in those areas and dismiss the launcher though. |
5166613 to
91dfea8
Compare
That can cause issues where the launcher eats a click when being dismissed, rather than being dismissed and clicking whatever was clicked at that point (e.g. an applet). |
|
I mentioned it on mattermost, but I believe input regions could be used instead and wouldn't eat a click. |
|
Any updates? |
517887d to
a61d379
Compare
@KodeBarista There were some recent additions: a new dummy wayland surface that when is blurred kind of breaks my previous solution with the constraints to make the prompt centered despite the search result numbers, so it is kind of broken. Regardless of that, @wash2 has discussed a totally different solution for that anyway so perhaps i should close this PR. I am still trying to find a way for my fork as I think this is low on the priority list of the cosmic team. The new issue with the blurred "dummy" surface from the recent changes can be seen in the video:
Video_2026-07-21_19-40-05.mp4 |
a61d379 to
932b9a3
Compare




Fixes #268
Why? :
Similar configurations for other launchers: https://github.com/davatorium/rofi/blob/next/config/config.c#L80-L90 , https://github.com/abenz1267/walker/blob/master/src/config.rs#L165-L171 .
Docs: https://davatorium.github.io/rofi/guides/Positioning/theme3-positioning/
For me, without being able to put it in the center, this doesn't feel like a launcher. Also, from the perspective that this app could be used by other DEs that won't have the limitations or the design of the COSMIC DE in mind, making the app more friendly to other desktops would be beneficial.
alt-tab-switch-center.mp4
workspace-view.mp4
The file is not created by default(not sure why but is not needed for the default) , the path is
~/.config/cosmic/com.system76.CosmicLauncher/v1/anchor.The distribution wide settings under
/usralso works, and is read as fallback at startup. ( e.g. :echo "center" | sudo tee /usr/share/cosmic/com.system76.CosmicLauncher/v1/anchor)Testing
cargo build --release/usr/bin/cosmic-launchersudo mv ./target/release/cosmic-laucher /usr/bin/cosmic-launcherpkill cosmic-launcher(cosmic-sessionwill restart launcher from the new binary)anchoron the new config folder and change values(center|top).