Skip to content

🎉 Add More Fixed Menu Positions - #1458

Merged
Schneegans merged 27 commits into
kando-menu:mainfrom
Linkazen:feature/#546_Add_More_Fixed_Menu_Locations
Aug 12, 2026
Merged

🎉 Add More Fixed Menu Positions#1458
Schneegans merged 27 commits into
kando-menu:mainfrom
Linkazen:feature/#546_Add_More_Fixed_Menu_Locations

Conversation

@Linkazen

@Linkazen Linkazen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Aims to partially address issue #546

Changes the internal menu property centered, to instead be isFixedPosition.

The position the menu is fixed to, is instead determined by a new fixedMenuPosition variable within the settings. This currently can be set to 5 fixed positions;

  • Centered
  • Top Right
  • Top Left
  • Bottom Right
  • Bottom Left

This is just stored in the config file as a Vec2, which will make implementations of custom positioning for the menu much easier in the future.

Image of new option
image

@Schneegans

Copy link
Copy Markdown
Contributor

Thank you very much for this contribution! It works really well! This would actually resolve #546. Here are some ideas / suggestions:

  • I think useFixedPosition sounds better than isFixedPosition. What do you think?
  • Maybe we should go for custom coordinates right from the beginning? This would make the code a bit easier and would allow for more customization. I guess the extreme corners are not super helpful in many cases, as you cannot easily select items close to the screen borders.
  • Maybe you could auto-hide the position drop-down (or rather the coordinate entry if you implement the idea above) if useFixedPosition == false. Like the menu conditions do this with the coordinates field:
Screencast.From.2026-08-05.20-11-08.mp4

What do you think?

@Linkazen

Linkazen commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Thank you very much for this contribution! It works really well! This would actually resolve #546. Here are some ideas / suggestions:

No problem! This project has been really helpful for me with productivity and otherwise, so happy to help with development on it.

I think useFixedPosition sounds better than isFixedPosition. What do you think?

Yes, I do agree, that is a much nicer name for it.

Maybe we should go for custom coordinates right from the beginning? This would make the code a bit easier and would allow for more customization. I guess the extreme corners are not super helpful in many cases, as you cannot easily select items close to the screen borders.

Yeah, that would work fine. I think including the presets as an option will still be good, as with Anchored Mode enabled I think it would be fine to use, but they should be more minor options compared to custom position. I'll take a look at this and get back to you when I have an implementation.

Maybe you could auto-hide the position drop-down (or rather the coordinate entry if you implement the idea above) if useFixedPosition == false. Like the menu conditions do this with the coordinates field:

Yeah I'll definitely do this, will definitely look nicer than just having it always showing.

Thanks so much for the feedback!

@Linkazen

Linkazen commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Hey @Schneegans, I've made quite a few changes compared to this first version of the PR. Primarily custom values are now shown, and there is a GUI modal, similar to the screen area modal.

image image

These have preset values that you can choose from, as well as picking the area like in the screen area model.

Screencast_20260809_125724.webm

Let me know if this all looks good to you, and if there are any improvements you think could be made, then let me know!

@Schneegans

Copy link
Copy Markdown
Contributor

Hey, this is totally awesome! Thank you so much for implementing this! I'll try to do a thorough review this afternoon, but a quick test revealed that the drag-and-drop picker returns wrong values for me. Maybe because I'm on a multi-monitor setup? Or due to screen-dpi-scaling? I'll look into this, but maybe you see an issue already in the mean time!

@Linkazen

Copy link
Copy Markdown
Contributor Author

Hey, this is totally awesome! Thank you so much for implementing this! I'll try to do a thorough review this afternoon, but a quick test revealed that the drag-and-drop picker returns wrong values for me. Maybe because I'm on a multi-monitor setup? Or due to screen-dpi-scaling? I'll look into this, but maybe you see an issue already in the mean time!

Hmm, that's unfortunate. If I were to guess it's likely to do with this line here (https://github.com/Linkazen/kando/blob/5c6ec54b6f080aa39c5ca1f13a436e7630f35f15/src/settings-renderer/components/menu-properties/ScreenPositionPicker.tsx#L138-L139). Specifically with the info.workArea.width/info.workArea.height, as the cursor position calculation is the exact same as the area picker. Could be an issue with screen scaling, as I had not thought of that at the time.

I tested this on Arch with Wayland KDE, and the picker only seemed to work for me when the settings app was fullscreen, or the cursor was let go of on the settings window. But, I assumed it was just issues with Wayland and would be fine on other platforms, as this same problem with cursor position seemed to happen on the area picker component too when I tried to use it.

I'll try and test it again myself sometime tomorrow and see if I can find the problem. But, if you know what the problem is and can fix it quickly, then feel free to push whatever change is needed.

@Schneegans

Copy link
Copy Markdown
Contributor

The ScreenAreaPicker does not work for me either anymore. I just pushed a fix which makes both work for me again. It's also much simpler this way 😄!

@Schneegans Schneegans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's really just to very small comments. It works now like a charm! Thank you so much!

Comment thread locales/en/translation.json Outdated
"top-left-preset-tooltip": "Set position to top left",
"bottom-left-preset-tooltip": "Set position to bottom left",
"bottom-right-preset-tooltip": "Set position to bottom right",
"picker-tooltip": "Drag this to an area on your screen to set position",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"picker-tooltip": "Drag this to an area on your screen to set position",
"picker-tooltip": "Drag this to a position on your screen to set the position",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Comment thread src/common/index.ts Outdated
Comment on lines +609 to +614
export function fixedMenuPositionToString(menuPos: number): string {
return numericFormatter(String(menuPos), {
fixedDecimalScale: true,
decimalScale: 4,
});
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this different than number.toFixed(4)? If not, we could remove the additional dependency, I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that works, fixed that now.

@Linkazen

Linkazen commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

It seems like both pickers are now broken for me.
Screencast_20260811_104512.webm

I think that this PR is still fine to be merged, as it seems like an issue with the info.pointerX/info.pointerY variables so likely just a KDE problem. But probably needs handling in a different issue.

@Linkazen

Copy link
Copy Markdown
Contributor Author

Yes seems to be an issue with the KWin-integration effect plugin. Changing this line seems to fix my issues.
image

@Schneegans

Copy link
Copy Markdown
Contributor

The problem seems to be that the pointer position is not updated during drag-and-drop operations by the input filter. Using an input spy fixes this issue for me. See here: kando-menu/kwin-integration#5

@Schneegans

Copy link
Copy Markdown
Contributor

Once the linter errors are fixed, I think this is ready to be merged! 🎉

@Linkazen

Copy link
Copy Markdown
Contributor Author

Alright should be fixed now!

@Schneegans
Schneegans self-requested a review August 12, 2026 18:25
@Schneegans
Schneegans merged commit fa4946c into kando-menu:main Aug 12, 2026
11 checks passed
@Schneegans

Copy link
Copy Markdown
Contributor

Thank you once more! I'm looking forward to your future contributions 😉

@Schneegans Schneegans linked an issue Aug 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Fixed Menu Location

2 participants