Skip to content

Commit

Permalink
feat: Add ASCII art banner functionality and update error text styling (
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima authored Jan 24, 2024
1 parent c095354 commit 60e531e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .local/bin/mdsanima-banners
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Copyright (c) 2023-2024 MDSANIMA DEV. All rights reserved.
# Licensed under the MIT license.

# This is a ASCII art banners with colors for `mdsanima-shell` script.
# The all baners is generated from command-line tool called `figlet` by
# typing `figlet -f future "mdsanima-shell"` and here is a colorized version
# with some font and colors variants thats may be useful for other purposes.


# Import default colors definition and help function for printing text in colors
source "$PWD/mdsanima-colors"
source "$PWD/mdsanima-prints"

# Pringing ASCII art lines
function __mds_shell_banner() {
__mds_color_print -fg ROSE "┏┳┓╺┳┓┏━┓┏━┓┏┓╻╻┏┳┓┏━┓ ┏━┓╻ ╻┏━╸╻ ╻ "
__mds_color_print -fg RED "┃┃┃ ┃┃┗━┓┣━┫┃┗┫┃┃┃┃┣━┫╺━╸┗━┓┣━┫┣╸ ┃ ┃ "
__mds_color_print -fg ORANGE "╹ ╹╺┻┛┗━┛╹ ╹╹ ╹╹╹ ╹╹ ╹ ┗━┛╹ ╹┗━╸┗━╸┗━╸"
}
4 changes: 2 additions & 2 deletions .local/bin/mdsanima-prints
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function __mds_color_print() {
local bg_seq="\e[48;5;"
local reset_code="\e[0m"

# Define black bold error text on red background
local _error_="${fg_seq}16;01m${bg_seq}196m ERROR ${reset_code}"
# Define white bold error text on red background
local _error_="${fg_seq}15;01m${bg_seq}196m ERROR ${reset_code}"

# Define defaults red error text
local color_error="${fg_seq}196m Color number must be between 0 and 255${reset_code}"
Expand Down

0 comments on commit 60e531e

Please sign in to comment.