From 02123b42a712e168ad503f9d09a7b95af62db26b Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 24 Feb 2025 14:35:12 -0500 Subject: [PATCH] AutoYADM commit: 2025-02-24 14:35:11 --- .zshrc | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.zshrc b/.zshrc index 66c28eb9..2199741f 100644 --- a/.zshrc +++ b/.zshrc @@ -6,7 +6,7 @@ export DISABLE_LS_COLORS=true # export MANPAGER="ov --section-delimiter '^[^\s]' --section-header" export EGET_BIN="/home/fic/.eget/bin" # plugins=(ssh-agent git github zsh-autosuggestions zsh-syntax-highlighting aliases copybuffer copyfile copypath fancy-ctrl-z systemd ) -plugins=(ssh-agent git github zsh-autosuggestions zsh-syntax-highlighting aliases colored-man-pages copybuffer copyfile copypath fancy-ctrl-z systemd ) +plugins=(ssh-agent git github zsh-autosuggestions zsh-syntax-highlighting aliases colored-man-pages copybuffer copyfile copypath fancy-ctrl-z systemd) source ~/.profile source $ZSH/oh-my-zsh.sh ASHEN="$HOME/dev/ashen/ashen.nvim" @@ -26,9 +26,9 @@ else fi # Note: if I do get Obsidian Bridge working, this is -# a really bad way to load the env because +# a really bad way to load the env because # it slows down shell initialization significantly. -# Would be better to find a way to have the plugin +# Would be better to find a way to have the plugin # call this script dynamically instead! # source ~/scripts/obsidian-bridge.sh @@ -51,7 +51,6 @@ source ~/.config/zsh/fzf.zsh # Not working for some reason... # source ~/.config/zsh/fzf-git.sh - # alias ls="eza -lh --git" # alias ls="eza --long --color=always --git --header --icons --no-user" # alias vlc="env -u DISPLAY vlc" @@ -98,11 +97,9 @@ alias mermaid=mmdc alias dnd=dragon-drop # alias cat=bat - alias autoyadm="AUTOYADMPUSH=1 ~/dev/autoyadm/autoyadm.sh" alias yadmadd="~/dev/autoyadm/yadmadd.sh" - # Created by `pipx` on 2024-09-20 02:14:00 export PATH="$PATH:/home/fic/.local/bin:/home/fic/.cargo/bin:/home/fic/go/bin" export PATH="$PATH:/home/fic/.eget/bin" @@ -111,13 +108,13 @@ export PATH="$PATH:/home/fic/.luarocks/bin" export PATH="$PATH:/home/fic/.local/share/npm/bin" fpath=(~/.zsh.d/ $fpath) function noh() { - nohup "$@" > /dev/null 2>&1 & + nohup "$@" >/dev/null 2>&1 & } function ls() { eza --long --color=always --git --header --icons "$@" } function wl-mime() { - wl-copy -t 'text/uri-list' <<< "file://$PWD/$@" + wl-copy -t 'text/uri-list' <<<"file://$PWD/$@" } function y() { local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd @@ -136,27 +133,28 @@ print -n '\033[5 q' function zle-keymap-select zle-line-init zle-line-finish { case $KEYMAP in - vicmd) print -n '\033[1 q';; # block cursor - viins|main) print -n '\033[5 q';; # line cursor + vicmd) print -n '\033[1 q' ;; # block cursor + viins | main) print -n '\033[5 q' ;; # line cursor esac } # DISABLE_AUTO_TITLE="true" -function set_win_title(){ - echo -ne "\033]0; ${PWD/#$HOME/~} \007" +function set_win_title() { + echo -ne "\033]0; ${PWD/#$HOME/~} \007" } -function viewport_osc(){ +function viewport_osc() { print -Pn "\e]133;A\e\\" } -function mksh(){ +function mksh() { local path="$1.sh" - if [[ ! -f "$path" ]]; then - echo '#!/bin/env bash\n\necho "Hello, World!"' >> "$path" - /usr/bin/chmod +x "$path" - echo "$path created." - else - echo "$path already exists." - fi + if [[ pathchk --portability "$path" ]] + # if [[ ! -f "$path" ]]; then + # echo '#!/bin/env bash\n\necho "Hello, World!"' >>"$path" + # /usr/bin/chmod +x "$path" + # echo "$path created." + # else + # echo "$path already exists." + # fi } # precmd_functions+=(set_win_title viewport_osc) @@ -176,4 +174,3 @@ export GPG_TTY=$(tty) eval "$(direnv hook zsh)" # colorscript -e 36 source ~/scripts/obsidian-bridge.sh -