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
|
||||
|
||||
# Evaluate if root user
|
||||
|
@ -23,5 +23,3 @@ export IS_ROOT
|
|||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
|
||||
source ~/.local/profile.d/*
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ fi
|
|||
alias http-server="python -m http.server"
|
||||
alias nmap-libvirt="nmap 192.168.122.0/24"
|
||||
alias xsel="xsel -b"
|
||||
alias rename="perl-rename"
|
||||
|
||||
alias drun-it="docker run -it"
|
||||
alias dexec-it="docker exec -it"
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
mkcdir() {
|
||||
mkdir -p "$1" && cd "$1"
|
||||
}
|
||||
|
||||
vialias() {
|
||||
$EDITOR $ZSH_CUSTOM/100-alias.zsh
|
||||
source $ZSH_CUSTOM/100-alias.zsh
|
||||
|
|
|
@ -10,8 +10,7 @@ if [ "$IS_ROOT" = false ]; then
|
|||
|
||||
# Check tmux
|
||||
if tmux info &>/dev/null; then
|
||||
tmux ls
|
||||
echo " "
|
||||
printf "\n%s\n\n" "$(tmux ls)"
|
||||
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