Skip to content

Commit

Permalink
Copy VS code desktop file (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngarside authored Nov 12, 2023
1 parent 296947c commit 197f35e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions distrobox/containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ RUN mkdir /opt/nuget \

# Copy configuration files.
COPY git.conf /etc/gitconfig
COPY vscode.desktop /opt/desktop/vscode.desktop
COPY vscode-keybindings.jsonc /opt/code/data/User/keybindings.json
COPY vscode-settings.jsonc /opt/code/data/User/settings.json

Expand Down
5 changes: 5 additions & 0 deletions distrobox/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ sudo --shell --user nathan -- <<EOF
code --extensions-dir /opt/code/extensions --install-extension PKief.material-icon-theme --user-data-dir /opt/code/data
EOF

# Copy desktop files.
sudo --shell --user nathan -- <<EOF
cp /opt/desktop/vscode.desktop ~/.local/share/applications/vscode.desktop
EOF

# Disable init service.
systemctl disable init
1 change: 1 addition & 0 deletions distrobox/vscode-settings.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"*.meta": "json",

// Treat configuration-like files as if they were 'ini'.
"*.desktop": "ini",
"*.rc": "ini",
"*.repo": "ini",
"*.restext": "ini",
Expand Down
15 changes: 15 additions & 0 deletions distrobox/vscode.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This is free and unencumbered software released into the public domain.

[Desktop Entry]
Categories=TextEditor;Development;IDE;
Comment=Code Editing. Redefined.
Exec=/usr/bin/distrobox enter --name distrobox -- code --extensions-dir /opt/code/extensions --user-data-dir /opt/code/data
GenericName=Text Editor
Icon=code
Keywords=vscode
MimeType=text/plain;inode/directory;application/x-code-workspace;
Name=Visual Studio Code
StartupNotify=true
StartupWMClass=Code
TryExec=/usr/bin/distrobox
Type=Application

0 comments on commit 197f35e

Please sign in to comment.