Index Key Link
action Click to view
add Click to view
affiliation Click to view
align Click to view
alignment Click to view
alpha Click to view
analog clock Click to view
animated image Click to view
app drawer Click to view
app group Click to view
application Click to view
audio Click to view
background Click to view
backup Click to view
beginner Click to view
behavior Click to view
blur Click to view
calendar Click to view
card Click to view
checklist Click to view
circle indicator Click to view
clean slate Click to view
clock Click to view
code block Click to view
code of conduct Click to view
color picker Click to view
communities Click to view
compass Click to view
compatibility Click to view
complementary color Click to view
conceptual learning Click to view
configure Click to view
contact Click to view
contrast Click to view
contribute Click to view
date Click to view
date / time Click to view
default launcher Click to view
delete Click to view
desktop Click to view
developer Click to view
discussion guideline Click to view
distribution Click to view
drawer Click to view
drawer handle Click to view
dual-screen Click to view
dynamic color Click to view
dynamic image Click to view
dynamic text Click to view
edit Click to view
editing Click to view
edit mode Click to view
export Click to view
feature Click to view
file naming Click to view
flip-style Click to view
foldable Click to view
folder Click to view
font Click to view
full screen Click to view
gaussian Click to view
gesture Click to view
getting started Click to view
gradient Click to view
group Click to view
heading Click to view
help Click to view
hide Click to view
html Click to view
hue Click to view
icon Click to view
import Click to view
install Click to view
installation Click to view
instructable Click to view
intellectual property Click to view
issue Click to view
key Click to view
keys & gestures Click to view
label Click to view
landscape mode Click to view
launcher action Click to view
layout Click to view
liability Click to view
lifetime purchase Click to view
light source Click to view
link Click to view
list Click to view
luminance Click to view
macro Click to view
macrodroid Click to view
margin Click to view
mask Click to view
media controller Click to view
mobile Click to view
month/year/day Click to view
move Click to view
multi-screen Click to view
namespace Click to view
navigation Click to view
object Click to view
object design menu Click to view
official Click to view
official blog Click to view
offset Click to view
option Click to view
ordinal Click to view
page Click to view
page indicator Click to view
paste Click to view
performance Click to view
permission Click to view
pin Click to view
png Click to view
quoting Click to view
radius Click to view
registration Click to view
reminder Click to view
remove Click to view
resource Click to view
rotate Click to view
rss Click to view
save Click to view
scroll Click to view
search Click to view
select Click to view
shadow Click to view
shape Click to view
share Click to view
sidebar Click to view
slider Click to view
sliding drawer Click to view
spacing Click to view
stretch Click to view
syntax Click to view
system setting Click to view
system ui Click to view
table Click to view
table of content Click to view
tasker Click to view
taxonomy Click to view
temperature Click to view
termination Click to view
terms of use Click to view
text Click to view
theme Click to view
toby Click to view
trademark Click to view
transform Click to view
transparency Click to view
transparent Click to view
troubleshooting Click to view
typeface Click to view
ui Click to view
user conduct Click to view
user interface demo Click to view
variable Click to view
wallpaper Click to view
warranties Click to view
weather Click to view
webp Click to view
website Click to view
welcome Click to view
widget Click to view
wiki Click to view
wiki editing Click to view
window Click to view

How To: Display Real-Time CPU Usage In Total Launcher

Tasker ← or → MacroDroid

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.

  1. Enter Edit mode in Total Launcher (long-press empty space or tap the Launcher edit handle).
  2. Tap Add (+) > Graphic > Default > Text.
  3. Tap the newly placed text object to open its property dialog, then select the Edit (Gear/Pencil) icon.
  4. In the text input field:
    1. * Delete the default text placeholder.
    2. Scroll through the dynamic insert options and choose Advanced: Variable (or format the variable tag manually).
    3. Set the variable placeholder to:
      • %cpu_val%
    4. (Note: Can add suffix text if desired, e.g., "CPU: %cpu_val%" to output CPU: 18%).
  5. Adjust typography, font color, size, and alignment to suit the theme layout.
  6. 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.

  1. Create the Task
    1. Open Tasker and switch to the Tasks tab.
    2. Tap the + button at the bottom right to create a new task and name it:
      • Update TL CPU
  2. Query CPU Utilization (Run Shell)
    1. Tap + to add an action.
    2. Select Code > Run Shell (or use Shizuku / Tasker ADB command).
    3. Enter the following command into the Command field:
      • top -b -n 1 | grep "User" | head -n 1
    4. Alternative lightweight one-liner for devices with `dumpsys` access:*
      • dumpsys cpuinfo | grep "TOTAL:" | awk '{print $1}'
    5. Under Store Output In, enter:
      • %cpu_raw
    6. Ensure Use Root or Use ADB WiFi / Shizuku is checked (unprivileged standard shell cannot read top system processes on modern Android versions).
  3. Parse and Format the Percentage
    • Depending on the shell command output, extract the numeric value:
    1. Tap + > Variables > Variable Search Replace.
    2. Variable: %cpu_raw
    3. Search: [0-9]+(?=%) (or [0-9]+ to match the first integer).
    4. Check Store Matches In Array: %cpu_out.
    5. *(Optional)* If %cpu_out1 is empty, set a fallback: Variable > Variable Set > Name %cpu_val To %cpu_out1 (or To 0 if unset).
  4. Broadcast the Variable to Total Launcher
    • Total Launcher supports direct integration via the plugin as well as standard broadcast intents.
    1. Option A (Using the Total Launcher Tasker Plugin):
      1. Tap + > Plugin > Total Launcher.
      2. Select Configuration / Edit.
      3. Choose Set Variable.
      4. Set Variable Name: cpu_val
      5. Set Value: %cpu_val
      6. Tap the checkmark to save the plugin action.
    2. Option B (Using Send Intent):
      1. Tap + > System > Send Intent.
      2. Action: com.ss.launcher.total.action.SET_VARIABLE
      3. Package: com.ss.launcher2
      4. Extra: var:cpu_val
      5. Extra: value:%cpu_val
      6. Target: Broadcast Receiver

Automate the Refresh Schedule

  • Because continuous 1-second sampling can consume battery, an interval of 5 to 15 seconds while the display is active is recommended.
  1. In Tasker, navigate to the Profiles tab.
  2. Tap + > State > Display > Display State > Set to On.
  3. Link this profile to the task Update TL CPU.
  4. Open the task and add a loop structure (or use a Time Context repeating every 2 minutes for ambient monitoring):
    1. Anchor: LoopStart
    2. Perform Action: (Execute shell & send variable steps)
    3. Task > Wait > Set to 5 Seconds (or 10 Seconds).
    4. 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

  • First, set up the on-screen graphic text item that displays the received value.
  1. Long-press an empty space or tap the Launcher edit handle to enter Edit mode.
  2. Tap Add (+) > Graphic > Default > Text.
  3. Tap the new text item to open its property dialog, then select the Edit (Gear/Pencil) icon.
  4. In the text input field:
    1. Clear the default text.
    2. Insert the custom variable placeholder:
      • %cpu_val%
    • (Note: You can include custom labels or formatting, e.g., "CPU: %cpu_val%" to output CPU: 24%).
  5. Adjust typography, size, color, and positioning as desired.
  6. Tap the checkmark to save and exit Edit mode.

Configure MacroDroid Variables

  • Before building the macro, configure two local variables to store the raw output and the parsed numeric percentage.
  1. Open MacroDroid and tap Variables (or expand the Variables drawer at the bottom of the Macro edit screen).
  2. Tap + to add a new variable:
    1. Name: cpu_raw
    2. Type: String
  3. Tap + to add a second variable:
    1. Name: cpu_val
    2. Type: String (or Integer)

Build the Macro in MacroDroid

  1. Create the Macro and Define Triggers
    1. Open MacroDroid and tap Add Macro.
    2. Set the macro name at the top to:
      • Update TL CPU
    3. Under Triggers (red section), tap +:
    4. Screen & Speaker > Screen On/Off > Screen On.
  2. *(Optional secondary trigger for ambient updates):*
    1. 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.
  3. Query System CPU Load
    1. Under Actions (blue section), tap +.
    2. Navigate to Applications > Shell Script.
    3. In the script editor:
      1. Select Shizuku or ADB Hack (do not use Non-rooted unless granted dump rights).
      2. Enter the following command into the script field:
        • dumpsys cpuinfo | grep "TOTAL:" | awk '{print $1}'
      3. Under Output to variable, select:
        • cpu_raw
    4. Tap OK to save the action.
  4. Parse and Clean the Output
    • Strip extra formatting or percentage signs to isolate the pure numeric value:
    1. Tap + under Actions > Variables > Text Manipulation.
    2. Select Extract text (Regex).
      1. Source variable: cpu_raw
      2. Regular expression:
        • [0-9]+
      3. Destination variable: cpu_val
    3. Tap OK.
  5. Broadcast the Variable to Total Launcher
    • Send the broadcast intent directly to Total Launcher's receiver:
    1. Tap + under Actions > Connectivity > Send Intent.
    2. Configure the intent parameters exactly as follows:
      1. Action: com.ss.launcher.total.action.SET_VARIABLE
      2. Package: com.ss.launcher2
      3. Target: Broadcast
      4. Extra 1 parameter: var
      5. Extra 1 value: cpu_val
      6. Extra 2 parameter: value
      7. Extra 2 value: [lv=cpu_val] *(Select via the triple-dot menu or type `[lv=cpu_val]` to pass the local variable)*
    3. Tap OK to save the action.
  6. Save and Test
    1. Tap the back arrow or the checkmark icon in the bottom-right corner to save the macro.
    2. In the macro overview screen, tap the three dots in the upper-right corner and select Run Actions (or Test Macro) to test execution.
    3. 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.

You could leave a comment if you were logged in.