💾 Archived View for pixeldreams.tokyo › technomancy › cute-ion-theme.gmi captured on 2023-11-14 at 08:06:48. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

tiny cute ion theme

31 august, 2023

idk why i thought this would make me cool but i made a slackbuild to install

ion shell (from redox os) and spent time learning the scripting language to

reimpliment my shell theme

* screenshot *

my .config/ion/initrc:

fn get_depth dir:str -- returns the depth of a directory in the filesystem
        let dir = [@split($dir '/')]
        echo $len(@dir)
end

fn PROMPT -- prints a lovely prompt for the user
        let user = " ${USER}\@ "

        let escaped_pwd = $replace($PWD '@' '\@')
        let dir = [@split($escaped_pwd '/')]
        let depth:int = $(get_depth $pwd)
        let home_depth:int = $(get_depth $HOME)
        let diff = $((depth - home_depth))

        test $diff -gt 3 &&
                let dir = [@dir[..$home_depth] '...' @dir[-3..]]

        let dir = $join(@dir '/')
        let dir = $replacen($dir $HOME '~' 1)

        test $USER = "root" &&
                let sigil = '#' ||
                let sigil = '




        let m = "${c::magenta}"
        let r = "${c::reverse}"
        let blk = "${c::blink}"
        let rst = "${c::reset}"

        echo -n "$m$r$user$rst$m ${blk}💕$rst$m $dir $sigil $rst"
end

banners.zsh ponyta

bragging on fedi

original zsh theme

ion manual