Merge branch 'main' of https://code.lksz.me/lksz/dotfiles
This commit is contained in:
commit
d8e37c1fdf
|
@ -1,3 +1,13 @@
|
|||
append_to_envvar() {
|
||||
local __VAL_tmp_=$(eval "echo '$1'")
|
||||
local __VAL_tmp_=$(echo "$__VAL_tmp_" | sed "s/${2}//" )
|
||||
$1=$__VAL_tmp_${2}
|
||||
}
|
||||
insert_to_envvar() {
|
||||
local __VAL_tmp_=$(eval "echo '$1'")
|
||||
local __VAL_tmp_=$(echo "$__VAL_tmp_" | sed "s/${2}//" )
|
||||
$1=${2}$__VAL_tmp_
|
||||
}
|
||||
get_clean_path() {
|
||||
sed 's/ *:\?$//g;s/`/``/g;s/:/`:`/g;s/\\`:`/\\:/g;' <<< $1 | \
|
||||
awk -v RS='`:`' -v ORS='`:`' '!arr[$0]++' | \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MY_VI="$(type -fP my_vi)"
|
||||
|
||||
port DOOMROOT="$HOME/.config/_my.emacs/doom"
|
||||
export DOOMROOT="$HOME/.config/_my.emacs/doom"
|
||||
[[ -x $DOOMROOT/emacs.d/bin/doom ]] && function doom() {
|
||||
export EMACSDIR="$DOOMROOT/emacs.d"
|
||||
export DOOMDIR="$DOOMROOT/config"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if [[ -n "$(which-command oh-my-posh)" ]]; then
|
||||
OHMYPOSH_CONFIG=''
|
||||
[[ -r ~/.poshtheme.omp.json ]] && OHMYPOSH_CONFIG="~/.poshtheme.omp.json"
|
||||
eval "$(oh-my-posh init bash --config $OHMYPOSH_CONFIG)"
|
||||
[[ -r ~/.poshtheme.omp.json ]] && OHMYPOSH_CONFIG="--config ~/.poshtheme.omp.json"
|
||||
eval "$(oh-my-posh init bash $OHMYPOSH_CONFIG)"
|
||||
unset OHMYPOSH_CONFIG
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
alias which-command="type -fP "
|
||||
function which-command() {
|
||||
type -fP "${@}"
|
||||
}
|
||||
|
||||
function add-alias-to-bash-completion-code() {
|
||||
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*' "$1" '.*$\)/\1 ' "$2/g'")
|
||||
|
|
|
@ -117,8 +117,6 @@ check-exist 'oh-my-posh'
|
|||
check-exist '~/.poshtheme.omp.json' "${USER_HOME}/.poshtheme.omp.json" "-r"
|
||||
check-exist 'tmux' || MISSING_APT_PACKAGES+=('tmux')
|
||||
check-exist 'git' || MISSING_APT_PACKAGES+=('git')
|
||||
check-exist 'emacs' || MISSING_APT_PACKAGES+=('emacs')
|
||||
check-exist 'monit' || MISSING_APT_PACKAGES+=('monit')
|
||||
check-exist 'direnv' || MISSING_APT_PACKAGES+=('direnv')
|
||||
check-exist "chezmoi" '' '' '' 'wget -O- chezmoi.io/get | bash # or'
|
||||
# wget -O- lksz.me/dotfiles | bash'
|
||||
|
|
Loading…
Reference in New Issue