diff --git a/.config/fish/README.org b/.config/fish/README.org index 94eb263..2bbcc68 100644 --- a/.config/fish/README.org +++ b/.config/fish/README.org @@ -419,3 +419,40 @@ starship init fish | source #+begin_src fish set -gx PATH "$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" #+end_src +* Phil's stuff +** phil-fix-names +Makes directory and file names lowercase, substitutes whitespace for dashes. +#+begin_src fish +function phil-fix-names + perl-rename 'y/A-Z/a-z/' * && perl-rename 'y/ /-/' * +end +#+end_src +** polish +Occasionally my keyboard layout changes. I have not figured out why yet, but this way I can quickly reset it. +#+begin_src fish +function polish + setxkbmap -model pc104 -layout pl -option compose:rctrl +end +#+end_src +** vps +Logs me into my VPS with an ssh key. I use it extensively, so being able to log in without having to type a password is really nice. +#+begin_src fish +function vps + ssh -p 2222 phil@46.38.232.163 -i ~/.ssh/id_ed25519_nopass +end +#+end_src +** vpssh +Mounts my \/srv\/ directory into ~/remote/vps-srv. Really convenient. My websites all run on org-mode, so this makes it very easy to work on them from the convenience of the best text editor. +#+begin_src fish +function vpssh + sshfs phil@46.38.232.163:/srv/ ~/remote/vps-srv -p 2222 -o identityFile=~/.ssh/id_ed25519_nopass -o reconnect +end +#+end_src +** vpsshu +Unmounts the above. +#+begin_src fish +function vpsshu + fusermount3 -u ~/remote/vps-srv/ +end + +#+end_src diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 9464ec9..ebbcb54 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -269,9 +269,9 @@ function vps end function vpssh - sshfs phil@46.38.232.163:/srv/ ~/remote/vps-srv -p 2222 -o identityFile=~/.ssh/id_ed25519_nopass -o reconnect $argv; + sshfs phil@46.38.232.163:/srv/ ~/remote/vps-srv -p 2222 -o identityFile=~/.ssh/id_ed25519_nopass -o reconnect end function vpsshu - fusermount3 -u ~/remote/vps-srv/ $argv; + fusermount3 -u ~/remote/vps-srv/ end