Passing Variable Information to Minimalistic Text

What you will Learn

How to pass variables to Minimalistic Text (MT)!


You’ll be pleased to know that as confusing as it may seem, it’s actually very straight forward and therefore this tutorial shouldn’t be very long (yeah right!).

I love minimalist themes and am therefore a big fan of the application that is very simplistic (as you’d hope) and allows you to display highly configurable text on your home screen, with very little battery drain = %PERFECT (Yes, that was a Tasker joke.. %lol?).

Simple Preparation

Download and install Minimalistic Text free from the market. If you like it, consider the donate version.

Make yourself a cup of tea.

Profile and Task Explanation

In the main Tasker screen, select Tasks, add new, name it MTRefresh. Give it a suitable icon, add in a +, Tasker, STOP action and save out of Tasker for good practice.

Here we go then - my personal MT setup is to have a single, stand-alone task that deals with passing any data from Tasker that I wish. What I mean by this is that I don’t have a context set up to run the task MTRefresh every 2 minutes for example. Not only would this cause battery drain, it’s unnecessary when the screen is off for example.

Q) But hold on… How does it refresh then?
A) Relax… I’m just about to explain…

I’m not going to (initially) recommend that you set up a context in isolation to do this. We’ll look to refresh the widget from your existing profiles first, in order to use no additional resource.

Depending on the variety of profiles in your Tasker collection, you may already have a ‘Device Boot’ context to run profiles such as SDCache or CPUDeviceBoot. Failing that, a Display On context perhaps? When looking to have your MT widget refresh, my suggestion would be to slot a ‘Perform Task’ action into these existing triggers – as many of them as you see fit.

If you don’t have a profile that triggers regularly such as the above, then use the one that does most frequently for the purposes of this tutorial.

In the chosen task, select +, Tasker, Perform Task and click on the magnifying glass. Scroll down until you find your MTRefresh task. Change the priority to ‘1’ (the lowest - as there is no necessity for this to run prior to any other task/action) and select ‘done’. In the task screen, drag the Perform Task action above any ‘STOP’ or ‘GOTO’ action (in the existing task you’ve chosen) that may cause it to be ‘skipped’ or not to start at all.

{If you don’t yet have any suitable profiles that trigger regularly, then select New, Time and select the times that you would like the widget to start manually refreshing in the morning and end at night. Tick the ‘repeat’ box which will be how often between these times the profile activates and your MT Widget is refreshed}

Open the task MTRefresh and click the +, Plugin, Minimalistic Text variable. Press Edit in the configuration screen and you will be presented with two boxes. The top box, labelled ‘Variable name’ is the name by you will reference the Tasker variable in the MT widget. This doesn’t have to start with a ‘%’ or be the same as the variable you are passing the data from. The bottom box is the variable you wish to pass. So, in the top box type BLAR and in the bottom box type %UPS, which is ‘up time in seconds’ (which is the time since you last rebooted). This value will of course always be increasing, so we can easily see that it is working correctly. Make sure this action is dragged above the stop action in the task before saving.

Go to your home screen, hold down and select widgets. Select Minimalistic Text. Select 1x1. In the widget preference screen, scroll down and select ‘predefined layout’. Select Custom.. The Custom layout option is no longer greyed out, so select that. You’ll be presented with the example of the time in text. Hold down on the first example box (Hour text (12h)) until it vibrates and then drag it down to the rubbish bin that appeared. Do the same with the other two boxes. Click the green + symbol. Press Misc. Hold down on Locale variable and drag it up to the box you previously cleared. Once it’s in the box, click on it once to bring up options below it. In the variable name field, type BLAR (assuming this is actually what you named it above). Press the back button to exit to the MT preference screen. At the bottom there is a very thin line saying ‘Preview (tap to toggle)' – click this and you’ll probably see a box with [LOCTV] in it. Alternatively, you may actually see the value of %UPS, but I’d imagine we need to ‘refresh’ the MTRefresh task first.

Press ok to exit out of MT and on your home screen, where you expected the widget to be, you may well see nothing at all… Don’t panic! :eek: Go into Tasker and open the task MTRefresh – press ‘test’. Go back to your home screen and hopefully you will see that the value of %UPS is now displayed!

Job done…!

I won’t go into how to make the text look cool as there’s a dedicated MT wiki and XDA thread for that.

You can of course use any of your own created variables and pass them to MT. You are not restricted to the inbuilt Tasker variables only.

There is a good thread here by akoe that describes how to pass your unread SMS count.

A list of inbuilt variables you can use can be found here

If anyone is struggling to pass certain data to MT or if you have any questions, feel free to post in this monitored XDA thread and ask!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License