aboutsummaryrefslogtreecommitdiff
path: root/.config/fish/config.fish
blob: cc442211b757e35c0c2f0ccc97ab329f552d235e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
if status is-login
    exec bash -c "test -e /etc/profile && source /etc/profile;\
    test -e ~/.zprofile && source ~/.zprofile;\
    exec fish"
end

if status is-interactive
    # commands to run in interactive sessions can go here
        fish_vi_key_bindings

    # abbreviations
        abbr -a S "cd ~/.local/bin && ls"
        abbr -a c "cal"
        abbr -a d "disown"
        abbr -a dots "cd ~/.local/share/.dotfiles/"
        abbr -a ks "killall screen"
        abbr -a lgit 'lazygit'
        abbr -a p "paru"
        abbr -a pu "paru -Syu --noconfirm"
        abbr -a s "screen"
        abbr -a sls "screen -ls"
        abbr -a sr "screen -r"
        abbr -a t "timedatectl"
        abbr -a uncommit 'git reset --soft HEAD^'
        abbr -a w "curl wttr.in"
        abbr -a x "startx"
        abbr -a yt-best "youtube-dl -cif 'bestvideo+bestaudio/best'"
        abbr -a yt-m4a "youtube-dl -cif 'bestaudio[ext=m4a]'"
        abbr -a yt-mp4 "youtube-dl -cif 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
        abbr -a yt-mpv "mpv --ytdl-format="
        abbr -a yt-webm "youtube-dl -cif 'bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm]/best'"
    # aliases
        alias egrep='grep -E'
        alias fgrep='grep -F'
        alias grep='grep --colour=auto'
        alias ls="ls --group-directories-first -h -p --color -F"
        alias neofetch="alsi"
        if which bat >/dev/null 2>&1
            alias cat="bat -p"
        end

    # less termcap variables (for colored man pages)
        set -gx LESS_TERMCAP_mb \e'[1;32m'
        set -gx LESS_TERMCAP_md \e'[1;32m'
        set -gx LESS_TERMCAP_me \e'[0m'
        set -gx LESS_TERMCAP_se \e'[0m'
        set -gx LESS_TERMCAP_so \e'[01;31m'
        set -gx LESS_TERMCAP_ue \e'[0m'
        set -gx LESS_TERMCAP_us \e'[1;4;33m'
end