Merge branch 'dev' into thesis

git: fix gitignore for ~/.local
mail: fix globbing in subdirectories
nvim.cmp: fix deprecated functions
This commit is contained in:
David JULIEN 2022-10-20 14:53:36 +02:00
commit 7b561eee06
4 changed files with 15 additions and 9 deletions

View File

@ -55,7 +55,7 @@ end
-- nvim-cmp supports additional completion capabilities -- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_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" } local servers = { "clangd", "sumneko_lua", "texlab" }
lsp_installer.setup { lsp_installer.setup {

14
.gitignore vendored
View File

@ -4,22 +4,28 @@
!/.xprofile !/.xprofile
!/.zshenv !/.zshenv
!/.local
!/.local/bin/ !/.local/bin/
!/local/src/ !/.local/src/
!/.local/state/ /.local/lib/
/.local/include/
/.local/share/
/.local/state/
!/.config/ !/.config/
/.config/dconf/ /.config/dconf/
/.config/font-manager/ /.config/font-manager/
/.config/fontconfig/ /.config/fontconfig/
/.config/gnupg/ /.config/gnupg/*
!/.config/gnupg/gpg-agent.conf !/.config/gnupg/gpg-agent.conf
/.config/libreoffice/ /.config/libreoffice/
/.config/mpd/ /.config/mpd/*
!/.config/mpd/mpd.conf !/.config/mpd/mpd.conf
/.config/mutt/.mailsynclastrun /.config/mutt/.mailsynclastrun
/.config/nvim/plugin/ /.config/nvim/plugin/
/.config/pulse/ /.config/pulse/
/.config/transmission-daemon/*
/.config/transmission-daemon/settings.json
/.config/zsh/.zcompdump /.config/zsh/.zcompdump
/**/*.log /**/*.log

View File

@ -40,7 +40,7 @@ messageinfo() {
syncandnotify() { syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")" acc="$(echo "$account" | sed "s/.*\///")"
mbsync "$acc" 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) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then if [ "$newcount" -gt "0" ]; then
for file in $new; do for file in $new; do
@ -66,4 +66,4 @@ wait
notmuch new 2>/dev/null notmuch new 2>/dev/null
#Create a touch file that indicates the time of the last run of mailsync #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"

View File

@ -13,7 +13,7 @@
unread="" unread=""
for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/) for acc in $(ls "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/)
do 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 if [ $new -gt 0 ]; then
box="" box=""
[ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box="" [ -n "$(echo "$acc" | sed -n '/@centrale/p')" ] && box=""
@ -23,6 +23,6 @@ do
unread="$unread/$box$new" unread="$unread/$box$new"
fi fi
done done
[ -n "$unread" ] && unread="($(echo "$unread" | cut -c 2-))" || exit [ -n "$unread" ] && unread="$(echo "$unread" | cut -c 2-)" || exit
printf "  %s%s " "$unread" "$icon" printf "  %s%s " "$unread" "$icon"