Rationalize the use of custom config files

This commit is contained in:
Rodolphe Bréard 2021-09-12 12:24:06 +02:00
parent 5bc0b45cdc
commit 2425fdca43
9 changed files with 9 additions and 11 deletions

View file

@ -0,0 +1,11 @@
# Since all keyboards does not include the same keys, the compose key
# should be customized. In order to achieve that, this script requires
# a symbolic link to point to a file containing the name of the key that
# will be used as a compose key.
COMPOSE_KEY_FILE="$HOME/.compose_key"
if [ -f "$COMPOSE_KEY_FILE" ]; then
COMPOSE_KEY=$(cat "$COMPOSE_KEY_FILE")
setxkbmap -option "compose:$COMPOSE_KEY"
fi

View file

@ -0,0 +1,11 @@
add_path() {
BIN_PATH="$1"
if [ -d "$BIN_PATH" ]; then
found=$(echo $PATH | tr ':' '\n' | grep -w "$BIN_PATH")
[ ! "$found" ] && export PATH="$BIN_PATH:$PATH"
true
fi
}
add_path "$HOME/.local/bin"
add_path "$HOME/.cargo/bin"

View file

@ -0,0 +1,6 @@
XDG_USER_DIR_FILE="$HOME/.config/user-dirs.dirs"
if [ -f "$XDG_USER_DIR_FILE" ]; then
. "$XDG_USER_DIR_FILE"
export XDG_PICTURES_DIR="$XDG_PICTURES_DIR"
fi

View file

@ -35,9 +35,6 @@ fi
# Proxy settings
[ -f "$HOME/.proxy" ] && . "$HOME/.proxy"
# Compose key
[ -f ~/.set_compose_key.sh ] && . ~/.set_compose_key.sh
# skim
[ -f "/usr/share/skim/key-bindings.zsh" ] && . /usr/share/skim/key-bindings.zsh
[ -f "/usr/share/skim/completion.zsh" ] && . /usr/share/skim/completion.zsh