using zsh

This commit is contained in:
Al-Hassan Abdel-Raouf 2022-03-11 13:42:14 +02:00
parent 3ff9f2c14f
commit 16b3b6900d
9 changed files with 139 additions and 48 deletions

View File

@ -1,3 +0,0 @@
#
# ~/.bash_logout
#

View File

@ -1,9 +0,0 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc

36
.bashrc
View File

@ -1,36 +0,0 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# User Information
export NAME="Al-Hassan Abdel-Raouf"
export EMAIL="alhassanaraouf@disroot.org"
# Default Programs
export VISUAL=vis
export EDITOR=$VISUAL
export BROWSER=lynx
export TERM=xfce4-terminal
export LYNX_CFG=~/.config/lynx/lynx.cfg
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
PATH=~/.config/composer/vendor/bin/:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
PATH=~/.config/composer/vendor/bin/:$HOME/scripts:$PATH
export FLYCTL_INSTALL="/home/alhassan/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"

64
.config/zsh/.zshrc Normal file
View File

@ -0,0 +1,64 @@
# Created by newuser for 5.8.1
# ZI Plugin Manager Setup
export ZI_HOME=${HOME}/.config/zsh/zi
declare -A ZI
ZI[HOME_DIR]=$ZI_HOME
ZI[BIN_DIR]=$ZI_HOME/bin
export ZPFX=$ZI_HOME/polaris
if [[ ! -f $HOME/.config/zsh/zi/bin/zi.zsh ]]; then
print -P "%F{33}▓▒░ %F{160}Installing (%F{33}z-shell/zi%F{160})…%f"
command mkdir -p "$HOME/.config/zsh/zi" && command chmod g-rwX "$HOME/.config/zsh/zi"
command git clone -q --depth=1 --branch "main" https://github.com/z-shell/zi "$HOME/.config/zsh/zi/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.config/zsh/zi/bin/zi.zsh"
autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi
# examples here -> https://z-shell.pages.dev/docs/gallery/collection
zicompinit # <- https://z-shell.pages.dev/docs/gallery/collection#minimal
# Loading Plugins
zi load z-shell/zui
zi load z-shell/zbrowse
zi load z-shell/zi-console
zi load z-shell/zsh-cmd-architect
zi load z-shell/zsh-navigation-tools
zi load z-shell/zzcomplete
zi load z-shell/H-S-MW
zi light z-shell/fast-syntax-highlighting
zi load mattmc3/omz-themes-standalone
# zi load ohmyzsh/ohmyzsh
zi snippet OMZP::git
zi snippet OMZP::composer
zi snippet OMZP::history
zi snippet OMZT::robbyrussell
zi load zsh-users/zsh-autosuggestions
# zi load zsh-users/zsh-syntax-highlighting
zi load zsh-users/zsh-completions
zi load zshzoo/zshrc.d
zi load notf0und/zsh-vapor
zi load jessarcher/zsh-artisan

View File

@ -0,0 +1,5 @@
# User Information
export NAME="Al-Hassan Abdel-Raouf"
export EMAIL="alhassanaraouf@disroot.org"

View File

@ -0,0 +1,29 @@
# History Setting
HISTFILE= $ZDOTDIR/history
HISTSIZE=1000
SAVEHIST=1000
setopt autocd beep extendedglob nomatch notify
# vi Mode
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
# zstyle :compinstall filename '/home/runner/.zshrc'
# compeletion
autoload -U compinit
compinit
setopt hist_ignore_all_dups # ignore duplicated commands history list
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_verify # show command with history expansion to user before running it
setopt hist_ignore_space # ignore commands that start with space

View File

@ -0,0 +1,28 @@
# Default Programs
export VISUAL=vis
export EDITOR=$VISUAL
#export BROWSER=lynx
#export TERM=xfce4-terminal
# Lynx config
export LYNX_CFG=~/.config/lynx/lynx.cfg
# fly cli
export FLYCTL_INSTALL="${HOME}/.config/fly"
# sonarqube
export SONAR_SCANNER_HOME="/opt/sonar-scanner"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# zsh autosuggest plugin
export ZSH_AUTOSUGGEST_STRATEGY=(history completion)

View File

@ -0,0 +1,12 @@
# adding composer packages
PATH=~/.config/composer/vendor/bin/:$PATH
# add my scripts
PATH=~/scripts:$PATH
# adding sonarqube
export PATH="${PATH}:${SONAR_SCANNER_HOME}/bin"
# adding fly.io
export PATH="$FLYCTL_INSTALL/bin:$PATH"

1
.zshenv Normal file
View File

@ -0,0 +1 @@
export ZDOTDIR=$HOME/.config/zsh