SOLVED LM19-64-cinn Custom Nemo action not appearing on right-click menu

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
sadhu
Level 5
Level 5
Posts: 590
Joined: Fri Nov 22, 2013 9:48 am
Contact:

SOLVED LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by sadhu » Mon Oct 07, 2019 3:37 am

I have a symbolic link for /home/sadhu/.config/nemo/ pointing to /ddr/shared_configuration/nemo

I created the following nemo action, which is saved as du.nemo_action in folder nemo/actions

Code: Select all

[Nemo Action]
Name=Disk Usage
Comment=Gives total disk usage for selected file(s)
Exec=/ddr/bin/mydu %U
Extensions=any
Selection=notnone
Quote=double
Active=true
The action does not appear, even after I have reloaded nemo.

The mydu script is simple, and it works: du -hc $1 | tail -n1 | xargs notify-send

I have created nemo actions before, but I've lost them and now I can't seem to get this one to work.


Thanks,
Last edited by sadhu on Wed Oct 09, 2019 2:25 am, edited 1 time in total.
sabbe sattā bhavantu sukhitattā. LN 19.2-64 Cinn 3.6.7, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:Dell Inspiron 15-3000, Core i3, 4G RAM Intel Gfx

User avatar
smurphos
Level 13
Level 13
Posts: 4634
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by smurphos » Tue Oct 08, 2019 1:30 am

Can you clarify? Is the issue the action not appearing in the context issue when you have files / folders selected or the notification not appearing when you select the action?

I can't reproduce the first issue - the action appears in the context menu.

I'm not sure %U is the right parameter to pass though - %F works my end, along with using "$@" in the script so that multiple selections are actually supported. As %F passes multiple selections space delimited, $1 in the script will only ever pick up the first selection. $@ will collect all arguments.

Code: Select all

[Nemo Action]
Name=Disk Usage
Comment=Gives total disk usage for selected file(s)
Exec=<scripts/du.sh %F>
Extensions=any
Selection=notnone
Quote=double
Active=true

Code: Select all

#!/bin/bash
du -hc "$@" | tail -n1 | xargs notify-send
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

sadhu
Level 5
Level 5
Posts: 590
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by sadhu » Tue Oct 08, 2019 11:23 am

Thanks for the tip re "$@"

This is the content of part of my .config/nemo/actions directory

Code: Select all

-rw-rw-r-- 1 sadhu sadhu  147 Oct  7 12:46  du.action
-rw-rw-r-- 1 sadhu sadhu  162 Oct  7 13:03  du.nemo_action
I didn't know which name (action or nemo_action) was proper, so both are included. I've tried naming the direcory nemo/action and nemo/actions but in both cases it still doesn't work.

I'll try in LM18.3 and see what happens. Works OK in L18.3-64-cin

Scratching my head....

Here's what the context menu looks like:
Screenshot from 2019-10-08 20-41-19.png
sabbe sattā bhavantu sukhitattā. LN 19.2-64 Cinn 3.6.7, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:Dell Inspiron 15-3000, Core i3, 4G RAM Intel Gfx

User avatar
smurphos
Level 13
Level 13
Posts: 4634
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by smurphos » Tue Oct 08, 2019 11:59 pm

Doh - I should have read your first post properly instead of getting stuck into how the action worked - the actions folder should be

~/.local/share/nemo/actions not ~.config/nemo/actions

The correct extension for the action file is *.nemo_action

As an aside I maintain a small github repo of useful actions - do you mind if I add your action or a variation of it to that repo?

https://github.com/smurphos/nemo_action ... on_scripts
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

sadhu
Level 5
Level 5
Posts: 590
Joined: Fri Nov 22, 2013 9:48 am
Contact:

Re: LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by sadhu » Wed Oct 09, 2019 2:25 am

Thanks Smurphos!

What a compliment -- that you wish to add my action to your repo! If you could send me a copy of your version I'd be grateful. Or else a link to it.

Duh is right! The nemo_sample_actions file should really specify this. But there were probably some sites that mentioned it, but missed by skim-reading.

I no longer read anything thoroughly... :( See https://www.theatlantic.com/magazine/ar ... id/306868/


Be Well and Happy
-Sadhu
sabbe sattā bhavantu sukhitattā. LN 19.2-64 Cinn 3.6.7, Mobo: ASUSTeK STRIX B250G GAMING v, Dual core Pntm G4560, Intel Gfx. Laptop:Dell Inspiron 15-3000, Core i3, 4G RAM Intel Gfx

User avatar
smurphos
Level 13
Level 13
Posts: 4634
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: LM19-64-cinn Custom Nemo action not appearing on right-click menu

Post by smurphos » Sat Oct 19, 2019 4:32 am

sadhu wrote:
Wed Oct 09, 2019 2:25 am
Thanks Smurphos!

What a compliment -- that you wish to add my action to your repo! If you could send me a copy of your version I'd be grateful. Or else a link to it.
Here is it. I went with a zenity window with a list of the selection rather than a notification and have added link support...

https://github.com/smurphos/nemo_action ... age-action

Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

Post Reply

Return to “Software & Applications”