From 1c38c7b171c801b52f9370fda8184823bd5ba47c Mon Sep 17 00:00:00 2001 From: Michel Date: Sun, 19 Jan 2025 17:40:36 +0100 Subject: [PATCH] Setup zsh --- .bashrc | 12 +----------- .config/terminal/.setuprc | 15 +++++++++++++++ .zshrc | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 .config/terminal/.setuprc create mode 100644 .zshrc diff --git a/.bashrc b/.bashrc index c0b61e0..53fd09f 100644 --- a/.bashrc +++ b/.bashrc @@ -5,18 +5,8 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return -export VISUAL='nvim' -export EDITOR="$VISUAL" +source "~/.config/terminal/.setuprc" -alias ls='ls --color=auto' -alias grep='grep --color=auto' -alias vim='nvim' -alias note='(cd ~/Notes/ && nvim ~/Notes/)' -alias note-diary='(cd ~/Notes/ && nvim ~/Notes/Diary.md)' -alias note-dsa='(cd ~/DSA/ && nvim ~/DSA/)' PS1='[\u@\h \W]\$ ' -eval "$(zoxide init bash --cmd cd)" eval "$(fzf --bash)" - -alias doch='sudo "$BASH" -c "$(history -p !!)"' diff --git a/.config/terminal/.setuprc b/.config/terminal/.setuprc new file mode 100644 index 0000000..f495b1e --- /dev/null +++ b/.config/terminal/.setuprc @@ -0,0 +1,15 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +export VISUAL='nvim' +export EDITOR="$VISUAL" + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +alias vim='nvim' +alias note='(cd ~/Notes/ && nvim ~/Notes/)' +alias note-diary='(cd ~/Notes/ && nvim ~/Notes/Diary.md)' +alias note-dsa='(cd ~/DSA/ && nvim ~/DSA/)' +alias doch='sudo "$BASH" -c "$(history -p !!)"' + +eval "$(zoxide init bash --cmd cd)" diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..9a2c7df --- /dev/null +++ b/.zshrc @@ -0,0 +1,33 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +export ZSH="$HOME/.oh-my-zsh" + +ZSH_THEME="lukerandall" + +plugins=( + git + archlinux + zsh-autosuggestions + zsh-syntax-highlighting +) + +source $ZSH/oh-my-zsh.sh + +# Check archlinux plugin commands here +# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/archlinux + +# fastfetch. Will be disabled if above colorscript was chosen to install +fastfetch -c $HOME/.config/fastfetch/config-compact.jsonc + +# Set-up icons for files/folders in terminal +alias ls='eza -a --icons' +alias ll='eza -al --icons' +alias lt='eza -a --tree --level=1 --icons' + +HISTFILE=~/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 +setopt appendhistory + +source "$HOME/.config/terminal/.setuprc"