fish/config.fish

138 lines
3.8 KiB
Fish
Raw Normal View History

2023-05-19 08:36:32 +01:00
set fish_greeting #supress fish_greeting
zoxide init fish | source
# pyenv init - | source
alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
2025-01-24 13:03:32 +00:00
alias da='dragon-drop -x'
2023-05-19 08:36:32 +01:00
alias dat='dragon-drop -t --and-exit'
alias dp='doas pacman'
alias p='pacman'
alias vim='nvim'
2025-01-24 13:03:32 +00:00
alias v='nvim'
2023-05-19 08:36:32 +01:00
alias em="emacs -nw":
2025-01-24 13:03:32 +00:00
# alias ls="exa"
2023-05-19 08:36:32 +01:00
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
2025-01-24 13:03:32 +00:00
alias nv="nvim"
2023-05-19 08:36:32 +01:00
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"
2023-11-27 12:04:59 +00:00
# set JAVA_HOME /usr/lib/jvm/java-8-openjdk
2023-05-19 08:36:32 +01:00
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
2025-01-24 13:03:32 +00:00
set --export DART_SDK "opt/flutter/bin/cache/dart-sdk"
2023-05-19 08:36:32 +01:00
2025-01-24 13:03:32 +00:00
# function ssh
# if [ $TERM = "xterm-kitty" ]
# kitty +kitten ssh $argv
# else
# /bin/ssh $argv
# end
# end
2023-05-19 08:36:32 +01:00
function configGit34
git config --local user.email "andr3h3nriqu3s@gmail.com"
git config --local user.name "agh"
end
function configGitOther
2025-01-24 13:03:32 +00:00
git config --local user.email "contact@andr3h3nriqu3s.com"
2023-05-19 08:36:32 +01:00
git config --local user.name "Andre Henriques"
end
2023-06-10 17:27:20 +01:00
function pickColor
2023-07-06 17:47:00 +01:00
grim -g "$(slurp -p -b 00000000)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:-
2023-06-10 17:27:20 +01:00
end
2023-05-19 08:36:32 +01:00
# grim and slurp
function sshot
grim -g "$(slurp)" - | wl-copy
end
2023-11-27 12:04:59 +00:00
function sshottof
2025-01-24 13:03:32 +00:00
grim -g "$(slurp -w 0)" -t png - > ./$argv
2023-11-27 12:04:59 +00:00
end
2023-05-19 08:36:32 +01:00
source ~/.config/fish/completions/bun.fish
source ~/.config/fish/completions/nvm.fish
source ~/.config/fish/other.fish
2023-07-09 18:26:37 +01:00
source ~/.config/fish/alias.fish
2023-05-19 08:36:32 +01:00
# pnpm
2025-01-24 13:03:32 +00:00
set -gx PNPM_HOME "/home/sylv/.local/share/pnpm"
2023-05-19 08:36:32 +01:00
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"
2023-07-06 17:47:00 +01:00
# opam configuration
2025-01-24 13:03:32 +00:00
# source /home/andr3/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
2023-07-09 18:26:37 +01:00
2023-07-13 14:28:25 +01:00
if status is-interactive
if ! test $NOT_SAFE
if ! test -n "$IN_NIX_SHELL"
2023-11-27 12:04:59 +00:00
#hyfetch
2023-07-13 14:28:25 +01:00
end
2023-07-09 18:26:37 +01:00
end
end
2023-11-27 12:04:59 +00:00
2025-01-24 13:03:32 +00:00
# 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"
2023-11-27 12:04:59 +00:00
# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH
2025-01-24 13:03:32 +00:00
# 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