Shell
Shell copied to clipboard
[Question] Is there a way to have a default click action for a menu?
ive tried:
menu(mode="multiple" separator="after" title=title.copy_path image=icon.copy_path)
{
item(where=sel.count > 1 title='Copy (@sel.count) items selected' [email protected](sel(false, "\n")) keys ='@sel(false, "\n")' image=icon.copy_path)
separator()
//copy path
item(mode="single" title='Copy path' [email protected](sel.path) tip=sel.path image=icon.copy_path keys='@sel.path')
//@sel.parent.len>3 == C:\ or just [Drive Letter]:\ aka not a drive
item(mode="single" title='Copy parent path' [email protected]>3 [email protected](sel.parent) tip=sel.parent image=icon.copy_path)
//copy file name with extension
menu(mode="multiple" title="Copy full name" image=icon.copy_path tip=sel.file.name)
{
item(mode="single" title="Copy full name" where=sel.file.len != sel.file.title.len type='file|dir|back.dir|namespace'
[email protected](sel.file.name) tip=sel.file.name image=icon.copy_path keys='@sel.file.name' vis=hidden default=true)
//copy name
item(mode="single" title="Copy name" type='file'
[email protected](sel.file.title) tip=sel.file.title image=inherit keys='@sel.file.title')
//copy extension
item(mode="single" title="Copy extension" type='file' where=sel.file.ext.len>0
[email protected](sel.file.ext) tip=sel.file.ext image=inherit keys='@sel.file.ext')
}
item(mode="single" type='file' separator="before" find='.lnk' title='Open file location' image=icon.copy_path)
separator
}
ive also tried:
menu(mode="multiple" separator="after" title=title.copy_path image=icon.copy_path)
{
item(where=sel.count > 1 title='Copy (@sel.count) items selected' [email protected](sel(false, "\n")) keys ='@sel(false, "\n")' image=icon.copy_path)
separator()
//copy path
item(mode="single" title='Copy path' [email protected](sel.path) tip=sel.path image=icon.copy_path keys='@sel.path')
//@sel.parent.len>3 == C:\ or just [Drive Letter]:\ aka not a drive
item(mode="single" title='Copy parent path' [email protected]>3 [email protected](sel.parent) tip=sel.parent image=icon.copy_path)
//copy file name with extension
menu(mode="multiple" title="Copy full name" where=sel.file.len != sel.file.title.len type='file|dir|back.dir|namespace'
[email protected](sel.file.name) tip=sel.file.name image=icon.copy_path keys='@sel.file.name')
{
//copy name
item(mode="single" title="Copy name" type='file'
[email protected](sel.file.title) tip=sel.file.title image=inherit keys='@sel.file.title')
//copy extension
item(mode="single" title="Copy extension" type='file' where=sel.file.ext.len>0
[email protected](sel.file.ext) tip=sel.file.ext image=inherit keys='@sel.file.ext')
}
item(mode="single" type='file' separator="before" find='.lnk' title='Open file location' image=icon.copy_path)
separator
}
Regarding the first default=true, @RubicBG mentioned this on discord:
I think it last worked in version 1.8.1 when the whole menu was loaded at once, then moudey made the submenus load on call which made the menu run faster but apparently this method misses that option you want. I let him know but he has not found a solution by now
Regarding the second one, It's not possible to assign a command to a menu.
yea i read the docs and also figured the second one wont work. welp its fine for now hope it will comeback oneday