2022-07-14 16:48:24 +00:00
|
|
|
# Environment variables
|
|
|
|
set -p PATH "$HOME/.cargo/bin"
|
|
|
|
|
2022-07-19 13:30:27 +00:00
|
|
|
# Non interactive functions
|
|
|
|
function podman-default-create -w podman
|
|
|
|
podman create \
|
|
|
|
--name $argv[1] \
|
|
|
|
--detach \
|
|
|
|
--pull always \
|
|
|
|
--label "io.containers.autoupdate=registry" \
|
|
|
|
$argv[2..]
|
|
|
|
|
|
|
|
set -l old_pwd (pwd)
|
|
|
|
cd ~/.config/systemd/user
|
|
|
|
podman generate systemd --new --files --name $argv[1]
|
|
|
|
cd $old_pwd
|
|
|
|
|
|
|
|
systemctl --user enable --now container-$argv[1]
|
|
|
|
end
|
|
|
|
|
2022-07-14 16:48:24 +00:00
|
|
|
if status is-interactive
|
|
|
|
# Interactive environment variables
|
|
|
|
set -x EDITOR /usr/bin/nvim
|
|
|
|
|
|
|
|
# Setup
|
|
|
|
## McFly
|
|
|
|
set -gx MCFLY_KEY_SCHEME vim
|
|
|
|
set -gx MCFLY_FUZZY 1
|
|
|
|
set -gx MCFLY_RESULTS 25
|
|
|
|
set -gx MCFLY_INTERFACE_VIEW BOTTOM
|
|
|
|
set -gx MCFLY_RESULTS_SORT LAST_RUN
|
|
|
|
set -gx MCFLY_HISTORY_LIMIT 10000
|
|
|
|
mcfly init fish | source
|
|
|
|
|
|
|
|
# Disable greeting
|
|
|
|
set -g fish_greeting
|
|
|
|
|
|
|
|
# Abbreviations
|
|
|
|
## Replacements
|
|
|
|
abbr -a -g rm trash
|
|
|
|
|
|
|
|
## Safety options
|
|
|
|
abbr -a -g cp "cp -i"
|
|
|
|
abbr -a -g mv "mv -i"
|
|
|
|
abbr -a -g rmi "rm -i"
|
|
|
|
|
|
|
|
# Functions
|
|
|
|
## Replacements
|
|
|
|
function cat -w bat
|
|
|
|
bat $argv
|
|
|
|
end
|
|
|
|
end
|