Masks

Masks#

Masks control how an item’s area interacts with the content behind it. They are applied per-item in the FX tab and determine whether (and how) the wallpaper background is visible through the item.

How to apply a mask#

  1. Select any item (Shape, Text, Image, etc.)
  2. Go to the FX tab
  3. Set Mask to one of the available types
  4. Adjust the mask-specific parameters below

Demo#

Mask types#

None#

Default. The item renders normally with no background interaction.

Shaders

Shaders#

Available since version 3.82

Shaders are GPU-powered visual effects that transform how layers and items look in real time. They can be applied in two ways:

  • FX Shader — applied as a layer effect on Overlap Groups (available in KWGT, KLWP and KLCK)
  • Animation Shader — applied as an animation action, reacting to scroll, gyroscope or other triggers (KLWP and KLCK only)

Both paths use the same shader library and parameters.

AI - astronomical info

AI: astronomical info (calculate sunrise, sunset, zodiac and moon data for a location)

Syntax

ai(type)

Arguments

  • type: Info type, see examples

Examples

FormulaDescription
$df("hh:mma", ai(sunrise))$Today's sunrise in hh:mm format
$df("hh:mma", ai(sunset))$Today's sunset in hh:mm format
$ai(isday)$Will return 1 during daylight or 0 if night
$tf(ai(nsunrise))$Time to next sunrise
$tf(ai(nsunset))$Time to next sunset
$ai(mphase)$Current Moon phase name
$ai(zodiac)$Current Zodiac sign name
$ai(season)$Current Season name
$ai(mage)$Current Moon age
$ai(mill)$%Current Moon illumination (in percentage)
$df("hh:mma", ai(moonrise))$Moon rise
$ai(moonrise, a1d)$Moon rise for tomorrow
$df("hh:mma", ai(moonset))$Moon set
$ai(moonrise, r2d)$Moon set 2 days ago
$df("hh:mma", ai(csunrise))$Today's civil sunrise in hh:mm format
$df("hh:mma", ai(csunset))$Today's civil sunset in hh:mm format
$df("hh:mma", ai(usunrise))$Today's nautical sunrise in hh:mm format
$df("hh:mma", ai(usunset))$Today's nautical sunset in hh:mm format
$df("hh:mma", ai(asunrise))$Today's astronomical sunrise in hh:mm format
$df("hh:mma", ai(asunset))$Today's astronomical sunset in hh:mm format
$ai(mphasec)$Current Moon phase code, one of: NEW, WAXING_CRESCENT, FIRST_QUARTER, WAXING_GIBBOUS, FULL, WANING_GIBBOUS, THIRD_QUARTER, WANING_CRESCENT
$ai(zodiacc)$Current Zodiac sign code, one of: ARIES, TAURUS, GEMINI, CANCER, LEO, VIRGO, LIBRA, SCORPIO, SAGITTARIUS, CAPRICORN, AQUARIUS, PISCES
$ai(seasonc)$Current Season code, one of: SPRING, SUMMER, AUTUMN, WINTER

AQ - air quality

AQ: air quality (pollution index, co2, pm10…)

Syntax

aq(type)

Arguments

  • type: Info type, see examples

Examples

FormulaDescription
$aq(index)$Air quality index (0 = best, 400 = worst)
$aq(label)$Air quality level label
$aq(level)$Air quality level, one of:: NA, GOOD, MODERATE, UNHEALTHY_FOR_SENSITIVE, UNHEALTHY, VERY_UNHEALTHY, HAZARDOUS
$aq(no2)$Average No2 (µg/m³)
$aq(pm10)$Average PM10 (µg/m³)
$aq(pm25)$Average PM25 (µg/m³)
$aq(station)$Data station ID
$aq(source)$Name of the data source
$tf(aq(updated))$Last data check in hh:mm format
$tf(aq(collected))$Time of data measurement in hh:mm format

BI - battery info

BI: battery info (level, voltage, temperature, time since charging…)

Syntax

bi(type, [date])

Arguments

  • type: Info type, see examples
  • date: Optional date for historical data up to 24 hours, you can use usual format so, r1h will give one hour ago, r30m 30 minutes ago and so on (see examples)

Examples

FormulaDescription
$bi(level)$%Battery Level (in %)
$bi(temp)$°$wi(tempu)$Battery Temperature in local unit
$bi(tempc)$Battery Temperature in celsius
$bi(volt)$Battery voltage in millivolts
$bi(charging)$Will return 0 if on battery, 1 if charging
$bi(fast)$Will return 1 if fast charging, 0 otherwise (Android 5.x or better only)
$bi(source)$Current power source (Battery, AC, USB or Wireless)
$df("hh:mma", bi(plugged))$Date of last plugged / unplugged event
$bi(current)$Realtime charging/discharging current in milliampere
$if(bi(charging) = 0, "unplugged", "plugged")$ $tf(bi(plugged))$Time since last plugged / unplugged event
$df("hh:mma", bi(fullempty))$Date of expected next charged/discharged event
$if(bi(charging) = 0, discharged, charged)$ $tf(bi(fullempty))$Time to next expected charged/discharged event
$if(bi(charging) = 0, Discharged, Full)$$if(bi(charging) = 0 | bi(level) < 100, " in " + tf(bi(fullempty) - dp()))$Alternate time to next expected charged/discharged event with relative time
$bi(level, r30m)$%Battery Level (in %) 30 minutes ago
$bi(source, r1h)$Battery Source 1 hour ago
$bi(temp, r2h)$°$wi(tempu)$Battery Temp 2 hours ago

BP - bitmap palette

BP: bitmap palette (extracts colors from images like cover art or local pictures)

Syntax

bp(mode, bitmap, [default])

Arguments

  • mode: Color to extract (see examples)
  • bitmap: Cover art, bitmap global, http resource or full path to a file
  • default: Default color to use when nothing is found

Examples

FormulaDescription
$bp(muted, mi(cover))$Extract muted color from cover art
$bp(vibrant, mi(cover))$Extract vibrant color from cover art
$bp(dominant, mi(cover))$Extract dominant color from cover art
$bp(mutedbc, mi(cover))$Extract muted body text color from cover art
$bp(vibrantbc, mi(cover))$Extract vibrant body text color from cover art
$bp(mutedtc, mi(cover))$Extract muted title text color from cover art
$bp(vibranttc, mi(cover))$Extract vibrant title text color from cover art
$bp(dmuted, mi(cover))$Extract muted dark color from cover art
$bp(dvibrant, mi(cover))$Extract vibrant dark color from cover art
$bp(dmutedbc, mi(cover))$Extract muted dark body text color from cover art
$bp(dvibrantbc, mi(cover))$Extract vibrant dark body text color from cover art
$bp(dmutedtc, mi(cover))$Extract muted dark title text color from cover art
$bp(dvibranttc, mi(cover))$Extract vibrant dark title text color from cover art
$bp(lmuted, mi(cover))$Extract muted light color from cover art
$bp(lvibrant, mi(cover))$Extract vibrant light color from cover art
$bp(lmutedbc, mi(cover))$Extract muted light body text color from cover art
$bp(lvibrantbc, mi(cover))$Extract vibrant light body text color from cover art
$bp(lmutedtc, mi(cover))$Extract muted light title text color from cover art
$bp(lvibranttc, mi(cover))$Extract vibrant light title text color from cover art
$bp(dominanttc, mi(cover))$Extract dominant title text color from cover art
$bp(dominantbc, mi(cover))$Extract dominant body text color from cover art

BR - broadcast receiver

BR: broadcast receiver (get variables from third parties, es Tasker)

Syntax

br(source, var)

Arguments

  • source: Source name, eg tasker or zooper
  • var: Variable name, if the variable contains a formula the formula will be parsed

Examples

