Updated scripts
This commit is contained in:
parent
8cc9facdb2
commit
52f247ca8a
@ -15,7 +15,4 @@
|
|||||||
[mergetool]
|
[mergetool]
|
||||||
keepBackup = false
|
keepBackup = false
|
||||||
|
|
||||||
# when working on work projects
|
|
||||||
[includeIf "gitdir:**/work/**/.git"]
|
|
||||||
path = ~/code_server/gitconfig.work
|
|
||||||
|
|
||||||
|
|||||||
@ -5,3 +5,13 @@
|
|||||||
[credential "https://git.mildef.com"]
|
[credential "https://git.mildef.com"]
|
||||||
helper = store --file ~/.my-credentials
|
helper = store --file ~/.my-credentials
|
||||||
username = christoffer
|
username = christoffer
|
||||||
|
[pull]
|
||||||
|
rebase = false
|
||||||
|
[merge]
|
||||||
|
tool = nvimdiff
|
||||||
|
[mergetool]
|
||||||
|
keepBackup = false
|
||||||
|
|
||||||
|
# when working on work projects
|
||||||
|
[includeIf "gitdir:**/code_server/.git"]
|
||||||
|
path = ~/code_server/gitconfig
|
||||||
|
|||||||
@ -42,6 +42,7 @@ bind -n C-M-x confirm kill-pane
|
|||||||
bind -n C-M-h split-window -v -c "#{pane_current_path}"
|
bind -n C-M-h split-window -v -c "#{pane_current_path}"
|
||||||
bind -n C-M-v split-window -h -c "#{pane_current_path}"
|
bind -n C-M-v split-window -h -c "#{pane_current_path}"
|
||||||
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
||||||
|
bind -n C-t display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "btop"
|
||||||
|
|
||||||
set-option -g status-position top
|
set-option -g status-position top
|
||||||
set-option -g default-terminal "tmux-256color"
|
set-option -g default-terminal "tmux-256color"
|
||||||
|
|||||||
@ -14,7 +14,7 @@ else
|
|||||||
DESKTOP="no"
|
DESKTOP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(systemd-detect-virt)" == "wsl" ]; then
|
if [[ "$(systemd-detect-virt)" == *"wsl"* ]]; then
|
||||||
WSL="yes"
|
WSL="yes"
|
||||||
else
|
else
|
||||||
WSL="no"
|
WSL="no"
|
||||||
@ -44,7 +44,7 @@ echo -e ' \e[H\e[2J
|
|||||||
printf -- '\033[32m *** System applications ***\n\033[37m'
|
printf -- '\033[32m *** System applications ***\n\033[37m'
|
||||||
|
|
||||||
# Ubuntu 20.04 workaround
|
# Ubuntu 20.04 workaround
|
||||||
if [ "$VER" == "20.04" ]; then
|
if [ "$WSL" == "yes" ]; then
|
||||||
sudo apt -y purge --auto-remove neovim
|
sudo apt -y purge --auto-remove neovim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -52,6 +52,7 @@ fi
|
|||||||
printf -- '\033[33m Updating system\n\033[37m'
|
printf -- '\033[33m Updating system\n\033[37m'
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade -y
|
sudo apt upgrade -y
|
||||||
|
if [ "$WSL" == "no" ]; then
|
||||||
if dpkg -s flatpak &>/dev/null; then
|
if dpkg -s flatpak &>/dev/null; then
|
||||||
flatpak update -y
|
flatpak update -y
|
||||||
else
|
else
|
||||||
@ -61,7 +62,8 @@ else
|
|||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
flatpak install -y flathub com.github.tchx84.Flatseal
|
flatpak install -y flathub com.github.tchx84.Flatseal
|
||||||
fi
|
fi
|
||||||
if dpkg -s flatpak &>/dev/null; then
|
fi
|
||||||
|
if dpkg -s snap &>/dev/null; then
|
||||||
sudo snap refresh
|
sudo snap refresh
|
||||||
else
|
else
|
||||||
sudo apt install -y snap
|
sudo apt install -y snap
|
||||||
@ -98,7 +100,6 @@ printf -- '\033[33m Installing fzf\n\033[37m'
|
|||||||
if [ -d ~/.fzf ]; then rm -rf ~/.fzf; fi
|
if [ -d ~/.fzf ]; then rm -rf ~/.fzf; fi
|
||||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
~/.fzf/install --all
|
~/.fzf/install --all
|
||||||
source ~/.fzf.bash
|
|
||||||
|
|
||||||
# # Install VirtualHere server
|
# # Install VirtualHere server
|
||||||
# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh
|
# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh
|
||||||
@ -138,9 +139,10 @@ cd build && cpack -G DEB && sudo dpkg -i nvim-linux64.deb
|
|||||||
if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
|
if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
|
||||||
|
|
||||||
# Install caffeine
|
# Install caffeine
|
||||||
|
if [ "$WSL" == "no" ]; then
|
||||||
printf -- '\033[33m Installing caffeine\n\033[37m'
|
printf -- '\033[33m Installing caffeine\n\033[37m'
|
||||||
sudo apt install -y caffeine
|
sudo apt install -y caffeine
|
||||||
|
fi
|
||||||
# Install fd
|
# Install fd
|
||||||
printf -- '\033[33m Installing fd\n\033[37m'
|
printf -- '\033[33m Installing fd\n\033[37m'
|
||||||
sudo apt install -y fd-find
|
sudo apt install -y fd-find
|
||||||
@ -192,7 +194,13 @@ sudo apt install -y composer
|
|||||||
|
|
||||||
# Install java
|
# Install java
|
||||||
printf -- '\033[33m Installing java\n\033[37m'
|
printf -- '\033[33m Installing java\n\033[37m'
|
||||||
|
if [ "$WSL" == "yes" ]; then
|
||||||
|
sudo add-apt-repository -y ppa:linuxuprising/java
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y oracle-java17-installer
|
||||||
|
else
|
||||||
sudo apt install -y default-jdk
|
sudo apt install -y default-jdk
|
||||||
|
fi
|
||||||
|
|
||||||
# Install julia
|
# Install julia
|
||||||
printf -- '\033[33m Installing julia\n\033[37m'
|
printf -- '\033[33m Installing julia\n\033[37m'
|
||||||
@ -235,7 +243,9 @@ sudo npm install -g neovim
|
|||||||
printf -- '\033[33m Installing Rust\n\033[37m'
|
printf -- '\033[33m Installing Rust\n\033[37m'
|
||||||
cd ~
|
cd ~
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
|
||||||
#source "$HOME/.cargo/env"
|
if [ "$WSL" == "yes" ]; then
|
||||||
|
source "$HOME/.cargo/env"
|
||||||
|
fi
|
||||||
rustup self update
|
rustup self update
|
||||||
rustup update stable
|
rustup update stable
|
||||||
rustup default stable
|
rustup default stable
|
||||||
@ -269,6 +279,7 @@ printf -- '\033[33m Installing starship\n\033[37m'
|
|||||||
cargo install starship --locked
|
cargo install starship --locked
|
||||||
|
|
||||||
# *** Desktop applications ***
|
# *** Desktop applications ***
|
||||||
|
if [ "$WSL" == "no" ]; then
|
||||||
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
|
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
|
||||||
|
|
||||||
if [ "$DESKTOP" == "yes" ]; then
|
if [ "$DESKTOP" == "yes" ]; then
|
||||||
@ -362,14 +373,15 @@ if [ "$DESKTOP" == "yes" ]; then
|
|||||||
sudo apt install -y timeshift
|
sudo apt install -y timeshift
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
# *** Dotfile symlinking ***
|
# *** Dotfile symlinking ***
|
||||||
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
|
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
|
||||||
|
|
||||||
|
if [ "$WSL" == "no" ]; then
|
||||||
# Symlink wezterm config
|
# Symlink wezterm config
|
||||||
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
|
printf -- '\033[33m Symlinking wezterm config\n\033[37m'
|
||||||
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua
|
ln -sf ~/code_server/wezterm.lua ~/.wezterm.lua
|
||||||
|
fi
|
||||||
# Symlink nvim config
|
# Symlink nvim config
|
||||||
printf -- '\033[33m Symlinking nvim config\n\033[37m'
|
printf -- '\033[33m Symlinking nvim config\n\033[37m'
|
||||||
mkdir -p ~/.config/nvim
|
mkdir -p ~/.config/nvim
|
||||||
@ -377,7 +389,11 @@ ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
|
|||||||
|
|
||||||
# Symlink git config
|
# Symlink git config
|
||||||
printf -- '\033[33m Symlinking git config\n\033[37m'
|
printf -- '\033[33m Symlinking git config\n\033[37m'
|
||||||
|
if [ "$WSL" == "yes" ]; then
|
||||||
|
ln -sf ~/code_server/gitconfig.work ~/.gitconfig
|
||||||
|
else
|
||||||
ln -sf ~/code_server/gitconfig ~/.gitconfig
|
ln -sf ~/code_server/gitconfig ~/.gitconfig
|
||||||
|
fi
|
||||||
|
|
||||||
# Symlink tmux config
|
# Symlink tmux config
|
||||||
printf -- '\033[33m Symlinking tmux config\n\033[37m'
|
printf -- '\033[33m Symlinking tmux config\n\033[37m'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user