Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: nemo actions submenus #3228

Open
Frunkh opened this issue Apr 30, 2023 · 11 comments
Open

Feature request: nemo actions submenus #3228

Frunkh opened this issue Apr 30, 2023 · 11 comments

Comments

@Frunkh
Copy link

Frunkh commented Apr 30, 2023

 * Nemo version 4.4.2
 * Is issue with desktop and windowed nemo
 * Distribution - Zorin OS 16.2
 * Graphics hardware *and* driver used NVIDIA 1080ti. Driver 525
 * 64 bit

Issue
When defining custom nemo actions, I am unable to provide a parent menu item name.
I can only make individual menu items but I'd love to group certain menu items under a parent menu.

@Frunkh Frunkh changed the title Feature request: nemo actions submenu's Feature request: nemo actions submenus Apr 30, 2023
@amiga-500
Copy link

Yea ive been wondering the same for years. Seems like an oversight not to allow custom submenus.

@devingfx
Copy link

Yep! +1

Nemo actions are so simple and practical that you end up to have hundreds of them, grouping is a must have!

@ramuyk
Copy link

ramuyk commented Jun 9, 2023

I completely agree that submenus for Nemo actions should be a must-have... In my perspective, Nemo is much more responsive and faster than Dolphin in multiple aspects... But I end up sticking with Dolphin because after having 30 actions we can't handle them properly without submenus...

@Jeremy7701
Copy link
Contributor

As someone who hasn't really found a use for nemo actions (or scripts) - well apart from just one action.
I'd be interested to see a few examples of their use - perhaps this would have a positive effect on a sub-menu feature?

@Frunkh
Copy link
Author

Frunkh commented Jun 9, 2023

As someone who hasn't really found a use for nemo actions (or scripts) - well apart from just one action. I'd be interested to see a few examples of their use - perhaps this would have a positive effect on a sub-menu feature?

I love to create my own custom actions for my own ease of use.
Here are some examples:

Image Processing

  • Resize Image: An action that calls a script to resize selected images to a user-specified size.
  • Compress Image: An action to compress the selected images to reduce their file size.
  • Convert Image Format: An action to convert the selected images to a different format like JPEG, PNG, etc.
  • Image Metadata: Show metadata of the selected image.

Developer tools

  • Open with Kate
  • Run
  • Git GUI

Let your imagination run wild, but if I put all of these things in the main menu, the whole thing will be huge and messy.

@Jeremy7701
Copy link
Contributor

Very Useful - but I can see that submenus would be desirable (although it might be possible to restrict some actions according to file type).

@devingfx
Copy link

@Jeremy7701 Here are my use cases:
As I'm experimenting with AI image tools like Stable Diffusion, I use nemo-actions to send image(s) to several APIs, it would be nice to tidy up the image file context menu (sorted randomly):

  • Get PNG info
  • Get BLIP captiioning
  • Get CLIP interrogator
  • Get DeepDanbooru prompt
  • Send to img2img
  • Send to inpaint
  • Send to outpaint
  • Send to upscale 2x
  • Send to upscale 4x
  • Remove background
  • Get background mask

It would be good to have:

  • Get metadatas >
    • PNG info
    • BLIP captiioning
    • CLIP interrogator
    • DeepDanbooru prompt
  • Send to SD >
    • img2img
    • inpaint
    • outpaint
    • upscale >
      • 2x
      • 4x
  • Background >
    • Remove
    • Get mask

@BloodyRain2k
Copy link

BloodyRain2k commented Dec 30, 2023

As someone who recently started looking into Actions and Scripts, I am too very confused that there's no option for grouping. I even wanted to try scripts instead, purely because they get a submenu, but I can't even find an instruction on how to create them...
I really wish that there would be the option for custom submenu groups, because I already know at this point that I'll need them.

@Jeremy7701
Copy link
Contributor

Scripts have some help text for this:-
Navigate to ~/.local/share/nemo/scripts/ and click on the 'more info' button;

Screenshot from 2023-12-30 12-52-41
This should display

Scripts
When executed from a local folder, scripts will be passed the selected file names.
When executed from a remote folder (e.g. a folder showing web or ftp content),
scripts will be passed no parameters.

In all cases, the following environment variables will be set by Nemo, which the scripts may use:

NEMO_SCRIPT_SELECTED_FILE_PATHS: newline-delimited paths for selected files (only if local)
NEMO_SCRIPT_SELECTED_URIS: newline-delimited URIs for selected files
NEMO_SCRIPT_CURRENT_URI: URI for current location
NEMO_SCRIPT_WINDOW_GEOMETRY: position and size of current window
NEMO_SCRIPT_NEXT_PANE_SELECTED_FILE_PATHS: newline-delimited paths for selected files
 in the inactive pane of a split-view window (only if local)
NEMO_SCRIPT_NEXT_PANE_SELECTED_URIS: newline-delimited URIs for selected files
 in the inactive pane of a split-view window
NEMO_SCRIPT_NEXT_PANE_CURRENT_URI: URI for current location in the inactive pane of a split-view window

@BloodyRain2k
Copy link

Yes I did read that text. But the fact that I added two scripts and the submenu entry Scripts didn't even show up until half a day later, because I needed to restarted Nemo due to having severely broken something somehow, threw me off. Because the Actions I created showed up immediately.

But even then, there's the problem that it's apparently not possible to give the scripts conditions when they should show up and when not.
Or if there is, then the note doesn't point it out. Which is why I'd prefer a sample script there too, like there's a sample action. Even if it's just a shell script that echo's the filenames to a textfile.

@Jeremy7701
Copy link
Contributor

I suspect you would need to restart nemo to enable scripts - but scripts seem aimed at multiple files whilst actions seem aimed at single files and allow you to restrict them by mime type or "extension".

I found an example of a simple script at https://itsfoss.com/nemo-tweaks/ which reads:

#!/bin/bash
name=$(zenity --color-selection --show-palette --title Color\ Select)
copyq add $name

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

No branches or pull requests

6 participants