Gen 275:
This commit is contained in:
47
glasshouse-desktop/home/zsh/.zsh_history
Normal file
47
glasshouse-desktop/home/zsh/.zsh_history
Normal file
@@ -0,0 +1,47 @@
|
||||
: 1728596017:0;sr
|
||||
: 1728596034:0;nixswitch
|
||||
: 1728596102:0;sr
|
||||
: 1728596103:0;a
|
||||
: 1728596110:0;sr
|
||||
: 1728596156:0;nixswitch && sr
|
||||
: 1728596183:0;aa
|
||||
: 1728596186:0;aaaaa
|
||||
: 1728596216:0;nixswitch && sr
|
||||
: 1728596245:0;aaa
|
||||
: 1728596251:0;aaaa
|
||||
: 1728596252:0;sr
|
||||
: 1728596273:0;nvim ~/.zshrc
|
||||
: 1728597329:0;gt eza-style.nix
|
||||
: 1728597334:0;gt
|
||||
: 1728597341:0;gt put eza-style.nix
|
||||
: 1728597345:0;gt summary
|
||||
: 1728597362:0;gt s
|
||||
: 1728597393:0;cd ../waybar
|
||||
: 1728598239:0;ls
|
||||
: 1728598246:0;alias ls
|
||||
: 1728598557:0;cat zkbd
|
||||
: 1728598574:0;nvim zkbd
|
||||
: 1728598589:0;nvim zshell
|
||||
: 1728598593:0;nvim zshell.nix
|
||||
: 1728598612:0;nixswitch
|
||||
: 1728598640:0;zsr
|
||||
: 1728598661:0;source zkbd
|
||||
: 1728598666:0;cat zkbd
|
||||
: 1728598678:0;echo $ZSH_AUTO_SUGGEST_ACCEPT_WIDGETS
|
||||
: 1728598684:0;echo $ZSH_AUTOSUGGEST_ACCEPT_WIDGETS
|
||||
: 1728598740:0;ls
|
||||
: 1728598745:0;cat zsh-style
|
||||
: 1728598777:0;rm zsh-style
|
||||
: 1728598783:0;nvim zshell.nix
|
||||
: 1728598795:0;nixswitch
|
||||
: 1728598826:0;zsr
|
||||
: 1728598838:0;aaaa
|
||||
: 1728598846:0;ls
|
||||
: 1728598852:0;gt p zkbd
|
||||
: 1728598860:0;ls
|
||||
: 1728598878:0;nvim zshell.nix
|
||||
: 1728598950:0;nixswitch
|
||||
: 1728598976:0;nvim zshell.nix
|
||||
: 1728599083:0;nixswitch
|
||||
: 1728599116:0;zsr
|
||||
: 1728599118:0;nixcommit
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
#function left-beep {
|
||||
# [[ $CURSOR -eq 0 ]] && return
|
||||
# zle vi-backward-char
|
||||
# (aplay /home/pagedmov/sound/sys/move_h.wav > /dev/null 2>&1 &)
|
||||
#}
|
||||
#function right-beep {
|
||||
# zle autosuggest-accept
|
||||
# [[ $CURSOR -eq ${#BUFFER} ]] && return
|
||||
# zle vi-forward-char
|
||||
# (aplay /home/pagedmov/sound/sys/move_h.wav > /dev/null 2>&1 &)
|
||||
#}
|
||||
#function up-beep {
|
||||
# zle up-line-or-history
|
||||
# (aplay /home/pagedmov/sound/sys/move_v.wav > /dev/null 2>&1 &)
|
||||
#}
|
||||
#function down-beep {
|
||||
# zle down-line-or-history
|
||||
# (aplay /home/pagedmov/sound/sys/move_v.wav > /dev/null 2>&1 &)
|
||||
#}
|
||||
#zle -N left-beep
|
||||
#zle -N right-beep
|
||||
#zle -N up-beep
|
||||
#zle -N down-beep
|
||||
|
||||
bindkey -v
|
||||
|
||||
#bindkey -M viins "^[OD" left-beep
|
||||
#bindkey -M viins "^[OC" right-beep
|
||||
#bindkey -M viins "^[OB" down-beep
|
||||
#bindkey -M viins "^[OA" up-beep
|
||||
|
||||
#bindkey -M vicmd "h" left-beep
|
||||
#bindkey -M vicmd "l" right-beep
|
||||
#bindkey -M vicmd "j" down-beep
|
||||
#bindkey -M vicmd "k" up-beep
|
||||
#ZSH_AUTOSUGGEST_ACCEPT_WIDGETS+=("right-beep")
|
||||
|
||||
function zle-keymap-select {
|
||||
if [[ ${KEYMAP} == vicmd ]] ||
|
||||
[[ $1 = 'block' ]]; then
|
||||
echo -ne "\e[1 q" # Change the cursor to a block (normal mode)
|
||||
else
|
||||
echo -ne "\e[5 q" # Change the cursor to a line (insert mode)
|
||||
fi
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle-keymap-select 'insert'
|
||||
}
|
||||
zle -N zle-line-init
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
# set the terminal mode when entering or exiting zle, otherwise terminfo keys are not loaded
|
||||
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
||||
zle-line-init() { echoti smkx; }; zle -N zle-line-init
|
||||
zle-line-finish() { echoti rmkx; }; zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
# History
|
||||
zshAddHistory() {
|
||||
whence ${${(z)1}[1]} >| /dev/null || return 1
|
||||
}
|
||||
|
||||
# ---| Correction and Autocompletion |--- #
|
||||
zstyle ':completion:*:correct:*' original true
|
||||
zstyle ':completion:*:correct:*' insert-unambiguous true
|
||||
zstyle ':completion:*:approximate:*' max-errors 'reply=($(( ($#PREFIX + $#SUFFIX) / 3 )) numeric)'
|
||||
|
||||
# completion
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "$comppath"
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' verbose true
|
||||
zstyle ':completion:*' insert-tab false
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:-command-:*:' verbose false
|
||||
zstyle ':completion::complete:*' gain-privileges 1
|
||||
zstyle ':completion:*:manuals.*' insert-sections true
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*' completer _complete _match _approximate _ignored
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
|
||||
# labels and categories
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*' format ' %F{green}->%F{yellow} %d%f'
|
||||
zstyle ':completion:*:messages' format ' %F{green}->%F{purple} %d%f'
|
||||
zstyle ':completion:*:descriptions' format ' %F{green}->%F{yellow} %d%f'
|
||||
zstyle ':completion:*:warnings' format ' %F{green}->%F{red} no matches%f'
|
||||
zstyle ':completion:*:corrections' format ' %F{green}->%F{green} %d: %e%f'
|
||||
|
||||
# menu colours
|
||||
eval "$(dircolors)"
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=36=0=01'
|
||||
|
||||
# command parameters
|
||||
zstyle ':completion:*:functions' ignored-patterns '(prompt*|_*|*precmd*|*preexec*)'
|
||||
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
|
||||
zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
|
||||
zstyle ':completion:*:(vim|nvim|vi|nano):*' ignored-patterns '*.(wav|mp3|flac|ogg|mp4|avi|mkv|iso|so|o|7z|zip|tar|gz|bz2|rar|deb|pkg|gzip|pdf|png|jpeg|jpg|gif)'
|
||||
|
||||
# hostnames and addresses
|
||||
zstyle ':completion:*:ssh:*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
||||
zstyle ':completion:*:ssh:*' group-order users hosts-domain hosts-host users hosts-ipaddr
|
||||
zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *'
|
||||
zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr
|
||||
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost
|
||||
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*'
|
||||
zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*'
|
||||
zstyle -e ':completion:*:hosts' hosts 'reply=( ${=${=${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ } ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} ${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}})'
|
||||
ttyctl -f
|
||||
@@ -54,19 +54,21 @@
|
||||
hmconf = "nvim $HOME/sysflakes/glasshouse-desktop/home";
|
||||
viflake = "nvim flake.nix";
|
||||
nvimcfg = "nvim $HOME/dots/nixvim/config";
|
||||
zsr = "runbg kitty zsh && kitty @ close-window";
|
||||
};
|
||||
initExtraFirst = ''
|
||||
|
||||
s_check() { [ $SOUNDS_ENABLED -eq 1 ] }
|
||||
|
||||
unalias ls
|
||||
ls() {
|
||||
command ls --group-directories-first --color=always -F1 "$@" | sort -f -k1
|
||||
s_check && (aplay ~/sound/sys/ls.wav > /dev/null 2>&1 &)
|
||||
eza -1 --group-directories-first --icons "@"
|
||||
s_check && runbg aplay ~/sound/sys/ls.wav
|
||||
}
|
||||
|
||||
cd() {
|
||||
export SOUNDS_ENABLED=0
|
||||
ls "$@"
|
||||
eza -1 --group-directories-first --icons "$@"
|
||||
builtin cd "$@"
|
||||
export SOUNDS_ENABLED=1
|
||||
s_check && (aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &)
|
||||
@@ -93,14 +95,18 @@ nixcommit() {
|
||||
git diff --quiet
|
||||
if [ $? -eq 1 ]; then
|
||||
git add .
|
||||
git commit -m "Commit for generation $gen"
|
||||
git commit -m "Gen $gen: $@"
|
||||
git push
|
||||
fi
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse"
|
||||
if [ $? -eq 0 ]; then
|
||||
s_check && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &)
|
||||
else
|
||||
s_check && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &)
|
||||
|
||||
read -p "Rebuild? y/n" confirm
|
||||
if [ confirm = "y" ]; then
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse"
|
||||
if [ $? -eq 0 ]; then
|
||||
s_check && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &)
|
||||
else
|
||||
s_check && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &)
|
||||
fi
|
||||
fi
|
||||
builtin cd $OLDPWD
|
||||
}
|
||||
@@ -163,7 +169,6 @@ nsp() { nix-shell -p "$@" --run zsh }
|
||||
|
||||
clear
|
||||
splash
|
||||
eval "$(starship init zsh)" 2>/dev/null
|
||||
s_check && (aplay ~/sound/sys/sh-source.wav > /dev/null 2>&1 &)
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user