From d5714c0ca28d944d0fce52ddaab20b5ec78037e6 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Wed, 19 Oct 2022 23:22:00 +0200 Subject: [PATCH 1/3] [git] fix: gitignore path in ~/.local --- .gitignore | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3ef6e1e..648d53d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,22 +4,28 @@ !/.xprofile !/.zshenv +!/.local !/.local/bin/ -!/local/src/ -!/.local/state/ +!/.local/src/ +/.local/lib/ +/.local/include/ +/.local/share/ +/.local/state/ !/.config/ /.config/dconf/ /.config/font-manager/ /.config/fontconfig/ -/.config/gnupg/ +/.config/gnupg/* !/.config/gnupg/gpg-agent.conf /.config/libreoffice/ -/.config/mpd/ +/.config/mpd/* !/.config/mpd/mpd.conf /.config/mutt/.mailsynclastrun /.config/nvim/plugin/ /.config/pulse/ +/.config/transmission-daemon/* +/.config/transmission-daemon/settings.json /.config/zsh/.zcompdump /**/*.log From 5cce96f8ada846c4cdd9f7b839e507896500ca30 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Wed, 19 Oct 2022 23:27:18 +0200 Subject: [PATCH 2/3] [mail] fix: globbing for subdirectories --- .local/bin/mailsync | 4 ++-- .local/bin/statusbar/sb-mailbox | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.local/bin/mailsync b/.local/bin/mailsync index c8fd4f9..aa37703 100755 --- a/.local/bin/mailsync +++ b/.local/bin/mailsync @@ -40,7 +40,7 @@ messageinfo() { syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" mbsync "$acc" - new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/ -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" | grep -iv "trash" 2>/dev/null)" + new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f -newer "${XDG_STATE_HOME:-$HOME/.local/state}/mailsynclastrun" | grep -iv "trash" 2>/dev/null)" newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then for file in $new; do @@ -66,4 +66,4 @@ wait notmuch new 2>/dev/null #Create a touch file that indicates the time of the last run of mailsync -touch "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" +touch "${XDG_STATE_HOME:-$HOME/.local/state}/mailsynclastrun" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox index 32fe024..2aaee38 100755 --- a/.local/bin/statusbar/sb-mailbox +++ b/.local/bin/statusbar/sb-mailbox @@ -13,7 +13,7 @@ unread="" for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/) do - new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/*/new/ -type f | grep -iv "trash" | wc -l 2>/dev/null)" + new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc -path */new/* -type f | grep -iv "trash" | wc -l 2>/dev/null)" if [ $new -gt 0 ]; then box="" [ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box="" @@ -23,6 +23,6 @@ do unread="$unread/$box$new" fi done -[ -n "$unread" ] && unread="($(echo "$unread" | cut -c 2-))" || exit +[ -n "$unread" ] && unread="$(echo "$unread" | cut -c 2-)" || exit printf "  %s%s " "$unread" "$icon" From 13efea3df40651d96ce8aa0d77519ad4e4096113 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Wed, 19 Oct 2022 23:27:36 +0200 Subject: [PATCH 3/3] [nvim.cmp] fix: deprecated function --- .config/nvim/lua/plugin/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lua/plugin/lsp/init.lua b/.config/nvim/lua/plugin/lsp/init.lua index 88be39c..4a22120 100644 --- a/.config/nvim/lua/plugin/lsp/init.lua +++ b/.config/nvim/lua/plugin/lsp/init.lua @@ -55,7 +55,7 @@ end -- nvim-cmp supports additional completion capabilities local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) +capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) local servers = { "clangd", "sumneko_lua", "texlab" } lsp_installer.setup {