Coming from Nautilus, I loved Nemo Actions!
Even though there's a graphical tool for Nautilus Actions, I've found it much more simpler to create Nemo Actions.
It's also so nice to have all those actions and scripts listed in the Preferences (and individually enabled or disabled, etc.)
Now, one more step could bring us closer to perfection in this regard: submenus!
KDE's Dolphin has it, so why not Nemo as well
[Moved to Github] Submenus for Nemo Actions?
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Do not post support questions here. Before you post read: Where to post ideas & feature requests
[Moved to Github] Submenus for Nemo Actions?
Last edited by sadi on Wed Jul 05, 2017 4:44 pm, edited 1 time in total.
Linux Mint 19.3 Cinnamon
Re: Submenus for Nemo Actions?
You can post feature requests to the Nemo developers here: https://github.com/linuxmint/nemo/issues
Re: Submenus for Nemo Actions?
Open nemo and press alt-p and you have the graphical option to enable / disable actions individually.
Re: Submenus for Nemo Actions?
Thank you both!
As a second-time newcomer, I didn't know about LM github repositories; it's a great place for issues, ideas, etc. indeed!
As for Actions GUI, although the one inside Nemo has very limited functionality, I don't miss the Nautilus one really -- a good sample nemo.action does the job just fine (although something more like a tutorial/manual could be better).
As a second-time newcomer, I didn't know about LM github repositories; it's a great place for issues, ideas, etc. indeed!
As for Actions GUI, although the one inside Nemo has very limited functionality, I don't miss the Nautilus one really -- a good sample nemo.action does the job just fine (although something more like a tutorial/manual could be better).
Linux Mint 19.3 Cinnamon
Re: [Moved to Github] Submenus for Nemo Actions?
hi. I'm new to linux mint/bash/aso but want 2 share a possible solution for those - like me - who need to have right click with nemo_action files organized by submenus. the idea is 2 simulate ur own menus on right click. is just a skeleton but is working and prove the idea.
0. apt install yad
1.
2. create the file ~/.local/share/nemo/actions/Custom\ Nemo\ extender.nemo_action
3. put in that file :
4. create the file /home/ciniset/.local/share/nemo/custom/nemoext
5. create the file /home/ciniset/.local/share/nemo/custom/main
and create the file /home/ciniset/.local/share/nemo/custom/Utils
ur ready 4 test now
short explanation:
create nemo_action file who call a bash script from ~/.local/share/nemo/custom/ who read menu file/files from same folder.
link between menu files are made by name. inside files is <name>+<C(for command)/M(for submenu)>+<command/menu info>
2 cents thoughts: it would be very nice if the submenu feature will be implemented in the future, having already the structure for nemo_action/scripts and being (i believe) relatively easy to create extra folder(submenus) in .local/share/nemo/actions containing .nemo_action files.
LAST MINUTE UPDATE
I'm ashamed I didn't look also into scripting capability of nemo
Scripting is solving the whole problem.
Nemo IS great!
0. apt install yad
1.
Code: Select all
mkdir ~/.local/share/nemo/custom
3. put in that file :
Code: Select all
[Nemo Action]
Name=Custom Nemo extender
Comment=Launch custom nemo menu extender
Exec=/home/ciniset/.local/share/nemo/custom/nemoext main
Icon-Name=media-playback-start
Selection=any
Extensions=dir;
Conditions=desktop;
Code: Select all
#! /bin/bash
read_menu_file() {
unset file_name work_string menu line lenght_dim lines_dim histogram
file_name=$1
work_string="$(cat $file_name | cut -f 1 -d "+")"
menu=$(cat $file_name | tr "+" " ")
while read line; do
((histogram[${#line}]++))
done <<< "$work_string"
for length in "${!histogram[@]}"; do
lenght_dim=$(( ${length} * 10 ))
done
lines_dim=$(( ${#histogram[@]} * 28 ))
}
if [ "$#" -ne 1 ]; then
exit # no menu file
fi
pushd . > /dev/null
SCRIPT_PATH="${BASH_SOURCE[0]}"
if ([ -h "${SCRIPT_PATH}" ]); then
while([ -h "${SCRIPT_PATH}" ]); do cd `dirname "$SCRIPT_PATH"`;
SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd > /dev/null
menu_name=$(echo $SCRIPT_PATH"/"$1)
read_menu_file $menu_name
while true; do
ANSWER=`yad --mouse --no-buttons --undecorated --skip-taskbar --width=$lenght_dim --height=$lines_dim --list --separator="+" --no-headers --column=Name --column=Type:HD --column=Function:HD $menu`
type=$(echo $ANSWER | cut -f 2 -d "+")
case "$type" in
"M")
submenu=$(echo $ANSWER | cut -f 1 -d "+")
submenu=${submenu::-4}
read_menu_file $SCRIPT_PATH/$submenu
continue
;;
*)
command=$(echo $ANSWER | cut -f 3 -d "+")
$command &
exit
;;
esac
done
Code: Select all
Firefox+C+firefox
Editor+C+gedit
Terminal+C+gnome-terminal
Utils[=>]+M+Utils
Code: Select all
VirtualBox[=>]+M+VirtualBox
Kalarm+C+kalarm
short explanation:
create nemo_action file who call a bash script from ~/.local/share/nemo/custom/ who read menu file/files from same folder.
link between menu files are made by name. inside files is <name>+<C(for command)/M(for submenu)>+<command/menu info>
2 cents thoughts: it would be very nice if the submenu feature will be implemented in the future, having already the structure for nemo_action/scripts and being (i believe) relatively easy to create extra folder(submenus) in .local/share/nemo/actions containing .nemo_action files.
LAST MINUTE UPDATE
I'm ashamed I didn't look also into scripting capability of nemo
Scripting is solving the whole problem.
Nemo IS great!
Re: [Moved to Github] Submenus for Nemo Actions?
Are you saying there's a simpler solution to the one you proposed above?
If so could you show an example (preferably with a simpler script item than the one you showed, e.g just a command to launch a terminal) ?
Re: [Moved to Github] Submenus for Nemo Actions?
open terminal ( )
cd ~/.local/share/nemo/scripts
echo -e "\n" > termtest
sed -i '1 i #!/bin/bash\nterminal\nexit 0' termtest
chmod +x termtest
U have now termtest executable file in ~/.local/share/nemo/scripts
Just open nemo, right click on desktop, go to Scripts menu and there u'll find termtest.
cd ~/.local/share/nemo/scripts
echo -e "\n" > termtest
sed -i '1 i #!/bin/bash\nterminal\nexit 0' termtest
chmod +x termtest
U have now termtest executable file in ~/.local/share/nemo/scripts
Just open nemo, right click on desktop, go to Scripts menu and there u'll find termtest.