Initial commit
This commit is contained in:
129
.zsh_history
Normal file
129
.zsh_history
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
: 1762247083:20;nvim terminal.zsh
|
||||||
|
: 1762247260:64;nvim -p plugins/alias.zsh
|
||||||
|
: 1762247582:5;nvim history.zsh
|
||||||
|
: 1762247759:0;rm alias.zsh
|
||||||
|
: 1762247763:0;rm history.zsh
|
||||||
|
: 1762247766:0;rm terminal.zsh
|
||||||
|
: 1762247769:0;rm zshrc
|
||||||
|
: 1762247778:20;nvim alias.zsh
|
||||||
|
: 1762247801:23;nvim aliases.zsh
|
||||||
|
: 1762247862:7;nvim completion.zsh
|
||||||
|
: 1762247926:9;nvim plugins/history.zsh
|
||||||
|
: 1762248006:11;nvim plugins/keybindings.zsh
|
||||||
|
: 1762248032:0;ls -la
|
||||||
|
: 1762248043:20;nvim configs/terminal.zsh
|
||||||
|
: 1762248098:37;nvim zshrc
|
||||||
|
: 1762248139:0;cd ..
|
||||||
|
: 1762248148:0;cd
|
||||||
|
: 1762248154:0;nvmin .zshrc
|
||||||
|
: 1762248161:3;nvim .zshrc
|
||||||
|
: 1762248169:0;source .zshrc
|
||||||
|
: 1762248191:0;sudo pacman -S starship
|
||||||
|
: 1762248199:0;source .zshrc
|
||||||
|
: 1762248211:0;ls -la
|
||||||
|
: 1762248236:0;cd .config/zsh
|
||||||
|
: 1762248238:0;ls -la
|
||||||
|
: 1762248251:0;nvim .zshrc
|
||||||
|
: 1762248260:0;nvim zshrc
|
||||||
|
: 1762248284:0;cd
|
||||||
|
: 1762248287:0;source .zshrc
|
||||||
|
: 1762248340:0;nvim .config/zsh/configs/terminal.zsh
|
||||||
|
: 1762248385:0;nvim .config/zsh/configs/starship.toml
|
||||||
|
: 1762248402:0;nvim .config/zsh/configs/terminal.zsh
|
||||||
|
: 1762248415:0;source .zshrc
|
||||||
|
: 1762249010:0;cd .config
|
||||||
|
: 1762249011:0;ls -la
|
||||||
|
: 1762249015:0;cd ghostty
|
||||||
|
: 1762249016:0;ls -la
|
||||||
|
: 1762249044:0;nvim -p themes/sweet.conf
|
||||||
|
: 1762249069:0;nvim config
|
||||||
|
: 1762249170:0;nvim -p themes/sweet
|
||||||
|
: 1762249191:0;cd .config/ghostty/themes/
|
||||||
|
: 1762249192:0;ls -la
|
||||||
|
: 1762249197:0;nvim sweet
|
||||||
|
: 1762249250:0;fc-list
|
||||||
|
: 1762249259:0;fc-list | grep "Iosevka"
|
||||||
|
: 1762249509:0;paru -S ttf-iosevka-aile ttf-iosevka
|
||||||
|
: 1762249565:0;fc-list | grep "Iosevka"
|
||||||
|
: 1762249584:0;paru -S ttf-iosevka-aile ttf-iosevka
|
||||||
|
: 1762249600:0;cd ..
|
||||||
|
: 1762249606:0;nvim config
|
||||||
|
: 1762249729:0;nvim .config/ghostty/config
|
||||||
|
: 1762249759:0;cd .config/hypr
|
||||||
|
: 1762249761:0;ls -la
|
||||||
|
: 1762249772:0;mkdir hypr.d
|
||||||
|
: 1762249782:0;nvim
|
||||||
|
: 1762249801:0;nvim hypr.d/input
|
||||||
|
: 1762249805:0;nvim hypr.d/input.conf
|
||||||
|
: 1762249838:0;volta install node
|
||||||
|
: 1762249850:0;nvim hypr.d/input.conf
|
||||||
|
: 1762249947:0;nvim hypr.d/variables.conf
|
||||||
|
: 1762250078:0;nvim hypr.d/key-binds.conf
|
||||||
|
: 1762250097:0;nvim hypr.d/keybinds.conf
|
||||||
|
: 1762250317:0;nvim hypr.d/variables.conf
|
||||||
|
: 1762250323:0;nvim hypr.d/keybinds.conf
|
||||||
|
: 1762250767:0;wev
|
||||||
|
: 1762250929:0;nvim hypr.d/keybinds.conf
|
||||||
|
: 1762251683:0;cd ..
|
||||||
|
: 1762251693:0;cd hypr
|
||||||
|
: 1762251706:0;cp hyprland.conf hyprland.conf.bak
|
||||||
|
: 1762251714:0;nvim hyprland.conf
|
||||||
|
: 1762251757:0;nvim hypr.d/displays.conf
|
||||||
|
: 1762251799:0;nvim hyprland.conf
|
||||||
|
: 1762251816:0;nvim hypr.d/displays.conf
|
||||||
|
: 1762251865:0;hyprctl monitors all
|
||||||
|
: 1762251876:0;nvim hypr.d/displays.conf
|
||||||
|
: 1762251891:0;nvim hyprland.conf
|
||||||
|
: 1762251939:0;hyprctl monitors all
|
||||||
|
: 1762251952:0;:q
|
||||||
|
: 1762252041:0;cd hypr.d
|
||||||
|
: 1762252043:0;ls -la
|
||||||
|
: 1762252072:0;nvim hyprland.conf
|
||||||
|
: 1762252121:0;cd hypr.d
|
||||||
|
: 1762252144:0;nvim keybinds.conf
|
||||||
|
: 1762252214:0;nvim autostart.conf
|
||||||
|
: 1762252408:0;cd ..
|
||||||
|
: 1762252415:0;nvim hyprland.conf.bak
|
||||||
|
: 1762252436:0;nvim hyprland.conf
|
||||||
|
: 1762252578:0;nvim hypr.d/environment.conf
|
||||||
|
: 1762252593:0;nvim hyprland.conf
|
||||||
|
: 1762252767:0;cd ..
|
||||||
|
: 1762252770:0;cd nvim
|
||||||
|
: 1762252772:0;ls -la
|
||||||
|
: 1762252779:0;git init
|
||||||
|
: 1762252806:0;git config --global init.defaultBranch master
|
||||||
|
: 1762252817:0;git config --global init.defa
|
||||||
|
: 1762252825:0;git config --global init.defaultBranch main
|
||||||
|
: 1762252827:0;ls -la
|
||||||
|
: 1762252835:0;git checkout -b main
|
||||||
|
: 1762252840:0;git add .
|
||||||
|
: 1762252854:0;git commit -m "initial commit"
|
||||||
|
: 1762252865:0;cd
|
||||||
|
: 1762252869:0;cd .ssh
|
||||||
|
: 1762252870:0;ls -la
|
||||||
|
: 1762252874:0;nvim id_ed25519.pub
|
||||||
|
: 1762252944:0;git config --global user.email "ottonom@gmail.com"
|
||||||
|
: 1762252956:0;git config --global user.name "Dave Damage"
|
||||||
|
: 1762252961:0;git commit -m "initial commit"
|
||||||
|
: 1762252972:0;git remote add origin https://git.v220250848426372724.happysrv.de/hyprice/nvim.git
|
||||||
|
: 1762252980:0;git push -u origin main
|
||||||
|
: 1762253009:0;git remote add origin git remote add origin ssh://git@git.v220250848426372724.t
|
||||||
|
: 1762253012:0;git remote add origin ssh://git@git.v220250848426372724.happysrv.de:47045/hyprice/nvim.git
|
||||||
|
: 1762253017:0;ls -la
|
||||||
|
: 1762253021:0;rm -rf git
|
||||||
|
: 1762253025:0;git init
|
||||||
|
: 1762253030:0;ls -la
|
||||||
|
: 1762253033:0;rm -rf git
|
||||||
|
: 1762253034:0;ls -la
|
||||||
|
: 1762253040:0;rm -rf .git
|
||||||
|
: 1762253045:0;git init
|
||||||
|
: 1762253054:0;git checkout -b main
|
||||||
|
: 1762253062:0;git add .
|
||||||
|
: 1762253069:0;git commit -m "Initial commit"
|
||||||
|
: 1762253074:0;git remote add origin ssh://git@git.v220250848426372724.happysrv.de:47045/hyprice/nvim.git
|
||||||
|
: 1762253081:0;git push -u origin main
|
||||||
|
: 1762253107:0;cd ..
|
||||||
|
: 1762253110:0;cd zsh
|
||||||
|
: 1762253112:0;ls -la
|
||||||
|
: 1762253116:0;git init
|
||||||
|
: 1762253129:0;git add .
|
||||||
176
configs/starship.toml
Normal file
176
configs/starship.toml
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
|
format = """
|
||||||
|
[](surface1)\
|
||||||
|
$os\
|
||||||
|
$username\
|
||||||
|
[](bg:peach fg:surface1)\
|
||||||
|
$directory\
|
||||||
|
[](fg:peach bg:green)\
|
||||||
|
$git_branch\
|
||||||
|
$git_status\
|
||||||
|
[](fg:green bg:teal)\
|
||||||
|
$c\
|
||||||
|
$rust\
|
||||||
|
$golang\
|
||||||
|
$nodejs\
|
||||||
|
$php\
|
||||||
|
$java\
|
||||||
|
$kotlin\
|
||||||
|
$haskell\
|
||||||
|
$python\
|
||||||
|
[](fg:teal bg:blue)\
|
||||||
|
$docker_context\
|
||||||
|
[](fg:blue bg:watermelon)\
|
||||||
|
$time\
|
||||||
|
[ ](fg:watermelon)\
|
||||||
|
$line_break$character"""
|
||||||
|
|
||||||
|
palette = 'sweet'
|
||||||
|
|
||||||
|
[palettes.sweet]
|
||||||
|
base = "#161925"
|
||||||
|
mantle = "#121520"
|
||||||
|
surface0 = "#1a1f2e"
|
||||||
|
surface1 = "#222e39"
|
||||||
|
surface2 = "#31363d"
|
||||||
|
lime = "#71f79f"
|
||||||
|
red = "#ed254e"
|
||||||
|
orange = "#ff6a00"
|
||||||
|
yellow = "#f9dc5c"
|
||||||
|
purple = "#c74ded"
|
||||||
|
dark_purple = "#7b7bbd"
|
||||||
|
blue = "#7cb7ff"
|
||||||
|
cyan = "#00c1e4"
|
||||||
|
teal = "#00e8c6"
|
||||||
|
selected_bg = "#00D3A7"
|
||||||
|
selected_fg = "#fefefe"
|
||||||
|
text = "#C3C7D1"
|
||||||
|
subtext1 = "#a8b2c0"
|
||||||
|
subtext0 = "#8a96a8"
|
||||||
|
peach = "#ff6a00"
|
||||||
|
green = "#71f79f"
|
||||||
|
watermelon = "#ff4d7a"
|
||||||
|
|
||||||
|
[os]
|
||||||
|
disabled = false
|
||||||
|
style = "bg:surface1 fg:text"
|
||||||
|
[os.symbols]
|
||||||
|
Windows = ""
|
||||||
|
Ubuntu = ""
|
||||||
|
SUSE = ""
|
||||||
|
Raspbian = ""
|
||||||
|
Mint = ""
|
||||||
|
Macos = ""
|
||||||
|
Manjaro = ""
|
||||||
|
Linux = ""
|
||||||
|
Gentoo = ""
|
||||||
|
Fedora = ""
|
||||||
|
Alpine = ""
|
||||||
|
Amazon = ""
|
||||||
|
Android = ""
|
||||||
|
Arch = ""
|
||||||
|
Artix = ""
|
||||||
|
CentOS = ""
|
||||||
|
Debian = ""
|
||||||
|
Redhat = ""
|
||||||
|
RedHatEnterprise = ""
|
||||||
|
EndeavourOS = ""
|
||||||
|
|
||||||
|
[username]
|
||||||
|
show_always = true
|
||||||
|
style_user = "bg:surface1 fg:text"
|
||||||
|
style_root = "bg:surface1 fg:text"
|
||||||
|
format = '[ $user ]($style)'
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "fg:mantle bg:peach"
|
||||||
|
format = "[ $path ]($style)"
|
||||||
|
truncation_length = 3
|
||||||
|
truncation_symbol = "…/"
|
||||||
|
|
||||||
|
[directory.substitutions]
|
||||||
|
"Documents" = " "
|
||||||
|
"Downloads" = " "
|
||||||
|
"Music" = " "
|
||||||
|
"Pictures" = " "
|
||||||
|
"Developer" = " "
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol $branch ](fg:base bg:green)]($style)'
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[($all_status$ahead_behind )](fg:base bg:green)]($style)'
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[c]
|
||||||
|
symbol = " "
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[php]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[java]
|
||||||
|
symbol = " "
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[kotlin]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[haskell]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:teal"
|
||||||
|
format = '[[ $symbol( $version) ](fg:base bg:teal)]($style)'
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
symbol = ""
|
||||||
|
style = "bg:mantle"
|
||||||
|
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
|
||||||
|
|
||||||
|
[time]
|
||||||
|
disabled = false
|
||||||
|
time_format = "%R"
|
||||||
|
style = "bg:watermelon"
|
||||||
|
format = '[[ $time ](fg:mantle bg:watermelon)]($style)'
|
||||||
|
|
||||||
|
[line_break]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[character]
|
||||||
|
disabled = false
|
||||||
|
success_symbol = '[❯](bold fg:green)'
|
||||||
|
error_symbol = '[❯](bold fg:red)'
|
||||||
|
vimcmd_symbol = '[❮](bold fg:green)'
|
||||||
|
vimcmd_replace_one_symbol = '[❮](bold fg:purple)'
|
||||||
|
vimcmd_replace_symbol = '[❮](bold fg:dark_purple)'
|
||||||
|
vimcmd_visual_symbol = '[❮](bold fg:yellow)'
|
||||||
|
|
||||||
|
|
||||||
8
configs/terminal.zsh
Normal file
8
configs/terminal.zsh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
antigen bundle zdharma-continuum/fast-syntax-highlighting
|
||||||
|
antigen bundle Aloxaf/fzf-tab
|
||||||
|
|
||||||
|
# Starship prompt
|
||||||
|
if command -v starship >/dev/null 2>&1; then
|
||||||
|
export STARSHIP_CONFIG=~/.config/zsh/configs/starship.toml
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
fi
|
||||||
115
plugins/aliases.zsh
Normal file
115
plugins/aliases.zsh
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
# Basic command improvements
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias ll='ls -lah'
|
||||||
|
alias la='ls -la'
|
||||||
|
alias l='ls -l'
|
||||||
|
alias lt='ls -laht' # Sort by time
|
||||||
|
alias lS='ls -lahS' # Sort by size
|
||||||
|
|
||||||
|
# Directory navigation
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../..'
|
||||||
|
alias ....='cd ../../..'
|
||||||
|
alias .....='cd ../../../..'
|
||||||
|
alias ~='cd ~'
|
||||||
|
alias -- -='cd -'
|
||||||
|
|
||||||
|
# Safety nets
|
||||||
|
alias rm='rm -i'
|
||||||
|
alias cp='cp -i'
|
||||||
|
alias mv='mv -i'
|
||||||
|
alias mkdir='mkdir -pv'
|
||||||
|
|
||||||
|
# Colorize grep
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
|
||||||
|
# System info
|
||||||
|
alias df='df -h'
|
||||||
|
alias du='du -h'
|
||||||
|
alias free='free -h'
|
||||||
|
alias ps='ps auxf'
|
||||||
|
|
||||||
|
# Pacman aliases
|
||||||
|
alias pacup='sudo pacman -Syu'
|
||||||
|
alias pacin='sudo pacman -S'
|
||||||
|
alias pacins='sudo pacman -U'
|
||||||
|
alias pacre='sudo pacman -R'
|
||||||
|
alias pacrem='sudo pacman -Rns'
|
||||||
|
alias pacrep='pacman -Si'
|
||||||
|
alias pacreps='pacman -Ss'
|
||||||
|
alias pacloc='pacman -Qi'
|
||||||
|
alias paclocs='pacman -Qs'
|
||||||
|
alias paclo='pacman -Qdt'
|
||||||
|
alias pacc='sudo pacman -Scc'
|
||||||
|
alias paclf='pacman -Ql'
|
||||||
|
|
||||||
|
# Paru aliases (AUR helper)
|
||||||
|
alias parup='paru -Syu'
|
||||||
|
alias parin='paru -S'
|
||||||
|
alias parins='paru -U'
|
||||||
|
alias parre='paru -R'
|
||||||
|
alias parrem='paru -Rns'
|
||||||
|
alias parrep='paru -Si'
|
||||||
|
alias parreps='paru -Ss'
|
||||||
|
|
||||||
|
# Systemd aliases
|
||||||
|
alias syss='systemctl status'
|
||||||
|
alias systart='sudo systemctl start'
|
||||||
|
alias systop='sudo systemctl stop'
|
||||||
|
alias sysr='sudo systemctl restart'
|
||||||
|
alias syse='sudo systemctl enable'
|
||||||
|
alias sysd='sudo systemctl disable'
|
||||||
|
alias syslog='journalctl -xe'
|
||||||
|
alias syslogu='journalctl -u'
|
||||||
|
alias syslogf='journalctl -f'
|
||||||
|
|
||||||
|
# Quick edits
|
||||||
|
alias zshrc='$EDITOR ~/.config/zsh/zshrc'
|
||||||
|
alias zshreload='source ~/.zshrc'
|
||||||
|
alias hyprconf='$EDITOR ~/.config/hypr/hyprland.conf'
|
||||||
|
alias nvimconf='$EDITOR ~/.config/nvim/init.lua'
|
||||||
|
|
||||||
|
# Git aliases
|
||||||
|
alias g='git'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gaa='git add .'
|
||||||
|
alias gb='git branch'
|
||||||
|
alias gc='git commit'
|
||||||
|
alias gcm='git commit -m'
|
||||||
|
alias gco='git checkout'
|
||||||
|
alias gd='git diff'
|
||||||
|
alias gl='git pull'
|
||||||
|
alias glog='git log --oneline --graph'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gs='git status'
|
||||||
|
|
||||||
|
# Navigation shortcuts
|
||||||
|
alias docs='cd ~/Documents'
|
||||||
|
alias dl='cd ~/Downloads'
|
||||||
|
alias dots='cd ~/.config'
|
||||||
|
alias proj='cd ~/Projects'
|
||||||
|
|
||||||
|
# Process management
|
||||||
|
alias psg='ps aux | grep -v grep | grep -i -e VSZ -e'
|
||||||
|
alias killp='kill -9'
|
||||||
|
|
||||||
|
# Network
|
||||||
|
alias ports='netstat -tulanp'
|
||||||
|
alias myip='curl http://ipecho.net/plain; echo'
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
alias h='history'
|
||||||
|
alias j='jobs -l'
|
||||||
|
alias which='type -a'
|
||||||
|
alias path='echo -e ${PATH//:/\\n}'
|
||||||
|
alias now='date +"%Y-%m-%d %T"'
|
||||||
|
alias week='date +%V'
|
||||||
|
|
||||||
|
# Hyprland specific
|
||||||
|
alias hyprlog='cat /tmp/hypr/hyprland.log'
|
||||||
|
alias hyprcrash='cat /tmp/hypr/hyprlandCrashReport.txt'
|
||||||
|
|
||||||
|
# File operations
|
||||||
|
alias cpv='rsync -ah --info=progress2'
|
||||||
27
plugins/completion.zsh
Normal file
27
plugins/completion.zsh
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Load completions
|
||||||
|
autoload -Uz compinit && compinit -d $ZSH_CACHE_DIR/zcompdump
|
||||||
|
|
||||||
|
# Smart completion
|
||||||
|
setopt AUTO_MENU
|
||||||
|
setopt COMPLETE_IN_WORD
|
||||||
|
setopt ALWAYS_TO_END
|
||||||
|
setopt PATH_DIRS
|
||||||
|
setopt AUTO_PARAM_SLASH
|
||||||
|
|
||||||
|
# Completion styling
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|=*' 'l:|=* r:|=*'
|
||||||
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
|
zstyle ':completion:*' use-cache yes
|
||||||
|
zstyle ':completion:*' cache-path $ZSH_CACHE_DIR
|
||||||
|
zstyle ':completion:*' special-dirs true
|
||||||
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
|
|
||||||
|
# Better directory navigation
|
||||||
|
zstyle ':completion:*' expand-or-complete-prefix-with-dots
|
||||||
|
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
|
|
||||||
|
# FZF-tab specific settings
|
||||||
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -1 --color=always $realpath'
|
||||||
|
zstyle ':fzf-tab:complete:*:*' fzf-preview 'less ${(Q)realpath}'
|
||||||
|
zstyle ':fzf-tab:*' switch-group ',' '.'
|
||||||
16
plugins/history.zsh
Normal file
16
plugins/history.zsh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# History configuration
|
||||||
|
HISTSIZE=50000
|
||||||
|
SAVEHIST=10000
|
||||||
|
|
||||||
|
# History behavior
|
||||||
|
setopt EXTENDED_HISTORY # Save timestamp
|
||||||
|
setopt INC_APPEND_HISTORY # Add immediately
|
||||||
|
setopt SHARE_HISTORY # Share between sessions
|
||||||
|
setopt HIST_EXPIRE_DUPS_FIRST # Remove dups first when trimming
|
||||||
|
setopt HIST_IGNORE_DUPS # Don't record immediate dups
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS # Delete old dups
|
||||||
|
setopt HIST_FIND_NO_DUPS # Don't show dups in search
|
||||||
|
setopt HIST_IGNORE_SPACE # Ignore space-prefixed commands
|
||||||
|
setopt HIST_SAVE_NO_DUPS # Don't save dups
|
||||||
|
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks
|
||||||
|
setopt HIST_VERIFY # Show command before executing from history
|
||||||
52
plugins/keybindings.zsh
Normal file
52
plugins/keybindings.zsh
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Emacs mode
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
|
# Make terminal keys work
|
||||||
|
if [[ -n ${terminfo[smkx]} && -n ${terminfo[rmkx]} ]]; then
|
||||||
|
autoload -Uz add-zle-hook-widget
|
||||||
|
zle-application-mode () { echoti smkx }
|
||||||
|
zle-application-mode-stop () { echoti rmkx }
|
||||||
|
add-zle-hook-widget -Uz zle-line-init zle-application-mode
|
||||||
|
add-zle-hook-widget -Uz zle-line-finish zle-application-mode-stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
# History search with arrows
|
||||||
|
autoload -U up-line-or-beginning-search down-line-or-beginning-search
|
||||||
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
bindkey '^[[A' up-line-or-beginning-search
|
||||||
|
bindkey '^[[B' down-line-or-beginning-search
|
||||||
|
|
||||||
|
# Standard keys
|
||||||
|
bindkey '^[[H' beginning-of-line # Home
|
||||||
|
bindkey '^[[F' end-of-line # End
|
||||||
|
bindkey '^[[3~' delete-char # Delete
|
||||||
|
bindkey '^[[3;5~' kill-word # Ctrl+Delete
|
||||||
|
bindkey '^[[1;5C' forward-word # Ctrl+Right
|
||||||
|
bindkey '^[[1;5D' backward-word # Ctrl+Left
|
||||||
|
bindkey '^[[Z' reverse-menu-complete # Shift+Tab
|
||||||
|
bindkey '^R' history-incremental-search-backward
|
||||||
|
bindkey ' ' magic-space # Do history expansion on space
|
||||||
|
|
||||||
|
# Useful extras
|
||||||
|
bindkey '^U' backward-kill-line # Ctrl+U - delete from cursor to start
|
||||||
|
bindkey '^K' kill-line # Ctrl+K - delete from cursor to end
|
||||||
|
bindkey '^W' backward-kill-word # Ctrl+W - delete word backwards
|
||||||
|
bindkey '^[[1;3D' backward-word # Alt+Left
|
||||||
|
bindkey '^[[1;3C' forward-word # Alt+Right
|
||||||
|
bindkey '^L' clear-screen # Ctrl+L - clear screen
|
||||||
|
bindkey '^A' beginning-of-line # Ctrl+A - go to start
|
||||||
|
bindkey '^E' end-of-line # Ctrl+E - go to end
|
||||||
|
|
||||||
|
# Edit command in $EDITOR
|
||||||
|
autoload -U edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
bindkey '^X^E' edit-command-line
|
||||||
|
|
||||||
|
# Undo/Redo
|
||||||
|
bindkey '^Z' undo # Ctrl+Z - undo
|
||||||
|
bindkey '^Y' redo # Ctrl+Y - redo
|
||||||
|
|
||||||
|
# Better word navigation (bash-style)
|
||||||
|
autoload -U select-word-style
|
||||||
|
select-word-style bash
|
||||||
40
zshrc
Normal file
40
zshrc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# Core environment
|
||||||
|
export EDITOR=nvim
|
||||||
|
export VISUAL=nvim
|
||||||
|
export PATH=$HOME/.local/bin:$PATH
|
||||||
|
export HISTFILE="$HOME/.config/zsh/.zsh_history"
|
||||||
|
export ZSH_CACHE_DIR=${XDG_CACHE_HOME:-$HOME/.cache}/zsh
|
||||||
|
mkdir -p $ZSH_CACHE_DIR
|
||||||
|
|
||||||
|
# Antigen
|
||||||
|
source /usr/share/zsh/share/antigen.zsh
|
||||||
|
|
||||||
|
# Load config files
|
||||||
|
for config in aliases history completion key-bindings; do
|
||||||
|
[[ -f ~/.config/zsh/plugins/$config.zsh ]] && source ~/.config/zsh/plugins/$config.zsh
|
||||||
|
done
|
||||||
|
|
||||||
|
# Plugins (work everywhere)
|
||||||
|
antigen bundle zsh-users/zsh-autosuggestions
|
||||||
|
antigen bundle Aloxaf/fzf-tab
|
||||||
|
|
||||||
|
# Terminal-specific config
|
||||||
|
if [[ $TERM != "linux" ]]; then
|
||||||
|
[[ -f ~/.config/zsh/configs/terminal.zsh ]] && source ~/.config/zsh/configs/terminal.zsh
|
||||||
|
else
|
||||||
|
PROMPT='[%F{green}%n@%m%f %F{blue}%1~%f]%# '
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Apply antigen
|
||||||
|
antigen apply
|
||||||
|
|
||||||
|
# Plugin settings
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
|
|
||||||
|
# FZF integration
|
||||||
|
[[ -f /usr/share/fzf/key-bindings.zsh ]] && source /usr/share/fzf/key-bindings.zsh
|
||||||
|
[[ -f /usr/share/fzf/completion.zsh ]] && source /usr/share/fzf/completion.zsh
|
||||||
|
export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border"
|
||||||
Reference in New Issue
Block a user