FormulaDescription
$br(kwgt, FOOBAR)$Will write the value of variable FOOBAR sent from Kustom Widget Flow
$br(tasker, FOOBAR)$Will write the value of variable FOOBAR sent from Tasker action plugin
$br(zooper, FOOBAR)$Will write the value of variable FOOBAR sent to Zooper from Tasker or third party plugins (equivalent in Zooper would be #TFOOBAR#)
$br(remote, FOOBAR)$Will write the value of variable FOOBAR sent to Kustom via remote message (see remote token in advanced settings)

CD - complication data

CD: complication data (Get data from watch complications)

Syntax

cd(id, type)

Arguments

  • id: Complication ID, numerical, 0 is background complication
  • type: Field type to extract (see examples)

Examples

FormulaDescription
$cd(1, stext)$First complication small text
$cd(2, ltext)$Second complication long text if available
$cd(3, icon)$Third complication icon
$cd(1, rval)$First complication ranged value
$cd(1, rmin)$First complication ranged min value
$cd(1, rmax)$First complication ranged max value
$cd(1, simg)$First complication small image
$cd(0, limg)$Background complication large image
$cd(0, title)$First complication title if available

CE - color editor

CE: color editor (manipulates ARGB or HSV color values)

Syntax

ce(color, filter, [amount])

Arguments

  • color: A valid ARGB or RGB color String (eg #FF663399)
  • filter: Filter (alpha opacity, sat saturation, lum luminance) or gradient end color (see examples)
  • amount: A value between 0 and 100, for alpha 0 is fully transparent, for saturation 0 means greyscale and for luminance 0 is black

Examples

FormulaDescription
$ce(#FF0000, invert)$Will invert RGB color
$ce(#FF0000, comp)$Will return complementary color
$ce(#FF0000, contrast)$Return either black or white depending on best contrast
$ce(#FF0000, alpha, 50)$Will make a fully opaque red into 50% transparent
$ce(#FF0000, sat, 0)$Will convert red color into Greyscale equivalent
$ce(#FF0000, lum, 50)$Will set red luminance to 50
$ce(#FF0000, lum, a50)$Will add 50 to red luminance (0 to 100)
$ce(#FF0000, alpha, r50)$Will remove 50 from red alpha (0 to 255)
$ce(#FF0000, #FF0000, 50)$Mix half red and half blue (50% gradient)

CI - calendar events

CI: calendar events (get title, time and data from multiple calendar events)

Syntax

ci(action, [index], [date], [calendar])

Arguments

  • action: Action (see examples)
  • index: Index of upcoming events if no date is provided, index of day events if date is added. When prefixed with an a will show only all day events, with e only normal ones. Index is zero based, 0 is the first event, 1 the second and so on, a0 is the first all day event, e0 the first non all day one.
  • date: Date to be used. The Date can be returned by some other function or you can use text. For text dates you can both set it statically using the format '1955y11M12d22h04m00s' to express year 1955, month 11, day 12 at 22:04:00 (all fields are optional), or use 'a/r' (add/remove) operators, so, for example 'a12m3s' will add 12 minutes and 3 secs to current date.
  • calendar: Override default Calendar selection

Examples

FormulaDescription
$df(EEE hh:mm, ci(start, 0))$-$df(hh:mm, ci(end, 0))$ $ci(title, 0)$Day start-end title of first upcoming event
$ci(title, 1)$Title of second upcoming event
$ci(desc, 1)$Description of second upcoming event or all day event (the first)
$df("hh:mma", ci(start, 0))$Start date of next upcoming event in HH:MM format
$ci(allday, 0)$Will write 1 if next upcoming event is allday, 0 otherwise
$ci(title, a0, a0d)$Title of today's first all day event
$ci(desc, e1, a0d)$Description of today's second event
$ci(loc, e1, a0d)$Location of today's second event
$ci(ccolor, e0, a1d)$Calendar Color of first event tomorrow
$ci(cname, a1, a1d)$Calendar Name of first all day event tomorrow
$df("hh:mma", ci(end, 0, a0d))$End date of second event today in HH:MM format
$ci(color, 1, a1d)$Color of second event tomorrow
$ci(ecount, a0d)$Number of appointments today
$ci(acount, a1d)$Number of all day events tomorrow
$ci(url, 0)$Url of first event today (to be used in Touch, open Url action)
$ci(urld, 0)$Open calendar at first event time (to be used in Touch, open Url action)



Privacy Policy