From c6e81ca6e4cf9128c134d5c55e152e786f3a0c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 4 Mar 2024 14:56:29 +0100 Subject: [PATCH 1/6] Update server dotfiles --- install.sh | 2 +- nvim/lua/plugins/init.lua | 1 + nvim/spell/ltex.dictionary.en-GB.txt | 1 + profile/.profile | 1 + zsh/.zshenv | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 zsh/.zshenv diff --git a/install.sh b/install.sh index 2910fcc..8d3dba2 100755 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ fi if $NVIM; then dependencies="neovim git unzip fzf cmake gcc make curl wget ripgrep npm" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then - $SUDO pacman -Sy --needed --noconfirm "$dependencies" npm go fd + $SUDO pacman -Sy --needed --noconfirm "$dependencies" npm go fd dotnet-sdk elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then $SUDO apt update $SUDO apt install -y software-properties-common diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 75337e9..d5d701c 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -2,6 +2,7 @@ return { 'ConradIrwin/vim-bracketed-paste', 'airblade/vim-rooter', 'nuchs/vim-hypr-nav', + 'isobit/vim-caddyfile', 'debugloop/telescope-undo.nvim', {'windwp/nvim-autopairs', event = "InsertEnter", opts = {}}, {'NeogitOrg/neogit', dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "sindrets/diffview.nvim"}, config = true, lazy = true}, diff --git a/nvim/spell/ltex.dictionary.en-GB.txt b/nvim/spell/ltex.dictionary.en-GB.txt index 51c1d9e..e94a0e7 100644 --- a/nvim/spell/ltex.dictionary.en-GB.txt +++ b/nvim/spell/ltex.dictionary.en-GB.txt @@ -4,3 +4,4 @@ OpenSwarm Lumentis stochasticity Feywild +closeby diff --git a/profile/.profile b/profile/.profile index 57b121f..84d3d3f 100644 --- a/profile/.profile +++ b/profile/.profile @@ -17,3 +17,4 @@ export ZDOTDIR="$XDG_CONFIG_HOME"/zsh export XDG_CURRENT_DESKTOP=GNOME export OPENCV_LOG_LEVEL=ERROR export PATH="$HOME/.local/bin:$PATH" +. "$HOME/.cargo/env" diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..c2f3182 --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1 @@ +. "$HOME/.cargo/env" From 34b1bb772e611d9e42f79eed102fe249407d7147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 4 Mar 2024 15:03:53 +0100 Subject: [PATCH 2/6] Remove none-ls --- nvim/lazy-lock.json | 1 - nvim/lua/plugins/none-ls.lua | 21 --------------------- 2 files changed, 22 deletions(-) delete mode 100644 nvim/lua/plugins/none-ls.lua diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index f841a2d..02a2431 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -16,7 +16,6 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, "neogit": { "branch": "master", "commit": "9c5b1392f22203c1ea082ad42f2c97f3ca6b5de1" }, - "none-ls.nvim": { "branch": "main", "commit": "ff3819c52ca04232fb70fbd6c1639de9abcbe122" }, "nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, diff --git a/nvim/lua/plugins/none-ls.lua b/nvim/lua/plugins/none-ls.lua deleted file mode 100644 index 3ed63a5..0000000 --- a/nvim/lua/plugins/none-ls.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - "nvimtools/none-ls.nvim", - dependencies = { "mason.nvim", "nvim-lua/plenary.nvim" }, - config = function() - local null_ls = require("null-ls") - null_ls.setup({ - root_dir = require("null-ls.utils").root_pattern(".git", "Makefile", "CMakeLists.txt", "build/", "meson.build"), - sources = { - -- null_ls.builtins.completion.spell, - -- null_ls.builtins.code_actions.proselint, - -- null_ls.builtins.diagnostics.proselint, - -- null_ls.builtins.diagnostics.codespell, - null_ls.builtins.diagnostics.shellcheck, - null_ls.builtins.formatting.shellharden, - null_ls.builtins.formatting.shfmt, - -- null_ls.builtins.diagnostics.cppcheck, - -- null_ls.builtins.diagnostics.selene - } - }) - end, -} From 607a2e4eca8178fcbf9cba7a2f90fadc7e17f423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Wed, 6 Mar 2024 11:22:40 +0100 Subject: [PATCH 3/6] Fix install script --- hypr/hyprland.conf | 5 +++-- install.sh | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 594b5f6..0ec271f 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -4,14 +4,15 @@ env = TERMINAL,alacritty $scripts = /home/user/.config/scripts -exec-once=hyprpaper monitor=DP-2,preferred,0x550,1 monitor=DP-1,preferred,1920x0,1,bitdepth,10 monitor=HDMI-A-1,preferred,5760x550,1 +exec-once=hyprpaper exec-once=wl-paste --type text --watch cliphist store exec-once=wl-paste --type image --watch cliphist store -exec-once=sleep 2 && hyprctl dispatch workspace 11 exec-once=/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 +exec-once=/usr/lib/kdeconnectd +exec-once=sleep 2 && hyprctl dispatch workspace 11 workspace=DP-1,11 workspace=DP-2,21 diff --git a/install.sh b/install.sh index 8d3dba2..ff0cd9f 100755 --- a/install.sh +++ b/install.sh @@ -39,14 +39,14 @@ fi if $NVIM; then dependencies="neovim git unzip fzf cmake gcc make curl wget ripgrep npm" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then - $SUDO pacman -Sy --needed --noconfirm "$dependencies" npm go fd dotnet-sdk + $SUDO pacman -Sy --needed --noconfirm $dependencies npm go fd dotnet-sdk elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then $SUDO apt update $SUDO apt install -y software-properties-common $SUDO add-apt-repository ppa:neovim-ppa/unstable -y $SUDO curl -sL https://deb.nodesource.com/setup_21.x | $SUDO bash - $SUDO apt update - $SUDO apt install -y "$dependencies" python3-venv nodejs golang fd-find + $SUDO apt install -y $dependencies python3-venv nodejs golang fd-find fi ln -s "$PWD"/nvim "$XDG_CONFIG_HOME"/nvim @@ -63,11 +63,11 @@ if $ZSH; then PROFILE=true dependencies="fzf zsh curl zoxide" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then - $SUDO pacman -Sy --needed --noconfirm "$dependencies" zsh-autosuggestions + $SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions echo "Please manually install yay" elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then $SUDO apt update - $SUDO apt install -y "$dependencies" + $SUDO apt install -y $dependencies fi ln -s "$PWD"/zsh "$XDG_CONFIG_HOME"/zsh @@ -95,10 +95,10 @@ fi if $AWESOME; then dependencies="awesome picom numlockx xcape rofi" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then - $SUDO pacman -Sy --needed --noconfirm "$dependencies" network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols + $SUDO pacman -Sy --needed --noconfirm $dependencies network-manager-applet xorg-xmodmap adobe-source-code-pro-fonts noto-fonts ttf-nerd-fonts-symbols elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then $SUDO apt update - $SUDO apt install -y "$dependencies" awesome-extra + $SUDO apt install -y $dependencies awesome-extra fi ln -s "$PWD"/awesome "$XDG_CONFIG_HOME"/awesome @@ -149,14 +149,14 @@ fi if $TMUX; then dependencies="tmux git zsh xdg-utils" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then - $SUDO pacman -Sy --needed --noconfirm "$dependencies" + $SUDO pacman -Sy --needed --noconfirm $dependencies ln -s "$PWD"/tmux "$XDG_CONFIG_HOME"/tmux git clone https://github.com/tmux-plugins/tpm "$XDG_DATA_HOME"/tmux/plugins/tpm "$XDG_DATA_HOME"/tmux/plugins/tpm/bin/install_plugins elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then $SUDO apt update - $SUDO apt install -y "$dependencies" + $SUDO apt install -y $dependencies ln -s "$PWD"/tmux "$HOME"/.tmux ln -s "$PWD"/tmux/tmux.conf "$HOME"/.tmux.conf From 8720c4e4ca203a924582ee0cec100588b364aea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 8 Mar 2024 20:48:44 +0100 Subject: [PATCH 4/6] Better cargo env --- profile/.profile | 1 - zsh/.zshenv | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/profile/.profile b/profile/.profile index 84d3d3f..57b121f 100644 --- a/profile/.profile +++ b/profile/.profile @@ -17,4 +17,3 @@ export ZDOTDIR="$XDG_CONFIG_HOME"/zsh export XDG_CURRENT_DESKTOP=GNOME export OPENCV_LOG_LEVEL=ERROR export PATH="$HOME/.local/bin:$PATH" -. "$HOME/.cargo/env" diff --git a/zsh/.zshenv b/zsh/.zshenv index c2f3182..e8e716f 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1 +1,3 @@ -. "$HOME/.cargo/env" +if [ -d "$HOME/.cargo/env" ]; then + . "$HOME/.cargo/env" +fi From a53ba2e6676e6119a7926e7fa8cd3223668a4096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 8 Mar 2024 23:33:34 +0100 Subject: [PATCH 5/6] Add push alias --- zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 12f2e02..845f53c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -207,3 +207,4 @@ alias cpr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window= alias mvr=rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'" alias ag="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'" +alias push="git add -A && git commit -m '`date`' && git push" From 5c40b26b39b7b850190037362a97f543ef1aae90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 8 Mar 2024 23:35:26 +0100 Subject: [PATCH 6/6] Improve micromamba zsh --- zsh/.zshrc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 845f53c..f809b20 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -151,19 +151,8 @@ export TERM="screen-256color" export PATH=$HOME/.local/bin:$PATH export GOPATH=/tmp/go -# >>> mamba initialize >>> -# !! Contents within this block are managed by 'mamba init' !! -export MAMBA_EXE="$HOME/.local/bin/micromamba"; +eval "$(micromamba shell hook --shell zsh)" export MAMBA_ROOT_PREFIX="$HOME/.micromamba"; -__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)" -if [ $? -eq 0 ]; then - eval "$__mamba_setup" -else - alias micromamba="$MAMBA_EXE" # Fallback on help from mamba activate -fi -unset __mamba_setup -# <<< mamba initialize <<< - autoload -Uz add-zsh-hook eval "$(zoxide init zsh --cmd j)"