📥️ Various nice improvements
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
#!/bin/sh
|
||||
which lsd>/dev/null
|
||||
if [ "$?" = "0" ]; then
|
||||
alias ls="lsd -h --color=auto --group-dirs first"
|
||||
else
|
||||
([ $? -eq 0 ] && \
|
||||
alias ls="lsd -h --color=auto --group-dirs first") || \
|
||||
alias ls="ls -h --color=auto --group-directories-first"
|
||||
fi
|
||||
# ([ "$?" = "0" ] && \
|
||||
# alias ls="lsd -h --color=auto --group-dirs first") || \
|
||||
# if [ $? -eq 0 ]; then
|
||||
# alias ls="lsd -h --color=auto --group-dirs first"
|
||||
# else
|
||||
# alias ls="ls -h --color=auto --group-directories-first"
|
||||
# fi
|
||||
which doas>/dev/null && [ $? -eq 0 ] && alias doas="sudo"
|
||||
alias\
|
||||
ll="ls -l"\
|
||||
la="ls -a"\
|
||||
|
21
roles/shell/files/bin/vault.sh
Executable file
21
roles/shell/files/bin/vault.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
[ -z "$REMOTE" ] && REMOTE=siv@archy.42069.no:/home/coder
|
||||
run_rsync() {
|
||||
rsync "$1" "$2" "$3"
|
||||
[ $? -eq 12 ] && echo -e "\e[0;31mRsync is missing on the remote server!\e[0," && exit 0
|
||||
}
|
||||
pull() {
|
||||
run_rsync "$1" "$3" "$2"
|
||||
}
|
||||
push() {
|
||||
run_rsync "$1" "$2" "$3"
|
||||
}
|
||||
sync() {
|
||||
pull "$1" "$2" "$3"
|
||||
push "$1" "$2" "$3"
|
||||
}
|
||||
case "$1" in
|
||||
mount) cryfs ~/.vault ~/vault -o allow_root ;;
|
||||
push|pull|sync) $1 "-aze ssh" "$HOME/.vault" "$REMOTE" ;;
|
||||
*) echo "Usage: $0 [ push | pull | sync | mount ]" ;;
|
||||
esac
|
@@ -3,6 +3,8 @@
|
||||
- name: Add .bat.conf
|
||||
copy: src=bat.conf dest={{ home }}/.bat.conf owner={{ name }} group={{ group }} mode=0644
|
||||
when: "'bat' in packages or 'bat' in extra_packages"
|
||||
- name: Add ~/.local/bin
|
||||
copy: src=bin dest={{ home }}/.local/bin owner={{ name }} group={{ group }} mode=0755
|
||||
|
||||
- name: Install zsh syntax highlighting (~/.zshrc.d folder)
|
||||
when: not zsh_opt_config
|
||||
|
Reference in New Issue
Block a user