From fd5cbd96203f1ea1281601d023f5a181dae196cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 12:35:38 +0100 Subject: [PATCH 1/7] Basic VSCode installation on Fedora --- fedora/configure_fresh_system | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index 55a2b6ed..6710e6e8 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -29,6 +29,17 @@ if [[ -z $NO_SYSTEMCTL ]]; then sudo systemctl list-timers "*dnf-*" fi +cd ~/Downloads +rm -f "*code*.rpm" +aria2c "https://go.microsoft.com/fwlink/?LinkID=760867" +sudo dnf install "*code*.rpm" +code --install-extension cssho.vscode-svgviewer +code --install-extension donjayamanne.python +code --install-extension saviorisdead.RustyCode +code --install-extension seanmcbreen.Spell +code --install-extension searKing.preview-vscode +code --install-extension vscodevim.vim + if [[ -z $NO_COMPILE_VIM ]]; then VIM_BUILD_DIR=/tmp cd "$VIM_BUILD_DIR" From ee1684f4c82ba0d01292f19cca5f3e8a0c32ffc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 12:55:47 +0100 Subject: [PATCH 2/7] Create ~/Downloads directory if needed --- fedora/configure_fresh_system | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index 6710e6e8..89bf2777 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -29,10 +29,11 @@ if [[ -z $NO_SYSTEMCTL ]]; then sudo systemctl list-timers "*dnf-*" fi +mkdir -p ~/Downloads cd ~/Downloads rm -f "*code*.rpm" aria2c "https://go.microsoft.com/fwlink/?LinkID=760867" -sudo dnf install "*code*.rpm" +sudo dnf -y install "*code*.rpm" code --install-extension cssho.vscode-svgviewer code --install-extension donjayamanne.python code --install-extension saviorisdead.RustyCode From b7e9a6ca13b7758f3b41715f543233e29b65a915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 13:54:33 +0100 Subject: [PATCH 3/7] Better glob pattern for vscode installation --- fedora/configure_fresh_system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index 89bf2777..5c19b524 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -33,7 +33,7 @@ mkdir -p ~/Downloads cd ~/Downloads rm -f "*code*.rpm" aria2c "https://go.microsoft.com/fwlink/?LinkID=760867" -sudo dnf -y install "*code*.rpm" +sudo dnf -y install code*.rpm code --install-extension cssho.vscode-svgviewer code --install-extension donjayamanne.python code --install-extension saviorisdead.RustyCode From c5db9f55a40f4c86f1eab2cc35b175bbf09bf901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 19:38:52 +0100 Subject: [PATCH 4/7] Verbose removal of old vscode installation files --- fedora/configure_fresh_system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index 5c19b524..aa2730c9 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -31,7 +31,7 @@ fi mkdir -p ~/Downloads cd ~/Downloads -rm -f "*code*.rpm" +rm -fv *code*.rpm aria2c "https://go.microsoft.com/fwlink/?LinkID=760867" sudo dnf -y install code*.rpm code --install-extension cssho.vscode-svgviewer From 2e0cfe693f33d37ddb302f3a53bc42056746dcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 19:46:59 +0100 Subject: [PATCH 5/7] Install vscode plugins only under normal user account --- fedora/configure_fresh_system | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index aa2730c9..5d3b9682 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -34,12 +34,15 @@ cd ~/Downloads rm -fv *code*.rpm aria2c "https://go.microsoft.com/fwlink/?LinkID=760867" sudo dnf -y install code*.rpm -code --install-extension cssho.vscode-svgviewer -code --install-extension donjayamanne.python -code --install-extension saviorisdead.RustyCode -code --install-extension seanmcbreen.Spell -code --install-extension searKing.preview-vscode -code --install-extension vscodevim.vim + +if [ "$(id -u)" != "0" ]; then + code --install-extension cssho.vscode-svgviewer + code --install-extension donjayamanne.python + code --install-extension saviorisdead.RustyCode + code --install-extension seanmcbreen.Spell + code --install-extension searKing.preview-vscode + code --install-extension vscodevim.vim +fi if [[ -z $NO_COMPILE_VIM ]]; then VIM_BUILD_DIR=/tmp From a49c790125551faa6092990bdd0be89e4c9e9d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 20:05:15 +0100 Subject: [PATCH 6/7] Add VSCode settings file --- .config/Code/User/settings.json | 11 +++++++++++ common/configure_fresh_system | 1 + 2 files changed, 12 insertions(+) create mode 100644 .config/Code/User/settings.json diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json new file mode 100644 index 00000000..8f0484ba --- /dev/null +++ b/.config/Code/User/settings.json @@ -0,0 +1,11 @@ +{ + "window.zoomLevel": 1, + "extensions.autoUpdate": true, + "editor.cursorStyle": "block", + "rust.rustLangSrcPath": "/home/cyryl/dev/rust/src", + "rust.racerPath": "/home/cyryl/.cargo/bin/racer", + "rust.rustfmtPath": "/home/cyryl/.cargo/bin/rustfmt", + "rust.rustsymPath": "/home/cyryl/.cargo/bin/rustsym", + "rust.cargoPath": "/home/cyryl/.cargo/bin/cargo", + "rust.cargoHome": "/home/cyryl/.cargo/" +} \ No newline at end of file diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 137ba01f..36ed7fe7 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -55,6 +55,7 @@ ln -vfs "$DIR/.config/autostart/redshift-gtk.desktop" ~/.config/autostart/ mkdir -p ~/.config/vdirsyncer/ ln -vfs "$DIR/.config/vdirsyncer/config" ~/.config/vdirsyncer/ ln -vfs "$DIR/.config/redshift.conf" ~/.config/redshift.conf +ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json source ~/.setenv From 1588c7ea341e8a33ba6852f669bc1ae8a3e4a387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 25 Nov 2016 21:08:37 +0100 Subject: [PATCH 7/7] Make the VSCode settings directory if needed --- common/configure_fresh_system | 1 + 1 file changed, 1 insertion(+) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 36ed7fe7..b5ad9510 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -55,6 +55,7 @@ ln -vfs "$DIR/.config/autostart/redshift-gtk.desktop" ~/.config/autostart/ mkdir -p ~/.config/vdirsyncer/ ln -vfs "$DIR/.config/vdirsyncer/config" ~/.config/vdirsyncer/ ln -vfs "$DIR/.config/redshift.conf" ~/.config/redshift.conf +mkdir -p ~/.config/Code/User ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json source ~/.setenv