summaryrefslogtreecommitdiff
path: root/.config/shell/.zshrc
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2025-10-26 19:35:55 +0100
committerfilip <“filip.rabiega@gmail.com”>2025-10-26 19:35:55 +0100
commit53097dbe44f27b4b7b03de288ff2fa3da44a69b3 (patch)
tree9353ce8607f2dd8d20b69b770baf5ef1c8f13c8e /.config/shell/.zshrc
parentb944e114f49115d5212b8dfbf29ffd4af92ee59e (diff)
downloaddotfiles-53097dbe44f27b4b7b03de288ff2fa3da44a69b3.tar.gz
dotfiles-53097dbe44f27b4b7b03de288ff2fa3da44a69b3.tar.bz2
dotfiles-53097dbe44f27b4b7b03de288ff2fa3da44a69b3.zip
removed junk
Diffstat (limited to '.config/shell/.zshrc')
-rw-r--r--.config/shell/.zshrc65
1 files changed, 59 insertions, 6 deletions
diff --git a/.config/shell/.zshrc b/.config/shell/.zshrc
index e23be49..3e00ea5 100644
--- a/.config/shell/.zshrc
+++ b/.config/shell/.zshrc
@@ -14,9 +14,8 @@ HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/shell/history"
setopt inc_append_history
# Load aliases and shortcuts if existent.
-[ -f "$HOME/.config/shell/envvarrc" ] && source "$HOME/.config/shell/envvarrc"
-[ -f "$HOME/.config/shell/aliasrc" ] && source "$HOME/.config/shell/aliasrc"
-# [ -f "$HOME/.config/shell/funcrc" ] && source "$HOME/.config/shell/funcrc"
+[ -f "$ALIASRC" ] && source "$ALIASRC"
+[ -f "$ENVVARRC" ] && source "$ENVVARRC"
# Basic auto/tab complete:
autoload -U compinit
@@ -72,9 +71,48 @@ lfcd () {
}
# Some bindings
-bindkey -s '^o' '^ulfcd\n'
-bindkey -s '^g' '^ugitui\n'
-bindkey -s '^t' '^uhtop\n'
+lfcd_widget() {
+ zle -I
+ BUFFER="lfcd"
+ zle accept-line
+}
+
+gitui_widget() {
+ zle -I
+ BUFFER="gitui"
+ zle accept-line
+}
+
+htop_widget() {
+ zle -I
+ BUFFER="htop"
+ zle accept-line
+}
+
+notesplain_widget() {
+ zle -I
+ BUFFER="notesplain"
+ zle accept-line
+}
+
+# Register it as a ZLE widget
+zle -N lfcd_widget
+zle -N gitui_widget
+zle -N htop_widget
+zle -N notesplain_widget
+
+# Bind it in both vi keymaps
+bindkey -M viins '^o' lfcd_widget
+bindkey -M vicmd '^o' lfcd_widget
+
+bindkey -M viins '^g' gitui_widget
+bindkey -M vicmd '^g' gitui_widget
+
+bindkey -M viins '^t' htop_widget
+bindkey -M vicmd '^t' htop_widget
+
+bindkey -M viins '^n' notesplain_widget
+bindkey -M vicmd '^n' notesplain_widget
# Use vim keys in tab complete menu:
bindkey -M menuselect 'h' vi-backward-char
@@ -89,3 +127,18 @@ bindkey '^e' edit-command-line
bindkey -M vicmd '^[[P' vi-delete-char
bindkey -M vicmd '^e' edit-command-line
bindkey -M visual '^[[P' vi-delete
+
+# >>> conda initialize >>>
+# !! Contents within this block are managed by 'conda init' !!
+# __conda_setup="$('/home/filipek/.local/opt/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
+# if [ $? -eq 0 ]; then
+# eval "$__conda_setup"
+# else
+# if [ -f "/home/filipek/.local/opt/miniconda3/etc/profile.d/conda.sh" ]; then
+# . "/home/filipek/.local/opt/miniconda3/etc/profile.d/conda.sh"
+# else
+# export PATH="/home/filipek/.local/opt/miniconda3/bin:$PATH"
+# fi
+# fi
+# unset __conda_setup
+# <<< conda initialize <<<