refactoring

This commit is contained in:
Matt Nish-Lapidus 2025-03-21 16:50:54 -04:00
parent 74ae1150a3
commit 69400c1aa3
142 changed files with 11 additions and 70 deletions

View file

@ -0,0 +1,3 @@
#!/usr/bin/env fish
cat /sys/class/power_supply/AC0/online

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function doomup --description 'doom update and gc'
doom sync $argv && doom gc && systemctl --user restart emacs.service
end

View file

@ -0,0 +1,8 @@
function fish_greeting
status --is-login
if [ $status = 0 ]
if which figlet > /dev/null
figlet -f "$HOME/.local/share/flf/wavy.flf" (hostname)
end
end
end

View file

@ -0,0 +1,3 @@
function la --description 'alias ls -la'
ls -la $argv
end

View file

@ -0,0 +1,4 @@
function lg --wraps=lazygit --description 'alias lg=lazygit'
lazygit $argv
end

View file

@ -0,0 +1,3 @@
function ll --description 'alias ls -l'
ls -l $argv
end

View file

@ -0,0 +1,3 @@
function lla --wraps='eza -la' --description 'alias lla eza -la'
eza -la $argv
end

View file

@ -0,0 +1,7 @@
function ls --wraps=eza --description 'eza instead of ls'
if type --quiet eza
eza --git --header --icons $argv
else
command ls --color=auto $argv
end
end

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function nixgc --description 'update home manager'
nix-collect-garbage $argv
end

View file

@ -0,0 +1,9 @@
#!/usr/bin/env fish
begin
set -lx __NV_PRIME_RENDER_OFFLOAD=1
set -lx __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
set -lx __GLX_VENDOR_LIBRARY_NAME=nvidia
set -lx __VK_LAYER_NV_optimus=NVIDIA_only
exec $argv
end

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function pdf-compress --description 'compress a pdf using ghostscript. produces output.pdf'
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dNOPAUSE -dBATCH -sOutputFile=output.pdf $argv
end

View file

@ -0,0 +1,10 @@
function pullall
for dir in *
if test -d $dir
cd $dir
echo "---- " $dir "----"
git pull
cd ..
end
end
end

View file

@ -0,0 +1,3 @@
function sbcl --description 'alias sbcl=rlwrap sbcl'
rlwrap sbcl $argv
end

View file

@ -0,0 +1,10 @@
#!/usr/bin/env fish
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end

View file

@ -0,0 +1,5 @@
#!/usr/bin/env fish
function yabup --description 'update yabridge'
yabridgectl sync --prune $argv
end