Merge remote-tracking branch 'git.kebler.net/master' into giskard
commit
58548e0c95
|
@ -0,0 +1 @@
|
||||||
|
alias gterm='GNOME_TERMINAL_SCREEN='\'''\'' gnome-terminal'
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
command -v code >/dev/null 2>&1 || exit
|
VSCODE_BIN=$(command -v code)
|
||||||
|
VSCODE_BIN=${VSCODE_BIN:-$(command -v codium)}
|
||||||
|
[[ $VSCODE_BIN ]] || { echo "no vscode binary on machine";exit; }
|
||||||
# set default home here
|
# set default home here
|
||||||
# can pass
|
# can pass
|
||||||
vscode () {
|
vscode () {
|
||||||
|
@ -9,12 +10,12 @@ vscode () {
|
||||||
local home=/opt/vscode
|
local home=/opt/vscode
|
||||||
home=${VSCODE_HOME:-$home}
|
home=${VSCODE_HOME:-$home}
|
||||||
[[ $1 == "-h" ]] && home=$2 && shift 2
|
[[ $1 == "-h" ]] && home=$2 && shift 2
|
||||||
mkdir -p $home
|
mkdir -p ${home}/${USER}
|
||||||
[[ $? -ne 0 ]] && echo "unable to set vscode home at $home, aborting" && return 1
|
[[ $? -ne 0 ]] && echo "unable to set vscode home at $home/$USER, aborting" && return 1
|
||||||
exts=${home}/extensions
|
exts=${home}/${USER}/extensions
|
||||||
user=${home}/user
|
user=${home}/${USER}/data
|
||||||
exe=$(command -v code)
|
echo $VSCODE_BIN --user-data-dir=$user --extensions-dir=$exts "$@"
|
||||||
$exe --user-data-dir=$user --extensions-dir=$exts "$@"
|
$VSCODE_BIN --user-data-dir=$user --extensions-dir=$exts "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# # if script was executed then call the function
|
# # if script was executed then call the function
|
||||||
|
|
Reference in New Issue