cleanup zsh, pre-install script
This commit is contained in:
parent
894b011bb1
commit
d436398ab0
|
@ -1,4 +1,4 @@
|
||||||
# ZSH
|
# make word splitting behave like bash
|
||||||
setopt SH_WORD_SPLIT
|
setopt SH_WORD_SPLIT
|
||||||
|
|
||||||
# Evaluate if root user
|
# Evaluate if root user
|
||||||
|
@ -23,5 +23,3 @@ export IS_ROOT
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||||
|
|
||||||
source ~/.local/profile.d/*
|
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ fi
|
||||||
alias http-server="python -m http.server"
|
alias http-server="python -m http.server"
|
||||||
alias nmap-libvirt="nmap 192.168.122.0/24"
|
alias nmap-libvirt="nmap 192.168.122.0/24"
|
||||||
alias xsel="xsel -b"
|
alias xsel="xsel -b"
|
||||||
|
alias rename="perl-rename"
|
||||||
|
|
||||||
alias drun-it="docker run -it"
|
alias drun-it="docker run -it"
|
||||||
alias dexec-it="docker exec -it"
|
alias dexec-it="docker exec -it"
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
mkcdir() {
|
|
||||||
mkdir -p "$1" && cd "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
vialias() {
|
vialias() {
|
||||||
$EDITOR $ZSH_CUSTOM/100-alias.zsh
|
$EDITOR $ZSH_CUSTOM/100-alias.zsh
|
||||||
source $ZSH_CUSTOM/100-alias.zsh
|
source $ZSH_CUSTOM/100-alias.zsh
|
||||||
|
|
|
@ -10,8 +10,7 @@ if [ "$IS_ROOT" = false ]; then
|
||||||
|
|
||||||
# Check tmux
|
# Check tmux
|
||||||
if tmux info &>/dev/null; then
|
if tmux info &>/dev/null; then
|
||||||
tmux ls
|
printf "\n%s\n\n" "$(tmux ls)"
|
||||||
echo " "
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
fix_permissions() {
|
||||||
|
chown -R "$(id --name -u):$(id --name -g)" "$1"
|
||||||
|
find "$1" -type d -exec chmod 700 {} \;
|
||||||
|
find "$1" -type f -exec chmod 600 {} \;
|
||||||
|
}
|
||||||
|
|
||||||
|
for d in "$HOME/.ssh" "$HOME/.gnupg"; do
|
||||||
|
mkdir -p "$d"
|
||||||
|
fix_permissions "$d"
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue