Skip to content

Instantly share code, notes, and snippets.

@iflowfor8hours
Forked from pgaskin/termux-themer.sh
Last active February 26, 2018 22:37
Show Gist options
  • Select an option

  • Save iflowfor8hours/eb56ce57ec886f5e14676d081ba616d0 to your computer and use it in GitHub Desktop.

Select an option

Save iflowfor8hours/eb56ce57ec886f5e14676d081ba616d0 to your computer and use it in GitHub Desktop.

Revisions

  1. iflowfor8hours revised this gist Feb 26, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion termux-themer.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # 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.properties
    # ./termux-themer base16-monokai-dark

    function jsonValue() {
    KEY=$1
  2. iflowfor8hours revised this gist Feb 26, 2018. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion termux-themer.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,10 @@
    #!/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.properties

    #!/bin/bash
    function jsonValue() {
    KEY=$1
    num=$2
  3. iflowfor8hours revised this gist Feb 26, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion termux-themer.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # curl -o termux-themer.sh
    # 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.properties

  4. iflowfor8hours revised this gist Feb 26, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion termux-themer.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    #!/bin/sh
    # curl -o termux-themer.sh
    # chmod +x termux-themer.sh
    # ./termux-themer base16-monokai-dark.properties

    #!/bin/bash
    function jsonValue() {
    KEY=$1
    num=$2
  5. @geek1011 geek1011 created this gist Nov 7, 2016.
    18 changes: 18 additions & 0 deletions termux-themer.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/sh
    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