Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6563aa0
Use 'Fira' font files from Nerd Fonts upstream instead of 'Fura' and …
lassipulkkinen Mar 16, 2020
7eac0a2
Update gradle configuration
fornwall May 23, 2020
01b1c18
Add Victor Mono font (closes #82)
fornwall May 23, 2020
d088d4f
Create nerd-font-setup.yml (#85)
fornwall May 24, 2020
1460608
Bump version to 0.28
fornwall May 24, 2020
d60636d
https://github.com/dracula/xresources/issues/4
zorro Aug 20, 2020
f4f8d0d
Add E Ink Color theme
Red54 Sep 24, 2020
6fcf4e3
Add iceberg colorscheme
mamg22 Sep 2, 2020
0f6a435
version 0.29
Dec 4, 2020
fb88ab2
readme: remove links to Google Play and Nethunter stores
Feb 3, 2021
0cc50bc
Update debug_build.yml
agnostic-apollo Jul 2, 2021
094fdd6
README: change termux url termux.com->termux.org
Grimler91 Mar 30, 2022
8635b74
fontpatcher: use python3 instead of python2
Grimler91 May 16, 2022
372c8c1
setup-scripts: use latest nerd-fonts commit and update urls where needed
Grimler91 May 16, 2022
014fdaa
Re-generate fonts through setup-font.sh and setup-nerd-font.sh
Grimler91 May 16, 2022
a7460ae
setup-fonts.sh: fix so that script can be run multiple times
Grimler91 May 16, 2022
237603e
Fix dpkg-query in setup-fonts.sh
KN4CK3R May 16, 2022
5bedf87
Added Bedstead-Condensed font.
KN4CK3R Oct 7, 2021
c8f5d2d
Added: Add LICENSE.md
agnostic-apollo Aug 25, 2022
941e956
rename dev_keystore.jks to testkey_untrusted.jks
Sep 21, 2022
a961546
Create dependabot.yml
landfillbaby Nov 7, 2022
e5a12be
Bump actions/checkout from 2 to 3 (#181)
dependabot[bot] Nov 7, 2022
a27c093
Bump actions/upload-artifact from 2 to 3 (#182)
dependabot[bot] Nov 7, 2022
f5740fa
Add Gruvbox Material themes.
lzlrd Jan 27, 2021
bdff744
Add gnometerm-new colorscheme
alive4ever Aug 22, 2022
f5eced5
Add Rose Pine themes
ThatOneCalculator Feb 18, 2022
c932bce
Add Tokyonight Day and Tokyonight Dark Color
Iamafnan Dec 26, 2021
75581fd
Updated tokyonight dark colorscheme
Iamafnan Dec 26, 2021
7058921
Add Ubuntu color scheme
DeicPro Sep 27, 2021
c453189
Add the Cascadia Code font.
lzlrd Jan 27, 2021
32f3a7a
Add Base16 Snazzy colorscheme
kidonng Jan 6, 2021
b3b140a
setup-nerd-fonts.sh: use lgc variant of inconsolata font
Feb 23, 2023
69445dc
setup-nerd-fonts.sh: opendyslexic font upstream changed path
Feb 23, 2023
36284c7
update set of nerd fonts
Feb 23, 2023
839d094
version 0.30
Feb 23, 2023
784a71c
Changed: Add termux app installation link to README
agnostic-apollo Jun 29, 2023
dd494a7
Bump actions/checkout from 3 to 4 (#214)
dependabot[bot] Oct 8, 2023
ec8e27b
chore: Bump gradle, gradle-plugin, kotlin and compileSdk
fornwall Oct 8, 2023
105ef50
Update NerdFonts to v3.0.2
TomJo2000 Jul 29, 2023
ee7365e
changed: Update font names to what the creators call them
fornwall Oct 8, 2023
8b2362e
Add Catppuccin colorscheme
rubyowo Mar 31, 2023
71d97cc
changed: Setup catppucin metadata as symlinks
fornwall Oct 8, 2023
419c424
chore: Fixed minor gradle and kotlin issues
fornwall Oct 8, 2023
dae6629
release: 0.31
fornwall Oct 8, 2023
66602f7
chore: Fixed two minor kotlin warnings
fornwall Oct 8, 2023
69bb1bf
Bump actions/setup-java from 3 to 4 (#223)
dependabot[bot] Jan 1, 2024
32b6f2c
Bump actions/upload-artifact from 3 to 4 (#225)
dependabot[bot] Jan 1, 2024
a158bfb
Added: Add `gradle.properties` file for `minSdkVersion`, `targetSdkVe…
agnostic-apollo Apr 15, 2024
9386520
Changed: Bump gradle to `8.5` and android gradle plugin to `8.3.2`
agnostic-apollo Apr 17, 2024
5547346
Changed: Rename `minSdkVersion` to `minSdk`, `targetSdkVersion` to `t…
agnostic-apollo Apr 17, 2024
73f58bb
Added|Changed: Add `github_release_build` workflow to attach APKs for…
agnostic-apollo Apr 17, 2024
b9b4f0f
Added: Add `workflow_dispatch` and `cron` schedule for "00:15 on 1st …
agnostic-apollo Apr 17, 2024
0d5c8cc
Release: 0.32.0
agnostic-apollo Apr 17, 2024
ff1f8c8
Changed!: Add `-app` suffix to app name and add version name in APKs …
agnostic-apollo Jun 22, 2024
82dcd32
Release: v0.32.1
agnostic-apollo Jun 22, 2024
79338cb
Added: Add `SECURITY.md`
agnostic-apollo Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
18 changes: 0 additions & 18 deletions .github/workflows/debug_build.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/github_action_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: GitHub Action Build

on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "15 0 1 */2 *"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Build
shell: bash {0}
run: |
exit_on_error() { echo "$1"; exit 1; }

if [ -z "$JAVA_HOME_17_X64" ] || [ ! -f "$JAVA_HOME_17_X64/bin/javac" ] || [ ! -x "$JAVA_HOME_17_X64/bin/javac" ]; then
exit_on_error "jdk-17 binary not found at path '$JAVA_HOME_17_X64/bin/javac' or is not executable."
fi

echo "Setting vars"

if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
GITHUB_SHA="${{ github.event.pull_request.head.sha }}" # Do not use last merge commit set in GITHUB_SHA
fi

# Set RELEASE_VERSION_NAME to "<CURRENT_VERSION_NAME>+<last_commit_hash>"
CURRENT_VERSION_NAME_REGEX='\s+versionName "([^"]+)"$'
CURRENT_VERSION_NAME="$(grep -m 1 -E "$CURRENT_VERSION_NAME_REGEX" ./app/build.gradle | sed -r "s/$CURRENT_VERSION_NAME_REGEX/\1/")"
RELEASE_VERSION_NAME="v$CURRENT_VERSION_NAME+${GITHUB_SHA:0:7}" # The "+" is necessary so that versioning precedence is not affected
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
exit_on_error "The release version '${RELEASE_VERSION_NAME/v/}' generated from current version '$CURRENT_VERSION_NAME' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html."
fi

APK_DIR_PATH="./app/build/outputs/apk/debug"
APK_VERSION_TAG="$RELEASE_VERSION_NAME.github.debug" # Note the ".", GITHUB_SHA will already have "+" before it
APK_BASENAME_PREFIX="termux-styling-app_$APK_VERSION_TAG"

# Used by upload step later
echo "APK_DIR_PATH=$APK_DIR_PATH" >> $GITHUB_ENV
echo "APK_VERSION_TAG=$APK_VERSION_TAG" >> $GITHUB_ENV
echo "APK_BASENAME_PREFIX=$APK_BASENAME_PREFIX" >> $GITHUB_ENV

echo "Building APK file for '$RELEASE_VERSION_NAME' release with '$APK_VERSION_TAG' tag"
export TERMUX_STYLING_APP_BUILD__APP_VERSION_NAME="${RELEASE_VERSION_NAME/v/}" # Used by app/build.gradle
export TERMUX_STYLING_APP_BUILD__APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle
export GRADLE_OPTS="-Dorg.gradle.java.home=$JAVA_HOME_17_X64"
if ! ./gradlew assembleDebug; then
exit_on_error "Build failed for '$RELEASE_VERSION_NAME' release with '$APK_VERSION_TAG' tag."
fi

echo "Validating APK file"
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk"; then
files_found="$(ls "$APK_DIR_PATH")"
exit_on_error "Failed to find built APK file at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk'. Files found: "$'\n'"$files_found"
fi

echo "Generating checksums-sha256.txt file"
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > checksums-sha256.txt); then
exit_on_error "Generate checksums-sha256.txt file failed for '$RELEASE_VERSION_NAME' release."
fi
echo "checksums-sha256.txt:"$'\n```\n'"$(cat "$APK_DIR_PATH/checksums-sha256.txt")"$'\n```'

- name: Upload files to action
uses: actions/upload-artifact@v4
with:
name: ${{ env.APK_BASENAME_PREFIX }}
path: |
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}.apk
${{ env.APK_DIR_PATH }}/checksums-sha256.txt
${{ env.APK_DIR_PATH }}/output-metadata.json
69 changes: 69 additions & 0 deletions .github/workflows/github_release_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: GitHub Release Build

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_REF }}

- name: Build and upload files to release
shell: bash {0}
run: |
exit_on_error() {
echo "$1"
echo "Deleting '$RELEASE_VERSION_NAME' release and '$GITHUB_REF' tag"
hub release delete "$RELEASE_VERSION_NAME"
git push --delete origin "$GITHUB_REF"
exit 1
}

if [ -z "$JAVA_HOME_17_X64" ] || [ ! -f "$JAVA_HOME_17_X64/bin/javac" ] || [ ! -x "$JAVA_HOME_17_X64/bin/javac" ]; then
exit_on_error "jdk-17 binary not found at path '$JAVA_HOME_17_X64/bin/javac' or is not executable."
fi

echo "Setting vars"
RELEASE_VERSION_NAME="${GITHUB_REF/refs\/tags\//}"
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
exit_on_error "The release version '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html."
fi

APK_DIR_PATH="./app/build/outputs/apk/debug"
APK_VERSION_TAG="$RELEASE_VERSION_NAME+github.debug"
APK_BASENAME_PREFIX="termux-styling-app_$APK_VERSION_TAG"

echo "Building APK file for '$RELEASE_VERSION_NAME' release with '$APK_VERSION_TAG' tag"
export TERMUX_STYLING_APP_BUILD__APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle
export GRADLE_OPTS="-Dorg.gradle.java.home=$JAVA_HOME_17_X64"
if ! ./gradlew assembleDebug; then
exit_on_error "Build failed for '$RELEASE_VERSION_NAME' release with '$APK_VERSION_TAG' tag."
fi

echo "Validating APK file"
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk"; then
files_found="$(ls "$APK_DIR_PATH")"
exit_on_error "Failed to find built APK file at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk'. Files found: "$'\n'"$files_found"
fi

echo "Generating checksums-sha256.txt file"
if ! (cd "$APK_DIR_PATH"; sha256sum "${APK_BASENAME_PREFIX}.apk" > checksums-sha256.txt); then
exit_on_error "Generate checksums-sha256.txt file failed for '$RELEASE_VERSION_NAME' release."
fi
echo "checksums-sha256.txt:"$'\n```\n'"$(cat "$APK_DIR_PATH/checksums-sha256.txt")"$'\n```'

echo "Uploading files to release"
if ! gh release upload "$RELEASE_VERSION_NAME" \
"$APK_DIR_PATH/${APK_BASENAME_PREFIX}.apk" \
"$APK_DIR_PATH/checksums-sha256.txt" \
; then
exit_on_error "Upload files to release failed for '$RELEASE_VERSION_NAME' release."
fi
17 changes: 17 additions & 0 deletions .github/workflows/nerd-font-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check Nerd Fonts

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Downloads nerd fonts
run: ./setup-nerd-fonts.sh
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ local.properties
ehthumbs.db
Thumbs.db

# Vim files
*.swo
*.swp

/tmp/
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `termux/termux-styling` repository is released under [GPLv3 only](https://www.gnu.org/licenses/gpl-3.0.html) license.
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build status](https://github.com/termux/termux-styling/workflows/Build/badge.svg)](https://github.com/termux/termux-styling/actions)
[![Join the chat at https://gitter.im/termux/termux](https://badges.gitter.im/termux/termux.svg)](https://gitter.im/termux/termux)

A [Termux](https://termux.com/) add-on app to customize the terminal font and
A [Termux](https://termux.org) add-on app to customize the terminal font and
color theme.

When developing (or packaging), note that this app needs to be signed with the
Expand All @@ -12,28 +12,20 @@ required font or color files.

## Installation

Termux:Styling application can be obtained from:

- [Google Play](https://play.google.com/store/apps/details?id=com.termux.styling)
- [F-Droid](https://f-droid.org/en/packages/com.termux.styling/)
- [Kali Nethunter Store](https://store.nethunter.com/en/packages/com.termux.styling/)
Termux:Styling application can be obtained from [F-Droid](https://f-droid.org/en/packages/com.termux.styling/).

Additionally we provide per-commit debug builds for those who want to try
out the latest features or test their pull request. This build can be obtained
from one of the workflow runs listed on [Github Actions](https://github.com/termux/termux-styling/actions)
from one of the workflow runs listed on [Github Actions](https://github.com/termux/termux-styling/actions/workflows/github_action_build.yml?query=branch%3Amaster+event%3Apush)
page.

Signature keys of all offered builds are different. Before you switch the
installation source, you will have to uninstall the Termux application and
all currently installed plugins.
all currently installed plugins. Check https://github.com/termux/termux-app#Installation for more info.

## How to use

1. When inside Termux, long press anywhere on the terminal.
2. Select `More...` in the resulting dialog.
3. Select `Style` in the next dialog.
4. Click either `CHOOSE COLOR` or `CHOOSE FONT` depending on what you want to customize.

## License

Released under the [GPLv3 license](http://www.gnu.org/licenses/gpl-3.0.en.html).
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check https://termux.dev/security for info on Termux security policies and how to report vulnerabilities.
51 changes: 41 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ plugins {
}

android {
compileSdkVersion 28
namespace "com.termux.styling"

compileSdk project.properties.compileSdkVersion.toInteger()

def appVersionName = System.getenv("TERMUX_STYLING_APP_BUILD__APP_VERSION_NAME") ?: ""
def apkVersionTag = System.getenv("TERMUX_STYLING_APP_BUILD__APK_VERSION_TAG") ?: ""

defaultConfig {
applicationId "com.termux.styling"
minSdkVersion 21
targetSdkVersion 28
versionCode 27
versionName "0.27"
minSdk project.properties.minSdkVersion.toInteger()
targetSdk project.properties.targetSdkVersion.toInteger()
versionCode 1000
versionName "0.32.1"

if (appVersionName) versionName = appVersionName
validateVersionName(versionName)
}

signingConfigs {
debug {
storeFile file('dev_keystore.jks')
storeFile file('testkey_untrusted.jks')
keyAlias 'alias'
storePassword 'xrj45yWGLbsO7W0v'
keyPassword 'xrj45yWGLbsO7W0v'
Expand All @@ -34,14 +42,37 @@ android {
signingConfig signingConfigs.debug
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
outputFileName = new File("termux-styling-app_" +
(apkVersionTag ? apkVersionTag : "v" + versionName + "+" + variant.buildType.name) + ".apk")
}
}
}

dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

task versionName {
doLast {
print android.defaultConfig.versionName
}
doLast {
print android.defaultConfig.versionName
}
}

def validateVersionName(String versionName) {
// https://semver.org/spec/v2.0.0.html#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
// ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
if (!java.util.regex.Pattern.matches("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\$", versionName))
throw new GradleException("The versionName '" + versionName + "' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html.")
}
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.termux.styling"
android:sharedUserId="com.termux" >

<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
Expand Down
30 changes: 30 additions & 0 deletions app/src/main/assets/colors/base16-snazzy.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Base16 Snazzy
# Based on https://github.com/aaron-williamson/base16-alacritty/blob/025688c7158eb8a3421cb2b3612e77915dce8c2a/colors/base16-snazzy-256.yml
foreground=#e2e4e5
background=#282a36
cursor=#e2e4e5

color0=#282a36
color1=#ff5c57
color2=#5af78e
color3=#f3f99d
color4=#57c7ff
color5=#ff6ac1
color6=#9aedfe
color7=#e2e4e5

color8=#78787e
color9=#ff5c57
color10=#5af78e
color11=#f3f99d
color12=#57c7ff
color13=#ff6ac1
color14=#9aedfe
color15=#f1f1f0

color16=#ff9f43
color17=#b2643c
color18=#34353e
color19=#43454f
color20=#a5a5a9
color21=#eff0eb
25 changes: 25 additions & 0 deletions app/src/main/assets/colors/catppuccin-frappe.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://github.com/catppuccin/catppuccin
foreground=#c6d0f5
background=#303446
cursor=#f2d5cf

color0=#51576d
color1=#e78284
color2=#a6d189
color3=#e5c890
color4=#8caaee
color5=#f4b8e4
color6=#81c8be
color7=#b5bfe2

color8=#626880
color9=#e78284
color10=#a6d189
color11=#e5c890
color12=#8caaee
color13=#f4b8e4
color14=#81c8be
color15=#a5adce

color16=#ef9f76
color17=#f2d5cf
1 change: 1 addition & 0 deletions app/src/main/assets/colors/catppuccin-frappe.txt
Loading