matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.58k stars 642 forks source link

Add a menu item `selected` or `checked` option #713

Open ruxpendp opened 3 years ago

ruxpendp commented 3 years ago

It would be great to add a check mark next to some options. Looks like this was requested at some point (#329) and maybe even implemented in the old bitbar (#330)? But it seems like it didn't make it into the reboot.

Love the new life you've breathed into this project as of late!!

leaanthony commented 3 years ago

Would this be just for display purposes?

ruxpendp commented 3 years ago

For me yes; the plugin I'm working on manages its own state. At the moment I'm just rendering check boxes in the text field itself, which actually works just fine but feels less "native" because the look and placement of the checkmark is inconsistent with native menus.

mine

Screen Shot 2021-04-26 at 3 06 35 AM

native

Screen Shot 2021-04-26 at 3 09 58 AM
leaanthony commented 3 years ago

And if you click a checked menu?

magicus commented 3 years ago

Then xbar exec:s whatever it should and then refreshes, and it's up to the script do determine if the check mark should be removed..?

I'm thinking this would be a good extension, and just for display purposes, as stated above.

ruxpendp commented 3 years ago

Magicus is correct – when you click on the checked menu no extra data needs to get passed from xbar or anything. All this feature would be is a setting to display that menu item with a check box (checked=true or something), and that’s it.

matryer commented 3 years ago

@leaanthony We should add this. Who fancies implementing it?

leaanthony commented 3 years ago

Should be relatively easy as checked is already supported in Wails

keremgocen commented 3 years ago

I’m up for it if no one else took it already 🧇

bicaluv commented 2 years ago

May I ask if the checked option is already implemented? Didn't see it in the doc.