diff --git a/bin/welcome.py b/bin/welcome.py new file mode 100755 index 0000000..774375a --- /dev/null +++ b/bin/welcome.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 + +from rich.console import Console +from rich.text import Text +import argparse + +console = Console(force_terminal=True) + +colors = [ + "black", + "red", + "green", + "yellow", + "blue", + "magenta", + "cyan", + "white", + "bright_black", + "bright_red", + "bright_green", + "bright_yellow", + "bright_blue", + "bright_magenta", + "bright_cyan", + "bright_white", +] + + +def wave(): + """ + ╮╭╭╮╮╭╭╮╮╭╭╮╮╭╭╮ + ╰╯╯╰╰╯╯╰╰╯╯╰╰╯╯╰ + """ + + lines = ["╮╭╭╮╮╭╭╮╮╭╭╮╮╭╭╮", "╰╯╯╰╰╯╯╰╰╯╯╰╰╯╯╰"] + for line in lines: + styled_line = [ + Text(line[i * 2 : i * 2 + 2], style=color) + for i, color in enumerate(colors[:8]) + ] + console.print(Text("").join(styled_line)) + + +def dots(): + """ + ● ● ● ● ● ● ● ● + """ + + console.print(Text(" ").join([Text("●", style=color) for color in colors[:8]])) + + +def wave_w_dots(): + """ + Alternating colors from red to white with + black separators + + ╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭ + ╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯ + """ + + lines = ["╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭╭─╮╮╮●╭╭", "╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯╯●╰╰╰─╯╯"] + + for line in lines: + styled_line = [] + for i, x in enumerate(line): + if i % 4: + styled_line.append(Text(x, style=colors[1 + int(i / 4)])) + else: + styled_line.append(Text(x, style="black")) + + console.print(Text("").join(styled_line)) + + +def main(): + prompts = {"wave": wave, "dots": dots, "wave_w_dots": wave_w_dots} + parser = argparse.ArgumentParser( + description="generate ansi color coded login prompts'" + ) + parser.add_argument("--welcome", type=str, help="a welcome screen to print") + + args = parser.parse_args() + + if not args.welcome: + for name, prompt in prompts.items(): + console.print(f"name: {name}") + prompt() + elif args.welcome not in prompts.keys(): + console.print(f"{args.welcome} is not a registered prompt") + else: + prompts[args.welcome]() + + +if __name__ == "__main__": + main() diff --git a/home/private_bin/executable_ansi_colors b/home/private_bin/executable_ansi_colors new file mode 100644 index 0000000..aaefcc5 --- /dev/null +++ b/home/private_bin/executable_ansi_colors @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +print("\\033[XXm") + +for i in range(30,37+1): + print("\033[%dm%d\t\t\033[%dm%d" % (i,i,i+60,i+60)) + +print("\\033[39m\\033[49m - Reset colour") +print("\\033[2K - Clear Line") +print("\\033[;H OR \\033[;f puts the cursor at line L and column C.") +print("\\033[A Move the cursor up N lines") +print("\\033[B Move the cursor down N lines") +print("\\033[C Move the cursor forward N columns") +print("\\033[D Move the cursor backward N columns") +print("\\033[2J Clear the screen, move to (0,0)") +print("\\033[K Erase to end of line") +print("\\033[s Save cursor position") +print("\\033[u Restore cursor position") +print() +print("\\032[4m Underline on") +print("\\033[24m Underline off") +print("\\033[1m Bold on") +print("\\033[21m Bold off") diff --git a/system/env.sh b/system/env.sh index 0d84e40..c721f04 100644 --- a/system/env.sh +++ b/system/env.sh @@ -57,7 +57,7 @@ if is-executable fnm; then fi if is-executable bat; then - export BAT_THEME=Dracula + export BAT_THEME=Catppuccin export BAT_STYLE=header,numbers,grid fi diff --git a/system/fzf.zsh b/system/fzf.zsh index 0cf5006..69c1d96 100644 --- a/system/fzf.zsh +++ b/system/fzf.zsh @@ -6,11 +6,21 @@ # ------------ source "$HOME/.fzf/shell/key-bindings.zsh" +# dracula +# FZF_COLORS=" +# --color=dark +# --color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f +# --color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7 +# " + +# catppuccin FZF_COLORS=" ---color=dark ---color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f ---color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7 +--color=bg+:#302D41,bg:#1E1E2E,spinner:#F8BD96,hl:#F28FAD +--color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 +--color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD " + + FZF_LAYOUT=" --height=40% --border=rounded