This commit is contained in:
Phil Bajsicki 2023-08-13 02:36:33 +02:00
parent a40301242b
commit 71f52e4aee
2 changed files with 39 additions and 2 deletions

View file

@ -419,3 +419,40 @@ starship init fish | source
#+begin_src fish #+begin_src fish
set -gx PATH "$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH" set -gx PATH "$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
#+end_src #+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

View file

@ -269,9 +269,9 @@ function vps
end end
function vpssh 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 end
function vpsshu function vpsshu
fusermount3 -u ~/remote/vps-srv/ $argv; fusermount3 -u ~/remote/vps-srv/
end end