Photo of me

Hugo Osvaldo Barrera

My desktop-wide microphone mute toggle

I use a global hotkey (Super1+m) to toggle my microphone between muted and unmuted.

It’s been very handy so far. Different videocall applications all have different hotkeys to mute / unmute oneself, and this avoids me having to keep a mental map of all the different mappings.

It’s also been super handy when pair-programming; I can mute while typing and unmute when I need to talk, saving my co-programmer the pain of hearing my rather loud keyboard.


I recently wanted to game online with some friends, and, again, since my keyboard is pretty loud, it made sense to try to have a global hotkey for toggling my mic (so that my co-gamers don’t hate me).

Note: Voice auto-detection isn’t an option since, apparently, my keyboard is as loud as my voice.

Discord supports a global hotkey on Windows and macOS, but the way it’s implemented relies on security issues “features” present on those platform that are not present in Linux desktop. On these other platforms, applications can freely act as keylogger and intercept keystrokes when they’re not in foreground. This is not possible on Wayland (the display server protocol on Linux2) for obvious reasons.

Global hotkeys have a rather different philosophy: you configure the compositor itself to grab certain hotkeys, and execute an action in response. If Discord had something like a D-Bus API, configuring such a thing would be possible. Sadly, Discord support no such thing.

However, the toggle works as is. It work on any application since it mutes the microphone at a system level. It’s just a shame that other can’t easily determine if I’m deliberately muted or not.


Aside from being globally accesible, this technique is also globally visible. There’s an icon on my status bar indicating the microphone status at all times:

The statusbar showing an icon that blends in.
The muted ("closed") indicator.
The statusbar showing an icon with a red background that stands out.
The unmuted ("open") indicator.

The design of the icon is vaguely inspired on the iOS icon used when applications are using a microphone in the background (e.g.: during background calls).

It works, and it’s just a tiny script. No polling either, it actually sleeps 99% of the time, and only wakes up for changes on microphone state.

Hotkey implementation

The global hotkey is just a one-liner which just calls ponymix. If you use sway, this can be freely copy-pasted. If you use a different compositor, just map global hotkeys to a similar command.


  1. Also known as Meta, , Command or Windows

  2. Older Linux desktops use Xorg, which does allow applications to freely snoop on keystrokes and what others are rendering. 

Filed on under: #linux #desktop #kiss #meet #discord

A simple boot setup with SecureBoot

I use a pretty simple setup for booting my systems.

Filed on under: #boot #uefi #linux #sbctl #kiss

Zoom screen sharing on ArchLinux

Zoom doesn’t support screen sharing on Linux unless you’re using GNOME or X11.

Also, Zoom only runs via XWayland (a compatibility layer for older applications). XWayland doesn’t really support desktop scaling, which is why it looks so blurry:

A screenshot of zoom's error message.
I reported that screen sharing on Linux just shared a white screen some time ago.
A few days later they fixed that.
Filed on under: #unix #zoom #wayland

What is git?

git is one of the most important tools for a developer nowadays and this applies pretty much regardless of what language you work on.

However, it seems that nobody explains what git is to new developers at any point. I’ve had to mentor many devs of different levels of experience, and I’ve consistently noticed that nobody had taught them what git is or how to use it.

Many courses seem to cover git, but only cover very advanced topics: branching, tags, git-flow, and alike. This is pretty much like teaching a medicine student how to do heart surgery on their first week – sure, it’s important, but it’s definitely not the first topic you want to cover (nor will they be able to actually assimilate this skill during their first week anyway).

Filed on under: #tech

Spotify review

Since copying music to my iPhone is a bit of pain, I decided to stop being a dinosaur, and get into this new world of on-demand music streaming.

Regrettably, it seems that these services are really below alpha quality - and amazingly, manage to have millions of customers anyway (but hey, stuff is frequently made popular due to marketing and not due to good quality).

Filed on under: #review #tech #rant

Using FreeOTP with

Some users have requested, over and over to use other apps as a 2FA. These include FreeOTP, Authy, and possible others (Google Authenticator, AFAIK, cannot be used since it lacks the ability to configure the amount of digits).

After some searching the web, I found out all the pieces of the puzzle are out there, but nobody built it entirely, so here goes!

Filed on under: #security

Using letsencrypt with HKPK

HKPK (RFC7469) is a standard that tells browser to cache a certain TLS certificate’s signature, and validate that future visits use that certificate (or a defined backup).

I intended on enabling this on my servers, but since letsencrypt renews your certificates every few months, it would mean updating this setting on my nginx configuration. It also means that if something catastrophic happens (like a disk failure), the certificate would be lost, but browsers would still expect to see that same one.

Filed on under: #tls #security #internet

I'm giving up on IM

I’ve been using XMPP as my primary IM protocol for years now. I’ve used a few other things on the side, but I’ve always advertised it as my primary mean of communication. And it’s really worked for a long time: lots of developers and people in FLOSS circles use XMPP, and Google Talk federated as XMPP too, so that worked for less tech-inclined users.

Filed on under: #rant #im #internet

Start small, then grow

All of us developers who love what we do have started lots of side-projects.

And almost all of us have equally as many side-projects abandoned on some workspace or projects directory, rotting, with no hope of every achieving completion. New projects are dumped there periodically, into a pit of abandonment and decay.

Filed on under: #development

Introducing Todoman

Inspired on memo and khal, todoman is a simple todo manager, (or task manager), designed to take note and keep track of pending tasks, that runs as a cli application on almost any Unix-like system (this includes Linux, BSD and probably other OSs from the Unix family).

Filed on under: #unix #getting things done #caldav

Open source your website

Unless your business’s value is actually on your website code itself, there’s little reason not to share your site’s code.

I understand why facebook or gmail won’t release the code to their site (I understand, without condemning nor condoning), but if you’ve got a blog, an institutional website, a three-page site that merely links to “download our app”, there’s little reason not to share the source with the public.

Filed on under: #open source

Opensmtpd and dovecot with a shared SQL database

This article will describes how to achieve a flexible and scalable email setup using opensmtpd and dovecot. For single-user or single-domain setups, this is an overkill, but feel free to read ahead, you may still find something useful.

Filed on under: #opensmtpd #dovecot

Performing backups the right way

For years I’ve had a single task on my TO-DO list: backup photos. I had an awful solution years ago, and only recently did a permanent, proper solution.

Doing backups the right way means taking several items into consideration, and should not be done lightly. Trusting poor backup solutions will result in a false sense of security where you might loose everything suddenly, and not even realize it until it’s too late!

Filed on under: #backups #unix