dotfiles/.config/fish/config.fish

93 lines
2 KiB
Fish
Raw Normal View History

set fish_greeting
set -g theme_display_virtualenv no
set -g theme_display_ruby no
set -g fish_prompt_pwd_dir_length 0
set base00 2D2D2D
set base01 393939
set base02 515151
set base03 747369
set base04 A09F93
set base05 D3D0C8
set base06 E8E6DF
set base07 F2F0EC
set base08 F2777A
set base09 F99157
set base0A FFCC66
set base0B 99CC99
set base0C 66CCCC
set base0D 6699CC
set base0E CC99CC
set base0F D27B53
#if status --is-interactive
2019-07-19 23:11:53 +02:00
if test "$XDG_CURRENT_DESKTOP" = "i3"
source $HOME/.config/base16-shell/profile_helper.fish
2019-07-19 23:11:53 +02:00
end
function colortest
~/.config/base16-shell/colortest base16-$argv[1].sh
end
function config
git --git-dir $HOME/.myconf --work-tree $HOME $argv
end
function pdf_comp
pandoc -o $argv.pdf $argv.md
zathura $argv.pdf &
while true
inotifywait -e modify $argv.md
pandoc -o $argv.pdf $argv.md
or notify-send "pandoc" "Erreur de compilation"
end
end
function dot_comp
dot -Tps2 $argv.dot | epstopdf --filter -o=$argv.pdf
zathura $argv.pdf &
while true
inotifywait -e modify $argv.dot
dot -Tps2 $argv.dot | epstopdf --filter -o=$argv.pdf
or notify-send "dot" "Erreur de compilation"
end
end
function su
/usr/bin/su --shell /usr/bin/fish $argv
end
function send_image
scp "$argv" breizh.me:/srv/files/Images/
end
function ranger
set tempfile (mktemp -t tmp.XXXXXX)
if test -n "$argv"
set argv $PWD
end
/usr/bin/ranger --choosedir="$tempfile" $argv
test -f $tempfile
and if test (cat "$tempfile") != (echo -n (pwd))
cd (cat $tempfile)
end
rm -f -- "$tempfile"
end
function rm
/usr/bin/rm -vI $argv
end
function arch-vm-install
echo "type \"boot tftp://10.0.2.2/archlinux.ipxe\""
qemu-system-x86_64 -enable-kvm -m 2G -hda VMs/arch_linux -netdev user,id=mynet0,tftp=Téléchargements/,bootfile=ipxe.pxe -device e1000,netdev=mynet0 -boot n;
end
function arch-vm-start
qemu-system-x86_64 -enable-kvm -m 2G -hda VMs/arch_linux -netdev user,id=mynet0 -device e1000,netdev=mynet0;
end
abbr sa ssh-add