Compare commits
7 Commits
master
...
b1cc37ba00
| Author | SHA1 | Date | |
|---|---|---|---|
| b1cc37ba00 | |||
| 560a4c3f57 | |||
| 736c07d7c5 | |||
| e113219dcd | |||
|
|
e39995c5ee | ||
|
|
b05ba3c9a3 | ||
|
|
a120bce087 |
@@ -1,7 +1,5 @@
|
|||||||
alias cdrepo='cd ~/Repositories/'
|
alias cdrepo='cd ~/Repositories/'
|
||||||
alias cdgithub='cd ~/Repositories/Github'
|
|
||||||
alias cdgitlab='cd ~/Repositories/Gitlab'
|
alias cdgitlab='cd ~/Repositories/Gitlab'
|
||||||
alias cdgitea='cd ~/Repositories/Gitea'
|
alias cdgithub='cd ~/Repositories/Github'
|
||||||
alias cdgh=cdgithub
|
|
||||||
alias cdgl=cdgitlab
|
alias cdgl=cdgitlab
|
||||||
alias cdgt=cdgitea
|
alias cdgh=cdgithub
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/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
7
bashrc
@@ -28,6 +28,7 @@ _source_dir_files "${BASEDIR}"/libs
|
|||||||
|
|
||||||
# Source 3rd party libs if they exists
|
# 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/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
|
# Early customization
|
||||||
_source_dir_files "${BASEDIR}"/rc.before.d
|
_source_dir_files "${BASEDIR}"/rc.before.d
|
||||||
@@ -36,12 +37,6 @@ _source_dir_files "${BASEDIR}"/rc.before.d
|
|||||||
_source_dir_files "${BASEDIR}"/rc
|
_source_dir_files "${BASEDIR}"/rc
|
||||||
_source_dir_files "${BASEDIR}"/rc.d
|
_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 alias definitions
|
||||||
_source_file_if_exists ~/.bash_aliases
|
_source_file_if_exists ~/.bash_aliases
|
||||||
_source_file_if_exists "${BASEDIR}"/aliases
|
_source_file_if_exists "${BASEDIR}"/aliases
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if (command -v flux &>/dev/null); then
|
if (command -v flux &>/dev/null); then
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if (command -v tea &>/dev/null); then
|
|
||||||
source <(tea completion bash)
|
|
||||||
fi
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/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
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function term_change_title {
|
function term_change_title
|
||||||
|
{
|
||||||
case $TERM in
|
case $TERM in
|
||||||
# Change the window title of X terminals
|
# Change the window title of X terminals
|
||||||
xterm* | rxvt* | urxvt* | Eterm)
|
xterm*|rxvt*|urxvt*|Eterm)
|
||||||
echo -ne "\033]0;${1}\007"
|
echo -ne "\033]0;${1}\007"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Change the window title of screen terminals
|
# Change the window title of screen terminals
|
||||||
screen* | tmux*)
|
screen*)
|
||||||
echo -ne "\033k${1}\033\\"
|
echo -ne "\033k${1}\033\\"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if (command -v keychain &>/dev/null); then
|
if (command -v keychain &>/dev/null); then
|
||||||
eval "$(keychain --inherit any --quiet --noask ~/.ssh/id_{rsa,ed25519})"
|
eval "$(keychain --eval --noask ~/.ssh/{id_ed25519,id_rsa_native})"
|
||||||
fi
|
fi
|
||||||
|
|||||||
47
rc.d/fzf
47
rc.d/fzf
@@ -1,47 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if (command -v fzf &>/dev/null); then
|
|
||||||
|
|
||||||
source <(fzf --bash)
|
|
||||||
|
|
||||||
# Navigation vers un répertoire
|
|
||||||
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
|
|
||||||
FZF_CTRL_R_OPTS="$(
|
|
||||||
cat <<'EOF'
|
|
||||||
--height 60%
|
|
||||||
--border sharp
|
|
||||||
--layout reverse
|
|
||||||
--prompt ' '
|
|
||||||
--pointer ❯
|
|
||||||
--marker ✔
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
export FZF_CTRL_R_OPTS
|
|
||||||
|
|
||||||
fi
|
|
||||||
10
rc.d/tmux
10
rc.d/tmux
@@ -8,13 +8,13 @@ if (command -v tmux &>/dev/null); then
|
|||||||
nb_sessions_attached=$(tmux list-session | grep -c "attached")
|
nb_sessions_attached=$(tmux list-session | grep -c "attached")
|
||||||
nb_sessions_detached=$(tmux list-session | grep -c -v "attached")
|
nb_sessions_detached=$(tmux list-session | grep -c -v "attached")
|
||||||
|
|
||||||
echo_info "tmux : found ${nb_sessions} session(s)"
|
echo_info "Found ${nb_sessions} tmux session(s)"
|
||||||
|
|
||||||
echo "➤ ${nb_sessions_attached} session(s) attached"
|
echo " * ${nb_sessions_attached} attached"
|
||||||
tmux list-sessions | grep "attached" | sed -e 's/^/ • /'
|
tmux list-sessions | grep "attached" | sed -e 's/^/ - /'
|
||||||
|
|
||||||
echo "➤ ${nb_sessions_detached} session(s) detached"
|
echo " * ${nb_sessions_detached} detached"
|
||||||
tmux list-sessions | grep -v "attached" | sed -e 's/^/ • /'
|
tmux list-sessions | grep -v "attached" | sed -e 's/^/ - /'
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if (command -v zoxide &>/dev/null); then
|
|
||||||
eval "$(zoxide init bash)"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user