Skip to content

Instantly share code, notes, and snippets.

@sr229
Created August 27, 2019 11:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sr229/3f0496dfdfeee7cbc1c93b496d880877 to your computer and use it in GitHub Desktop.
Save sr229/3f0496dfdfeee7cbc1c93b496d880877 to your computer and use it in GitHub Desktop.
Silverblue delegate script for VSCode
#!/bin/sh
# Copyright 2019 (c) Ayane Satomi
# Public Domain
#
# Delegate Script for VSCode
# This makes sure VScode only runs in a Toolbox container.
# This only works with a default container.
FEDORA_DEFAULT_CONTAINER="fedora-toolbox-$(whoami)-30"
if [ -z "$@" ]; then
# regular toolbox enter
toolbox enter -c "$FEDORA_DEFAULT_CONTAINER"
else
# if there is a command, execute it non-interactively.
toolbox run -c "$FEDORA_DEFAULT_CONTAINER" "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment