aboutsummaryrefslogtreecommitdiff
path: root/modules/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/zsh')
-rw-r--r--modules/zsh/default.nix120
1 files changed, 65 insertions, 55 deletions
diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix
index 52278cf..e0659ba 100644
--- a/modules/zsh/default.nix
+++ b/modules/zsh/default.nix
@@ -1,8 +1,18 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.modules.zsh;
- inherit (lib) mkEnableOption mkOption mkIf types;
+ inherit (lib)
+ mkEnableOption
+ mkOption
+ mkIf
+ types
+ ;
in
{
options.modules.zsh = {
@@ -48,68 +58,68 @@ in
};
autosuggestion.enable = true;
initContent = ''
- source ~/.oh-my-zsh/themes/${cfg.theme}.zsh-theme
- setopt nobeep
- export KEYTIMEOUT=1
- export NO_COLOR=1
-# export KEYTIMEOUT=20 # note, set higher if you want to use surround mode or any chording
+ source ~/.oh-my-zsh/themes/${cfg.theme}.zsh-theme
+ setopt nobeep
+ export KEYTIMEOUT=1
+ export NO_COLOR=1
+ export UV_PYTHON_DOWNLOADS=never
+ # export KEYTIMEOUT=20 # note, set higher if you want to use surround mode or any chording
- bindkey -M vicmd m vi-backward-char
- bindkey -M vicmd n vi-down-line-or-history
- bindkey -M vicmd e vi-up-line-or-history
- bindkey -M vicmd i vi-forward-char
+ bindkey -M vicmd m vi-backward-char
+ bindkey -M vicmd n vi-down-line-or-history
+ bindkey -M vicmd e vi-up-line-or-history
+ bindkey -M vicmd i vi-forward-char
- bindkey -M vicmd N vi-join
+ bindkey -M vicmd N vi-join
- bindkey -M vicmd h vi-set-mark
- bindkey -M vicmd j vi-repeat-search
- bindkey -M vicmd k vi-forward-word-end
- bindkey -M vicmd l vi-insert
+ bindkey -M vicmd h vi-set-mark
+ bindkey -M vicmd j vi-repeat-search
+ bindkey -M vicmd k vi-forward-word-end
+ bindkey -M vicmd l vi-insert
- bindkey -M vicmd J vi-rev-repeat-search
+ bindkey -M vicmd J vi-rev-repeat-search
- # vim style backspace (im a young soul)
- bindkey -v '^?' backward-delete-char
+ # vim style backspace (im a young soul)
+ bindkey -v '^?' backward-delete-char
- bindkey '^F' fzf-cd-widget
- bindkey -M vicmd / fzf-history-widget
-# bindkey -M vicmd " f" fzf-cd-widget
-# bindkey -M vicmd . fzf
- if [[ -n "$TMUX" ]]; then
- # TODO: fix continuum so i dont need this hack
- export TERM=screen-256color
- fi
+ bindkey '^F' fzf-cd-widget
+ bindkey -M vicmd / fzf-history-widget
+ # bindkey -M vicmd " f" fzf-cd-widget
+ # bindkey -M vicmd . fzf
+ if [[ -n "$TMUX" ]]; then
+ # TODO: fix continuum so i dont need this hack
+ export TERM=screen-256color
+ fi
- export PATH=$HOME:/.local/riscv/bin:$PATH:$HOME/.local/bin
+ export PATH=$HOME:/.local/riscv/bin:$PATH:$HOME/.local/bin
- function zle-keymap-select() {
- case $KEYMAP in
- vicmd) echo -ne '\e[1 q';; # block
- viins) echo -ne '\e[5 q';; # beam
- main) echo -ne '\e[5 q';; # beam
- esac
- }
- zle -N zle-keymap-select
- zle-line-init() {
- zle -K viins
- echo -ne '\e[5 q' # beam
- }
- zle -N zle-line-init
- echo -ne '\e[5 q'
- precmd() {
- print -Pn "\e]0;$(dirs -p | head -1)\e\\"
- print -Pn "\e]133;A\e\\"
- if ! builtin zle; then
- print -n "\e]133;D\e\\"
- fi
- echo -ne '\e[5 q'
- }
- function preexec {
- print -Pn "\e]0;''${(q)1}\e\\"
- print -n "\e]133;C\e\\"
- }
+ function zle-keymap-select() {
+ case $KEYMAP in
+ vicmd) echo -ne '\e[1 q';; # block
+ viins) echo -ne '\e[5 q';; # beam
+ main) echo -ne '\e[5 q';; # beam
+ esac
+ }
+ zle -N zle-keymap-select
+ zle-line-init() {
+ zle -K viins
+ echo -ne '\e[5 q' # beam
+ }
+ zle -N zle-line-init
+ echo -ne '\e[5 q'
+ precmd() {
+ print -Pn "\e]0;$(dirs -p | head -1)\e\\"
+ print -Pn "\e]133;A\e\\"
+ if ! builtin zle; then
+ print -n "\e]133;D\e\\"
+ fi
+ echo -ne '\e[5 q'
+ }
+ function preexec {
+ print -Pn "\e]0;''${(q)1}\e\\"
+ print -n "\e]133;C\e\\"
+ }
'';
};
};
}
-