From b16f48b5b370dcd9eb740dc7899c0ce999d02456 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 19:00:42 +0100 Subject: [PATCH 01/19] [nvim] refactor: remove icons from completion --- .config/nvim/lua/plugin/cmp.lua | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.config/nvim/lua/plugin/cmp.lua b/.config/nvim/lua/plugin/cmp.lua index e53c879..c87d9b5 100644 --- a/.config/nvim/lua/plugin/cmp.lua +++ b/.config/nvim/lua/plugin/cmp.lua @@ -18,33 +18,7 @@ end cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) -- Custom item icons -local icons = { - Class = "", - Color = "", - Constant = "µ", - Constructor = "", - Enum = "", - EnumMember = "", - Event = "", - Field = "", - File = "", - Folder = "", - Function = "", - Keyword = "", - Interface = "", - Method = "", - Module = "", - Operator = "", - Property = "", - Reference = "", - Snippet = "", - Struct = "", - Text = "", - TypeParameter = "", - Unit = "", - Value = "", - Variable = "", -} +local icons = { } cmp.setup { completion = { @@ -62,8 +36,6 @@ cmp.setup { }, formatting = { format = function(entry, vim_item) - vim_item.kind = string.format("%s %s", icons[vim_item.kind], - vim_item.kind) vim_item.menu = ({ nvim_lsp = "[lsp]", nvim_lua = "[nvim]", From 8b67005a9d765ff39e7f923514a6bf75eddac98e Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 19:17:00 +0100 Subject: [PATCH 02/19] [nvim] feat: use textobjects with treesitter --- .config/nvim/lua/plugin/packer.lua | 5 ++ .config/nvim/lua/plugin/treesitter.lua | 104 ++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/plugin/packer.lua b/.config/nvim/lua/plugin/packer.lua index 8c53feb..781d35e 100644 --- a/.config/nvim/lua/plugin/packer.lua +++ b/.config/nvim/lua/plugin/packer.lua @@ -54,6 +54,11 @@ return require("packer").startup(function() config = function() require("plugin.treesitter") end } + use { -- Additional text objects via treesitter + 'nvim-treesitter/nvim-treesitter-textobjects', + after = 'nvim-treesitter', + } + -- telescope use { "nvim-telescope/telescope.nvim", diff --git a/.config/nvim/lua/plugin/treesitter.lua b/.config/nvim/lua/plugin/treesitter.lua index 2b7f3a3..314c6f8 100644 --- a/.config/nvim/lua/plugin/treesitter.lua +++ b/.config/nvim/lua/plugin/treesitter.lua @@ -4,12 +4,112 @@ -- Description : treesitter config file require("nvim-treesitter.configs").setup { - ensure_installed = { "c", "lua", "python", "rust", "bash" }, - ignore_install = { "javascript" }, + ensure_installed = { "c", "lua", "rust", "bash", "vim" }, highlight = { enable = true, }, indent = { enable = true, }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = "", + node_decremental = "", + }, + }, + textobjects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- use the capture groups defined in textobjects.scm + ["ap"] = { + query = "@parameter.outer", + desc = "Select parameter region" + }, + ["ip"] = { + query = "@parameter.inner", + desc = "Select inner part of a parameter region" + }, + ["af"] = { + query = "@function.outer", + desc = "Select a function block" + }, + ["if"] = { + query = "@function.inner", + desc = "Select inner part of a function" + }, + ["ac"] = { + query = "@class.outer", + desc = "Select a class block" + }, + ["ic"] = { + query = "@class.inner", + desc = "Select inner part of a class" + }, + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + ["]m"] = { + query = "@function.outer", + desc = "Jump to next function", + }, + ["])"] = { + query = "@class.outer", + desc = "Jump to next class", + }, + }, + goto_next_end = { + ["]M"] = { + query = "@function.outer", + desc = "Jump after next function", + }, + ["]]"] = { + query = "@class.outer", + desc = "Jump after next class", + }, + }, + goto_previous_start = { + ["[m"] = { + query = "@function.outer", + desc = "Jump to previous function", + }, + ["[)"] = { + query = "@class.outer", + desc = "Jump to previous class", + }, + }, + goto_previous_end = { + ["[M"] = { + query = "@function.outer", + desc = "Jump after previous function", + }, + ["[]"] = { + query = "@class.outer", + desc = "Jump after previous class", + }, + }, + }, + swap = { + enable = true, + swap_next = { + ["a"] = { + query = "@parameter.inner", + desc = "Swap with next parameter", + }, + }, + swap_previous = { + ["A"] = { + query = "@parameter.inner", + desc = "Swap with previous parameter", + }, + }, + }, + }, } From d122b1d842baa26fc85f6338550b33084a124743 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 19:55:49 +0100 Subject: [PATCH 03/19] [mail] fix: remove personnal config prom public repo --- .config/mbsync/config | 77 ------------------- .config/mbsync/config.template | 25 ++++++ .config/msmtp/config | 32 -------- .config/msmtp/config.template | 10 +++ .../accounts/1-david.julien@posteo.net.muttrc | 46 ----------- .../2-david.julien@ens-lyon.fr.muttrc | 55 ------------- .../2-david.julien@univ-nantes.fr.muttrc | 67 ---------------- .../accounts/3-david.julien@mailo.com.muttrc | 59 -------------- .config/neomutt/accounts/ens.signature | 4 - .config/neomutt/accounts/mailo.signature | 2 - .config/neomutt/accounts/nantes.signature | 7 -- .config/neomutt/accounts/posteo.signature | 2 - .config/neomutt/maps | 5 +- .config/neomutt/muttrc.template | 5 -- .../neomutt/{neomuttrc => neomuttrc.template} | 8 +- .config/notmuch/default/hooks/post_new.sh | 23 ------ .config/notmuch/tags/univ | 18 ----- 17 files changed, 38 insertions(+), 407 deletions(-) delete mode 100644 .config/mbsync/config create mode 100644 .config/mbsync/config.template delete mode 100644 .config/msmtp/config create mode 100644 .config/msmtp/config.template delete mode 100644 .config/neomutt/accounts/1-david.julien@posteo.net.muttrc delete mode 100644 .config/neomutt/accounts/2-david.julien@ens-lyon.fr.muttrc delete mode 100644 .config/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc delete mode 100644 .config/neomutt/accounts/3-david.julien@mailo.com.muttrc delete mode 100644 .config/neomutt/accounts/ens.signature delete mode 100644 .config/neomutt/accounts/mailo.signature delete mode 100644 .config/neomutt/accounts/nantes.signature delete mode 100644 .config/neomutt/accounts/posteo.signature delete mode 100644 .config/neomutt/muttrc.template rename .config/neomutt/{neomuttrc => neomuttrc.template} (88%) delete mode 100755 .config/notmuch/default/hooks/post_new.sh delete mode 100644 .config/notmuch/tags/univ diff --git a/.config/mbsync/config b/.config/mbsync/config deleted file mode 100644 index 856cc3d..0000000 --- a/.config/mbsync/config +++ /dev/null @@ -1,77 +0,0 @@ -# Personnal - Critical -IMAPStore david.julien@posteo.net-remote -Host posteo.de -Port 993 -User david.julien@posteo.net -PassCmd "pass posteo.net/david.julien" -AuthMechs LOGIN -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -MaildirStore david.julien@posteo.net-local -Subfolders Verbatim -Path /home/swytch/.local/share/mail/posteo/ -Inbox /home/swytch/.local/share/mail/posteo/INBOX - -Channel posteo -Expunge Both -Far :david.julien@posteo.net-remote: -Near :david.julien@posteo.net-local: -Patterns * !"[Gmail]/All Mail" -Create Both -SyncState * -MaxMessages 0 -ExpireUnread no -# End Profile - -# University -IMAPStore david.julien@univ-nantes.fr-remote -Host imaps.etu.univ-nantes.fr -Port 993 -User E22D718J -PassCmd "pass univ-nantes.fr/E22D718J" -AuthMechs LOGIN -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -MaildirStore david.julien@univ-nantes.fr-local -Subfolders Verbatim -Path /home/swytch/.local/share/mail/univ/ -Inbox /home/swytch/.local/share/mail/univ/INBOX - -Channel univ -Expunge Both -Far :david.julien@univ-nantes.fr-remote: -Near :david.julien@univ-nantes.fr-local: -Patterns * !"[Gmail]/All Mail" -Create Both -SyncState * -MaxMessages 0 -ExpireUnread no -# End Profile - -# Personnal -IMAPStore david.julien@mailo.com-remote -Host mail.mailo.com -Port 993 -User david.julien@mailo.com -PassCmd "pass mailo.com/david.julien" -AuthMechs LOGIN -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -MaildirStore david.julien@mailo.com-local -Subfolders Verbatim -Path /home/swytch/.local/share/mail/mailo/ -Inbox /home/swytch/.local/share/mail/mailo/INBOX - -Channel mailo -Expunge Both -Far :david.julien@mailo.com-remote: -Near :david.julien@mailo.com-local: -Patterns * !"[Gmail]/All Mail" -Create Both -SyncState * -MaxMessages 0 -ExpireUnread no -# End Profile diff --git a/.config/mbsync/config.template b/.config/mbsync/config.template new file mode 100644 index 0000000..feec876 --- /dev/null +++ b/.config/mbsync/config.template @@ -0,0 +1,25 @@ +# Personnal - Critical +IMAPStore email@address.you-remote +Host address.you +Port 993 +User email@address.you +PassCmd "pass address.you/email" +AuthMechs LOGIN +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +MaildirStore email@address.you-local +Subfolders Verbatim +Path /home/user/.local/share/mail/address/ +Inbox /home/user/.local/share/mail/address/INBOX + +Channel address +Expunge Both +Far :email@address.you-remote: +Near :email@address.you-local: +Patterns * !"[Gmail]/All Mail" +Create Both +SyncState * +MaxMessages 0 +ExpireUnread no +# End Profile diff --git a/.config/msmtp/config b/.config/msmtp/config deleted file mode 100644 index 4e48a95..0000000 --- a/.config/msmtp/config +++ /dev/null @@ -1,32 +0,0 @@ -account posteo -host posteo.de -port 587 -from david.julien@posteo.net -user david.julien@posteo.net -passwordeval "pass posteo.net/david.julien" -auth on -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile /home/swytch/.config/msmtp/msmtp.log - -account univ -host smtp.etu.univ-nantes.fr -port 587 -from david.julien@univ-nantes.fr -user E22D718J -passwordeval "pass univ-nantes.fr/E22D718J" -auth on -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile /home/swytch/.config/msmtp/msmtp.log - -account mailo -host mail.mailo.com -port 587 -from david.julien@mailo.com -user david.julien@mailo.com -passwordeval "pass mailo.com/david.julien" -auth on -tls on -tls_trust_file /etc/ssl/certs/ca-certificates.crt -logfile /home/swytch/.config/msmtp/msmtp.log diff --git a/.config/msmtp/config.template b/.config/msmtp/config.template new file mode 100644 index 0000000..102f29a --- /dev/null +++ b/.config/msmtp/config.template @@ -0,0 +1,10 @@ +account address +host address.you +port 587 +from email@address.you +user email@address.you +passwordeval "pass address.you/email" +auth on +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile /home/user/.local/share/msmtp/msmtp.log diff --git a/.config/neomutt/accounts/1-david.julien@posteo.net.muttrc b/.config/neomutt/accounts/1-david.julien@posteo.net.muttrc deleted file mode 100644 index 7cc1d88..0000000 --- a/.config/neomutt/accounts/1-david.julien@posteo.net.muttrc +++ /dev/null @@ -1,46 +0,0 @@ -# vim: filetype=neomuttrc -# muttrc file for account email@adress.you -set realname = "David JULIEN" -set from = "david.julien@posteo.net" -set sendmail = "msmtp -a posteo" -alias me david.julien -set folder = "$XDG_DATA_HOME/mail/posteo" -set header_cache = "$XDG_CACHE_HOME/neomutt/posteo/headers" -set message_cachedir = "$XDG_CACHE_HOME/neomutt/posteo/bodies" -set mbox_type = Maildir - -set crypt_autosign = yes -set pgp_self_encrypt = yes -set pgp_default_key = "0x7F03EA9BEFFCB97F" - -bind index,pager gg noop -bind index,pager g noop -bind index,pager M noop -bind index,pager C noop -bind index gg first-entry -unmailboxes * -unalternates * -set signature="$XDG_CONFIG_HOME/neomutt/accounts/posteo.signature" -unmacro index o -macro index o "mailsync" "run mbsync to sync david.julien@posteo.net" - -mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=Receipts" -set record = "+Sent" -macro index,pager gs "=Sent" "go to sent" -macro index,pager Ms ";=Sent" "move mail to sent" -macro index,pager Cs ";=Sent" "copy mail to sent" -set postponed = "+Drafts" -macro index,pager gd "=Drafts" "go to drafts" -macro index,pager Md ";=Drafts" "move mail to drafts" -macro index,pager Cd ";=Drafts" "copy mail to drafts" -macro index,pager gt "=Trash" "go to trash" -macro index,pager Mt ";=Trash" "move mail to trash" -macro index,pager Ct ";=Trash" "copy mail to trash" -macro index,pager gr "=Receipts" "go to receipts" -macro index,pager Mr ";=Receipts" "move mail to receipts" -macro index,pager Cr ";=Receipts" "copy mail to receipts" -set trash = "+Trash" -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -set spoolfile = "+INBOX" diff --git a/.config/neomutt/accounts/2-david.julien@ens-lyon.fr.muttrc b/.config/neomutt/accounts/2-david.julien@ens-lyon.fr.muttrc deleted file mode 100644 index 6edfdff..0000000 --- a/.config/neomutt/accounts/2-david.julien@ens-lyon.fr.muttrc +++ /dev/null @@ -1,55 +0,0 @@ -# vim: filetype=neomuttrc -# muttrc file for account david.julien@ens-lyon.fr -set realname = "David JULIEN" -set from = "david.julien@ens-lyon.fr" -set sendmail = "msmtp -a david.julien@ens-lyon.fr" -alias me david.julien -set folder = "$XDG_DATA_HOME/mail/david.julien@ens-lyon.fr" -set header_cache = "$XDG_CACHE_HOME/neomutt/david.julien@ens-lyon.fr/headers" -set message_cachedir = "$XDG_CACHE_HOME/neomutt/david.julien@ens-lyon.fr/bodies" -set mbox_type = Maildir - -set crypt_autosign = yes -set pgp_self_encrypt = yes -set pgp_default_key = "0x9D5279329BB80FA0" - -bind index,pager gg noop -bind index,pager g noop -bind index,pager M noop -bind index,pager C noop -bind index gg first-entry -unmailboxes * -unalternates * -set signature="$XDG_CONFIG_HOME/neomutt/accounts/ens.signature" -unmacro index o -macro index o "mailsync" "run mbsync to sync david.julien@ens-lyon.fr" - -mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=MOVEP" "=QEST" "=fanfare" -set record = "+Sent" -macro index,pager gs "=Sent" "go to sent" -macro index,pager Ms ";=Sent" "move mail to sent" -macro index,pager Cs ";=Sent" "copy mail to sent" -set postponed = "+Drafts" -macro index,pager gd "=Drafts" "go to drafts" -macro index,pager Md ";=Drafts" "move mail to drafts" -macro index,pager Cd ";=Drafts" "copy mail to drafts" -macro index,pager gt "=Trash" "go to trash" -macro index,pager Mt ";=Trash" "move mail to trash" -macro index,pager Ct ";=Trash" "copy mail to trash" -set trash = "+Trash" -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -set spoolfile = "+INBOX" -macro index,pager gf "=fanfare" "go to fanfare" -macro index,pager Mf ";=fanfare" "move mail to fanfare" -macro index,pager Cf ";=fanfare" "copy mail to fanfare" -macro index,pager gI "=internship" "go to internship" -macro index,pager MI ";=internship" "move mail to internship" -macro index,pager CI ";=internship" "copy mail to internship" -macro index,pager gm "=MOVEP" "go to MOVEP" -macro index,pager Mm ";=MOVEP" "move mail to MOVEP" -macro index,pager Cm ";=MOVEP" "copy mail to MOVEP" -macro index,pager gq "=QEST" "go to QEST" -macro index,pager Mq ";=QEST" "move mail to QEST" -macro index,pager Cq ";=QEST" "copy mail to QEST" diff --git a/.config/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc b/.config/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc deleted file mode 100644 index a889735..0000000 --- a/.config/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc +++ /dev/null @@ -1,67 +0,0 @@ -# vim: filetype=neomuttrc -# muttrc file for account david.julien@univ-nantes.fr -set realname = "David JULIEN" -set from = "david.julien@univ-nantes.fr" -set sendmail = "msmtp -a univ" -alias me david.julien -set folder = "$XDG_DATA_HOME/mail/univ" -set header_cache = "$XDG_CACHE_HOME/neomutt/univ/headers" -set message_cachedir = "$XDG_CACHE_HOME/neomutt/univ/bodies" -set mbox_type = Maildir - -set crypt_autosign = yes -set pgp_self_encrypt = yes -set pgp_default_key = "0x1DD6B2BA6DD78810" - -bind index,pager gg noop -bind index,pager g noop -bind index,pager M noop -bind index,pager C noop -bind index gg first-entry -unmailboxes * -unalternates * -set signature="$XDG_CONFIG_HOME/neomutt/accounts/nantes.signature" -unmacro index o -macro index o "mailsync" "run mbsync to sync david.julien@univ-nantes.fr" - -mailboxes "=Sent" "=Drafts" "=Trash" "=INBOX" "=thesis" "=publications" "=teaching" "=teaching/X11I020" "=teaching/X11I040" "=forge" "=velo" "=admin" "=login" -set record = "+Sent" -macro index,pager gs "=Sent" "go to sent" -macro index,pager Ms ";=Sent" "move mail to sent" -macro index,pager Cs ";=Sent" "copy mail to sent" -set postponed = "+Drafts" -macro index,pager gd "=Drafts" "go to drafts" -macro index,pager Md ";=Drafts" "move mail to drafts" -macro index,pager Cd ";=Drafts" "copy mail to drafts" -macro index,pager gt "=Trash" "go to trash" -macro index,pager Mt ";=Trash" "move mail to trash" -macro index,pager Ct ";=Trash" "copy mail to trash" -set trash = "+Trash" -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -set spoolfile = "+INBOX" -macro index,pager gT "=thesis" "go to thesis" -macro index,pager MT ";=thesis" "move mail to thesis" -macro index,pager CT ";=thesis" "copy mail to thesis" -macro index,pager gf "=forge" "go to forge" -macro index,pager Mf ";=forge" "move mail to forge" -macro index,pager Cf ";=forge" "copy mail to forge" -macro index,pager gv "=velo" "go to velo" -macro index,pager Mv ";=velo" "move mail to velo" -macro index,pager Cv ";=velo" "copy mail to velo" -macro index,pager ga "=admin" "go to admin" -macro index,pager Ma ";=admin" "move mail to admin" -macro index,pager Ca ";=admin" "copy mail to admin" -macro index,pager gl "=login" "go to login" -macro index,pager Ml ";=login" "move mail to login" -macro index,pager Cl ";=login" "copy mail to login" -macro index,pager gp "=publications" "go to publications" -macro index,pager Mp ";=publications" "move mail to publications" -macro index,pager Cp ";=publications" "copy mail to publications" -macro index,pager gc2 "=teaching/X11I020" "go to teaching/X11I020" -macro index,pager Mc2 ";=teaching/X11I020" "move mail to teaching/X11I020" -macro index,pager Cc2 ";=teaching/X11I020" "copy mail to teaching/X11I020" -macro index,pager gc4 "=teaching/X11I040" "go to teaching/X11I040" -macro index,pager Mc4 ";=teaching/X11I040" "move mail to teaching/X11I040" -macro index,pager Cc4 ";=teaching/X11I040" "copy mail to teaching/X11I040" diff --git a/.config/neomutt/accounts/3-david.julien@mailo.com.muttrc b/.config/neomutt/accounts/3-david.julien@mailo.com.muttrc deleted file mode 100644 index f6bf6cf..0000000 --- a/.config/neomutt/accounts/3-david.julien@mailo.com.muttrc +++ /dev/null @@ -1,59 +0,0 @@ -# vim: filetype=neomuttrc -# muttrc file for account email@adress.you -set realname = "David JULIEN" -set from = "david.julien@mailo.com" -set sendmail = "msmtp -a mailo" -alias me david.julien -set folder = "$XDG_DATA_HOME/mail/mailo" -set header_cache = "$XDG_CACHE_HOME/neomutt/mailo/headers" -set message_cachedir = "$XDG_CACHE_HOME/neomutt/mailo/bodies" -set mbox_type = Maildir - -set crypt_autosign = yes -set pgp_self_encrypt = yes -set pgp_default_key = "0x86C2FBBE4A4F0F7F" - -bind index,pager gg noop -bind index,pager g noop -bind index,pager M noop -bind index,pager C noop -bind index gg first-entry -unmailboxes * -unalternates * -set signature="$XDG_CONFIG_HOME/neomutt/accounts/mailo.signature" -unmacro index o -macro index o "mailsync" "run mbsync to sync david.julien@mailo.com" - -mailboxes "=sent" "=draftbox" "=trash" "=INBOX" "=farigoule" "=promo_fanfare" "=mediapart" "=git" "=sosh" -set record = "+sent" -macro index,pager gs "=sent" "go to sent" -macro index,pager Ms ";=sent" "move mail to sent" -macro index,pager Cs ";=sent" "copy mail to sent" -set postponed = "+draftbox" -macro index,pager gd "=draftbox" "go to drafts" -macro index,pager Md ";=draftbox" "move mail to drafts" -macro index,pager Cd ";=draftbox" "copy mail to drafts" -macro index,pager gt "=trash" "go to trash" -macro index,pager Mt ";=trash" "move mail to trash" -macro index,pager Ct ";=trash" "copy mail to trash" -set trash = "+trash" -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -set spoolfile = "+INBOX" - -macro index,pager gf "=farigoule" "go to farigoule" -macro index,pager Mf ";=farigoule" "move mail to farigoule" -macro index,pager Cf ";=farigoule" "copy mail to farigoule" -macro index,pager gp "=promo_fanfare" "go to promo_fanfare" -macro index,pager Mp ";=promo_fanfare" "move mail to promo_fanfare" -macro index,pager Cp ";=promo_fanfare" "copy mail to promo_fanfare" -macro index,pager gm "=mediapart" "go to mediapart" -macro index,pager Mm ";=mediapart" "move mail to mediapart" -macro index,pager Cm ";=mediapart" "copy mail to mediapart" -macro index,pager gg "=git" "go to git" -macro index,pager Mg ";=git" "move mail to git" -macro index,pager Cg ";=git" "copy mail to git" -macro index,pager gh "=sosh" "go to sosh" -macro index,pager Mh ";=sosh" "move mail to sosh" -macro index,pager Ch ";=sosh" "copy mail to sosh" diff --git a/.config/neomutt/accounts/ens.signature b/.config/neomutt/accounts/ens.signature deleted file mode 100644 index 14e7658..0000000 --- a/.config/neomutt/accounts/ens.signature +++ /dev/null @@ -1,4 +0,0 @@ - -David JULIEN -M2 Informatique Fondamentale -ENS de Lyon diff --git a/.config/neomutt/accounts/mailo.signature b/.config/neomutt/accounts/mailo.signature deleted file mode 100644 index 034281e..0000000 --- a/.config/neomutt/accounts/mailo.signature +++ /dev/null @@ -1,2 +0,0 @@ - -David JULIEN diff --git a/.config/neomutt/accounts/nantes.signature b/.config/neomutt/accounts/nantes.signature deleted file mode 100644 index 64b56a8..0000000 --- a/.config/neomutt/accounts/nantes.signature +++ /dev/null @@ -1,7 +0,0 @@ - -David JULIEN -Doctorant au LS2N (Nantes) -Équipe VELO - -Faculté de Sciences et Techniques -Bâtiment 11 - Bureau 221 diff --git a/.config/neomutt/accounts/posteo.signature b/.config/neomutt/accounts/posteo.signature deleted file mode 100644 index 034281e..0000000 --- a/.config/neomutt/accounts/posteo.signature +++ /dev/null @@ -1,2 +0,0 @@ - -David JULIEN diff --git a/.config/neomutt/maps b/.config/neomutt/maps index 7088d5d..efb72f0 100644 --- a/.config/neomutt/maps +++ b/.config/neomutt/maps @@ -5,10 +5,7 @@ bind index,pager g noop bind index \Cf noop # Switching accounts -macro index,pager ip 'source $XDG_CONFIG_HOME/neomutt/accounts/1-david.julien@posteo.net.muttrc!;' "switch to david.julien@posteo.net" -macro index,pager is 'source $XDG_CONFIG_HOME/neomutt/accounts/2-david.julien@ens-lyon.fr.muttrc!;' "switch to david.julien@ens-lyon.fr" -macro index,pager in 'source $XDG_CONFIG_HOME/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc!;' "switch to david.julien@univ-nantes.fr" -macro index,pager im 'source $XDG_CONFIG_HOME/neomutt/accounts/3-david.julien@mailo.com.muttrc!;' "switch to david.julien@mailo.com" +macro index,pager i1 'source $XDG_CONFIG_HOME/neomutt/accounts/account_template.muttrc!;' "switch to email@address.you" # General rebindings bind index j next-entry diff --git a/.config/neomutt/muttrc.template b/.config/neomutt/muttrc.template deleted file mode 100644 index ace1410..0000000 --- a/.config/neomutt/muttrc.template +++ /dev/null @@ -1,5 +0,0 @@ -# vim: filetype=neomuttrc -source /home/swytch/.config/mutt/neomutt.muttrc -source /home/swytch/.config/mutt/accounts/account_template.muttrc -macro index,pager i1 'source -/home/swytch/.config/mutt/accounts/account_template.muttrc!;' "switch to david.julien@posteo.net" diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc.template similarity index 88% rename from .config/neomutt/neomuttrc rename to .config/neomutt/neomuttrc.template index 480a7eb..407f168 100644 --- a/.config/neomutt/neomuttrc +++ b/.config/neomutt/neomuttrc.template @@ -1,8 +1,4 @@ # vim: filetype=neomuttrc -# Adapted from Luke Smith's mutt-wizard config files. -# More information : https://github.com/LukeSmithxyz/mutt-wizard - - set mailcap_path = $XDG_CONFIG_HOME/neomutt/mailcap:$mailcap_path set mime_type_query_command = "file --mime-type -b %s" set date_format="%d/%m/%y %I:%M%p" @@ -30,7 +26,7 @@ auto_view application/pgp-encrypted #set display_filter = "tac | sed '/\\\[-- Autoview/,+1d' | tac" # Suppress autoview messages. alternative_order text/plain text/enriched text/html - source $XDG_CONFIG_HOME/neomutt/maps source $XDG_CONFIG_HOME/neomutt/colors -source $XDG_CONFIG_HOME/neomutt/accounts/2-david.julien@univ-nantes.fr.muttrc +source $XDG_CONFIG_HOME/neomutt/accounts/account_template.muttrc +$XDG_CONFIG_HOME/neomutt/accounts/account_template.muttrc!;' "switch to email@address.you diff --git a/.config/notmuch/default/hooks/post_new.sh b/.config/notmuch/default/hooks/post_new.sh deleted file mode 100755 index 0c8b092..0000000 --- a/.config/notmuch/default/hooks/post_new.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env sh - -# The accounts to be cleaned -accounts="univ" - -filter() { - notmuch search --output=files --format=text0 $parameters and tag:unread| xargs -0 --no-run-if-empty mv -t "$XDG_DATA_HOME/mail/$account/$tag/new/" - notmuch search --output=files --format=text0 $parameters and not tag:unread| xargs -0 --no-run-if-empty mv -t "$XDG_DATA_HOME/mail/$account/$tag/cur/" -} - -for account in $accounts -do - notmuch tag --input $XDG_CONFIG_HOME/notmuch/tags/$account - tags_location="$XDG_CONFIG_HOME/notmuch/tags/$account" - tags="$(grep "+" "$tags_location" | sed -e 's/^.//' -e 's/ .*//')" - for tag in $tags - do - case $tag in - "+univ") ;; - *) parameters="folder:$account/INBOX and tag:$tag" && filter;; - esac - done -done diff --git a/.config/notmuch/tags/univ b/.config/notmuch/tags/univ deleted file mode 100644 index b6d7884..0000000 --- a/.config/notmuch/tags/univ +++ /dev/null @@ -1,18 +0,0 @@ -# vim: filetype=none - -# !filters will be applied top to bottom - -# mailbox -#+univ -- path:univ/ - -+teaching/X11I020 -inbox subject:x11i020 -+teaching/X11I040 -inbox subject:x11i040 - -+publications -inbox subject:[hal] -+forge -inbox from:gitlab@univ-nantes.fr - -+velo -inbox subject:[ls2n-velo] -+login -inbox from:login@univ-nantes.fr - -+admin -inbox from:virginie.dupont or from alexiane.brard or from emmanuelle.sale -+thesis -inbox from:benoit.delahaye or from:guillaume.cantin or from:gilles.ardourel From b66dcdcec7d9ec7976c6beaffe3799e6e7c75e17 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:09:20 +0100 Subject: [PATCH 04/19] [nvim] feat: smart pasting in visual mode --- .config/nvim/lua/maps.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index a6afe95..1dfb8ef 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -35,6 +35,11 @@ vim.keymap.set("n", "p", "\"+P", { desc = "Copy from clipboard"} ) +vim.keymap.set("x", "p", + "\"_dP", + { desc = "Send selection to void register and paste from clipboard" } +) + vim.keymap.set("n", "", "w! | !compiler %", { desc = "Compile current file using ~/.local/bin/compiler"} From 5e892c4f2c8a9fe9a42d4e6283c5014fe9f705fd Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:11:01 +0100 Subject: [PATCH 05/19] [nvim] feat: add description to --- .config/nvim/lua/maps.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index 1dfb8ef..756f0c9 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -82,4 +82,6 @@ vim.keymap.set("n", "s", ) -- snippets -vim.keymap.set({ "i", "s" }, "", "luasnip-next-choice") +vim.keymap.set({ "i", "s" }, "", "luasnip-next-choice", + { desc = "Cycle through luasnip choices" } +) From 312d469f22f34b0c7ffa07063a6ed798e7c5e967 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:11:21 +0100 Subject: [PATCH 06/19] [nvim] feat: comments and formatting --- .config/nvim/lua/maps.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index 756f0c9..fbac41b 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -11,7 +11,7 @@ vim.keymap.set({ "n", "v" }, "", }) vim.g.mapleader = " " --- Dealing with word wrap +-- dealing with word wrap vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { @@ -27,26 +27,30 @@ vim.keymap.set("n", "j", desc = "Smart down motion" }) -vim.keymap.set("n", "y", +-- yank and pasting +vim.keymap.set({ "n", "v" }, "y", "\"+y", { desc = "Yank to clipboard"} ) vim.keymap.set("n", "p", "\"+P", - { desc = "Copy from clipboard"} + { desc = "Paste from clipboard" } ) vim.keymap.set("x", "p", "\"_dP", { desc = "Send selection to void register and paste from clipboard" } ) +-- comfort zone vim.keymap.set("n", "", "w! | !compiler %", - { desc = "Compile current file using ~/.local/bin/compiler"} + { desc = "Compile current file using ~/.local/bin/compiler" } ) + +-- packer vim.keymap.set("n", "u", function() require("packer").sync() end, - { desc = "Sync packer config and update plugins"} + { desc = "Sync packer config and update plugins" } ) -- telescope From 07741bae28c58410a99d5103a50823377d38f19d Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:30:23 +0100 Subject: [PATCH 07/19] [nvim] fix: keymaps for visual-mode only --- .config/nvim/lua/maps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index fbac41b..c3934bd 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -28,7 +28,7 @@ vim.keymap.set("n", "j", }) -- yank and pasting -vim.keymap.set({ "n", "v" }, "y", +vim.keymap.set({ "n", "x" }, "y", "\"+y", { desc = "Yank to clipboard"} ) From 17f4fcbe18424fbd17e5f5d2e59e0a7620d585ba Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:30:59 +0100 Subject: [PATCH 08/19] [nvim] feat: send selection to void register --- .config/nvim/lua/maps.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index c3934bd..3b8e52e 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -41,6 +41,12 @@ vim.keymap.set("x", "p", { desc = "Send selection to void register and paste from clipboard" } ) +-- deletion +vim.keymap.set({ "n", "x" }, "d", + "\"_d", + { desc = "Send selection to void register" } +) + -- comfort zone vim.keymap.set("n", "", "w! | !compiler %", From 1c90ace02802252363d6f4d36e35e11a8f770cf7 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 7 Jan 2023 22:50:54 +0100 Subject: [PATCH 09/19] [nvim] fix: lsp formatting vim.lsp.buf.formatting got deprecated --- .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 8af6b8d..ba49aa5 100644 --- a/.config/nvim/lua/plugin/lsp/init.lua +++ b/.config/nvim/lua/plugin/lsp/init.lua @@ -38,7 +38,7 @@ local on_attach = function(_, bufnr) vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) vim.keymap.set("n", "ln", vim.diagnostic.goto_next, opts) vim.keymap.set("n", "lp", vim.diagnostic.goto_prev, opts) - vim.keymap.set("n", "lf", vim.lsp.buf.formatting, opts) + vim.keymap.set("n", "lf", vim.lsp.buf.format, opts) vim.keymap.set("n", "", vim.lsp.buf.signature_help, opts) vim.keymap.set("n", "wa", vim.lsp.buf.add_workspace_folder, opts) From 58f90bbf8b36968ce3cabbb91690cce9f5ac47ab Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 00:25:07 +0100 Subject: [PATCH 10/19] [dwm] feat: window selborder get its own variable --- .config/X11/xcolors_dark | 1 + .config/X11/xcolors_light | 1 + .local/src/dwm | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/X11/xcolors_dark b/.config/X11/xcolors_dark index 4ef9146..b2094a5 100644 --- a/.config/X11/xcolors_dark +++ b/.config/X11/xcolors_dark @@ -30,6 +30,7 @@ *.foreground: #fbf1c7 *.normforeground: #a89984 *.selforeground: #ebdbb2 +*.selborder: #427d61 *.cursorColor: #ebdbb2 /* dmenu colors */ diff --git a/.config/X11/xcolors_light b/.config/X11/xcolors_light index 4efad90..ffded1c 100644 --- a/.config/X11/xcolors_light +++ b/.config/X11/xcolors_light @@ -30,6 +30,7 @@ *.foreground: #665c64 *.normforeground: #665c64 *.selforeground: #1d2021 +*.selborder: #d65d0e *.cursorColor: #1d2021 /* dmenu colors */ diff --git a/.local/src/dwm b/.local/src/dwm index 4af8e13..115058f 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 4af8e137098783c0c17305bae7b9b440bd6571b7 +Subproject commit 115058faa89079d6b83603946a22bc9340b79091 From c8aee7fd9cf16e07a89ddcfb5d690568a261409d Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 00:25:33 +0100 Subject: [PATCH 11/19] [dwm] feat: increase bordersize --- .config/X11/xresources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/X11/xresources b/.config/X11/xresources index 9568298..5701d71 100644 --- a/.config/X11/xresources +++ b/.config/X11/xresources @@ -4,7 +4,7 @@ *.japan: IPAexGothic:size=12 /* dwm config */ -dwm.borderpx: 2 +dwm.borderpx: 3 dwm.gappx: 15 /* st config */ From 24cf70ac9dc7b299f98204ee0c91e6026696c2f5 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 00:37:01 +0100 Subject: [PATCH 12/19] [repo] feat: put everything on chapril.org --- .gitmodules | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitmodules b/.gitmodules index 70837f4..af80c0c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,18 @@ -[submodule ".local/src/dwm"] - path = .local/src/dwm - url = git@github.com:swy7ch/dwm.git -[submodule ".local/src/dwmblocks"] - path = .local/src/dwmblocks - url = git@github.com:swy7ch/dwmblocks.git -[submodule ".local/src/st"] - path = .local/src/st - url = git@github.com:swy7ch/st.git -[submodule ".local/src/dmenu"] - path = .local/src/dmenu - url = git@github.com:swy7ch/dmenu -[submodule ".local/src/slock"] - path = .local/src/slock - url = git@github.com:swy7ch/slock.git [submodule ".local/src/astronomy.nvim"] path = .local/src/astronomy.nvim - url = git@github.com:swy7ch/astronomy.nvim + url = ssh://gitea@forge.chapril.org:222/swytch/astronomy.nvim +[submodule ".local/src/dmenu"] + path = .local/src/dmenu + url = ssh://gitea@forge.chapril.org:222/swytch/dmenu +[submodule ".local/src/dwm"] + path = .local/src/dwm + url = ssh://gitea@forge.chapril.org:222/swytch/dwm +[submodule ".local/src/dwmblocks"] + path = .local/src/dwmblocks + url = ssh://gitea@forge.chapril.org:222/swytch/dwmblocks +[submodule ".local/src/slock"] + path = .local/src/slock + url = ssh://gitea@forge.chapril.org:222/swytch/slock +[submodule ".local/src/st"] + path = .local/src/st + url = ssh://gitea@forge.chapril.org:222/swytch/st From 0e9e90734d1a4f84304375e046b28b64e466dad1 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 15:28:08 +0100 Subject: [PATCH 13/19] [st] feat: update to 0.9 --- .local/src/st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/src/st b/.local/src/st index 465b6c8..870124f 160000 --- a/.local/src/st +++ b/.local/src/st @@ -1 +1 @@ -Subproject commit 465b6c89b7ea9cd53fe3417d62f50dd1922df5dc +Subproject commit 870124f0fe23699b6d7ab33b789952d3279cf061 From 9625223687b6eda299e5e533b3d0ca385f5931af Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 15:28:46 +0100 Subject: [PATCH 14/19] [dmenu] feat: update to 5.2 --- .local/src/dmenu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/src/dmenu b/.local/src/dmenu index 0f4c5fa..d5b5994 160000 --- a/.local/src/dmenu +++ b/.local/src/dmenu @@ -1 +1 @@ -Subproject commit 0f4c5faed3e396832bd11586371698d06bf21b71 +Subproject commit d5b5994a280d07312e21f07d307c15e50bded81f From e697700e75352c57ee1bc6f273ce4c40d146981c Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 15:29:47 +0100 Subject: [PATCH 15/19] [dwm] feat: update to 6.4 --- .local/src/dwm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/src/dwm b/.local/src/dwm index 115058f..16bc69c 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 115058faa89079d6b83603946a22bc9340b79091 +Subproject commit 16bc69ce1ca3b2a6a1eed77a2c3c5499188612da From f80d34861275165252db2a9c9f0659dd152cce64 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 15:31:16 +0100 Subject: [PATCH 16/19] [system] feat: restartsig patch for dwm switch-color keybinding now restarts dwm --- .config/sxhkd/sxhkdrc | 2 +- .local/src/dwm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index a92f7b4..ac734a5 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -39,7 +39,7 @@ super + shift + o dmenuopen super + c - switch-colors + switch-colors && kill -1 $(pidof dwm) super + alt + c switch-colors -s diff --git a/.local/src/dwm b/.local/src/dwm index 16bc69c..4a476e8 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 16bc69ce1ca3b2a6a1eed77a2c3c5499188612da +Subproject commit 4a476e877c4ce2210cafedfe7146b21d87a6a169 From 1344ce8f2d23bbfa16e60366c83d1809d6df098a Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 17:46:53 +0100 Subject: [PATCH 17/19] [st] fix: color codes in config.def.h --- .local/src/st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/src/st b/.local/src/st index 870124f..c0ce7e4 160000 --- a/.local/src/st +++ b/.local/src/st @@ -1 +1 @@ -Subproject commit 870124f0fe23699b6d7ab33b789952d3279cf061 +Subproject commit c0ce7e475b271aaf80059b2f2dd3163a8cf5f145 From 863b0c367b0e2523170f698eb05eca6868fe35d5 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 18:12:17 +0100 Subject: [PATCH 18/19] [dwm] feat: restoreafterrestart patch --- .local/src/dwm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/src/dwm b/.local/src/dwm index 4a476e8..36a8e80 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 4a476e877c4ce2210cafedfe7146b21d87a6a169 +Subproject commit 36a8e80ee2ac923016019b65dc88be7cb166b074 From 23e4798377018a0172d5ce5ad4c94c9f59f6388a Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 8 Jan 2023 18:19:23 +0100 Subject: [PATCH 19/19] [dotfiles] feat: update gitignore remove useless stuff add personnal configs --- .gitignore | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 648d53d..c686ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,6 @@ !/.zshenv !/.local -!/.local/bin/ -!/.local/src/ /.local/lib/ /.local/include/ /.local/share/ @@ -16,16 +14,19 @@ /.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/mbsync/config +/.config/msmtp/config +/.config/neomutt/neomuttrc +/.config/neomutt/personnal_maps +/.config/neomutt/accounts/ /.config/nvim/plugin/ /.config/pulse/ -/.config/transmission-daemon/* -/.config/transmission-daemon/settings.json +/.config/transmission-daemon/ /.config/zsh/.zcompdump /**/*.log