Skip to content

Instantly share code, notes, and snippets.

@MehulBawadia
Created June 18, 2025 15:06
Show Gist options
  • Save MehulBawadia/bbf2ad3c3587f453f2b8265e751ef3b7 to your computer and use it in GitHub Desktop.
Save MehulBawadia/bbf2ad3c3587f453f2b8265e751ef3b7 to your computer and use it in GitHub Desktop.
Open external terminal from VS Code - Fedora Workstation 42
#!/bin/bash
# Get the project root path from the first argument passed by VS Code
PROJECT_ROOT="$1"
# Change to the project root directory
cd "${PROJECT_ROOT}" || { echo "Failed to change directory to ${PROJECT_ROOT}" >&2; exit 1; }
# Launch Ptyxis in a new window
ptyxis --new-window
# If Ptyxis itself exits, the script will also exit.
# No need for 'exec ptyxis' here unless you want the script to replace itself with ptyxis
# which might complicate error handling or debugging if ptyxis fails to launch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment