Skip to content

Commit

Permalink
ide-launcher-advanced@adrianopaonessa: New IDE support (Sublime Text) (
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianopaonessa authored Sep 16, 2024
1 parent fae1b54 commit f0afa45
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 13 deletions.
6 changes: 5 additions & 1 deletion ide-launcher-advanced@adrianopaonessa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
### 1.0.4

* New Sublime Text support, now you can open your project with Sublime Text :D

### 1.0.3

New catalan translation (Thanks to [Odyssey][Odyssey] on GitHub)
* New catalan translation (Thanks to [Odyssey][Odyssey] on GitHub)

### 1.0.2

Expand Down
5 changes: 3 additions & 2 deletions ide-launcher-advanced@adrianopaonessa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is the list of the currently available editors.
- Visual Studio Code Insiders
- VSCodium
- VSCodium Insiders

- Sublime Text

## Required things

Expand All @@ -23,4 +23,5 @@ Required commands for each IDE:
- `code` required for Visual Studio Code
- `code-insiders` required for Visual Studio Code Insiders
- `codium` required for VSCodium
- `codium-insiders` required for VSCodium Insiders
- `codium-insiders` required for VSCodium Insiders
- `subl` required for Sublime Text
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vscodeInstalled=true
vsCodeInsiderInstalled=true
vsCodiumInstalled=true
vsCodiumInsidersInstalled=true
sublimeTextInstalled=true

installedNum=0
installedIDEs=()
Expand Down Expand Up @@ -36,6 +37,12 @@ else
installedIDEs+=("VSCodium Insiders");
fi

if ! command -v subl &> /dev/null ; then sublimeTextInstalled=false;
else
installedNum=$((installedNum+1));
installedIDEs+=("Sublime Text");
fi

#########################################
# Check if more than one app is installed
check_more_than_one() {
Expand All @@ -58,23 +65,39 @@ check_more_than_one() {
if [ "$IDE" -eq "$i" ] ; then
echo; echo "Launching ${installedIDEs[$i]}...";

if [ "${installedIDEs[$i]}" == "Visual Studio Code" ] ; then code "${CURRENT_DIR}";
elif [ "${installedIDEs[$i]}" == "Visual Studio Code Insiders" ] ; then code-insiders "${CURRENT_DIR}";
elif [ "${installedIDEs[$i]}" == "VSCodium" ] ; then codium "${CURRENT_DIR}";
elif [ "${installedIDEs[$i]}" == "VSCodium Insiders" ] ; then codium-insiders "${CURRENT_DIR}";
if [ "${installedIDEs[$i]}" == "Visual Studio Code" ] ; then code "${CURRENT_DIR}"; exit 0;
elif [ "${installedIDEs[$i]}" == "Visual Studio Code Insiders" ] ; then code-insiders "${CURRENT_DIR}"; exit 0;
elif [ "${installedIDEs[$i]}" == "VSCodium" ] ; then codium "${CURRENT_DIR}"; exit 0;
elif [ "${installedIDEs[$i]}" == "VSCodium Insiders" ] ; then codium-insiders "${CURRENT_DIR}"; exit 0;
elif [ "${installedIDEs[$i]}" == "Sublime Text" ] ; then subl "${CURRENT_DIR}"; sublime_launched;
else echo;echo "Error: Value not valid, retry";echo;echo "=============================="; check_more_than_one; fi
fi
done

check_more_than_one
else
# Launch the installed one
if $vscodeInstalled ; then code "${CURRENT_DIR}";
elif $vsCodeInsiderInstalled ; then code-insiders "${CURRENT_DIR}";
elif $vsCodiumInstalled ; then codium "${CURRENT_DIR}";
elif $vsCodiumInsidersInstalled ; then codium-insiders "${CURRENT_DIR}";
elif $sublimeTextInstalled ; then subl "${CURRENT_DIR}";
else echo;echo "Error: Value not valid, retry";echo;echo "=============================="; check_more_than_one; fi
fi
}

sublime_launched() {
echo;echo;echo;
echo "==================================================================================";
echo "Sublime Text launched. This window will stay open to prevent the IDE from closing.";
echo "This window will close automatically when Sublime Text is closed.";
echo "==================================================================================";

# Loop until Sublime is closed
while [ -n "$(pgrep -f sublime_text)" ] ; do sleep 1 ; done
exit 0;
}

check_more_than_one

exit 0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "Launch your IDE (VSCode, VSCode Insiders, VSCodium and VSCodium Insiders) within the current directory.",
"description": "Launch your IDE (VSCode, VSCode Insiders, VSCodium, Sublime Text and VSCodium Insiders) within the current directory.",
"uuid": "ide-launcher-advanced@adrianopaonessa",
"name": "Advanced IDE Launcher",
"author": "Adriano Paonessa",
"version": "1.0.3"
"version": "1.0.4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.3\n"
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.4\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/"
"issues\n"
"POT-Creation-Date: 2024-09-10 23:04+0200\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.3\n"
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.4\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/"
"issues\n"
"POT-Creation-Date: 2024-09-10 23:04+0200\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.3\n"
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.4\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/"
"issues\n"
"POT-Creation-Date: 2024-09-10 23:04+0200\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.3\n"
"Project-Id-Version: ide-launcher-advanced@adrianopaonessa 1.0.4\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/"
"issues\n"
"POT-Creation-Date: 2024-09-10 23:04+0200\n"
Expand Down

0 comments on commit f0afa45

Please sign in to comment.