This commit is contained in:
Strix 2023-10-14 22:38:12 +02:00
parent 11187dc11c
commit 05595c2e14
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
28 changed files with 210 additions and 246 deletions

View file

@ -0,0 +1,7 @@
super_apply() {
pacman -S --needed zsh cmake
}
super_undo() {
pacman -R zsh
}

41
crates/10-zsh/crate.sh Normal file
View file

@ -0,0 +1,41 @@
#!/bin/sh
describe="Install zsh and oh-my-zsh!"
scripts="@distro @self"
super_apply() {
[ -d /tmp/fastfetch ] || git clone https://github.com/LinusDierheimer/fastfetch /tmp/fastfetch
if ! command -v fastfetch &> /dev/null; then
cd /tmp/fastfetch
mkdir -p build
cd build
cmake ..
cmake --build . --target fastfetch
mv fastfetch /usr/local/bin/fastfetch
fi
usermod $USER --shell /bin/zsh
}
super_undo() {
usermod $USER --shell /bin/bash
}
apply() {
if [ ! -d "$HOME/.oh-my-zsh" ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
PL_DIR=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-autosuggestions $PL_DIR
PL_DIR=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
[ -d "$PL_DIR" ] || git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $PL_DIR
fi
[ -e "$HOME/.zshrc" ] || ln files/.zshrc $HOME/.zshrc
}
undo() {
unlink $HOME/.zshrc
rm -rf $HOME/.oh-my-zsh
}

View file

@ -0,0 +1,23 @@
export GPG_TTY=$(tty)
# paths
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# ZSH
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="afowler"
plugins=(git docker docker-compose node zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# ALIASES
alias open="xdg-open"
alias nobeep="sudo modprobe -r pcspkr"
alias s="title $HOST && cmatrix -rs && clear"
alias q="exit"
# COSMETICS
fastfetch
export PATH="${PATH}:/home/${USER}/.local/bin"
export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"