Thursday, July 08, 2021

Mentally here and there: A quick Twitter Presence script in IFTTT

Guilty pleasures of the tech world. A while back I got confronted with the choice of whether to pay for IFTTT or not as the service moved to a more restricted free tier. At the time (and to this day), I had a few utility automation scripts which felt quite handy, even if I didn't use them regularly. IFTTT felt useful to me, so I decided to pay the monthly and resolved to find interesting ways to get something back.

I'm still playing with some scripts, but having access to the "Filter" functionality is really useful. In short it lets you add some Javscript code in between your 'trigger' and your 'action' to make things more dynamic. For instance, I've got one Filter that sets a target Evernote folder based on a hashtag I assign in Tiny Tiny RSS, for more flexibility. It's nice like that.

Today I had a play with IFTTT's "Note" widget, which lets you just enter some text and send it to the service. You can add that as a quick-access widget on your phone screen. I noticed that the Twitter service's actions let you update your bio, and your profile picture, but you can also send a tweet at the same time.

I've been thinking about my relationship with Twitter again, especially now that I'm effectively unemployed. There are days when I don't mind being on there and hanging out, but it also gets tiring quickly. Not just the doomscrolling and the naysayers - also the good stuff. I mean, I follow a whole bunch of lovely and really interesting people, but Twitter's format means that I get 30-40 fascinating ideas, topics and links within a minute of logging in. That's too much for my little brain.

So I'm desperate to treat Twitter (and other social media sites) more as a 'drop-in', like an (un)conference or a meetup or a cafe. It's tiring going to an event, even if it's great, and all of us need downtime to process what we've just been through when we do attend something so intense. 

I figure the in/out time for Twitter should be something along the lines of 1 day "in", for every 3 days "out" probably. For me, at least - that's a check-in twice a week, where I allow myself to be engaged as if I were in a live chatroom. 

In other words, asynchronous is nice, but the human mind struggles to balance things when we're half-present, when the network is always there but the attention isn't necessarily around to match it.

So here's my setup for IFTTT to have a quick way to be 'in' or 'out', a presence indicator for Twitter, if you will.

Firstly, I made a desaturated, darkened copy of my usual avatar image to use when I mark myself as 'away', and uploaded both to the same place on my web host. Here are the two side-by-side:

(The original Megritte-inspired apple-face goes back decades. I'm not sure where the coffee stains came from.)

I then made a new Applet in IFTTT, hooking together the "Note widget" with Twitter's "Update profile picture" action. I had to fill in a default URL for the picture, so just used the URL for the first image as a default.

Then I added some interstitial Filter code that looks like this:

// Default presence avatar img
var avatar_pic = 'megritte_stained_400x400.jpg';
// Shortcut to incoming text
var note_text = DoNote.doNoteNewCommandCommon.NoteText;
// afk message to use
var afk_msg = null;

// Go away
if (note_text.toLowerCase().indexOf('afk') == 0) {
  avatar_pic = 'megritte_stained_grey_400x400.jpg';
  // Check if we want to send a tweet using 'afk <message>'
  if (note_text.length >= 3) {
    Twitter.uploadProfileImageTwitter.setTweet('(' + 
note_text.substring(3).trim() + ')');
} else {
  // if not 'afk', send any text provided as a tweet
  if (note_text !== null &&
      note_text.trim() != '') {

// Set avatar appropriately
'https://<domain and path>/' + avatar_pic);

And then finally I added the Note widget to my phone's home screen, using the IFTTT Android App.

To mark myself 'away from Twitter', I use the widget to send the simple text 'afk'. This will update the avatar to the monochrome version. If I want to, I can add an optional status to send as a tweet after that, eg 'afk Had enough doomscrolling, back next week.'

To return, I can send a 'blank' message - a single space, as the widget doesn't seem to allow properly empty messages - or any text that doesn't begin with 'afk' to include a tweet update. The avatar will be set back to the colour version either way.

Simple enough, as all good daily tech should be. I'm hoping though that it a) encourages me to use Twitter in a more "obvious" way, in that it's more obvious to me if I'm supposed to be focused and engaged with it, and b) maybe encourages others to think about the same thing, by being more transparent about where my mind is.

After all, as we increasingly lose sight of each other's physical bodies, our mental presence has become more and more the point at which we interpret and negotiate our social cues and cultures. 

No comments:

Subscribe by email