Add wrapper for vscode for better XDG compliance
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
8366509d59
commit
4b5ac28369
4 changed files with 39 additions and 0 deletions
|
@ -73,6 +73,7 @@ CONFIG_LINKED_FILES_HOME=(
|
|||
".config/zsh"
|
||||
".config/kitty"
|
||||
".local/bin"
|
||||
".local/share/applications"
|
||||
".local/share/gnupg/gpg.conf"
|
||||
".local/share/gnupg/dirmngr.conf"
|
||||
)
|
||||
|
@ -96,4 +97,7 @@ for file in "${!CONFIG_LINKED_FILES[@]}"; do
|
|||
rm -rf "${file}" |& output::debug
|
||||
ln -fs "${CONFIG_LINKED_FILES[${file}]}" "${file}" |& output::debug
|
||||
done
|
||||
|
||||
update-desktop-database ~/.local/share/applications
|
||||
|
||||
output::success "Successfully created symlinks"
|
||||
|
|
14
system/.local/bin/code
Executable file
14
system/.local/bin/code
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# code
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin@kaderli.dev>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Wrapper script for code to use XDG directories
|
||||
#
|
||||
# USAGE:
|
||||
# ./code
|
||||
"/usr/bin/code" --extensions-dir "${XDG_DATA_HOME}/vscode/extensions" "${@}"
|
18
system/.local/share/applications/code-oss.desktop
Normal file
18
system/.local/share/applications/code-oss.desktop
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Desktop Entry]
|
||||
Name=Code - OSS
|
||||
Comment=Code Editing. Redefined.
|
||||
GenericName=Text Editor
|
||||
Exec=code --unity-launch %F
|
||||
Icon=com.visualstudio.code.oss
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
StartupWMClass=Code
|
||||
Categories=TextEditor;Development;IDE;
|
||||
MimeType=text/plain;application/x-code-oss-workspace;
|
||||
Actions=new-empty-window;
|
||||
Keywords=vscode;
|
||||
|
||||
[Desktop Action new-empty-window]
|
||||
Name=New Empty Window
|
||||
Exec=/usr/bin/code-oss --new-window %F
|
||||
Icon=com.visualstudio.code.oss
|
3
system/.local/share/applications/mimeinfo.cache
Normal file
3
system/.local/share/applications/mimeinfo.cache
Normal file
|
@ -0,0 +1,3 @@
|
|||
[MIME Cache]
|
||||
application/x-code-oss-workspace=code-oss.desktop;
|
||||
text/plain=code-oss.desktop;
|
Loading…
Add table
Add a link
Reference in a new issue