stark / color-scripts Goto Github PK
View Code? Open in Web Editor NEWUser contributed color scripts
Home Page: https://git.io/color.sh
User contributed color scripts
Home Page: https://git.io/color.sh
Here's something I wrote to test xterm, if you'd like it.
#!/usr/bin/env bash
# Print a slice of color like:
# ________________
# |green red|
# | |
# |cyan magenta|
# ----------------
#
# It should look smooth if your terminal supports enough colors.
#clear
b=0
get_screen_size()
{
local sizes=$(stty size)
if [ $? = 0 ] ; then
set $sizes
screen_rows="$1"
screen_cols="$2"
fi
}
get_screen_size
rows=$((screen_rows - 2))
cols=$((screen_cols - 1))
blue_step=$((255 / rows))
red_green_step=$((255 / cols))
row=0
b=0
while [ $row -lt $rows ] ; do
col=0
r=0
g=255
while [ $col -lt $cols ] ; do
#printf "\e[38;2;${r};${g};${b}m#"
printf "\e[48;2;${r};${g};${b}m "
r=$((r + red_green_step))
g=$((g - red_green_step))
col=$((col + 1))
done
printf "\e[0m\n"
b=$((b + blue_step))
row=$((row + 1))
done
printf "\e[0m"
exit 0
I'm using fish shell as a default shell, but i couldn't figure out how to link all executable files so that every time i open my terminal some of than to execute randomly.
hex
& hex-block
won't run on macOS because they both have the line
xdef="$HOME/.Xresources"
and ~/.Xresources doesn't exist on Macs.
I'm using zsh shell. How to execute the color scripts randomly there?
Based on elfman, this was my first time doing it, hope you like it. :)
https://pastebin.com/pqnrRCUi
pinguco output:
[1m[31m ██████[0m
[1m[31m██[0m██[0m[34m██[0m[1m[31m██[0m[34m██[0m
[1m[31m██[0m██[34m██[0m[1m[31m██[0m[34m██[0m
[1m[31m██████[0m[35m██████[0m
[1m[31m████[0m████[1m[31m██[0m
[1m[31m████[0m████████[1m[31m██[0m
[1m[31m████[0m████████[1m[31m██[0m
[1m[31m████[0m████████[1m[31m██[0m
[1m[31m████[0m████[1m[31m██[0m
There's this nifty one-liner I found at https://github.com/dexpota/kitty-themes:
COLOR_SCRIPT_REPO=https://api.github.com/repos/stark/Color-Scripts/contents/color-scripts
wget -q -O - $(curl -s $COLOR_SCRIPT_REPO | jq '.[] | "\(.path) \(.download_url)"' -r | cut -d " " -f2) | bash
I see a bunch of errors. Some of them might need there execute bit set.
I reproduced some of the errors by running this:
for i in *; do echo $i; echo $i >> colors.err; ./$i 2>> colors.err; done
...
hex
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
hex-block
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
...
pinguco
zsh: permission denied: ./pinguco
pipes1
./pipes1: line 182: read: 0.05: invalid timeout specification
...
Is there a way to keep the scripts up to date? pipes.sh has changed hands and received a few fixes since the version included in this repo. There are also a few more scripts now maintained in the same place
Feel free to use!
https://github.com/necronoise/bomber-cli/blob/master/bomber
Looks the community has moved over to using Derek's color script repo as the current collection of shell color scripts.
https://gitlab.com/dwt1/shell-color-scripts
I suggest any future Pull Requests for new scripts and any issues with the scripts here be sent over to Derek's repo.
That repo contains all the scripts contained in this one and more.
Thank you, stark for maintaining this repo for as long as you have!
hi, i'm new to git and coding, so i don't often use terminal. i'd like to know commands to run in terminal and if this color-scripts work on windows too
i try to run it ./color-script but it doesnt work and also run using ./colors i hope someone can tell me how?
im still trying to figure it out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.