Last active
June 22, 2022 08:20
-
-
Save 00sapo/bdd9cbb81528ff0c400137b2dfd96f38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GistID: bdd9cbb81528ff0c400137b2dfd96f38 | |
# basic | |
set --export PATH "$HOME/.local/bin/:$PATH" | |
# editor | |
set --export EDITOR "/usr/bin/nvim" | |
# java | |
set --export JAVA_HOME "/usr/lib/jvm/default/" | |
# nim | |
set --export PATH "$HOME/.nimble/bin:$PATH" | |
# ruby | |
set --export PATH "$HOME/.local/share/gem/ruby/3.0.0/bin:$PATH" | |
# javascript | |
set --export PATH "$HOME/.npm-global/bin:$PATH" | |
if test -n "$PYTHONPATH" | |
set -x PYTHONPATH '$HOME/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/pep582' $PYTHONPATH | |
else | |
set -x PYTHONPATH '$HOME/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/pep582' | |
end | |
# pyenv | |
set --export PATH "$HOME/bin:$HOME/.pyenv/bin:$PATH" | |
set -Ux PYENV_ROOT $HOME/.pyenv | |
fish_add_path $PYENV_ROOT/bin | |
status is-login; and pyenv init --path | source | |
source (pyenv init - | psub) | |
# golang | |
if not set -q $GOBIN | |
set --export PATH "$GOBIN/bin:$PATH" | |
else | |
set --export PATH "$HOME/go/bin:$PATH" | |
end | |
# rust | |
set --export PATH "$HOME/.cargo/bin:$PATH" | |
# mlflow | |
set --export MLFLOW_TRACKING_URI "$HOME/mlruns" | |
# ladspa | |
set --export LADSPA_PATH "$LADSPA_PATH:/usr/lib/ladspa" | |
# alacritty | |
set --export WINIT_X11_SCALE_FACTOR 1 | |
# nvim | |
# set --export NVIM_LISTEN_ADDRESS "/tmp/nvimsocket" | |
# Abbreviations | |
abbr -a pacman-autoremove "sudo pacman -Rs (pacman -Qtdq)" | |
abbr -a docview "viddy -t unbuffer rich" | |
abbr -a extra "sudo cryptsetup luksOpen /dev/sdb2 extra; mount /extra" | |
abbr -a zotsync-pull "if test -f \"zotero.sqlite\"; rclone sync ateneopv:Zotero ./storage/; else; echo \"Error: not in Zotero folder\"; return 1; end;" | |
abbr -a zotsync-push "if test -f \"zotero.sqlite\"; rclone sync ./storage/ ateneopv:Zotero; else; echo \"Error: not in Zotero folder\"; return 1; end;" | |
abbr -a zotsync-sync "if test -f \"zotero.sqlite\"; watch -n 120 rclone bisync ./storage/ ateneopv:Zotero; else; echo \"Error: not in Zotero folder\"; return 1; end;" | |
function fix-camera-freq; v4l2-ctl --set-ctrl=power_line_frequency=$argv; end | |
function sendvnc | |
ssh $argv true | |
if test $status -ne 0 | |
echo "ssh doesn't work on server!" | |
else | |
ssh -N -R 5900:localhost:5900 $argv & x11vnc -localhost -display :0 -reopen | |
end | |
end | |
function getvnc; ssh -t -L 5900:localhost:5900 $argv 'x11vnc -localhost -display :0 -reopen'; end | |
function sendssh | |
ssh $argv true | |
if test $status -ne 0 | |
echo "ssh doesn't work on server!" | |
else | |
echo "Starting sshd" | |
sudo systemctl start sshd | |
and ssh -vvv -N -R 2200:localhost:22 $argv | |
echo "Stopping sshd" | |
sudo systemctl stop sshd | |
end | |
end | |
# Set up vim mode | |
set -g fish_key_bindings fish_vi_key_bindings | |
bind -M insert \cc kill-whole-line repaint | |
bind -M insert \el accept-autosuggestion | |
bind -M insert \ej execute | |
bind -M normal \ej execute | |
# zoxide | |
zoxide init fish | source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment