Maccy
Maccy copied to clipboard
Limit the size of the popup but leave older items
I know i can limit the number of items in the list manually, but when i do that, i can no longer access them unless i search for them (which means i remember what they contained). I've seen that in other apps, but wouldn't it be possible to have a submenu under the list the show the rest of the items that Maccy remembers? This way, the menu stays small for most usage but when you need to find an older item, you can still do it even if you don't remember precisely what it was.
How would you find the item if you don't remember what it was? If you remember at least a part of the text, this should be enough, shouldn't it?
Well, if it's for example a phone number, a name or email, a serial number (i sell softwares), it's usually impossible to remember any part of it. I've been using clipmenu for years, and it happened to me hundreds of times to have to copy something i did not remember.
That's why being able to go through the whole list is important even if and i agree, searching through them is good. The other reason why submenus could be useful is that you still get a small popup but it can contain many items.
My 2c:
I find it useful to have an arbitrary tag for pinned entries. I have tons of pinned entries for things like URLs of public facing documentation, contracts, registration and bank account numbers.
What I do now, is put save some text in UPPERCASE:
-- one day all computers will be made this way 🤔 Thanks Alex for this master-work 😊
I second @thysm00's request. I think having the last X items displayed and the rest of them under a submenu would be nice to un-clutter the main menu. I love how ClipMenu handles this:
I think I've found a way to show a smaller popup and then the rest could be scrolled. It will look like this:
Would that work for your case?
Yes, that would definitely work for me! And would indeed be even better than the sub menus!
@p0deje I think the scrollable would work and solve the inconvenience of having a very long list of items.
Another use case is having a weird Unicode character in the history, like a middle dot or something – that cannot be easily searched for.
Scrolling as shown above looks like a great solution! 👍
I was going to suggest this but I am happy to see the author came to the same conclusion.
There are a lot of edge cases when trying to force menu height using confinementRect(for:on:)
:
- It seems like it's completely ignored when showing a popup by clicking on the menu icon.
- It works on the main display, but doesn't on the secondary.
- The direction of the popup needs to be handled manually (e.g. it should draw below the cursor by default, but when the cursor is at the bottom of the screen - it should draw above the cursor).
- Similar to previous, the popup should offset to the left when part of the menu is wider than the screen (e.g. popup when the cursor is near the right edge of the screen).
The dummy reference implementation which limits height to 250px is done by add this to Menu.swift
:
func confinementRect(for menu: NSMenu, on screen: NSScreen?) -> NSRect {
var x: CGFloat = 0
var y: CGFloat = 0
switch UserDefaults.standard.popupPosition {
case "center":
if let screen = screen {
let topLeftX = (screen.visibleFrame.width - menu.size.width) / 2 + screen.visibleFrame.origin.x
var topLeftY = (screen.visibleFrame.height + menu.size.height) / 2 + screen.visibleFrame.origin.y
if screen.visibleFrame.height < menu.size.height {
topLeftY = screen.visibleFrame.origin.y
}
x = topLeftX + 1
y = topLeftY + 1
}
default:
x = NSEvent.mouseLocation.x
y = NSEvent.mouseLocation.y
}
return NSRect(x: x, y: y - CGFloat(250) - 1, width: menu.size.width, height: 250)
}
Given the existing problems, I'm not sure if I find a way to make it work reliably.
An alternative approach could be:
- using more than 1 column for viewing the list of text on the popup menu
- using the arrow down/up keys for selecting the desired text as currently
- using the arrow left/right keys for going forward/backward in the pagination
- moving the shortcut keys ( ⌘1 to ⌘9 ) along the pagination
@p0deje Has there been any progress in implementing this feature? I would love to be able to limit the height of the popup to 20 items, but be able to scroll through my entire history.
Nothing new since my last comment. On Aug 18, 2023, at 14:16, robert-d-94 @.***> wrote: @p0deje Has there been any progress in implementing this feature? I would love to be able to limit the height of the popup to 20 items, but be able to scroll through my entire history.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
This would be awesome!
I think I've found a way to show a smaller popup and then the rest could be scrolled. It will look like this:
Would that work for your case?
This is a very good solution! But i found only at the botton of the screen, this type of popup will function, is it possible to limit all popup height anywhere it appears?