How To: Display Real-Time CPU Usage In Total Launcher
Using Tasker
Due to Android platform security and SELinux restrictions introduced in Android 8.0+ (Oreo), Total Launcher can no longer read system CPU metrics directly from /proc/stat. This guide details how to query system CPU usage via elevated ADB/Shizuku shell commands in Tasker and push that value into a Total Launcher Text Variable on the home screen.
Prerequisites:
Total Launcher (installed and set as default or active Launcher).
Tasker (with ADB WiFi / Shizuku / Root permissions enabled to run shell dumps).
5–10 minutes for setup and verification.
Create the CPU Variable Object in Total Launcher
Before setting up the background broadcast, create the graphic text element in Total Launcher that will listen for the value.
Enter Edit mode in Total Launcher (long-press empty space or tap the Launcher edit handle).
Tap Add (+) > Graphic > Default > Text.
Tap the newly placed text object to open its property dialog, then select the Edit (Gear/Pencil) icon.
In the text input field:
* Delete the default text placeholder.
Scroll through the dynamic insert options and choose Advanced: Variable (or format the variable tag manually).
Set the variable placeholder to:
(Note: Can add suffix text if desired, e.g., "CPU: %cpu_val%" to output CPU: 18%).
Adjust typography, font color, size, and alignment to suit the theme layout.
Tap the checkmark to confirm and exit Edit mode.
Build the Query Task in Tasker
Now create the task that samples current CPU load and sends the broadcast intent to Total Launcher.
Create the Task
Open Tasker and switch to the Tasks tab.
Tap the + button at the bottom right to create a new task and name it:
Query CPU Utilization (Run Shell)
Tap + to add an action.
Select Code > Run Shell (or use Shizuku / Tasker ADB command).
Enter the following command into the Command field:
top -b -n 1 | grep "User" | head -n 1
Alternative lightweight one-liner for devices with `dumpsys` access:*
dumpsys cpuinfo | grep "TOTAL:" | awk '{print $1}'
Under Store Output In, enter:
Ensure Use Root or Use ADB WiFi / Shizuku is checked (unprivileged standard shell cannot read top system processes on modern Android versions).
Parse and Format the Percentage
Tap + > Variables > Variable Search Replace.
Variable: %cpu_raw
Search: [0-9]+(?=%) (or [0-9]+ to match the first integer).
Check Store Matches In Array: %cpu_out.
*(Optional)* If %cpu_out1 is empty, set a fallback: Variable > Variable Set > Name %cpu_val To %cpu_out1 (or To 0 if unset).
Broadcast the Variable to Total Launcher
Option A (Using the Total Launcher Tasker Plugin):
Tap + > Plugin > Total Launcher.
Select Configuration / Edit.
Choose Set Variable.
Set Variable Name: cpu_val
Set Value: %cpu_val
Tap the checkmark to save the plugin action.
Option B (Using Send Intent):
Tap + > System > Send Intent.
Action: com.ss.launcher.total.action.SET_VARIABLE
Package: com.ss.launcher2
Extra: var:cpu_val
Extra: value:%cpu_val
Target: Broadcast Receiver
Automate the Refresh Schedule
In Tasker, navigate to the Profiles tab.
Tap + > State > Display > Display State > Set to On.
Link this profile to the task Update TL CPU.
Open the task and add a loop structure (or use a Time Context repeating every 2 minutes for ambient monitoring):
Anchor: LoopStart
Perform Action: (Execute shell & send variable steps)
Task > Wait > Set to 5 Seconds (or 10 Seconds).
Task > Goto > Type: Action Label > Label: LoopStart (Add condition: IF %SCREEN ~ on).
Tip: Add a manual refresh tap action! In Total Launcher, select the CPU text element, open its Tap Action, select Tasker Task, and link it directly to Update TL CPU. Tapping the on-screen text instantly updates the CPU reading on demand.
Using MacroDroid
Following the SELinux restrictions implemented in modern Android versions, Total Launcher cannot query /proc/stat directly for system CPU data. This guide walks through configuring MacroDroid (via ADB Hack or Shizuku) to extract live CPU utilization and update a Total Launcher Text Variable on the home screen.
Prerequisites:
Total Launcher (installed and running).
MacroDroid with elevated permissions enabled (granted via Shizuku or via one-time PC ADB command: adb shell pm grant com.arlosoft.macrodroid android.permission.DUMP).
5–10 minutes for setup and verification.
Create the CPU Variable Object in Total Launcher
Long-press an empty space or tap the Launcher edit handle to enter Edit mode.
Tap Add (+) > Graphic > Default > Text.
Tap the new text item to open its property dialog, then select the Edit (Gear/Pencil) icon.
In the text input field:
Clear the default text.
Insert the custom variable placeholder:
Adjust typography, size, color, and positioning as desired.
Tap the checkmark to save and exit Edit mode.
Open MacroDroid and tap Variables (or expand the Variables drawer at the bottom of the Macro edit screen).
Tap + to add a new variable:
Name: cpu_raw
Type: String
Tap + to add a second variable:
Name: cpu_val
Type: String (or Integer)
Build the Macro in MacroDroid
Create the Macro and Define Triggers
Open MacroDroid and tap Add Macro.
Set the macro name at the top to:
Under Triggers (red section), tap +:
Screen & Speaker > Screen On/Off > Screen On.
*(Optional secondary trigger for ambient updates):*
Tap + under Triggers > Date/Time > Regular Interval > Set to 10 seconds (or 30 seconds) > Under Constraints, add Screen On so it only fires while the display is awake.
Query System CPU Load
Under Actions (blue section), tap +.
Navigate to Applications > Shell Script.
In the script editor:
Select Shizuku or ADB Hack (do not use Non-rooted unless granted dump rights).
Enter the following command into the script field:
dumpsys cpuinfo | grep "TOTAL:" | awk '{print $1}'
Under Output to variable, select:
Tap OK to save the action.
Parse and Clean the Output
Tap + under Actions > Variables > Text Manipulation.
Select Extract text (Regex).
Source variable: cpu_raw
Regular expression:
Destination variable: cpu_val
Tap OK.
Broadcast the Variable to Total Launcher
Tap + under Actions > Connectivity > Send Intent.
Configure the intent parameters exactly as follows:
Action: com.ss.launcher.total.action.SET_VARIABLE
Package: com.ss.launcher2
Target: Broadcast
Extra 1 parameter: var
Extra 1 value: cpu_val
Extra 2 parameter: value
Extra 2 value: [lv=cpu_val] *(Select via the triple-dot menu or type `[lv=cpu_val]` to pass the local variable)*
Tap OK to save the action.
Save and Test
Tap the back arrow or the checkmark icon in the bottom-right corner to save the macro.
In the macro overview screen, tap the three dots in the upper-right corner and select Run Actions (or Test Macro) to test execution.
Return to the home screen; the text object will reflect the current live CPU percentage.
Tip: To update CPU readings on demand, open Total Launcher's Edit mode, tap the CPU text object, choose Tap Action > Launch Shortcut > MacroDroid > Run Macro, and link it to Update TL CPU.