Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions vscodium@trymeouteh/files/vscodium@trymeouteh/examine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

## Here we handle exception.
## We will catch if currently right clicked directory actually exists,
## ... Or is it the root filesystem?
WORKING_DIR=$1


## IF: WORKING_DIR is empty (eg. recents, trash or search results) --- does not exist
## OR: WORKING_DIR is / (eg. favorites or root filesystem) --- we don't touch root filesystem
if [[ -z "$WORKING_DIR" || "$WORKING_DIR" == '/' ]]; then

# THEN: We exit with err. code 1, so that Nemo action will receive err. condition
# ...and won't continue executing, aka. won't show VSCode menu entry at all.
exit 1
fi

exit 0
3 changes: 2 additions & 1 deletion vscodium@trymeouteh/[email protected]_action.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ _Name=Open in VSCodium
_Comment=Open VSCodium in the selected folder
Exec=codium %P
Icon-Name=vscodium
Selection=Any
Conditions=exec <vscodium@trymeouteh/examine.sh "%P">;
Selection=None
Extensions=dir;