Compare commits
1 commit
6096cbaac6
...
dec722b6e1
Author | SHA1 | Date | |
---|---|---|---|
|
dec722b6e1 |
3 changed files with 73 additions and 146 deletions
12
flake.lock
generated
12
flake.lock
generated
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750304462,
|
"lastModified": 1749821119,
|
||||||
"narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=",
|
"narHash": "sha256-X3WAS322EsebI4ohJcXhKpiyG1v+7wE4VOiXy1pxM/c=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c",
|
"rev": "79dfd9aa295e53773aad45480b44c131da29f35b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750365781,
|
"lastModified": 1749285348,
|
||||||
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
|
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
|
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -51,26 +51,13 @@ in {
|
||||||
antidote = {
|
antidote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
#######
|
|
||||||
# OMZ #
|
|
||||||
#######
|
|
||||||
|
|
||||||
"getantidote/use-omz" # Handle OMZ dependencies
|
"getantidote/use-omz" # Handle OMZ dependencies
|
||||||
# Load lib only if things break
|
# Load lib only if things break
|
||||||
# "ohmyzsh/ohmyzsh path:lib" # Load OMZ's library
|
# "ohmyzsh/ohmyzsh path:lib" # Load OMZ's library
|
||||||
|
|
||||||
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages" # Load OMZ plugins
|
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages" # Load OMZ plugins
|
||||||
# "ohmyzsh/ohmyzsh path:plugins/magic-enter"
|
# "ohmyzsh/ohmyzsh path:plugins/magic-enter"
|
||||||
"ohmyzsh/ohmyzsh path:plugins/command-not-found" # Provide suggested packages to be installed if a command cannot be found
|
"ohmyzsh/ohmyzsh path:plugins/command-not-found" # Provide suggested packages to be installed if a command cannot be found
|
||||||
"ohmyzsh/ohmyzsh path:plugins/dirhistory kind:defer" # shortcuts for navigating directory history and hierarchy
|
"ohmyzsh/ohmyzsh path:plugins/dirhistory kind:defer" # shortcuts for navigating directory history and hierarchy
|
||||||
"ohmyzsh/ohmyzsh path:plugins/universalarchive kind:defer"
|
|
||||||
|
|
||||||
"ohmyzsh/ohmyzsh path:plugins/gitignore kind:defer"
|
|
||||||
"ohmyzsh/ohmyzsh path:plugins/git-commit kind:defer"
|
|
||||||
|
|
||||||
#########
|
|
||||||
# OMZ ^ #
|
|
||||||
#########
|
|
||||||
|
|
||||||
"romkatv/powerlevel10k kind:fpath" # A Zsh theme
|
"romkatv/powerlevel10k kind:fpath" # A Zsh theme
|
||||||
|
|
||||||
|
@ -96,84 +83,82 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
initContent = let
|
initExtraFirst = ''
|
||||||
initExtraFirst = lib.mkBefore ''
|
# Basic auto/tab complete:
|
||||||
# Basic auto/tab complete:
|
autoload -U compinit
|
||||||
autoload -U compinit
|
zstyle ':completion:*' menu select
|
||||||
zstyle ':completion:*' menu select
|
zmodload zsh/complist
|
||||||
zmodload zsh/complist
|
_comp_options+=(globdots) # Include hidden files.
|
||||||
_comp_options+=(globdots) # Include hidden files.
|
|
||||||
|
|
||||||
if [[ "''${ZSH_PROFILE}" -eq 1 ]]; then
|
if [[ "''${ZSH_PROFILE}" -eq 1 ]]; then
|
||||||
zmodload zsh/zprof # Profiling. Enable `zprof` at the end of initExtra too.
|
zmodload zsh/zprof # Profiling. Enable `zprof` at the end of initExtra too.
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
# From antidote (for p10k):
|
# From antidote (for p10k):
|
||||||
# prompts:
|
# prompts:
|
||||||
# with prompt plugins, remember to add this to your .zshrc:
|
# with prompt plugins, remember to add this to your .zshrc:
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
autoload -Uz promptinit && promptinit && prompt powerlevel10k
|
autoload -Uz promptinit && promptinit && prompt powerlevel10k
|
||||||
|
|
||||||
# Remove nix from path if we are in a container (distrobox)
|
# Remove nix from path if we are in a container (distrobox)
|
||||||
if [ -v DISTROBOX_ENTER_PATH ]; then
|
if [ -v DISTROBOX_ENTER_PATH ]; then
|
||||||
export PATH=$(echo $PATH | tr ':' '\n' | grep -vE '/nix/|/run/wrappers|\.nix-profile|/etc/profiles/per-user/jirka/bin|/run/current-system/sw/bin' | tr '\n' ':')
|
export PATH=$(echo $PATH | tr ':' '\n' | grep -vE '/nix/|/run/wrappers|\.nix-profile|/etc/profiles/per-user/jirka/bin|/run/current-system/sw/bin' | tr '\n' ':')
|
||||||
export PATH=$(echo $PATH | sed 's/:$//')
|
export PATH=$(echo $PATH | sed 's/:$//')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -v ASCIINEMA_REC ]; then
|
if [ -v ASCIINEMA_REC ]; then
|
||||||
_zsh_autosuggest_disable
|
_zsh_autosuggest_disable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bindkey '^ ' autosuggest-accept # Bind CTRL + Space
|
bindkey '^ ' autosuggest-accept # Bind CTRL + Space
|
||||||
bindkey '^Y' autosuggest-accept # Bind CTRL + Y
|
bindkey '^Y' autosuggest-accept # Bind CTRL + Y
|
||||||
|
|
||||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||||
bindkey -M vicmd 'k' history-substring-search-up
|
bindkey -M vicmd 'k' history-substring-search-up
|
||||||
bindkey -M vicmd 'j' history-substring-search-down
|
bindkey -M vicmd 'j' history-substring-search-down
|
||||||
|
|
||||||
# Extracting
|
# Extracting
|
||||||
ex ()
|
ex ()
|
||||||
{
|
{
|
||||||
if [ -f $1 ] ; then
|
if [ -f $1 ] ; then
|
||||||
case $1 in
|
case $1 in
|
||||||
*.tar.bz2) tar xjf $1 ;;
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
*.tar.gz) tar xzf $1 ;;
|
*.tar.gz) tar xzf $1 ;;
|
||||||
*.tar.xz) tar xJf $1 ;;
|
*.tar.xz) tar xJf $1 ;;
|
||||||
*.bz2) bunzip3 $1 ;;
|
*.bz2) bunzip3 $1 ;;
|
||||||
*.rar) unrar x $1 ;;
|
*.rar) unrar x $1 ;;
|
||||||
*.gz) gunzip $1 ;;
|
*.gz) gunzip $1 ;;
|
||||||
*.tar) tar xf $1 ;;
|
*.tar) tar xf $1 ;;
|
||||||
*.tbz2) tar xjf $1 ;;
|
*.tbz2) tar xjf $1 ;;
|
||||||
*.tgz) tar xzf $1 ;;
|
*.tgz) tar xzf $1 ;;
|
||||||
*.zip) unzip $1 ;;
|
*.zip) unzip $1 ;;
|
||||||
*.Z) uncompress $1;;
|
*.Z) uncompress $1;;
|
||||||
*.7z) 7z x $1 ;;
|
*.7z) 7z x $1 ;;
|
||||||
*) echo "'$1' cannot be extracted via ex()" ;;
|
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo "'$1' is not a valid file"
|
echo "'$1' is not a valid file"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Kitty binds
|
# Kitty binds
|
||||||
if [ "$TERM" = "xterm-kitty" ]; then
|
if [ "$TERM" = "xterm-kitty" ]; then
|
||||||
alias kssh="kitty +kitten ssh"
|
alias kssh="kitty +kitten ssh"
|
||||||
alias icat="kitty +kitten icat"
|
alias icat="kitty +kitten icat"
|
||||||
alias d="kitty +kitten diff"
|
alias d="kitty +kitten diff"
|
||||||
alias get="kitty +kitten transfer"
|
alias get="kitty +kitten transfer"
|
||||||
alias put="kitty +kitten transfer --direction=upload"
|
alias put="kitty +kitten transfer --direction=upload"
|
||||||
alias kclip="kitty +kitten clipboard"
|
alias kclip="kitty +kitten clipboard"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "''${ZSH_PROFILE}" -eq 1 ]]; then
|
if [[ "''${ZSH_PROFILE}" -eq 1 ]]; then
|
||||||
zprof
|
zprof
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in lib.mkMerge [ initExtraFirst initExtra ];
|
|
||||||
|
|
||||||
localVariables = {
|
localVariables = {
|
||||||
YSU_MESSAGE_POSITION = "after";
|
YSU_MESSAGE_POSITION = "after";
|
||||||
|
|
|
@ -24,64 +24,6 @@ in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
gh
|
gh
|
||||||
tea
|
tea
|
||||||
riffdiff
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
|
||||||
git-cliff.enable = true;
|
|
||||||
gitui = {
|
|
||||||
enable = true;
|
|
||||||
keyConfig = lib.mkDefault ''
|
|
||||||
(
|
|
||||||
open_help: Some(( code: F(1), modifiers: "")),
|
|
||||||
|
|
||||||
move_left: Some(( code: Char('h'), modifiers: "")),
|
|
||||||
move_right: Some(( code: Char('l'), modifiers: "")),
|
|
||||||
move_up: Some(( code: Char('k'), modifiers: "")),
|
|
||||||
move_down: Some(( code: Char('j'), modifiers: "")),
|
|
||||||
|
|
||||||
popup_up: Some(( code: Char('p'), modifiers: "CONTROL")),
|
|
||||||
popup_down: Some(( code: Char('n'), modifiers: "CONTROL")),
|
|
||||||
page_up: Some(( code: Char('b'), modifiers: "CONTROL")),
|
|
||||||
page_down: Some(( code: Char('f'), modifiers: "CONTROL")),
|
|
||||||
home: Some(( code: Char('g'), modifiers: "")),
|
|
||||||
end: Some(( code: Char('G'), modifiers: "SHIFT")),
|
|
||||||
shift_up: Some(( code: Char('K'), modifiers: "SHIFT")),
|
|
||||||
shift_down: Some(( code: Char('J'), modifiers: "SHIFT")),
|
|
||||||
|
|
||||||
edit_file: Some(( code: Char('I'), modifiers: "SHIFT")),
|
|
||||||
|
|
||||||
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
|
||||||
|
|
||||||
diff_reset_lines: Some(( code: Char('u'), modifiers: "")),
|
|
||||||
diff_stage_lines: Some(( code: Char('s'), modifiers: "")),
|
|
||||||
|
|
||||||
stashing_save: Some(( code: Char('w'), modifiers: "")),
|
|
||||||
stashing_toggle_index: Some(( code: Char('m'), modifiers: "")),
|
|
||||||
|
|
||||||
stash_open: Some(( code: Char('l'), modifiers: "")),
|
|
||||||
|
|
||||||
abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")),
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = {
|
|
||||||
init = {
|
|
||||||
defaultBranch = lib.mkDefault "main";
|
|
||||||
};
|
|
||||||
pager = {
|
|
||||||
diff = lib.mkDefault "riff";
|
|
||||||
show = lib.mkDefault "riff";
|
|
||||||
log = lib.mkDefault "riff";
|
|
||||||
};
|
|
||||||
interactive = {
|
|
||||||
diffFilter = lib.mkDefault "riff --color=on";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue