From 02c4eed1a65a1119aa5e724ba838984c6a254c44 Mon Sep 17 00:00:00 2001 From: David Kebler Date: Sat, 28 Dec 2024 12:14:19 -0800 Subject: [PATCH] add bfse vscode action --- bfs vscode.nemo_action | 102 ++++++++++++++++++ ..._action => bfs-vscode-selected.nemo_action | 13 ++- bfse.sh | 3 + copypath.nemo_action | 10 ++ 4 files changed, 121 insertions(+), 7 deletions(-) create mode 100644 bfs vscode.nemo_action rename smartgit.nemo_action => bfs-vscode-selected.nemo_action (95%) create mode 100755 bfse.sh create mode 100644 copypath.nemo_action diff --git a/bfs vscode.nemo_action b/bfs vscode.nemo_action new file mode 100644 index 0000000..02caf1c --- /dev/null +++ b/bfs vscode.nemo_action @@ -0,0 +1,102 @@ +[Nemo Action] + +############################################# +#### DEBUGGING: +#### +#### Run Nemo with the environment +#### variable NEMO_ACTION_VERBOSE +#### set to get useful log output +#### for debugging your actions +#### +#### i.e. $ nemo --quit +#### $ NEMO_ACTION_VERBOSE=1 nemo +############################################# + +# Whether this action is active. For troubleshooting. +# Optional - if this field is omitted, the action will be active +#Active=true + +# Standard tokens that can be used in the Name, Comment (tooltip) and Exec fields: +# +# %U - insert URI list of selection +# %F - insert path list of selection +# %P - insert path of parent (current) directory +# %f or %N (deprecated) - insert display name of first selected file +# %p - insert display name of parent directory +# %D - insert device path of file (i.e. /dev/sdb1) + + +# The name to show in the menu, locale supported with standard desktop spec. +# **** REQUIRED **** +Name=Bind VSCODE Current Dir + +# Tool tip, locale supported (Appears in the status bar) +Comment=Bind mount current directory for access then start VSCODE Editor + +# What to run. Enclose in < > to run an executable that resides in the actions folder. +# **** REQUIRED **** +#Exec=gedit %F +# Exec=eval "$TERMINAL -- bash -l -c 'bfs_vscode'" +Exec=<./bfse.sh> +# Exec=gnome-terminal + +# Icon name to use in the menu - must be a theme icon name +#Icon-Name=sublime-text + +# Gtk Stock ID to use for the icon. Note if both Icon-name and Stock-Id are +# defined, the Stock-Id takes precedence. +#Stock-Id=gtk-cdrom + +# What type selection: [s]ingle, [m]ultiple, any, notnone, none (background click), or +# a number representing how many files must be selected to display. +# ****** REQUIRED ******* +Selection=any + +# What extensions to display on - this is an array, end with a semicolon +# Single entry options, ending in a semicolon: +# "dir" for directory selection +# "none" for no extension. +# "nodirs" for any selection, but not including directories. +# "any" for any file type, including directories. +# Individual specific extensions can be a semicolon-terminated list +# Extensions are NOT case sensitive. jpg will match JPG, jPg, jpg, etc.. +# **** EITHER EXTENSIONS OR MIMETYPES IS REQUIRED ***** +Extensions=any; + +# What mime-types to display on - this is an array, end with a semicolon +# **** EITHER EXTENSIONS OR MIMETYPES IS REQUIRED ***** +#Mimetypes=text/plain; + +# Separator to use (if any) - add a string to insert between path/url entries +# in the exec line. Optional - if you leave this out, a space is inserted. +# Note you can have trailing spaces here. +#Separator=, + +# Quote type to use (if any) - enclose paths/urls with quotes. Optional - defaults +# to no quotes. +# Can be: single, double, backtick +#Quote=double + +# Dependencies - program executables required for this action to work. Nemo will +# Search in the path for these program(s) and not display the action if any are missing. +# You can also supply an absolute path to a file (i.e. /usr/lib/gvfs/gvfsd-archive) to check +# instead of or in addition to an executable in the path. +# This is an array, separate entries with semi-colon, and terminate with a semicolon. +Dependencies=/opt/bin/vscode; + +# Conditions - semicolon-separated array of special conditions: +# "desktop" current (parent) folder is desktop +# "removable" target (first selection) is removable +# "gsettings " is true +# "gsettings <[eq|ne|gt|lt]> " +# "dbus " exists + +#Conditions=desktop; + +# Escape Spaces - set to true to escape spaces in filenames and uris ($U, $F, $P, $D) +# +# Sometimes this may be preferred to getting raw filenames that must be enclosed in +# quotes. +# +# Optional - by default this is false +#EscapeSpaces=true diff --git a/smartgit.nemo_action b/bfs-vscode-selected.nemo_action similarity index 95% rename from smartgit.nemo_action rename to bfs-vscode-selected.nemo_action index dcf4af8..926a0be 100644 --- a/smartgit.nemo_action +++ b/bfs-vscode-selected.nemo_action @@ -28,18 +28,17 @@ # The name to show in the menu, locale supported with standard desktop spec. # **** REQUIRED **** -Name=Smartgit Current Dir - +Name=Launch vscode with selected # Tool tip, locale supported (Appears in the status bar) -Comment=Start SmartGit with current directory +Comment=Start VSCODE Editor with Selected Directory # What to run. Enclose in < > to run an executable that resides in the actions folder. # **** REQUIRED **** #Exec=gedit %F -Exec=/opt/smartgit/bin/smartgit.sh %F +Exec=/opt/bin/vscode %F # Icon name to use in the menu - must be a theme icon name -#Icon-Name=sublime-text +#Icon-Name=Atom-text # Gtk Stock ID to use for the icon. Note if both Icon-name and Stock-Id are # defined, the Stock-Id takes precedence. @@ -48,7 +47,7 @@ Exec=/opt/smartgit/bin/smartgit.sh %F # What type selection: [s]ingle, [m]ultiple, any, notnone, none (background click), or # a number representing how many files must be selected to display. # ****** REQUIRED ******* -Selection=any +Selection=s # What extensions to display on - this is an array, end with a semicolon # Single entry options, ending in a semicolon: @@ -80,7 +79,7 @@ Extensions=any; # You can also supply an absolute path to a file (i.e. /usr/lib/gvfs/gvfsd-archive) to check # instead of or in addition to an executable in the path. # This is an array, separate entries with semi-colon, and terminate with a semicolon. -Dependencies=/opt/bin/smartgit +Dependencies=/opt/bin/vscode; # Conditions - semicolon-separated array of special conditions: # "desktop" current (parent) folder is desktop diff --git a/bfse.sh b/bfse.sh new file mode 100755 index 0000000..4a1f19b --- /dev/null +++ b/bfse.sh @@ -0,0 +1,3 @@ +# eval "gnome-terminal -- bash -l -c 'bfs_vscode'" +# gnome-terminal -- module_load bindfs; bfs_vscode . +gnome-terminal --profile='bfse' diff --git a/copypath.nemo_action b/copypath.nemo_action new file mode 100644 index 0000000..1436d4c --- /dev/null +++ b/copypath.nemo_action @@ -0,0 +1,10 @@ +[Nemo Action] +Active=true +Name=Copy path +Comment=Copy path to clipboard +Exec=sh -c "echo '%F' | xclip -selection clipboard -rmlastnl" +Icon-Name=link +Selection=one +Extensions=any; +Quote=backquote +Dependency=xclip