Compare commits

...

12 Commits

Author SHA1 Message Date
5f8997f418 chore(rc): fzf integration config spacing rework 2025-11-03 01:34:40 +01:00
693d20f2cf feat(aliases): Improve aliases for kitty 2025-11-03 01:33:44 +01:00
db981696b6 fix: activate mise early
because some tools set in rc.d (like fzf, ...) depends on it
2025-11-03 01:24:52 +01:00
594a212ebc chore(rc): rework fzf integration config 2025-11-01 12:53:41 +01:00
8fef2338eb feat(aliases): Add aliases for kitty 2025-10-24 12:48:22 +02:00
ea9139f77f feat(completion): Add autocompletion for tea
`tea` is the command line tool for Gitea.
2025-10-02 22:41:47 +02:00
15a56af2c8 chores(completion): spaces 2025-10-02 22:40:57 +02:00
a56929aa8b feat(aliases): Add some aliases for cd 2025-09-28 19:03:11 +02:00
526e6cae26 feat(functions): Add a function to start and log into the devenv container 2025-09-28 17:55:51 +02:00
1a003a9d72 feat(bashrc): Add management for functions 2025-09-28 17:55:51 +02:00
2b51dfd554 feat(bashrc): remove z.sh third party library
Better use zoxide (See https://github.com/ajeetdsouza/zoxide).
(It is available with mise. Just `mise use -g zoxide`.)
2025-09-28 17:52:54 +02:00
d078a852df fix(profile): fix keychain inheritance 2025-09-28 17:50:30 +02:00
9 changed files with 77 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
alias cdrepo='cd ~/Repositories/'
alias cdgitlab='cd ~/Repositories/Gitlab'
alias cdgithub='cd ~/Repositories/Github'
alias cdgl=cdgitlab
alias cdgitlab='cd ~/Repositories/Gitlab'
alias cdgitea='cd ~/Repositories/Gitea'
alias cdgh=cdgithub
alias cdgl=cdgitlab
alias cdgt=cdgitea

7
aliases.d/kitty Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
# [ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
if [ -n "${KITTY_INSTALLATION_DIR}" ]; then
alias ssh="kitty +kitten ssh"
alias icat="kitty +kitten icat"
fi

7
bashrc
View File

@@ -28,7 +28,6 @@ _source_dir_files "${BASEDIR}"/libs
# Source 3rd party libs if they exists
_source_file_if_exists "${BASEDIR}/3rd-party/complete-alias/complete_alias"
# _source_file_if_exists "${BASEDIR}/3rd-party/z/z.sh" # FIX: Problème de gestion de la variable PROMPT_COMMAND
# Early customization
_source_dir_files "${BASEDIR}"/rc.before.d
@@ -37,6 +36,12 @@ _source_dir_files "${BASEDIR}"/rc.before.d
_source_dir_files "${BASEDIR}"/rc
_source_dir_files "${BASEDIR}"/rc.d
# Source functions definitions
_source_file_if_exists ~/.bash_functions
_source_file_if_exists "${BASEDIR}"/functions
_source_dir_files "${BASEDIR}"/functions
_source_dir_files "${BASEDIR}"/functions.d
# Source alias definitions
_source_file_if_exists ~/.bash_aliases
_source_file_if_exists "${BASEDIR}"/aliases

View File

@@ -1,4 +1,3 @@
#!/bin/bash
if (command -v flux &>/dev/null); then

5
completion.d/tea Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
if (command -v tea &>/dev/null); then
source <(tea completion bash)
fi

18
functions.d/devenv Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
function devenv() {
local status
# Get LXC container status
status=$(lxc info devenv | yq .Status)
# Start container if not running
if [ "${status}" != "RUNNING" ]; then lxc start devenv; fi
# Rename tmux window if inside tmux
if [ -n "$TMUX" ]; then tmux rename-window "devenv"; fi
# Login as user xavier
lxc exec devenv -- login -f xavier
}

View File

@@ -1,5 +1,5 @@
#!/bin/bash
if (command -v keychain &>/dev/null); then
eval "$(keychain --eval --noask ~/.ssh/{id_ed25519,id_rsa_native})"
eval "$(keychain --inherit any --quiet --noask ~/.ssh/id_{rsa,ed25519})"
fi

View File

@@ -4,28 +4,44 @@ if (command -v fzf &>/dev/null); then
source <(fzf --bash)
# Selection de fichiers
export FZF_CTRL_T_OPTS="--height 60% \
--border sharp \
--layout reverse \
--prompt '󰈞 ' \
--pointer \
--marker ✔"
# Navigation vers un répertoire
export FZF_ALT_C_OPTS="--height 60% \
--border sharp \
--layout reverse \
--prompt '󰥨 ' \
--pointer \
--marker ✔"
FZF_ALT_C_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt '󰥨 '
--pointer
--marker ✔
EOF
)"
export FZF_ALT_C_OPTS
# Selection de fichiers
FZF_CTRL_T_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt '󰈞 '
--pointer
--marker ✔
--preview="bat --color=always --style=-header {}"
EOF
)"
export FZF_CTRL_T_OPTS
# Navigation dans l'historique
export FZF_CTRL_R_OPTS="--height 60% \
--border sharp \
--layout reverse \
--prompt ' ' \
--pointer \
--marker ✔"
FZF_CTRL_R_OPTS="$(
cat <<'EOF'
--height 60%
--border sharp
--layout reverse
--prompt ' '
--pointer
--marker ✔
EOF
)"
export FZF_CTRL_R_OPTS
fi