fish/config.fish
2025-01-24 13:03:32 +00:00

138 lines
3.8 KiB
Fish

set fish_greeting #supress fish_greeting
zoxide init fish | source
# pyenv init - | source
alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
alias da='dragon-drop -x'
alias dat='dragon-drop -t --and-exit'
alias dp='doas pacman'
alias p='pacman'
alias vim='nvim'
alias v='nvim'
alias em="emacs -nw":
# alias ls="exa"
alias ll="exa -al"
alias la="exa -a"
alias grep="grep --color=auto"
alias egrep="egrep --color=auto"
alias df="df -h"
alias du="du -h"
alias cat="bat"
function nem
nohup emacs $argv &> /tmp/nohup.em.out & disown
end
alias nv="nvim"
alias nemacs="nohup emacs"
alias rust-musl-builder='docker run --rm -it -v "$(pwd)":/home/rust/src messense/rust-musl-cross:armv7-musleabihf'
#alias ledger="ledger -f $HOME/Documents/ledger/ledger.ledger"
set EDITOR "nvim"
set _JAVA_AWT_WM_NONREPARENTING "1"
# set JAVA_HOME /usr/lib/jvm/java-8-openjdk
set XDG_CONFIG_HOME "$HOME/.config"
set -g FZF_DEFAULT_COMMAND 'rg --files --follow --ignore-vcs --hidden -g "!{node_modules/*,.git/*}"'
export FZF_DEFAULT_COMMAND='rg --files --follow --ignore-vcs --hidden -g "!{node_modules/*,.git/*}"'
export EDITOR="nvim"
#export PATH=$PATH:$ANDROID_HOME/tools
#export PATH=$PATH:$ANDROID_HOME/tools/bin
#export PATH=$PATH:$ANDROID_HOME/platform-tools
export NIXPKGS_ALLOW_UNFREE=1
set --export DART_SDK "opt/flutter/bin/cache/dart-sdk"
# function ssh
# if [ $TERM = "xterm-kitty" ]
# kitty +kitten ssh $argv
# else
# /bin/ssh $argv
# end
# end
function configGit34
git config --local user.email "andr3h3nriqu3s@gmail.com"
git config --local user.name "agh"
end
function configGitOther
git config --local user.email "contact@andr3h3nriqu3s.com"
git config --local user.name "Andre Henriques"
end
function pickColor
grim -g "$(slurp -p -b 00000000)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:-
end
# grim and slurp
function sshot
grim -g "$(slurp)" - | wl-copy
end
function sshottof
grim -g "$(slurp -w 0)" -t png - > ./$argv
end
source ~/.config/fish/completions/bun.fish
source ~/.config/fish/completions/nvm.fish
source ~/.config/fish/other.fish
source ~/.config/fish/alias.fish
# pnpm
set -gx PNPM_HOME "/home/sylv/.local/share/pnpm"
set -gx PATH "$PNPM_HOME" $PATH
# pnpm end
# tabtab source for packages
# uninstall by removing these lines
[ -f ~/.config/tabtab/fish/__tabtab.fish ]; and . ~/.config/tabtab/fish/__tabtab.fish; or true
# nix
alias nshell "nix-shell --run fish"
# opam configuration
# source /home/andr3/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
if status is-interactive
if ! test $NOT_SAFE
if ! test -n "$IN_NIX_SHELL"
#hyfetch
end
end
end
# Set the environment for the my ltex server
set --export USERNAME_MY_LTEX "andr3h3nriqu3s@gmail.com"
set --export APIKEY_MY_LTEX "pit-Z31pae3YaG1c"
set --export AUTHORIZATION_MY_LTEX "Basic YW5kcjNoM25yaXF1M3NAZ21haWwuY29tOmI3YjNjMTljYzc5YWY3Y2ZlNGQ5Mjk3NWEzNjFlZDBk"
# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH
# set --export NOT_SAFE 1
# Android Home
set --export ANDROID_HOME "/home/sylv/Android/Sdk"
set --export ANDROID_SDK_ROOT "/home/sylv/Android/Sdk"
# Auto rename zellij tab
function zellij_tab_name_update --on-event fish_preexec
if set -q ZELLIJ
set title (string split ' ' $argv)[1]
command nohup zellij action rename-tab $title >/dev/null 2>&1
end
end
function steam_path_run
set -fx STEAM_COMPAT_DATA_PATH "$HOME/.steam/steam/steamapps/compatdata/$argv[1]/"
set -fx STEAM_COMPAT_CLIENT_INSTALL_PATH "$HOME/.steam/steam/steamapps/compatdata/$argv[1]/pfx"
set -fx DXVK_ASYNC 1
set -fx PROTON_HIDE_NVIDIA_GPU 0
set -fx PROTON_ENABLE_NVAPI 1
set -fx VKD3D_CONFIG "dxr"
gamemoderun ~/.steam/steam/steamapps/common/Proton\ -\ Experimental/proton run $argv[2]
end