From ceec338c162ca0d3d438b405162f8b8e0d9ec039 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Tue, 4 Apr 2023 11:38:34 +0200 Subject: [PATCH] update install scripts --- conf.d/alacritty/alacritty.yml | 5 +- conf.d/mpd/mpd.conf | 7 ++- conf.d/notmuch/post-new | 2 +- conf.d/nvim/coc.vim | 10 ++-- conf.d/nvim/ddc.vim | 16 ++--- conf.d/nvim/init.vim | 25 +++++++- conf.d/nvim/keybindings.vim | 10 +--- conf.d/nvim/plug.vim | 18 +++--- conf.d/vscode/vscode-settings.json | 2 + .../jl-helper/functions/update_auth_sock | 12 ++++ conf.d/zim/modules/jl-helper/init.zsh | 9 ++- conf.d/zim/modules/jl-helper/init.zsh.zwc | Bin 1128 -> 2224 bytes conf.d/zim/modules/manjaro/init.zsh.zwc | Bin 0 -> 2016 bytes conf.d/zim/zimrc | 55 ++++++++++++------ conf.d/zim/zshenv | 10 ++-- conf.d/zim/zshrc | 22 +++++-- conf/mbsyncrc | 8 +-- conf/notmuch-config | 9 ++- conf/tmux.conf.local | 4 +- meta/tasks/zsh.yaml | 9 ++- 20 files changed, 149 insertions(+), 84 deletions(-) create mode 100644 conf.d/zim/modules/jl-helper/functions/update_auth_sock create mode 100644 conf.d/zim/modules/manjaro/init.zsh.zwc diff --git a/conf.d/alacritty/alacritty.yml b/conf.d/alacritty/alacritty.yml index 2b3e4e7..cdf46af 100644 --- a/conf.d/alacritty/alacritty.yml +++ b/conf.d/alacritty/alacritty.yml @@ -85,7 +85,7 @@ window: # # Override the variant of the GTK theme. Commonly supported values are `dark` # and `light`. Set this to `None` to use the default theme variant. - gtk_theme_variant: dark + windows.decorations_theme_variant: dark #scrolling: # Maximum number of lines in the scrollback buffer. @@ -284,6 +284,9 @@ live_config_reload: true # program: /bin/bash # args: # - --login +shell: + program: /bin/zsh + # Startup directory # # Directory the shell is started in. If this is unset, or `None`, the working diff --git a/conf.d/mpd/mpd.conf b/conf.d/mpd/mpd.conf index 9b2cb27..b5bd34e 100644 --- a/conf.d/mpd/mpd.conf +++ b/conf.d/mpd/mpd.conf @@ -83,7 +83,7 @@ sticker_file "/home/jeff/.config/mpd/sticker.sql" # For network #bind_to_address "localhost" bind_to_address "127.0.0.1" -bind_to_address "192.168.0.1" +bind_to_address "192.168.1.1" # # And for Unix Socket # bind_to_address "/home/jeff/.config/mpd/socket" @@ -128,7 +128,7 @@ metadata_to_use "albumartist,artist,album,title,track,name,genre,date,disc" # This setting enables automatic update of MPD's database when files in # music_directory are changed. # -#auto_update "yes" +auto_update "yes" # # Limit the depth of the directories being watched, 0 means only watch # the music directory itself. There is no limit by default. @@ -311,7 +311,8 @@ input { audio_output { type "pulse" name "MPD pulse output" -# server "localhost" # optional + server "127.0.0.1" # optional + mixer_type "software" # sink "alsa_output.pci-0000_00_1b.0.analog-stereo" # optional } diff --git a/conf.d/notmuch/post-new b/conf.d/notmuch/post-new index a99f4f3..9b38628 100755 --- a/conf.d/notmuch/post-new +++ b/conf.d/notmuch/post-new @@ -7,7 +7,7 @@ # -ASTROID_BIN=$(which astroid) +MAILCLIENT_BIN=$(which aerc) NOTMUCH_BIN=$(which notmuch) NOTIFY_BIN=$(which notify-send) diff --git a/conf.d/nvim/coc.vim b/conf.d/nvim/coc.vim index a084fb8..e3b4d96 100644 --- a/conf.d/nvim/coc.vim +++ b/conf.d/nvim/coc.vim @@ -18,11 +18,11 @@ " no select by `"suggest.noselect": true` in your configuration file " NOTE: Use command ':verbose imap ' to make sure tab is not mapped by " other plugin before putting this into your config -inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ CheckBackspace() ? "\" : - \ coc#refresh() -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" +" inoremap +" \ coc#pum#visible() ? coc#pum#next(1) : +" \ CheckBackspace() ? "\" : +" \ coc#refresh() +" inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" " Make to accept selected completion item or notify coc.nvim to format " u breaks current undo, please make your own choice diff --git a/conf.d/nvim/ddc.vim b/conf.d/nvim/ddc.vim index 123703b..6d32fe3 100644 --- a/conf.d/nvim/ddc.vim +++ b/conf.d/nvim/ddc.vim @@ -35,15 +35,15 @@ call ddc#custom#patch_filetype('markdown', 'sourceParams', { \ 'around': {'maxSize': 100}, \ }) -" Mappings -" : completion. -inoremap -\ ddc#map#pum_visible() ? '' : -\ (col('.') <= 1 getline('.')[col('.') - 2] =~# '\s') ? -\ '' : ddc#map#manual_complete() +" " Mappings +" " : completion. +" inoremap +" \ ddc#map#pum_visible() ? '' : +" \ (col('.') <= 1 getline('.')[col('.') - 2] =~# '\s') ? +" \ '' : ddc#map#manual_complete() -" : completion back. -inoremap ddc#map#pum_visible() ? '' : '' +" " : completion back. +" inoremap ddc#map#pum_visible() ? '' : '' " Use ddc. call ddc#enable() diff --git a/conf.d/nvim/init.vim b/conf.d/nvim/init.vim index f4744bf..8c9c712 100644 --- a/conf.d/nvim/init.vim +++ b/conf.d/nvim/init.vim @@ -250,7 +250,7 @@ set hlsearch set incsearch " Don't redraw while executing macros (good performance config) -set lazyredraw +set nolazyredraw " For regular expressions turn magic on set magic @@ -418,10 +418,10 @@ let g:buffet_right_trunc_icon = "\uf0a9" " ----- " Highlight the symbol and its references when holding the cursor. -autocmd CursorHold * silent call CocActionAsync('highlight') +" autocmd CursorHold * silent call CocActionAsync('highlight') " Disable warnings -let g:coc_disable_startup_warning = 1 +" let g:coc_disable_startup_warning = 1 " ----- " }}} @@ -646,9 +646,19 @@ let g:python3_host_prog = '/usr/bin/python3' lua require("noice").setup() +" ----- +" }}} + + +" Notify {{{ +" ----- + +lua require("notify").setup() + " ----- " }}} + " OCaml {{{ " ----- @@ -743,6 +753,15 @@ let g:tmux_navigator_save_on_switch = 2 " }}} +" Treesitter {{{ +" ----- + +lua require'nvim-treesitter.configs'.setup{highlight={enable=true}} + +" ----- +" }}} + + " Vimroom {{{ " ----- diff --git a/conf.d/nvim/keybindings.vim b/conf.d/nvim/keybindings.vim index bd9d7a1..f4e9ca0 100644 --- a/conf.d/nvim/keybindings.vim +++ b/conf.d/nvim/keybindings.vim @@ -17,7 +17,7 @@ " ----- " For COC -verbose imap +" verbose imap " Disable highlights when you press : map :noh @@ -51,14 +51,6 @@ map :saveas " Buffers {{{ " ----- -" command! -bang -nargs=? -complete=dir Files -" \ call fzf#vim#files( -" \ , -" \ fzf#vim#with_preview( -" \ {'options': ['--layout=reverse', '--info=inline']} -" \ ), -" \ 0 -" \ ) command -bang CloseBuffer :call CloseBuffer() map ff lua require('telescope.builtin').find_files() diff --git a/conf.d/nvim/plug.vim b/conf.d/nvim/plug.vim index b2bd278..a758f97 100644 --- a/conf.d/nvim/plug.vim +++ b/conf.d/nvim/plug.vim @@ -58,6 +58,12 @@ Plug 'bagrat/vim-buffet', { 'as': 'buffet' } Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' } +" Treesitter +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + +" Nvim-notify +Plug 'rcarriga/nvim-notify' + " Noice Plug 'folke/noice.nvim' Plug 'MunifTanjim/nui.nvim' @@ -83,6 +89,9 @@ Plug 'Konfekt/FastFold' " Grammalecte Plug 'dpelle/vim-Grammalecte' +" LanguageTool +Plug 'dpelle/vim-LanguageTool' + " Markdown Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} Plug 'godlygeek/tabular' @@ -142,16 +151,7 @@ Plug 'edkolev/tmuxline.vim' Plug 'benmills/vimux' " Colorschemes -" Plug 'jdsimcoe/abstract.vim', { 'as': 'abstract' } -" Plug 'romainl/Apprentice', { 'as': 'apprentice' } -" Plug 'jdsimcoe/hyper.vim', { 'as': 'hyper' } -" Plug 'dracula/vim', { 'as': 'dracula' } -" Plug 'nanotech/jellybeans.vim', { 'as': 'jellybeans' } -" Plug 'hardcoreplayers/oceanic-material', { 'as': 'oceanic' } -" Plug 'xero/sourcerer.vim', { 'as': 'sourcerer' } Plug 'connorholyday/vim-snazzy', { 'as': 'snazzy' } -" Plug 'jacoborus/tender.vim', { 'as': 'tender' } -" Plug 'dylanaraps/wal.vim' " Sudo workaround plugin Plug 'lambdalisue/suda.vim' diff --git a/conf.d/vscode/vscode-settings.json b/conf.d/vscode/vscode-settings.json index 1a9b6b7..99d1015 100644 --- a/conf.d/vscode/vscode-settings.json +++ b/conf.d/vscode/vscode-settings.json @@ -108,4 +108,6 @@ "terminal.integrated.defaultProfile.linux": "zsh", "git.enableSmartCommit": true, "editor.fontFamily": "'Source Code Pro', 'Nunito Sans', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", + "workbench.colorTheme": "Visual Studio 2019 Dark", + "autoHeader": {}, } \ No newline at end of file diff --git a/conf.d/zim/modules/jl-helper/functions/update_auth_sock b/conf.d/zim/modules/jl-helper/functions/update_auth_sock new file mode 100644 index 0000000..fb3d841 --- /dev/null +++ b/conf.d/zim/modules/jl-helper/functions/update_auth_sock @@ -0,0 +1,12 @@ +update_auth_sock() { + local socket_path="$(tmux show-environment | sed -n 's/^SSH_AUTH_SOCK=//p')" + + if ! [[ "$socket_path" ]]; then + echo 'no socket path' >&2 + return 1 + else + export SSH_AUTH_SOCK="$socket_path" + fi +} + +compdef _files update_auth_sock diff --git a/conf.d/zim/modules/jl-helper/init.zsh b/conf.d/zim/modules/jl-helper/init.zsh index d6363b0..2bbd1c1 100644 --- a/conf.d/zim/modules/jl-helper/init.zsh +++ b/conf.d/zim/modules/jl-helper/init.zsh @@ -29,16 +29,19 @@ alias neomutt='neomutt -f ${HOME}/Mail/jeff.lance@mala.fr/inbox/' # Utilities # -alias rs='rsync -Pavzl' # rsync shortcut -alias ls='lsd' # pretty ls +alias ip='ip -c' # ip address +# alias ls='lsd' # pretty ls alias md='mkdir -p' # mkdir alias alias open='xdg-open' # open files +alias pips='pip_search' # pip search tool +alias rs='rsync -Pavzl' # rsync shortcut alias t='tmux' # tmux alias ta='t a -t' # tmux attach to a session alias tls='t ls' # tmux list sessions +alias tvs='transcode-video --scan' # tmux new session alias tn='t n -t' # tmux new session alias xcolor='xcolor | xclip -i' # xcolor -alias youtube-dl='youtube-dl -f best' # youtube-dl best download +alias yd='yt-dlp' # yt-dlp best download # diff --git a/conf.d/zim/modules/jl-helper/init.zsh.zwc b/conf.d/zim/modules/jl-helper/init.zsh.zwc index d7acbad5e2ad67ce60161269910fe413428e2293..0d41588daca5698d2998cf7d0584719fab2ecc11 100644 GIT binary patch literal 2224 zcmeH{F>ljA6vtm@d<1iI2cLC&jOwfVq~=_xyYR_xyZ!e$7VRhZjCbk?$(ZjHSdB}gonru>-Y?MYUc*X|@3d_JxO7>%ESkNy( z_eDA>hVfqDtOEM7j}dr(l?iU5UIAFMP4Xcc94*FKV9{2nvP@-YV!UN(iHDI^+F-tN zX7AWAQnJqiS-?o=Ht&ezSWSw#9mKefUDgp9X6$kNt0FA-G|x}M$CcjSB%I{; zNu5h1zyG1qFOmHI8R0blIpHLKeS5}l;kqq5J^t?Xui$Nb!+9Q4`dke0HRkm?-->s| scQniC_F~ofa4#Ca0GimHYPc6JX0<(wY3?FF#PJ26ulve%Un%>_ZzpI3KmY&$ literal 1128 zcmdr~F>c#16#bU$7~WDKONRg+yvjm>7F`plDY_H|dVnIbNLP$0(GaDy4$#R!uY1sG(_4?;4c`yn(7(qqBzLW??h(@~ z;5QJaD&ye=ACJS~mB_+Ou}X3sUdSNja>|QP6DI7q4y4nRvytu#CE&}cKp1( z=g%B|s=1#je6UC1~~T# za0+;+nS;0e7Fgc`Yru|JidfU7$ZC`0Ybay2$tFw`{a|WHO?h6MpX_^JBSTWxMrvkg zrmC_U@gn=?n}j&#SK>#(0TdpCQ}UNT;hXk+)vhY@23 zH2p?bu&RnAI8V|vm~FBmD5|*06A=`=Jm+;4WM#IVZN!R^!3pWDea1qEu@5wtE*q-q(fOliV?||DohCcxhfuGVD>YOd` zTi_k=Db=p^_Qd#K0uO;d0&juOsYdP70lx-r?;8I()qX-X$oJLm8Gc1v4xVRRunS%Y z@%@HwJn}`t>u7bOV5VVKrjBgqdsLsU!{NiQAkZBRK@{i3dxM3i7Rp%_}8A(Q?_`c z7G%;tF37OY78Xjs_zjnRn4AJX)1Sp_wWHo%SP1|18=a3-Z-pF^&*yw?NRLj4(-_<_($?eluz literal 0 HcmV?d00001 diff --git a/conf.d/zim/zimrc b/conf.d/zim/zimrc index 96507fb..0af8652 100644 --- a/conf.d/zim/zimrc +++ b/conf.d/zim/zimrc @@ -3,16 +3,31 @@ # Modules # ------- +# Environment +# # Sets sane Zsh built-in environment options. zmodule environment -# Provides handy git aliases and functions. -zmodule git # Applies correct bindkeys for input events. zmodule input + +# Completion +# +# Additional completion definitions for Zsh. +zmodule zsh-users/zsh-completions +# Buku completions modules +zmodule buku +# Enables and configures smart and extensive tab completion. +# completion must be sourced after zsh-users/zsh-completions +zmodule completion +# Fish-like autosuggestions for Zsh. +zmodule zsh-users/zsh-autosuggestions + +# Productivity +# +# Provides handy git aliases and functions. +zmodule git # Sets a custom terminal title. zmodule termtitle -# Utility aliases and functions. Adds colour to ls, grep and less. -zmodule utility # Provides archive and unarchive functions for easy archive manipulation. zmodule archive # Manjaro aliases and functions. @@ -25,6 +40,21 @@ zmodule sudo zmodule https://github.com/rupa/z.git # zsh-kitty completion zmodule https://github.com/redxtech/zsh-kitty.git +# Utility aliases and functions. Adds colour to ls, grep and less. +zmodule utility +# exa +zmodule exa +# fzf +zmodule fzf + +# Syntx highlighting +# +# Fish-like syntax highlighting for Zsh. +# zsh-users/zsh-syntax-highlighting must be sourced after completion +zmodule zsh-users/zsh-syntax-highlighting +# Fish-like history search (up arrow) for Zsh. +# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting +zmodule zsh-users/zsh-history-substring-search # Prompt # @@ -32,20 +62,7 @@ zmodule https://github.com/redxtech/zsh-kitty.git zmodule git-info # A customizable version of steeef's prompt theme. zmodule steeef +# The minimal, blazing-fast, and infinitely customizable prompt for any shell! +zmodule joke/zim-starship -# Additional completion definitions for Zsh. -zmodule zsh-users/zsh-completions -# Buku completions modules -zmodule buku -# Enables and configures smart and extensive tab completion. -# completion must be sourced after zsh-users/zsh-completions -zmodule completion -# Fish-like autosuggestions for Zsh. -zmodule zsh-users/zsh-autosuggestions -# Fish-like syntax highlighting for Zsh. -# zsh-users/zsh-syntax-highlighting must be sourced after completion -zmodule zsh-users/zsh-syntax-highlighting -# Fish-like history search (up arrow) for Zsh. -# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting -zmodule zsh-users/zsh-history-substring-search # }}} End configuration added by Zim install diff --git a/conf.d/zim/zshenv b/conf.d/zim/zshenv index bb1c006..78ea310 100644 --- a/conf.d/zim/zshenv +++ b/conf.d/zim/zshenv @@ -17,10 +17,10 @@ path=(~/bin ~/.local/bin $path[@]) # <<< set PATH so it includes user's private bin if it exists <<< # >>> active gnome-keyring >>> -if [ -n "${DESKTOP_SESSION}" ];then - eval $(gnome-keyring-daemon --replace) - export SSH_AUTH_SOCK -fi +# if [ -n "${DESKTOP_SESSION}" ];then + # eval $(gnome-keyring-daemon --start) 2>/dev/null + # export SSH_AUTH_SOCK +# fi # Check if the ssh-agent is already running # if [ "$(ps -u $USER | grep ssh-agent | wc -l)" -lt "1" ]; then @@ -43,7 +43,7 @@ fi # >>> environment variables >>> export BROWSER=qutebrowser export EDITOR=nvim -export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' +# export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' export MYVIMRC="${HOME}/.vimrc" export PASSWORD_STORE_DIR="${HOME}/Private/.password-store" export PASSWORD_STORE_ENABLE_EXTENSIONS=True diff --git a/conf.d/zim/zshrc b/conf.d/zim/zshrc index f9eacb8..a7f7791 100644 --- a/conf.d/zim/zshrc +++ b/conf.d/zim/zshrc @@ -19,13 +19,13 @@ setopt HIST_IGNORE_ALL_DUPS # # Set editor default keymap to emacs (`-e`) or vi (`-v`) -bindkey -e +bindkey -v # Prompt for spelling correction of commands. setopt CORRECT # Customize spelling correction prompt. -#SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' +SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' # Remove path separator from WORDCHARS. WORDCHARS=${WORDCHARS//[\/]} @@ -165,7 +165,7 @@ bindkey -M vicmd 'j' history-substring-search-down # >>> fzf initialization >>> # -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # <<< fzf initialization <<< # @@ -218,5 +218,19 @@ eval "$(direnv hook zsh)" # # >>> starship >>> -eval "$(starship init zsh)" +# eval "$(starship init zsh)" # <<< starship <<< + +# +# gnome-keyring-daemon +# +eval $(gnome-keyring-daemon --start) 2>/dev/null +export SSH_AUTH_SOCK + +# +# passwordstore +# + +# >>> passwordstore update >>> +echo -ne "\npasswordstore: " && pass git pull +# <<< passwordstore update <<< diff --git a/conf/mbsyncrc b/conf/mbsyncrc index ba268a1..77e0453 100644 --- a/conf/mbsyncrc +++ b/conf/mbsyncrc @@ -96,9 +96,9 @@ SyncState * Expunge Both -Channel jeff.lance@mala.fr-archives -Far :jeff.lance@mala.fr-remote:"Archives" -Near :jeff.lance@mala.fr-local:archives +Channel jeff.lance@mala.fr-archive +Far :jeff.lance@mala.fr-remote:"Archive" +Near :jeff.lance@mala.fr-local:archive Pattern * Create Near MaxMessages 1500 @@ -113,7 +113,7 @@ Channel jeff.lance@mala.fr-sent Channel jeff.lance@mala.fr-trash Channel jeff.lance@mala.fr-drafts Channel jeff.lance@mala.fr-junk -Channel jeff.lance@mala.fr-archives +Channel jeff.lance@mala.fr-archive diff --git a/conf/notmuch-config b/conf/notmuch-config index c8796c1..c53ff67 100644 --- a/conf/notmuch-config +++ b/conf/notmuch-config @@ -12,13 +12,16 @@ name=Jeff LANCE primary_email=jeff.lance@mala.fr [new] -tags=new; +tags=new;unread;inbox; ignore=.mbsyncstate;.isyncuidmap.db;.uidvalidity;.mbsyncstate.journal;.mbsyncstate.new;.mbsyncstate.lock;/.*[.](json|lock|bak)$/;.templates; [search] -exclude_tags= +exclude_tags=deleted;spam; [maildir] -synchronize_flags=true +synchronize_flags=false + +[crypto] +gpg_path=gpg # vim:ft=sh diff --git a/conf/tmux.conf.local b/conf/tmux.conf.local index 5c2974d..ea6dc58 100644 --- a/conf/tmux.conf.local +++ b/conf/tmux.conf.local @@ -78,9 +78,9 @@ run '~/.tmux/plugins/tpm/tpm' # make tmux works with ssh-agent set -g update-environment "DISPLAY SSH_ASKPASS \ - SSH_AUTH_SOCK SSH_AGENT_PID \ + SSH_AGENT_PID \ SSH_CONNECTION WINDOWID XAUTHORITY" -setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock +setenv -g SSH_AUTH_SOCK "/run/user/1000/keyring/ssh" # start with a new session new-session diff --git a/meta/tasks/zsh.yaml b/meta/tasks/zsh.yaml index e779dda..382e899 100644 --- a/meta/tasks/zsh.yaml +++ b/meta/tasks/zsh.yaml @@ -1,6 +1,5 @@ - shell: - - command: '/usr/bin/env bash -c helpers/install_zsh.sh' - description: Installation of zsh configuration - stderr: true - stdout: true - +- command: '/usr/bin/env bash -c helpers/install_zsh.sh' + description: Installation of zsh configuration + stderr: true + stdout: true