1
0
Fork 0
mirror of https://codeberg.org/Mo8it/server_dotfiles.git synced 2024-09-19 19:01:16 +00:00
server_dotfiles/.config/fish/config.fish
2022-08-02 14:38:20 +02:00

61 lines
1.4 KiB
Fish

# Environment variables
set -p PATH "$HOME/.cargo/bin"
# Non interactive functions
function podman-default-create -w podman
set -l container_name $argv[1]
if systemctl --user is-enabled container-$container_name
systemctl --user disable --now container-$container_name
end
if podman container exists $container_name
podman stop $container_name
end
podman create \
--name $container_name \
--label "io.containers.autoupdate=registry" \
--tz local \
$argv[2..]
set -l old_pwd (pwd)
cd ~/.config/systemd/user
podman generate systemd --new --files --name $container_name
cd $old_pwd
systemctl --user enable --now container-$container_name
end
if status is-interactive
# Disable greeting
set -g fish_greeting
# 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
# 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