finished zsh config

This commit is contained in:
paul-loedige
2024-02-18 23:43:59 +01:00
parent 864262b297
commit 4ec5efbdf6
2 changed files with 18 additions and 155 deletions
+18 -6
View File
@@ -2255,6 +2255,18 @@ alias ftemplate='git fetch template'
alias mtemplate='git merge template/master --allow-unrelated-histories' alias mtemplate='git merge template/master --allow-unrelated-histories'
alias log='git log' alias log='git log'
#+end_src #+end_src
*** ls -> [[https://github.com/eza-community/eza][eza]]
#+begin_src shell :tangle pkg-list.txt
eza
#+end_src
#+begin_src shell :tangle ~/alias.sh
alias ls='eza --icons -lF --color=always --group-directories-first --git' # my preferred listing
alias la='eza --icons -aF --color=always --group-directories-first --git' # all files and dirs
alias ll='eza --icons -alF --color=always --group-directories-first --git' # long format
alias lt='eza --icons -aTF --color=always --group-directories-first --git' # tree listing
alias lx='eza --icons -lF --color=always --group-directories-first --git --extended' # extended info
alias l.='eza -a | egrep "^\."' # list dotfiles
#+end_src
** [[https://www.zsh.org/][ZSH]] ** [[https://www.zsh.org/][ZSH]]
*** Installation *** Installation
#+begin_src conf :tangle pkg-list.txt #+begin_src conf :tangle pkg-list.txt
@@ -2312,7 +2324,7 @@ ENABLE_CORRECTION="true"
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765 # See https://github.com/ohmyzsh/ohmyzsh/issues/5765
COMPLETION_WAITING_DOTS="true" COMPLETION_WAITING_DOTS="true"
#+end_src #+end_src
**** TODO [[https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins][Plugins]] **** [[https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins][Plugins]]
***** Dependencies ***** Dependencies
some of the following plugins require dependencies some of the following plugins require dependencies
#+begin_src shell :tangle pkg-list.txt #+begin_src shell :tangle pkg-list.txt
@@ -2389,9 +2401,9 @@ plugins=(
vi-mode vi-mode
vscode vscode
# # non oh-my-zsh plugins # # non oh-my-zsh plugins
# zsh-autosuggestions zsh-autosuggestions
# zsh-syntax-highlighting zsh-syntax-highlighting
# conda-zsh-completion conda-zsh-completion
) )
#+end_src #+end_src
**** [[https://github.com/romkatv/powerlevel10k][Powerlevel10k]] **** [[https://github.com/romkatv/powerlevel10k][Powerlevel10k]]
@@ -2427,7 +2439,7 @@ source $ZSH/oh-my-zsh.sh
*** Configuration *** Configuration
**** Source Aliases **** Source Aliases
#+begin_src shell :tangle ~/.zshrc #+begin_src shell :tangle ~/.zshrc
source alias.sh source ~/alias.sh
#+end_src #+end_src
**** Modify PATH **** Modify PATH
#+begin_src shell :tangle ~/.zshrc #+begin_src shell :tangle ~/.zshrc
@@ -2450,7 +2462,7 @@ bash
*** Configuration *** Configuration
**** Source Aliases **** Source Aliases
#+begin_src shell :tangle ~/.bashrc #+begin_src shell :tangle ~/.bashrc
source alias.sh source ~/alias.sh
#+end_src #+end_src
**** Modify PATH **** Modify PATH
#+begin_src shell :tangle ~/.bashrc #+begin_src shell :tangle ~/.bashrc
-149
View File
@@ -1,149 +0,0 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
#
# ~/.zshrc
#
# Path to your oh-my-zsh installation.
export ZSH="/home/paul/.oh-my-zsh"
# set default text editor
export EDITOR="nvim"
# fcitx support
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="false"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# Uncomment the following line to change how often to auto-update (in days).
export UPDATE_ZSH_DAYS=3
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
svn
themes
command-not-found
vi-mode
extract
# non oh-my-zsh plugins
zsh-autosuggestions
zsh-syntax-highlighting
conda-zsh-completion
)
source $ZSH/oh-my-zsh.sh
# additional path variables
export PATH=$PATH:~/.local/bin
export PATH=$PATH:~/.config/emacs/bin
### ALIAS' ###
#jokes
alias dog='cat'
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' #rickroll
#shutdown and reboot
alias sn='shutdown now'
alias rb='reboot'
# navigation
alias ..='cd ..'
alias ...='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias dotfiles='cd ~/.dotfiles'
#libreoffice
alias writer='libreoffice --writer'
alias calc='libreoffice --calc'
alias impress='libreoffice --impress'
# pacman and pikaur
alias install='sudo pacman -S'
alias uninstall='sudo pacman -Rns'
alias search='sudo pacman -Ss'
alias install-all='sudo pikaur'
alias update='sudo pacman -Syyu' # update only standard pkgs
alias update-all="pikaur -Syu" # update standard pkgs and AUR pkgs
alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' # remove orphaned packages
# Changing "ls" to "eza"
alias ls='eza --icons -lF --color=always --group-directories-first --git' # my preferred listing
alias la='eza --icons -aF --color=always --group-directories-first --git' # all files and dirs
alias ll='eza --icons -alF --color=always --group-directories-first --git' # long format
alias lt='eza --icons -aTF --color=always --group-directories-first --git' # tree listing
alias lx='eza --icons -lF --color=always --group-directories-first --git --extended' # extended info
alias l.='eza -a | egrep "^\."' # list dotfiles
# Colorize grep output (good for log files)
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# confirm before overwriting something
alias cp="cp -i"
alias mv='mv -i'
alias rm='rm -i'
# git
alias add='git add'
alias addup='git add -u'
alias addall='git add .'
alias branch='git branch'
alias checkout='git checkout'
alias co='git checkout'
alias clone='git clone'
alias commit='git commit -m'
alias fetch='git fetch'
alias pull='git pull origin'
alias push='git push origin'
alias status='git status'
alias diff='git diff'
alias remote='git remote'
alias ftemplate='git fetch template'
alias mtemplate='git merge template/master --allow-unrelated-histories'
alias log='git log'
### AUTOSTART ###
#neofetch
neofetch
source /etc/profile.d/conda.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh