Muh dotfiles
This commit is contained in:
46
.config/fish/conf.d/abbr.fish
Normal file
46
.config/fish/conf.d/abbr.fish
Normal file
@ -0,0 +1,46 @@
|
||||
status is-interactive; or return
|
||||
|
||||
status is-login; and abbr H Hyprland
|
||||
|
||||
abbr l la
|
||||
abbr m mkdir
|
||||
abbr o open
|
||||
abbr t trash
|
||||
# abbr m mpv
|
||||
abbr mm -- mpv --shuffle \$XDG_MUSIC_DIR
|
||||
|
||||
abbr g git
|
||||
# abbr dots -- git --git-dir \~/.dotfiles/ --work-tree \~
|
||||
abbr gl git log
|
||||
abbr ga git add
|
||||
abbr gc git commit
|
||||
abbr gs git status
|
||||
abbr gcl git clone
|
||||
abbr gco git checkout
|
||||
|
||||
|
||||
function __last_hist_item; printf $history[1]; end
|
||||
abbr !! -p anywhere -f __last_hist_item
|
||||
|
||||
function __find_editor --description 'Edit with edit-in-kitty when in ssh'
|
||||
if set -q SSH_TTY; and type -q edit-in-kitty
|
||||
printf edit-in-kitty
|
||||
else
|
||||
printf $EDITOR
|
||||
end
|
||||
end
|
||||
abbr e -f __find_editor
|
||||
|
||||
function __ssh_kitten --description 'Use ssh kitten if available'
|
||||
type -q kitten; and printf 'kitten '
|
||||
printf ssh
|
||||
end
|
||||
abbr s -f __ssh_kitten
|
||||
|
||||
function __multidot --description 'Use .... instead of ../../../'
|
||||
string repeat -n (math (string length -- $argv) - 1) ../
|
||||
end
|
||||
abbr multidot -r '\.\.\.+$' -p anywhere -f __multidot
|
||||
|
||||
function __multicd; echo cd (__multidot $argv); end
|
||||
abbr multicd -r '^\.\.+$' -f __multicd
|
49
.config/fish/conf.d/env.fish
Normal file
49
.config/fish/conf.d/env.fish
Normal file
@ -0,0 +1,49 @@
|
||||
set -gx XDG_CONFIG_HOME ~/.config
|
||||
set -gx XDG_CACHE_HOME ~/.cache
|
||||
set -gx XDG_STATE_HOME ~/.local/state
|
||||
set -gx XDG_DATA_HOME ~/.local/share
|
||||
|
||||
set -gx XDG_MUSIC_DIR ~/music
|
||||
set -gx XDG_VIDEOS_DIR ~/vid
|
||||
set -gx XDG_PICTURES_DIR ~/pic
|
||||
set -gx XDG_DOCUMENTS_DIR ~/doc
|
||||
|
||||
set -gx XDG_DESKTOP_DIR /tmp
|
||||
set -gx XDG_DOWNLOAD_DIR /tmp
|
||||
# set -gx XDG_TEMPLATES_DIR "$HOME/"
|
||||
# set -gx XDG_PUBLICSHARE_DIR "$HOME/"
|
||||
|
||||
set -gx GOPATH $XDG_DATA_HOME/go # GOOUT my home
|
||||
set -gx CARGO_HOME $XDG_DATA_HOME/cargo
|
||||
|
||||
# Can't use '~' in universal variables
|
||||
set -gx fish_user_paths ~/.local/bin $CARGO_HOME/bin
|
||||
|
||||
# -agx is a bad idea as login shell itself also does it
|
||||
set -gx WINEPATH /usr/x86_64-w64-mingw32/bin
|
||||
# set -gx CPATH /usr/x86_64-w64-mingw32/include
|
||||
|
||||
set -gx BROWSER librewolf # for fish documentation mainly
|
||||
|
||||
# Convenience
|
||||
set -gx SCREENSHOT_DIR $XDG_PICTURES_DIR/screen
|
||||
set -gx SCREENRECORD_DIR $XDG_VIDEOS_DIR/screen
|
||||
|
||||
|
||||
# Find an editor
|
||||
for e in nvim vim vi helix nano
|
||||
type -q $e; or continue
|
||||
set -gx EDITOR $e
|
||||
break
|
||||
end
|
||||
type -q nvim; and set -gx MANPAGER nvim +Man!
|
||||
|
||||
|
||||
test -S ~/.bitwarden-ssh-agent.sock
|
||||
and set -gx SSH_AUTH_SOCK ~/.bitwarden-ssh-agent.sock
|
||||
|
||||
# SSH with GPG
|
||||
# set -e SSH_AGENT_PID
|
||||
# set -gx GPG_TTY (tty)
|
||||
# set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
|
||||
# gpg-connect-agent updatestartuptty /bye >/dev/null
|
Reference in New Issue
Block a user