This guide is intended for KWGT users who are missing the ability to add global variables (Globals) in the editor. This issue may appear on some phones running Android 15 (e.g., Motorola Moto G85). The following workaround allows you to effectively use “Shared” variables as a replacement.
Global variables (GV) in KWGT are user-defined values (e.g., color, text, number) that can be used across the entire widget. They allow centralized control over the widget's appearance and behavior.
On some devices, the Globals tab is not visible at all in the KWGT editor.
An alternative is to use the Shared tab, where you can create so-called Shared Globals. However, these only work within the current widget, not across multiple ones.
Create a template (an empty widget with all your needed Shared variables) and use it as a starting point for each new widget.
- Open a new widget
- Go to the
Shared
tab - Tap the
+
icon and set:- Title:
ram perc
- Type:
text
- Description:
RAM in percent
- Title:
- Open the menu (three dots) and select
Formula
- Enter the formula:
$mu(round, (rm(mused)*100)/rm(mtot))$
- Confirm by tapping the checkmark.
- In the
Items
tab, add a newText
element - In the formula field, enter:
Ram used: $gv(ram perc)$ %
The result will display something like:
Ram used: 58 %
Total: $mu(round, (rm(mtot)/1000), 1)$
Free: $mu(round, (rm(mfree)/1000), 1)$
Used: $mu(round, (rm(mused)/1000), 1)$
Total: $mu(round, (rm(fstot)/1000), 0)$
Free: $mu(round, (rm(fsfree)/1000), 0)$
Used: $mu(round, (rm(fsused)/1000), 0)$
$mu(round, (rm(fsused, int)*100)/rm(fstot, int))$
This method allows you to replace missing Globals functionality and continue customizing your widgets in KWGT. Hopefully, it saves you time and effort if you run into the same issue.
© 2025 n4zz