Skip to content

Commit

Permalink
Add color test
Browse files Browse the repository at this point in the history
  • Loading branch information
aminfara committed Dec 3, 2021
1 parent fd5fdf7 commit 37f304a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 21 additions & 0 deletions color-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Based on: https://gist.github.com/XVilka/8346728

awk -v columns=$(tput cols || echo 80) 'BEGIN{
for (column = 0; column<columns; column++) {
r = (column*255/columns);
g = (column*255/columns);
b = (column*255/columns);
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "%s\033[0m", " ";
}
printf "\n\n";
for (column = 0; column<columns; column++) {
r = 255-(column*255/columns);
g = (column*510/columns);
b = (column*255/columns);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "%s\033[0m", " ";
}
}'
3 changes: 1 addition & 2 deletions zshrc.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ activate_homebrew() {
################################################################################

install_cli_tools() {
brew_install_or_upgrade git fd ripgrep fzf htop jq gnupg tmux
brew_install_or_upgrade git fd ripgrep fzf htop jq gnupg tree tmux
# Install fzf key bindings
$(brew --prefix fzf)/install --key-bindings --completion --no-update-rc --no-bash --no-fish
ln -s $MYZSH_INSTALLED_DIR/tmux.conf $HOME/.tmux.conf
Expand Down Expand Up @@ -160,7 +160,6 @@ activate_cli_tools () {

install_antigen() {
brew_install_or_upgrade antigen
# git_install_or_update $ANTIGEN_DIRECTORY "zsh-users/antigen.git"
activate_antigen
}

Expand Down

0 comments on commit 37f304a

Please sign in to comment.