Last active
November 21, 2022 11:20
-
-
Save loneicewolf/bff76d8d0809120525a65c3621b81be8 to your computer and use it in GitHub Desktop.
colors, effects, message box, popups, etc - in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## edit: this was only called "colors in bash" but I renamed it to include more "general" or "overall" effects, | |
## such as; popups(zenity, notify-send, ..) and (soon coming!) ncurses, etc. | |
# might be some errors (not only grammar) | |
# red=31 | |
# green=32 | |
# blue=34 | |
# yellow=33 | |
# cyan=36 | |
# pink=35 | |
## to use printf DO \n AT END | |
m="hello" && for i in {31,32,34,33,36,35}; do printf "\e["$i"m$m\e[00m\n"; done | |
m="hello" && for i in {31,32,34,33,36,35}; do echo -e "\e["$i"m$m\e[00m"; done | |
# hello | |
# ... | |
# hello | |
## all in diff colors. | |
Okay, but what about pictures?
text is good, but.. not very "nice" or "fun" to look at, would be better if we could use some nice picture (as well) as the text. Why limit ourselves? :)
first download your favo picture. Which might be, you know - a wallpaper, an actual icon, emoji, or a gif. (if a gif, screenshot where you want - and save it as a .ico) (in fact, save all pictures/images/icons as just that. Icons (.ico
) else you will get a
# ~~~~~icon to display~~~~~ ~~~~~message to display~~~~~
notify-send -i /path/to/your/favorite/image.ico "Hello world!"
it will not only (as you probably already guessed) display text "hello world!" but it will also display that icon
(think of a fun thing like when you boot into the system and you are presented with a message saying "welcome" and a emoji with sunglasses on, instead of just a boring text.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
note: not mine, I took it from CERNs spectre/meltdown check bash script