dotfiles/.config/fish/config.fish

73 lines
2.4 KiB
Fish

# /\ ,,
# || ' ||
# =||= \\ _-_, ||/\\
# || || ||_. || ||
# || || ~ || || ||
# \\, \\ ,-_- \\ |/
# _/
source ~/.cache/wal/colors.fish
set -Ux AWT_TOOLKIT MToolkit
set -Ux BORG_RELOCATED_REPO_ACCESS_IS_OK yes
set -Ux DESKTOP_SESSION bspwm
set -Ux EDITOR vim
set -Ux JDK_JAVA_OPTIONS "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
set -Ux SYSTEMD_EDITOR vim
set -gx fish_user_paths $fish_user_paths (ruby -e 'print Gem.user_dir')/bin /home/agatha/.local/bin /home/agatha/.cargo/bin /home/agatha/.cabal/bin /home/agatha/.espressif/tools/xtensa-esp32-elf-clang/esp-13.0.0-20211203-x86_64-unknown-linux-gnu/bin/
set -Ux LIBCLANG_PATH "/home/agatha/.espressif/tools/xtensa-esp32-elf-clang/esp-13.0.0-20211203-x86_64-unknown-linux-gnu/lib"
set -Ux PIP_USER no
alias cat bat
alias code codium
alias df duf
alias ls 'exa -lFhT --group-directories-first --level 1'
alias py python3
alias xclip 'xclip -selection clipboard'
alias youtube-dl-audio 'youtube-dl --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format best'
alias ip 'ip -color=always'
if status is-interactive
# Commands to run in interactive sessions can go here
end
# https://github.com/fish-shell/fish-shell/issues/1891#issuecomment-451961517
function expand-dot-to-parent-directory-path -d 'expand ... to ../.. etc'
# Get commandline up to cursor
set -l cmd (commandline --cut-at-cursor)
# Match last line
switch $cmd[-1]
case '*..'
commandline --insert '/.'
case '*'
commandline --insert '.'
end
end
bind . 'expand-dot-to-parent-directory-path'
# args: file host container path
function scp-lxc
scp -r $argv[1] $argv[2]:/tmp/
set -l pid (string trim (ssh $argv[2] (string join ' ' "sudo lxc-ls -f -Fpid" $argv[3]) | sed -n 2p))
ssh $argv[2] (string join '' "sudo mv /tmp/" (basename $argv[1]) " /proc/" $pid "/root/" $argv[4])
end
# if test -n "$DESKTOP_SESSION"
# set -x (gnome-keyring-daemon --start --components=secrets | string split "=")
# end
set -e SSH_AGENT_PID
set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
# so gpg-agent knows in what tty to prompt for key passwords
set -x GPG_TTY (tty)
gpg-connect-agent updatestartuptty /bye > /dev/null
starship init fish | source