1
0

Compare commits

...

33 Commits

Author SHA1 Message Date
f97bedaaa3 add yarn 2025-12-13 20:15:48 +01:00
3cedd9e5b9 Update .zshenv 2025-11-14 11:27:22 +01:00
2a78e46d8f Remove .zim/modules/passwordstore/init.zsh.zwc 2025-11-14 11:14:39 +01:00
9d91d4023b fix 2025-11-14 11:07:21 +01:00
4e8424f256 fix 2025-11-14 11:06:27 +01:00
a7c8b8e976 Add .config/rofi/Manjaro.rasi 2025-11-14 11:01:16 +01:00
b176720e24 Fix and add rofi to path 2025-11-14 10:57:14 +01:00
26ec610ab6 Add .zprofile 2025-11-09 23:56:08 +01:00
7404e1b1ba Update .zshrc 2025-11-09 23:55:22 +01:00
494e6962e3 Update .zim/modules/jl-helper/init.zsh 2025-11-03 09:50:11 +01:00
683d92aa25 Update .zshenv 2025-11-01 20:33:48 +01:00
4cf79f093f up 2025-10-24 18:24:30 +02:00
ab60824b0c Update .zim/modules/passwordstore/init.zsh 2025-10-09 10:08:14 +02:00
029a68eb4c Update .zim/modules/passwordstore/init.zsh 2025-10-09 10:06:43 +02:00
5d749f744b Update .zshrc 2025-10-09 10:03:38 +02:00
caa3942adc Update .zshrc 2025-10-09 10:03:15 +02:00
12633c228e Update .zimrc 2025-10-09 10:00:40 +02:00
b80c60d072 Update .zimrc 2025-10-09 09:59:56 +02:00
70c7f85a38 Update .zshenv 2025-10-09 09:59:16 +02:00
000bd80364 Update .zshrc 2025-10-09 09:57:20 +02:00
23e876558d Update .zimrc 2025-10-05 17:54:09 +02:00
b9b0e2512d Update .zimrc 2025-10-05 17:52:43 +02:00
10ce820874 Update .zimrc 2025-10-05 17:52:14 +02:00
7902a05997 Update .zimrc 2025-10-05 17:46:57 +02:00
00e3e3484c Update .zimrc 2025-10-05 17:46:11 +02:00
740741bc6f Update .zim/modules/passwordstore/init.zsh 2025-10-05 16:28:33 +02:00
74dd5ba04e Update .zim/modules/passwordstore/init.zsh 2025-10-05 16:27:05 +02:00
de65fead4f Update .zim/modules/passwordstore/init.zsh 2025-10-05 16:25:45 +02:00
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
9 changed files with 134 additions and 163 deletions

21
README.md Normal file
View File

@@ -0,0 +1,21 @@
# How to use this repo
## Install [chezmoi](https://www.chezmoi.io/)
```
yay -Sy chezmoi
```
## Set up chezmoi on the computer
```
chezmoi init git.jefflance.me/jeff/chezmoi
```
## Apply chezmoi configuration
```
chezmoi apply
```

View File

@@ -19,6 +19,7 @@ plugins=(
['rust']='https://github.com/code-lever/asdf-rust.git'
['julia']='https://github.com/rkyleg/asdf-julia.git'
['r']='https://github.com/asdf-community/asdf-r.git'
['yarn']='https://github.com/twuni/asdf-yarn.git'
)

View File

@@ -0,0 +1 @@
/home/jeff/.config/rofi/launchers/type-3/style-6.rasi

View File

@@ -50,7 +50,7 @@ alias yd='yt-dlp' # yt-dlp best download
# Shortcuts
#
hash -d crs="${HOME}/cours" # cours
hash -d crs="${HOME}/Cours" # cours
hash -d doc="${HOME}/Documents" # documents
hash -d dot="$(chezmoi source-path)" # dotfiles

View File

@@ -0,0 +1,27 @@
# modules-local/passwordstore/init.zsh
# === Passwordstore async pull ===
PASS_PULL_LOG="/tmp/passstore-pull"
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_$(date +%Y%m%d:%H%M%S).log"
fi
rm -f "$PASS_PULL_LOCK"
) & disown
fi
}
# Lancer au démarrage
_passwordstore_async_pull

View File

@@ -3,39 +3,32 @@
# Modules
# -------
# Environment
#
# Sets sane Zsh built-in environment options.
zmodule environment
# Applies correct bindkeys for input events.
zmodule input
# Completion
#
# Additional completion definitions for Zsh.
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-syntax-highlighting
zmodule zsh-users/zsh-history-substring-search
zmodule completion
zmodule ohmyzsh/ohmyzsh --root plugins/kitty
zmodule ohmyzsh/ohmyzsh --root plugins/starship
zmodule ohmyzsh/ohmyzsh --root plugins/sudo
zmodule ohmyzsh/ohmyzsh --root plugins/zoxide
zmodule ohmyzsh/ohmyzsh --root plugins/direnv
zmodule ohmyzsh/ohmyzsh --root plugins/colorize
zmodule ohmyzsh/ohmyzsh --root plugins/docker-compose
zmodule ohmyzsh/ohmyzsh --root plugins/colored-man-pages
zmodule ohmyzsh/ohmyzsh --root plugins/git
zmodule ohmyzsh/ohmyzsh --root plugins/man
zmodule ohmyzsh/ohmyzsh --root plugins/magic-enter
zmodule ohmyzsh/ohmyzsh --root plugins/per-directory-history
zmodule ohmyzsh/ohmyzsh --root plugins/qrcode
zmodule ohmyzsh/ohmyzsh --root plugins/mosh
# 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
# chezmoi
zmodule joke/zim-chezmoi
# Provides handy git aliases and functions.
zmodule git
# Sets a custom terminal title.
zmodule termtitle
# Provides archive and unarchive functions for easy archive manipulation.
zmodule archive
{{ if (eq .chezmoi.os "linux") -}}
# Distribution aliases and functions.
{{ if (eq .chezmoi.osRelease.id "manjaro") -}}
@@ -45,36 +38,17 @@ zmodule pacman
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
zmodule debian
{{- end }}
{{- end }}
# sudo module
zmodule sudo -z
# Utility aliases and functions. Adds colour to ls, grep and less.
{{- end -}}
zmodule termtitle
zmodule archive
zmodule utility
# exa
## zmodule exa
# fzf
zmodule fzf
# Personal aliases
zmodule jl-helper -z
# magic enter feature from subnixr's minimal prompt theme
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
# A customizable version of steeef's prompt theme.
zmodule steeef
# starship
zmodule joke/zim-starship
zmodule passwordstore -z
zmodule buku -z
zmodule jl-helper -z
# zstyle ':zim:module' skip 'prompt'
# End configuration added by Zim install

1
home/dot_zprofile Normal file
View File

@@ -0,0 +1 @@
[[ -f ~/.profile ]] && . ~/.profile

View File

@@ -20,21 +20,25 @@ path=(~/bin ~/.local/bin $path[@])
# >>> environment variables >>>
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CONFIG_HOME="${HOME}/.config"
# update path
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
# Update path
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:${PATH}"
export GEM_HOME="$(${HOME}/.asdf/shims/gem env user_gemhome)"
export PATH="$PATH:$GEM_HOME/bin"
export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin"
[[ -d ${HOME}/.fuelup ]] && export PATH="$PATH:${HOME}/.fuelup/bin"
export PATH="${GEM_HOME}/bin:${PATH}"
export PATH="$(go env GOBIN):$(go env GOPATH)/bin:${PATH}"
[[ -d ${HOME}/.fuelup ]] && export PATH="${HOME}/.fuelup/bin:${PATH}"
[[ $(command -v rofi) ]] && export PATH="${HOME}/.config/rofi/scripts:${PATH}"
# set default browser, editor and terminal
# Set default browser, editor, terminal and shell
export BROWSER=qutebrowser
export EDITOR=$([[ $(command -v nvim) ]] && echo nvim || echo vim)
export TERMINAL=kitty
export EDITOR=$( ( [[ $(command -v nvim) ]] && echo nvim ) || ( [[ $(command -v vim) ]] && echo vim ) || echo nano)
export TERMINAL=$( ( [[ $(command -v kitty) ]] && echo kitty ) || ( [[ $(command -v alacritty) ]] && echo alacritty ) || echo xterm)
export SHELL=/usr/bin/zsh
# to permit fcitx runs with kitty
export GLFW_IM_MODULE=ibus
# set fuzzy finder command to rg if installed
# Set fuzzy finder command to rg if installed
[[ $(command -v rg) ]] && export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export PASSWORD_STORE_DIR="${HOME}/.password-store"
@@ -43,28 +47,7 @@ export ZK_NOTEBOOK_DIR="${HOME}/Notes"
export OPENAI_API_KEY="$(pass _api_keys/openai_perso-2 2>/dev/null || echo ERROR)"
export IPINFO_API_KEY="$(pass _api_keys/ipinfo_perso-0 2>/dev/null || echo ERROR)"
# Most pure GTK3 apps use wayland by default, but some,
# such as Firefox, require the backend to be explicitly selected.
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
export GTK_CSD=0
# qt wayland
export QT_QPA_PLATFORM="wayland"
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
#Java XWayland blank screens fix
export _JAVA_AWT_WM_NONREPARENTING=1
# set default shell and terminal
export SHELL=/usr/bin/zsh
export TERMINAL_COMMAND=xdg-terminal-exec
# set ozone platform to wayland
export ELECTRON_OZONE_PLATFORM_HINT=wayland
# set electron trash implementation if trash-cli installed
# Set electron trash implementation if trash-cli installed
[[ ( $(command -v code) && $(command -v trash) ) ]] && export ELECTRON_TRASH="trash"
# Disable hardware cursors. This might fix issues with
@@ -78,13 +61,13 @@ fi
export OPENCV_LOG_LEVEL=ERROR
# <<< environment variables <<<
# load profile
# Load profile
set -a
. "$HOME/.config/user-dirs.dirs"
. "${HOME}/.config/user-dirs.dirs"
set +a
if [ -n "$(ls "$HOME"/.config/profile.d 2>/dev/null)" ]; then
for f in "$HOME"/.config/profile.d/*; do
if [ -n "$(ls "${HOME}"/.config/profile.d 2>/dev/null)" ]; then
for f in "${HOME}"/.config/profile.d/*; do
# shellcheck source=/dev/null
. "$f"
done

View File

@@ -33,55 +33,32 @@ WORDCHARS=${WORDCHARS//[\/]}
# Zoxide configuration
ZOXIDE_CMD_OVERRIDE=cd
SPACESHIP_PROMPT_ASYNC=false
# --------------------
# Module configuration
# --------------------
#
# completion
#
zstyle ':zim:module' skip 'prompt'
# Set a custom path for the completion dump file.
# If none is provided, the default ${ZDOTDIR:-${HOME}}/.zcompdump is used.
#zstyle ':zim:completion' dumpfile "${ZDOTDIR:-${HOME}}/.zcompdump-${ZSH_VERSION}"
#
# git
#
# Set a custom prefix for the generated aliases. The default prefix is 'G'.
#zstyle ':zim:git' aliases-prefix 'g'
#
# input
#
# Append `../` to your input for each `.` you type after an initial `..`
zstyle ':zim:input' double-dot-expand yes
#
# termtitle
#
# Set a custom terminal title format using prompt expansion escape sequences.
# See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# If none is provided, the default '%n@%m: %~' is used.
#zstyle ':zim:termtitle' format '%1~'
#
# zsh-autosuggestions
#
# Customize the style that the suggestions are shown with.
# See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style
#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)
# Customize the main highlighter styles.
@@ -89,6 +66,8 @@ ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
#typeset -A ZSH_HIGHLIGHT_STYLES
#ZSH_HIGHLIGHT_STYLES[comment]='fg=10'
# ------------------
# Initialize modules
# ------------------
@@ -99,6 +78,10 @@ if [[ ${ZIM_HOME}/init.zsh -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
fi
source ${ZIM_HOME}/init.zsh
# autoload -Uz compinit && compinit -C
# ------------------------------
# Post-init module configuration
# ------------------------------
@@ -130,29 +113,29 @@ bindkey '^E' vi-end-of-line
#
# zoxide
#
if (( $+commands[zoxide] )); then
eval "$(zoxide init --cmd ${ZOXIDE_CMD_OVERRIDE:-z} zsh)"
else
echo '[zshrc] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'
fi
# #
# # zoxide
# #
# if (( $+commands[zoxide] )); then
# eval "$(zoxide init --cmd ${ZOXIDE_CMD_OVERRIDE:-z} zsh)"
# else
# echo '[zshrc] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'
# fi
# #
# # direnv
# #
# [[ -x $(command -v direnv) ]] && eval "$(direnv hook zsh)"
# setopt PROMPT_SUBST
#
# direnv
#
[[ -x $(command -v direnv) ]] && eval "$(direnv hook zsh)"
setopt PROMPT_SUBST
show_virtual_env() {
if [[ -n "$CONDA_DEFAULT_ENV" && -n "$DIRENV_DIR" ]]; then
echo "($(basename $CONDA_DEFAULT_ENV))"
fi
}
PS1='$(show_virtual_env)'$PS1
# show_virtual_env() {
# if [[ -n "$CONDA_DEFAULT_ENV" && -n "$DIRENV_DIR" ]]; then
# echo "($(basename $CONDA_DEFAULT_ENV))"
# fi
# }
# PS1='$(show_virtual_env)'$PS1
@@ -191,29 +174,17 @@ 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
# # passwordstore
# #
# # !! 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"
# if [[ $(curl -s -w "%{http_code}\n" -L "https://git.jefflance.me/" -o /dev/null) = "200" ]]; then
# echo -ne "\npasswordstore: " && pass git pull
# 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"
# echo -ne "\npasswordstore: serveur hors ligne"
# fi
# tmux attach
# fi
# fi
# unset __conda_setup
@@ -226,11 +197,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