-
-
Save iflowfor8hours/eb56ce57ec886f5e14676d081ba616d0 to your computer and use it in GitHub Desktop.
Please pay the developers, termux is great https://github.com/termux/termux-styling
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 | |
# USAGE: | |
# curl -o termux-themer.sh https://gist.githubusercontent.com/iflowfor8hours/eb56ce57ec886f5e14676d081ba616d0/raw/4a7ca295538262ef579d121ffefd4eb5ee27de68/termux-themer.sh | |
# chmod +x termux-themer.sh | |
# ./termux-themer base16-monokai-dark | |
function jsonValue() { | |
KEY=$1 | |
num=$2 | |
awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'$KEY'\042/){print $(i+1)}}}' | tr -d '"' | sed -n ${num}p | |
} | |
if [ $# -eq 0 ]; then | |
echo Usage: $0 theme-name | |
echo | |
echo Themes: | |
curl -k -s "https://api.github.com/repos/termux/termux-styling/contents/app/src/main/assets/colors"|jsonValue name|sed 's/.properties//g'|sed 's/ //g' | |
else | |
cd ~ | |
mkdir -p .termux | |
curl -k -s "https://raw.githubusercontent.com/termux/termux-styling/master/app/src/main/assets/colors/$1.properties" > ~/.termux/colors.properties | |
termux-reload-settings | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment