diff --git a/files/.config/zsh/custom/000-env.zsh b/files/.config/zsh/custom/000-env.zsh index ea556db..968b8ac 100644 --- a/files/.config/zsh/custom/000-env.zsh +++ b/files/.config/zsh/custom/000-env.zsh @@ -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/* - diff --git a/files/.config/zsh/custom/100-alias.zsh b/files/.config/zsh/custom/100-alias.zsh index 31f8dc1..8036bac 100644 --- a/files/.config/zsh/custom/100-alias.zsh +++ b/files/.config/zsh/custom/100-alias.zsh @@ -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" diff --git a/files/.config/zsh/custom/101-function.zsh b/files/.config/zsh/custom/101-function.zsh index 90d7da8..7d80ea8 100644 --- a/files/.config/zsh/custom/101-function.zsh +++ b/files/.config/zsh/custom/101-function.zsh @@ -1,7 +1,3 @@ -mkcdir() { - mkdir -p "$1" && cd "$1" -} - vialias() { $EDITOR $ZSH_CUSTOM/100-alias.zsh source $ZSH_CUSTOM/100-alias.zsh diff --git a/files/.config/zsh/custom/102-autocompletion.zsh b/files/.config/zsh/custom/102-autocompletion.zsh deleted file mode 100644 index e69de29..0000000 diff --git a/files/.config/zsh/custom/200-motd.zsh b/files/.config/zsh/custom/200-motd.zsh index a775017..bbc7963 100644 --- a/files/.config/zsh/custom/200-motd.zsh +++ b/files/.config/zsh/custom/200-motd.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 diff --git a/scripts/pre-install.sh b/scripts/pre-install.sh new file mode 100644 index 0000000..45711de --- /dev/null +++ b/scripts/pre-install.sh @@ -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 +