1
0

Compare commits

...

5 Commits

Author SHA1 Message Date
22d0c9e391 Update .zshrc 2025-10-05 16:05:44 +02:00
48dcc3cb3c Update .zimrc 2025-10-05 16:00:26 +02:00
8a4bd87007 Add .zim/modules/passwordstore/init.zsh
Add .zim/modules/passwordstore/init.zsh.zwc
2025-10-05 15:47:46 +02:00
b495e4e935 Update .zshrc 2025-10-05 15:39:19 +02:00
843d5b0c84 Update .zimrc 2025-10-05 15:35:16 +02:00
4 changed files with 47 additions and 106 deletions

View File

@@ -0,0 +1,27 @@
# modules-local/passwordstore/init.zsh
# === Passwordstore async pull ===
PASS_PULL_LOG="/tmp/passstore-pull.log"
PASS_PULL_LOCK="/tmp/passstore-pull.lock"
# Fonction pour lancer le pull async
_passwordstore_async_pull() {
# Si le répertoire existe et qu'aucun pull n'est en cours
[[ -d "$PASSWORD_STORE_DIR" ]] || return
if [[ ! -f "$PASS_PULL_LOCK" ]]; then
# Création d'un lock pour éviter les pulls simultanés
touch "$PASS_PULL_LOCK"
(
cd "$PASSWORD_STORE_DIR" || exit
# Vérifie la connectivité avant pull
if git ls-remote &>/dev/null; then
git pull --ff-only &> "$PASS_PULL_LOG"
fi
rm -f "$PASS_PULL_LOCK"
) & disown
fi
}
# Lancer au démarrage
_passwordstore_async_pull

View File

@@ -3,38 +3,19 @@
# Modules # Modules
# ------- # -------
# Environment
#
# Sets sane Zsh built-in environment options.
zmodule environment zmodule environment
# Applies correct bindkeys for input events.
zmodule input zmodule input
# Completion
#
# Additional completion definitions for Zsh.
zmodule zsh-users/zsh-completions zmodule zsh-users/zsh-completions
# 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 zmodule zsh-users/zsh-autosuggestions
zmodule zsh-users/zsh-syntax-highlighting
zmodule zsh-users/zsh-history-substring-search
# zmodule completion
# Productivity
#
# Alacritty completions modules
zmodule alacritty -z
# Sets up asdf, with auto install and optimized usage of the direnv plugin.
#zmodule asdf
# Buku completions modules
zmodule buku -z zmodule buku -z
# chezmoi
zmodule joke/zim-chezmoi zmodule joke/zim-chezmoi
# Provides handy git aliases and functions.
zmodule git zmodule git
# Sets a custom terminal title.
zmodule termtitle zmodule termtitle
# Provides archive and unarchive functions for easy archive manipulation.
zmodule archive zmodule archive
{{ if (eq .chezmoi.os "linux") -}} {{ if (eq .chezmoi.os "linux") -}}
# Distribution aliases and functions. # Distribution aliases and functions.
@@ -46,35 +27,17 @@ zmodule pacman
zmodule debian zmodule debian
{{- end }} {{- end }}
{{- end }} {{- end }}
# sudo module
zmodule sudo -z zmodule sudo -z
# Utility aliases and functions. Adds colour to ls, grep and less.
zmodule utility zmodule utility
# exa
## zmodule exa
# fzf
zmodule fzf zmodule fzf
# Personal aliases
zmodule jl-helper -z zmodule jl-helper -z
# magic enter feature from subnixr's minimal prompt theme
zmodule magic-enter zmodule magic-enter
# 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
#
# Exposes git repository status information to prompts.
zmodule git-info zmodule git-info
# A customizable version of steeef's prompt theme.
zmodule steeef zmodule steeef
# starship # zmodule joke/zim-starship
zmodule joke/zim-starship zmodule password -z
zstyle ':zim:module' skip 'prompt'
# End configuration added by Zim install # End configuration added by Zim install

View File

@@ -37,51 +37,26 @@ ZOXIDE_CMD_OVERRIDE=cd
# Module configuration # Module configuration
# -------------------- # --------------------
# zstyle ':zim:module' skip 'prompt'
# completion
#
# Set a custom path for the completion dump file. # Set a custom path for the completion dump file.
# If none is provided, the default ${ZDOTDIR:-${HOME}}/.zcompdump is used. # If none is provided, the default ${ZDOTDIR:-${HOME}}/.zcompdump is used.
#zstyle ':zim:completion' dumpfile "${ZDOTDIR:-${HOME}}/.zcompdump-${ZSH_VERSION}" #zstyle ':zim:completion' dumpfile "${ZDOTDIR:-${HOME}}/.zcompdump-${ZSH_VERSION}"
#
# git
#
# Set a custom prefix for the generated aliases. The default prefix is 'G'. # Set a custom prefix for the generated aliases. The default prefix is 'G'.
#zstyle ':zim:git' aliases-prefix 'g' #zstyle ':zim:git' aliases-prefix 'g'
#
# input
#
# Append `../` to your input for each `.` you type after an initial `..` # Append `../` to your input for each `.` you type after an initial `..`
zstyle ':zim:input' double-dot-expand yes zstyle ':zim:input' double-dot-expand yes
#
# termtitle
#
# Set a custom terminal title format using prompt expansion escape sequences. # Set a custom terminal title format using prompt expansion escape sequences.
# See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes # See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# If none is provided, the default '%n@%m: %~' is used. # If none is provided, the default '%n@%m: %~' is used.
#zstyle ':zim:termtitle' format '%1~' #zstyle ':zim:termtitle' format '%1~'
#
# zsh-autosuggestions
#
# Customize the style that the suggestions are shown with. # Customize the style that the suggestions are shown with.
# See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style # See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style
#ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10' #ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'
#
# zsh-syntax-highlighting
#
# Set what highlighters will be used.
# See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
# Customize the main highlighter styles. # Customize the main highlighter styles.
@@ -99,6 +74,8 @@ if [[ ${ZIM_HOME}/init.zsh -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
fi fi
source ${ZIM_HOME}/init.zsh source ${ZIM_HOME}/init.zsh
autoload -Uz compinit && compinit -C
# ------------------------------ # ------------------------------
# Post-init module configuration # Post-init module configuration
# ------------------------------ # ------------------------------
@@ -125,7 +102,7 @@ bindkey -M vicmd 'j' history-substring-search-down
# Bind ctrl+a and ctrl+e # Bind ctrl+a and ctrl+e
bindkey '^A' vi-beginning-of-line bindkey '^A' vi-beginning-of-line
bindkey '^E' vi-end-of-line bindkey '^E' vi-end-of-line
# }}} End configuration added by Zim install # }}} End configuration added by Zim install
@@ -185,38 +162,20 @@ if [ -z "$TMUX" ]; then
ssh-add 2>/dev/null ssh-add 2>/dev/null
# start tmux # start tmux
#
# passwordstore
#
if [[ $(curl -s -w "%{http_code}\n" -L "https://git.jefflance.me/" -o /dev/null) = "200" ]]; then
echo -ne "\npasswordstore: " && pass git pull
else
echo -ne "\npasswordstore: serveur hors ligne"
fi
tmux attach tmux attach
fi fi
fi fi
#
# ocaml
#
# [[ ! -r '/home/jeff/.opam/opam-init/init.zsh' ]] || source '/home/jeff/.opam/opam-init/init.zsh' > /dev/null 2> /dev/null
# test -r /home/jeff/.opam/opam-init/init.zsh && . /home/jeff/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
# eval "$(asdf exec opam env)"
# #
# # conda
# #
# # !! Contents within this block are managed by 'conda init' !!
# __conda_setup="$('/home/jeff/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
# if [ $? -eq 0 ]; then
# eval "$__conda_setup"
# else
# if [ -f "/home/jeff/miniconda3/etc/profile.d/conda.sh" ]; then
# . "/home/jeff/miniconda3/etc/profile.d/conda.sh"
# else
# export PATH="/home/jeff/miniconda3/bin:$PATH"
# fi
# fi
# unset __conda_setup
# #
# gpg-agent # gpg-agent
# #
@@ -226,11 +185,3 @@ gpgconf --launch gpg-agent
#
# passwordstore
#
if [[ $(curl -s -w "%{http_code}\n" -L "https://git.jefflance.me/" -o /dev/null) = "200" ]]; then
echo -ne "\npasswordstore: " && pass git pull
else
echo -ne "\npasswordstore: serveur hors ligne"
fi