Skip to content

UI Format

Francesco edited this page Nov 3, 2017 · 47 revisions

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

BETA 6.4: check here

T-UI follows the common Linux time format guidelines, which you can find in the following table.

Format Description
%a abbreviated weekday name (e.g., Sun)
%A full weekday name (e.g., Sunday)
%b abbreviated month name (e.g., Jan)
%B full month name (e.g., January)
%c date and time (e.g., Thu Mar 3 23:05:25 2005)
%C century; like %Y, except omit last two digits (e.g., 21)
%d day of month (e.g, 01)
%D date; same as %m/%d/%y
%e day of month, space padded; same as %_d
%F full date; same as %Y-%m-%d
%g last two digits of year of ISO week number (see %G)
%G year of ISO week number (see %V); normally useful only with %V
%h same as %b
%H hour (00..23)
%I hour (01..12)
%j day of year (001..366)
%k hour ( 0..23)
%l hour ( 1..12)
%m month (01..12)
%M minute (00..59)
%n a newline
%N nanoseconds (000000000..999999999)
%p equivalent of either AM or PM; blank if not known
%P like %p, but lower case
%r 12-hour clock time (e.g., 11:11:04 PM)
%R 24-hour hour and minute; same as %H:%M
%s seconds since 1970-01-01 00:00:00 UTC
%S second (00..60)
%t a tab
%T time; same as %H:%M:%S
%u day of week (1..7); 1 is Monday
%U week number of year, with Sunday as first day of week (00..53)
%V ISO week number, with Monday as first day of week (01..53)
%w day of week (0..6); 0 is Sunday
%W week number of year, with Monday as first day of week (00..53)
%x date representation (e.g., 12/31/99)
%X time representation (e.g., 23:13:48)
%y last two digits of year (00..99)
%Y year

Example

%m/%d/%y
Output:
07/06/17

%H:%M
Output:
10:34

Date: %m-%d-%y%nTime: %H:%M
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 (Beta only)

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
  • %mt -> 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])

Clone this wiki locally