feat: zsh-xdg-setup

This commit is contained in:
Ahmad Ansori Palembani 2024-05-18 14:30:24 +07:00
parent 61fac023fd
commit af4234464f
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 11 additions and 0 deletions

9
zsh-xdg-setup Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
[ "${EUID:-$(id -u)}" -eq 0 ] || { >&2 echo "Please run this as root."; exit 1; }
echo """#!/bin/zsh
export ZDOTDIR=\"\${XDG_CONFIG_HOME:-\$HOME/.config}/zsh\"""" > /etc/__zshenv && \
mv -i /etc/__zshenv /etc/zshenv
ln -si /etc/zshenv /etc/zsh/zshenv