~kris/dots

srice

ref: 2dc7c2f7e39f562e3603676ef50c2df0a4723c19 srice/.config/fish/functions/ff.fish -rw-r--r-- 1.5 KiB
2dc7c2f7 — Kris Yotam update nvim plan9 theme, add hosts file, misc updates 6 months ago
                                                                                
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
# ff - fastfetch with logo flags
# Usage: ff [-logo]
# Examples: ff, ff -apple, ff -arch, ff -linux

function ff
    if test (count $argv) -eq 0
        fastfetch
    else
        # Get the flag without the dash and convert to lowercase
        set -l raw $argv[1]
        set -l flag (string lower -- (string replace -r -- '^-' '' $raw))

        switch $flag
            case apple
                fastfetch --logo Apple
            case arch
                fastfetch --logo Arch
            case linux
                fastfetch --logo Linux
            case debian
                fastfetch --logo Debian
            case ubuntu
                fastfetch --logo Ubuntu
            case fedora
                fastfetch --logo Fedora
            case gentoo
                fastfetch --logo Gentoo
            case nixos
                fastfetch --logo NixOS
            case void
                fastfetch --logo Void
            case manjaro
                fastfetch --logo Manjaro
            case mint
                fastfetch --logo Mint
            case pop
                fastfetch --logo Pop
            case kali
                fastfetch --logo Kali
            case parrot
                fastfetch --logo Parrot
            case '*'
                # Try to use the argument as a logo name directly (capitalize first letter)
                set -l logo (string sub -l 1 -- $flag | string upper)(string sub -s 2 -- $flag)
                fastfetch --logo $logo
        end
    end
end