Skip to content

Notifications

Francesco edited this page Jul 11, 2017 · 23 revisions

t-ui allows you to see notifications directly inside the launcher, alongside your commands.

Activation

  1. Open the file notifications.xml
    config -open notifications.xml
  2. Look for the line named "enabled" (<enabled value="false"/>)
  3. Change "value" to "true" (<enabled value="true"/>)

Then save, go back to t-ui and use the command restart.

The next time you start t-ui, you will be asked if you want to grant notifications access.

Include an application

notifications -inc appName

Exclude an application

notifications -exc appName

Set color

notifications -clr #color appName

Tip: Have a look at Defining Colors

Set a filter

This command:
notifications -title_filter 1 [df]og
will set a filter with id "1" which excludes every notifications whose title matches this Regular Expression.

So, every notifications which contains the word "dog" or the word "fog" in its title won't be shown.

"id" can be any integer value, it's needed to create filter groups.

Tip: have a look at the Regular Expressions.

Title filter

notifications -title_filter id regex

Text filter

notifications -text_filter id regex

Filter groups

Filter groups are groups of filters that apply together when evaluating a notification.

They are linked with an AND relation, which means that the notification is not shown only if every filter match on that notification.

For example, let's take this notification:

  • package: com.whatsapp.android
  • Title: Johnathan
  • Text: Hey man, I love t-ui!
  1. We set a a filter on title with id 2:
    notifications -title_filter 2 Jo.*
    this excludes every notification whose title begins with "Jo"
  2. We set a filter on text with id 2:
    notifications -text_filter 2 ?
    this excludes every notification whose text contains a "?"

Now, we created a filter group. You can see that you only need to set the same id to two or more filters in order to get a group.

Let's analyze the situation:

  1. The first filter matches: the title starts with "Jo" -> true
  2. The second filter doesn't matches: the text doesn't contain a question mark -> false
  3. true AND false -> false (this is a boolean evaluation)
  4. the notification is shown

Apply to a single application

You can apply a filter (or a group of filters) to a single app with this command:
notifications -apply_filter id application

For example, this will apply the above filter group only to WhatsApp (and not, for example, to gmail):
notifications -apply_filter 2 WhatsApp

Clone this wiki locally