Skip to content

UI Format

Francesco Andreuzzi edited this page Feb 5, 2019 · 47 revisions

Index

Format input

How to

$ config -set input_format [format]

Values

Example

  • [%t] %p %i [09.12.54] $ echo t-ui!
  • %t%n%p %i
    09.12.54
    $ echo t-ui!

Format output

How to

$ config -set output_format [format]

Values

  • output text: %o
  • newline: %n

Example

  • [%t] %o [09.12.54] t-ui!

Format session info

How to

$ config -set session_info_format [format]

Values

  • username: %u
  • device: %d
  • path: %p

Example

  • %u@%d:%p andre@bullhead:~
  • %d --> %u : %p bullhead --> andre : /storage/emulated/0/Downloads

Format app launch

How to

$ config -set app_launch_format [format]

Values

  • activity name: %a
  • package name: %p
  • application name: %l
  • time/date: %t
  • newline: %n

Example

  • --> %a --> ohi.andre.consolelauncher.LauncherActivity
  • Launching: %n (%p) Launching: T-UI (ohi.andre.consolelauncher)

Format app installed/uninstalled message

How to

$ config -set app_installed_format [format]
$ config -set app_uninstalled_format [format]

Values

  • package name: %p
  • app name: %l
  • newline: %n

Device

How to

$ config -set device_format [format]

Values

  1. device name -> %d (check also device_name)
  2. username -> %u (check also username)
  3. newline -> %n

RAM

How to

$ config -set ram_format [format]

Values

  1. available RAM -> %av
  2. total RAM -> %tot
  3. newline -> %n

You have to choose a unit (TeraByte, GigaByte, MegaByte, KiloByte, Byte). You can also get the percentage of available RAM.

In order to apply a unit, append its acronym (tb, gb, mb, kb, b) at the value that you want to get.
For example:
%avgb
means "Available RAM in GigaBytes".

You can get the percentage appending the "percentage" (%) mark:
%av%

Example

  • Available RAM: %avtb TB of %tottb TB (%av%%) -> Available RAM 0.05 TB of 0.1 TB (50%)
  • %avgb GB / %totmb MB-> 0.7 GB / 1024 MB

Storage

How to

$ config -set storage_format [format]

Values

  • available internal storage -> %iav
  • total internal storage -> %itot
  • available external storage -> %eav
  • total external storage -> %etot
  • newline -> %n

You can choose a unit as I explained in the RAM format section (some lines above).

Example

  • Ìnternal: %iavmb MB of %itotmb MB (%iav%%) -> Internal: 500 MB of 1024 MB (49%)
  • External: %eavgb GB of %etottb TB -> External: 0.1 GB of 0.001 TB

Battery

How to

$ config -set battery_format [format]

Values

  • Battery percentage: %v
  • newline -> %n

Optional battery values (Beta only)

  • Charging: %(charging/not charging)

Time

How to

$ config -set time_format [format]

Values

Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
Y Week year Year 2009; 09
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day name in week Text Tuesday; Tue
u Day number of week (1 = Monday, ..., 7 = Sunday) Number 1
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800
X Time zone ISO 8601 time zone -08; -0800; -08:00

Example

dd/MM/yyyy
Output:
07/06/2017

HH:mm
Output:
10:34

Date: MM-dd-yyyy%nTime: HH:mm
Output:
Date: 07-06-17
Time: 10:34

Multiple time formats

You can define more than one time format. Check the option "time_format_separator" behaviors.xml. By default, its value is "@".

In order to have more than one time format, edit your time_format option in this way:

config -set time_format Short Date: %F@Long Date: %c

To apply a chosen time format to a format which supports the %t option, append the index of the desired format to %t (the first index is 0, not 1).

Example

  • config -set input_format [%t1] %p %i [Long Date: Jul 26, 2017, 12:49:36 PM] $ echo t-ui!

Network

How to

$ config -set network_format [format]

Values

  • %w0 -> "1" if WiFi is on, "0" otherwise
  • %w1 -> "on" if WiFi is on, "off" otherwise
  • %w2 -> "ON" if WiFi is on, "OFF" otherwise
  • %w3 -> "true" if WiFi is on, "false" otherwise
  • %w4 -> "TRUE" if WiFi is on, "FALSE" otherwise
  • %wn -> the network name
  • %ip4 -> your ipv4
  • %ip6 -> your ipv6
  • %d0 -> "1" if mobile data is on, "0" otherwise
  • %d1 -> "on" if mobile data is on, "off" otherwise
  • %d2 -> "ON" if mobile data is on, "OFF" otherwise
  • %d3 -> "true" if mobile data is on, "false" otherwise
  • %d4 -> "TRUE" if mobile data is on, "FALSE" otherwise
  • %dt -> the mobile network type, "4g", "3g", ...
  • %b0 -> "1" if bluetooth is on, "0" otherwise
  • %b1 -> "on" if bluetooth is on, "off" otherwise
  • %b2 -> "ON" if bluetooth is on, "OFF" otherwise
  • %b3 -> "true" if bluetooth is on, "false" otherwise
  • %b4 -> "TRUE" if bluetooth is on, "FALSE" otherwise
  • %n -> newline

Optional network values

  • WiFi: %(text on/text off)
  • Mobile data: %[text on/text off]
  • Bluetooth: %{text on/text off}

Example

%(WiFi - %wn/%[Mobile Data: %d3/No Internet access])

Unlock counter

How to

$ config -set unlock_counter_format [format]

Values

  • %c -> unlock times
  • %t(text)n -> the n last unlock times
    • %i -> the unlock time index
    • %w -> the time
  • %n -> newline
  • %a[n][divider] -> the progress in the cycle. Replace [n] with the desired denominator, and [divider] with the divider between numerator and denominator.

Cycle

You can change the cycle start time setting the option unlock_counter_cycle_start (behavior.xml). A cycle lasts 24hrs.
For instance:

Cycle start Time now Format Output
06.00 10.00 %a24. 4.24
06.00 20.00 %a24. 14.24
00.00 10.00 %a12- 5-12
06.00 23.00 %a12/ 11/12

Example

1.
Unlocked %c times (%a10/)
Unlocked 10 times (5/10)

2.
Last unlocks:%n%t1(Unlock n. %i -> %w)3"

Unlock n. 1 -> 11.24.04
Unlock n. 2 -> 11.20.10
Unlock n. 3 -> 10.45.58