This file contains hidden or 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
#!/bin/bash | |
# | |
# This file echoes a bunch of color codes to the | |
# terminal to demonstrate what's available. Each | |
# line is the color code of one forground color, | |
# out of 17 (default + 16 escapes), followed by a | |
# test use of that color on all nine background | |
# colors (default + 8 escapes). | |
# |
This file contains hidden or 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
#!/bin/bash | |
if [[ "$1" == "neovim" || "$1" == "all" ]]; then | |
# install neovim | |
sudo add-apt-repository ppa:neovim-ppa/unstable | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 55F96FCF8231B6DD | |
sudo apt update | |
sudo apt install neovim | |
elif [[ "$1" == "apps" || "$1" == "all" ]]; then | |
# install applications |
This file contains hidden or 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
#!/bin/bash | |
set -eu # Fail on errors or undeclared variables | |
printable_colours=256 | |
# Return a colour that contrasts with the given colour | |
# Bash only does integer division, so keep it integral | |
function contrast_colour { | |
local r g b luminance |