dev: automated commit - 2025-09-29 12:07:29
This commit is contained in:
parent
0a04450061
commit
f2cc7ea607
7 changed files with 127 additions and 61 deletions
|
|
@ -9,8 +9,6 @@ export ZDOTDIR=${ZDOTDIR:-~/.config/zsh}
|
|||
|
||||
# Auto-start Sway on first virtual terminal
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
#exec niri
|
||||
exec sway
|
||||
# exec niri
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ if command -v bombadil &> /dev/null; then _lazy_load_completion bombadil "bombad
|
|||
if command -v rop &> /dev/null; then eval "$(rop completion zsh)"; fi
|
||||
if command -v goq &> /dev/null; then eval "$(goq completion zsh)"; fi
|
||||
if command -v drop &> /dev/null; then eval "$(drop completion zsh)"; fi
|
||||
if command -v mora &> /dev/null; then eval "$(mora completion zsh)"; fi
|
||||
|
||||
# Custom completion for kf function using kubectx contexts
|
||||
_kf_completion() {
|
||||
|
|
@ -60,7 +61,7 @@ _yay_completion() {
|
|||
return 0
|
||||
}
|
||||
|
||||
# For zsh:
|
||||
|
||||
_yay_zsh_completion() {
|
||||
local -a opts
|
||||
opts=(
|
||||
|
|
@ -72,11 +73,13 @@ _yay_zsh_completion() {
|
|||
'-Q:List installed'
|
||||
'-Si:Package info'
|
||||
'-Sc:Clean cache'
|
||||
'-p:Open nix-shell with packages'
|
||||
'help:Show help'
|
||||
'install:Install to user env'
|
||||
'remove:Remove from user env'
|
||||
'list:List installed packages'
|
||||
'clean:Clean nix store'
|
||||
'shell:Start nix-shell with packages'
|
||||
)
|
||||
_describe 'yay commands' opts
|
||||
}
|
||||
|
|
|
|||
|
|
@ -732,6 +732,7 @@ yay() {
|
|||
echo "Searching for '$2'..."
|
||||
nix search nixpkgs "$2" 2>/dev/null || nix-env -qaP | grep -i "$2"
|
||||
;;
|
||||
|
||||
# Install package to user environment
|
||||
install|"-S")
|
||||
[ -z "$2" ] && { echo "Usage: yay install <package>"; return 1; }
|
||||
|
|
@ -752,6 +753,17 @@ yay() {
|
|||
nix-env -q
|
||||
;;
|
||||
|
||||
# nix-shell quick run
|
||||
shell|"-p")
|
||||
shift
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: yay shell <pkg1> [pkg2 ...]"
|
||||
return 1
|
||||
fi
|
||||
echo "Starting nix-shell with: $*"
|
||||
nix-shell -p "$@"
|
||||
;;
|
||||
|
||||
# Clean up
|
||||
clean|"-Sc")
|
||||
echo "Cleaning nix store..."
|
||||
|
|
@ -770,9 +782,10 @@ Commands:
|
|||
yay search <pkg> Search packages
|
||||
yay install <pkg> Install package (user)
|
||||
yay remove <pkg> Remove package
|
||||
yay list List installed packages
|
||||
yay clean Clean package cache
|
||||
yay help Show this help
|
||||
yay list List installed packages
|
||||
yay shell <pkg...> Start nix-shell with packages
|
||||
yay clean Clean package cache
|
||||
yay help Show this help
|
||||
|
||||
Note: For system packages, edit ~/.config/nixos/configuration.nix
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue