sh: initial commit, profile, alias
This commit is contained in:
commit
54b4cbe4a1
5 changed files with 109 additions and 0 deletions
24
dot_alias
Normal file
24
dot_alias
Normal file
|
@ -0,0 +1,24 @@
|
|||
# xbps
|
||||
alias xup='xi -Su'
|
||||
alias xun='xi -Sun'
|
||||
|
||||
# listing files
|
||||
eza_params=(
|
||||
--git --icons --group --group-directories-first --time-style=long-iso
|
||||
--color-scale=all --modified --classify=auto
|
||||
)
|
||||
eza_params_long=(
|
||||
--long --header
|
||||
)
|
||||
[ ! -z $_EZA_PARAMS ] && eza_params=($_EZA_PARAMS)
|
||||
|
||||
alias ls="eza $eza_params"
|
||||
alias l="eza --git-ignore $eza_params"
|
||||
alias ll="eza $eza_params_long $eza_params"
|
||||
alias la="eza --all $eza_params_long $eza_params"
|
||||
alias lt="eza $eza_params_long $eza_params --level"
|
||||
|
||||
alias cat="bat -p"
|
||||
|
||||
# system helpers
|
||||
command -v doas >/dev/null && alias sudo='doas'
|
52
dot_profile
Normal file
52
dot_profile
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
# .profile
|
||||
|
||||
: ${BROWSER:=$(command -v firefox 2>/dev/null)}
|
||||
export BROWSER
|
||||
|
||||
: ${EDITOR:=$(command -v hx 2>/dev/null)}
|
||||
: ${VISUAL:="$EDITOR"}
|
||||
export EDITOR VISUAL
|
||||
|
||||
: ${PAGER:=$(command -v bat)}
|
||||
export PAGER
|
||||
|
||||
for x in \
|
||||
"$HOME/.local/share" \
|
||||
"/usr/share" \
|
||||
"/usr/local/share" \
|
||||
; do
|
||||
[ -d "$x" ] || continue
|
||||
case ":${XDG_DATA_DIRS}:" in
|
||||
*":${x}:"*) ;;
|
||||
*) XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${x}" ;;
|
||||
esac
|
||||
done
|
||||
export XDG_DATA_DIRS
|
||||
|
||||
for x in \
|
||||
"$HOME/bin" \
|
||||
"$HOME/.local/bin" \
|
||||
"/usr/local/sbin" \
|
||||
"/usr/local/bin" \
|
||||
"/usr/sbin" \
|
||||
"/usr/bin" \
|
||||
"/sbin" \
|
||||
"/bin" \
|
||||
; do
|
||||
[ -d "$x" ] || continue
|
||||
case ":${PATH}:" in
|
||||
*":${x}:"*) ;;
|
||||
*) PATH="${x:+$x:}${PATH}" ;;
|
||||
esac
|
||||
done
|
||||
export PATH
|
||||
|
||||
# XDG_RUNTIME_DIR is managed by turnstile
|
||||
: ${XDG_CONFIG_HOME:=$HOME/.config}
|
||||
: ${XDG_CACHE_HOME:=$HOME/.cache}
|
||||
: ${XDG_DATA_HOME:=$HOME/.data}
|
||||
export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME
|
||||
|
||||
export FZF_DEFAULT_COMMAND="fd --strip-cwd-prefix --hidden --follow"
|
||||
export SVDIR="${XDG_CONFIG_HOME}"/service
|
9
dot_shrc
Normal file
9
dot_shrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
# .shrc
|
||||
|
||||
for f in \
|
||||
"$HOME"/.profile \
|
||||
"$HOME"/.alias \
|
||||
; do
|
||||
[ -f "$f" ] && . "$f"
|
||||
done
|
23
dot_zshrc
Normal file
23
dot_zshrc
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/zsh
|
||||
# .zshrc
|
||||
|
||||
# if not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# load shell agnostic configs
|
||||
source "$HOME"/.shrc
|
||||
|
||||
# init zinit
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
|
||||
[ ! -d "$ZINIT_HOME" ] && {
|
||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
}
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# load custom configs
|
||||
for f in "$HOME"/.zsh/*.zsh ; do
|
||||
source "$f"
|
||||
done
|
||||
|
1
symlink_dot_zprofile
Normal file
1
symlink_dot_zprofile
Normal file
|
@ -0,0 +1 @@
|
|||
/home/hendrik/.profile
|
Loading…
Add table
Reference in a new issue