KLWP/KWGT Integration

[Note: Some variables require Niagara Launcher v1.4., rolling out in September 2021]

KLWP is a powerful app that lets you design dynamic live wallpapers with custom components and content. You can e.g. add widgets or blur the wallpaper, and add logic to change components depending on the external state.  Niagara integrates with KLWP and publishes variables that allow you to react to specific events and conditions - read the following section for more information on how to use those.

Note: the same applies to KWGT, which is from the same developer as KLWP and uses the same system. For brevity, we focus on KLWP in this guide.

Launch Niagara's agenda from KLWP/KWGT

You can open Niagara Launcher's agenda sheet from KLWP/KWGT by using the open URL touch-action with the "URL" niagara://agenda.

Variables published by Niagara

Niagara exports some variables to KLWP, which can generally be accessed in the formula editor with $br(niagara-launcher, variable-name)$.  Those variables can be of different types but are mostly numbers or boolean/logical values (true/false). You can for example use them in a KLWP if function comparing to a known value, like so: $if(br(niagara-launcher, variable-name) = "true", value if true, value if not true)$. Make sure to include the quotation marks for "true"/"false" like in the example.

Current screen

To get the type of content currently shown in Niagara, you can read the screen variable exported to KLWP.  It can have the following values:

Screen type Variable value
Favorites 0
All apps list 1
Other screens (e.g., search) 2
Niagara is in the background (like on the lock screen or Android's recents screen) -1

Calendar events

Through the calendar-event variable you can check whether there are any calendar events visible below the clock/date in Niagara. When it's "true", a calendar event is currently visible in the favorites and the Niagara widget thus takes up more space than normal.  It's possible to combine it with the screen type variable to check if there is a calendar event and the favorites is currently visible: $if(br(niagara-launcher, screen) = 0 & br(niagara-launcher, calendar-event) = "true", ..., ...)$

Media player visibility

The variable media-player gives information about the current visibility of Niagara's media player widget. It's either "true" (when the player is visible) or "false" (when it's invisible): if(br(niagara-launcher, media-player) = "true", ..., ...).

Text and theme color

Niagara Launcher exposes the currently selected theme and home-screen text colors as variables theme-color and text-color, respectively. That is especially useful when those are set to adapt to the current wallpaper. As an example, you can set the color of a KLWP text element to $br(niagara-launcher, text-color)$ to match the rest of the interface.

Examples

Blur wallpaper and hide components in all apps list

  1. Go to the background tab, and change the type from solid to image, if necessary. Also, ensure you selected an image with the bitmap option.
  2. Please scroll to the blur option in the same tab, tap on the checkbox next to it and enable formula support through the top right calculator icon.
  3. Tap in the center of the blur option and paste the formula $if(br(niagara-launcher, screen) = 0, 0, 50)$ there. Afterward, tap on "apply." This command checks if the favorites screen is visible (remember, the favorites screen has the value of zero) and sets the blur factor to zero (no blur) if it is and to fifty if it isn't.
  4. Go to the layer tab and set the visibility option to the formula $if(br(niagara-launcher, screen) = 0, ALWAYS, NEVER)$ in a similar way. This will hide all the components you may have added in KLWP, like a clock, weather, etc.

Current Limitations

As of now, you can only interact with your KLWP live wallpaper for elements placed above Niagara Launcher's favorites.

General KLWP Guides & Wiki

KLWP has an active development team and a highly supportive community. For more ideas, tips and tricks, please refer to the following resources:

Still need help? Contact Us Contact Us