working on zsh

This commit is contained in:
2026-03-11 14:21:24 +01:00
parent cf816ede62
commit 9146ac0124
8812 changed files with 810 additions and 587 deletions
-84
View File
@@ -1,84 +0,0 @@
typeset -U path cdpath fpath manpath
for profile in ${(z)NIX_PROFILES}; do
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
done
HELPDIR="${ZSH_HELPDIR:-${XDG_DATA_HOME:-$HOME/.local/share}/zsh/$ZSH_VERSION/help}"
# Source zsh-autosuggestions (use environment variable)
if [ -n "$ZSH_AUTOSUGGESTIONS_PATH" ]; then
source "$ZSH_AUTOSUGGESTIONS_PATH"
ZSH_AUTOSUGGEST_STRATEGY=(history)
fi
# oh-my-zsh extra settings for plugins
plugins=(git sudo extract colored-man-pages command-not-found history docker kubectl)
source "$ZSH/oh-my-zsh.sh"
# Source zoxide (use environment variable)
if [ -n "$ZOXIDE_INIT" ]; then
eval "$($ZOXIDE_INIT zsh)"
fi
# History options should be set in .zshrc and after oh-my-zsh sourcing.
HISTSIZE="10000"
SAVEHIST="10000"
HISTFILE="${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zsh_history"
mkdir -p "$(dirname "$HISTFILE")"
# Source fzf (use environment variable)
if [[ $options[zle] = on ]] && [ -n "$FZF_ZSH" ]; then
source <($FZF_ZSH --zsh)
fi
# Source zsh-syntax-highlighting (use environment variable)
if [ -n "$ZSH_SYNTAX_HIGHLIGHTING_PATH" ]; then
source "$ZSH_SYNTAX_HIGHLIGHTING_PATH"
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
fi
# Source catppuccin zsh-syntax-highlighting (use environment variable)
if [ -n "$CATPPUCCIN_ZSH_SYNTAX_PATH" ]; then
source "$CATPPUCCIN_ZSH_SYNTAX_PATH"
fi
# Set shell options
set_opts=(
HIST_FCNTL_LOCK HIST_IGNORE_DUPS HIST_IGNORE_SPACE SHARE_HISTORY autocd
NO_APPEND_HISTORY NO_EXTENDED_HISTORY NO_HIST_EXPIRE_DUPS_FIRST
NO_HIST_FIND_NO_DUPS NO_HIST_IGNORE_ALL_DUPS NO_HIST_SAVE_NO_DUPS
)
for opt in "${set_opts[@]}"; do
setopt "$opt"
done
unset opt set_opts
# Source starship (use environment variable)
# if [[ $TERM != "dumb" ]] && [ -n "$STARSHIP_INIT" ]; then
# eval "$($STARSHIP_INIT zsh)"
# fi
# Kitty shell integration
if test -n "$KITTY_INSTALLATION_DIR"; then
export KITTY_SHELL_INTEGRATION="no-rc"
autoload -Uz -- "$KITTY_INSTALLATION_DIR/shell-integration/zsh/kitty-integration"
kitty-integration
unfunction kitty-integration
fi
# Source direnv (use environment variable)
if [ -n "$DIRENV_HOOK" ]; then
eval "$($DIRENV_HOOK zsh)"
fi
# Aliases
# alias -- la='eza -a'
# alias -- ll='eza -l'
# alias -- lla='eza -la'
# alias -- ls='eza'
# alias -- lt='eza --tree'
# Eat shell integration
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
@@ -1,55 +0,0 @@
#!/usr/bin/env zsh
# --- Environment Variables ---
export EDITOR="nvim"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH" # Example: Add Rust's cargo binaries
# --- Aliases ---
# (You can move these from your Nix config to here if you prefer)
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gco="git checkout"
alias ll="exa --icons -la --group-directories-first"
alias ls="exa --icons -a --group-directories-first"
# --- Functions ---
# Example: Create a new directory and cd into it
mkcd() {
mkdir -p "$1" && cd "$1"
}
# --- Shell Options ---
setopt HIST_IGNORE_ALL_DUPS # Ignore duplicate commands in history
setopt HIST_IGNORE_SPACE # Ignore commands starting with a space
setopt APPEND_HISTORY # Append to history file, don't overwrite
setopt INC_APPEND_HISTORY # Append to history file as soon as the command is entered
# --- Key Bindings ---
# Example: Edit command line in $EDITOR
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^xe' edit-command-line # Ctrl+x, e
# --- Prompt Customization ---
# (Starship usually handles this, but you can add pre-starship prompts here)
# --- Load other files ---
# Source other files (e.g., secrets, local overrides)
[[ -f "$HOME/.zshrc.local" ]] && source "$HOME/.zshrc.local"
# --- Fuzzy Finder (fzf) ---
# If not already loaded in .zshrc
[[ $- == *i* ]] && source "$(brew --prefix)/opt/fzf/shell/key-bindings.zsh" 2>/dev/null
[[ $- == *i* ]] && source "$(brew --prefix)/opt/fzf/shell/completion.zsh" 2>/dev/null
# --- Conditional Loading ---
# Only load if not already loaded
if [[ -z "$TMUX" ]]; then
# Example: Start tmux if not already in a session
if command -v tmux &>/dev/null && [ -n "$PS1" ]; then
exec tmux
fi
fi
@@ -0,0 +1,72 @@
##############################################
# Aliases (source-of-truth)
#
# This file is written in bash/zsh alias syntax in [bash_zsh], [bash_specific], [zsh_specific].
# Fish has different syntax; the Nix module translates [bash_zsh] into fish format and then
# appends [fish_specific] as-is.
##############################################
##############################################
# Generic aliases (bash/zsh)
# These are intended to be available in bash and zsh.
##############################################
[bash_zsh]
alias ll='ls -lah'
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gcp='git add . && git commit && git push'
alias cd='z'
alias nps='xdg-open https://search.nixos.org'
alias hvnx='cd ~/Repos/nixos/henrovnix_ok'
alias emt='hvnx && emacs README.org --batch -f org-babel-tangle && emacs -Q --batch README.org -f org-html-export-to-html'
alias nxs='hvnx && sudo nixos-rebuild switch --flake .#traveldroid'
alias nxt='hvnx && sudo nixos-rebuild test --flake .#traveldroid'
alias nxv='hvnx && sudo nixos-rebuild build-vm --flake .#traveldroid && "$(ls -1 ./result/bin/run-*-vm | head -n 1)"'
alias rb='systemctl reboot'
alias po='systemctl poweroff'
alias fpl='flatpak list'
alias fps='flatpak search'
alias fpi='flatpak install'
alias fpr='flatpak run'
alias nxc='ssh henrov@nextcloud.data-pro.nu'
alias vs='code'
alias blog='cd ~/Repos/blog && ll'
alias keys='hyprctl binds'
##############################################
# Shell-specific aliases / examples
#
# Everything below is COMMENTED OUT on purpose.
# These examples show syntax or commands that are shell-specific
# (or behave differently across shells).
##############################################
[bash_specific]
# Enable recursive globbing (**)
# alias sg='shopt -s globstar'
[zsh_specific]
# Recursive globbing works by default in zsh; this prints matches one-per-line
# alias recglob='print -l **/*.nix'
[fish_specific]
# Fish has its own language; this is fish-only syntax (not bash/zsh)
# alias setvar='set -gx EDITOR emacs'
[dash_specific]
# dash is a minimal POSIX shell; shown here only as an example
# alias com='command -v ls'
[nushell_specific]
# Nushell pipelines structured data; this is nu-only syntax
# alias fbf='ls | where size > 1mb | get name'
@@ -0,0 +1,15 @@
##############################################
# Enabled shells (source-of-truth)
#
# Edit this file in the repo:
# ./assets/conf/dev/terminal/enabled_shells.conf
#
# After changing, rebuild Home Manager / your system as you normally do.
##############################################
[enabled_shells]
bash = yes
zsh = yes
fish = no
dash = no
nushell = no
@@ -0,0 +1,84 @@
# vim:ft=kitty
## name: Catppuccin Kitty Mocha
## author: Catppuccin Org
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #cdd6f4
background #1e1e2e
selection_foreground #1e1e2e
selection_background #f5e0dc
# Cursor colors
cursor #f5e0dc
cursor_text_color #1e1e2e
# Scrollbar colors
scrollbar_handle_color #9399b2
scrollbar_track_color #45475a
# URL color when hovering with mouse
url_color #f5e0dc
# Kitty window border colors
active_border_color #b4befe
inactive_border_color #6c7086
bell_border_color #f9e2af
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111b
active_tab_background #cba6f7
inactive_tab_foreground #cdd6f4
inactive_tab_background #181825
tab_bar_background #11111b
# Colors for marks (marked text in the terminal)
mark1_foreground #1e1e2e
mark1_background #b4befe
mark2_foreground #1e1e2e
mark2_background #cba6f7
mark3_foreground #1e1e2e
mark3_background #74c7ec
# The 16 terminal colors
# black
color0 #45475a
color8 #585b70
# red
color1 #f38ba8
color9 #f38ba8
# green
color2 #a6e3a1
color10 #a6e3a1
# yellow
color3 #f9e2af
color11 #f9e2af
# blue
color4 #89b4fa
color12 #89b4fa
# magenta
color5 #f5c2e7
color13 #f5c2e7
# cyan
color6 #94e2d5
color14 #94e2d5
# white
color7 #bac2de
color15 #a6adc8
@@ -0,0 +1,26 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"agent": {
"default_model": {
"provider": "ollama",
"model": "codellama:34b",
"enable_thinking": false
},
"favorite_models": [],
"model_parameters": []
},
"ui_font_size": 16,
"buffer_font_size": 15,
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark",
},
}

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 306 KiB

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

Before

Width:  |  Height:  |  Size: 382 KiB

After

Width:  |  Height:  |  Size: 382 KiB

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 224 KiB

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 221 KiB

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Some files were not shown because too many files have changed in this diff Show More