In the middle of the desert you can say anything you want

04 Jun 2022

Qtile replacing countdown-notification mechanism

I had this:

tm_old() {
    local DATE=$(date +'%H:%M:%S %d/%m')
    local N="$1"; shift
	  (utimer -c $N && zenity --info --title="Time's Up" --text="${*:-BING} \n\n $DATE")

I used it as tm 3m message and get a popup in three minutes with “message”. Used it for reminders of random stuff like “turn off the stove” or “stop doing X”.

Now utimer seems to be dead, and qtile makes the alert popup messages pop up in the wrong workspace group, usually the one wrote the command in instead of the currently active one.

Today I solved the last part by switching to notify-send. Found dunst, added to startup, now notify-send creates nice visible alerts: 2022-06-05-001631_384x90_scrot.png

It seems to support a lot of cool stuff like progress bars and images: dunst-project/dunst: Lightweight and customizable notification daemon

Dunst - The Blue Book - nice post, and woohooo a digital garden!

Useful commands:

  • dunstctl close-all
  • dunstctl history-pop

Added the first one as qtile shortcut:

        [mod, ctrl],
        desc="Clear notifications",

There’s also dunstify which is a notify-send with more options.

Changed the zsh command to use notify-send. Everything works nicely now.

If utimer stops working I’ll prolly write a python script that does a countdown1 and then a configured notification/action/.., without relying on .zshrc aliases and bash functions. We’ll see.

  1. Or use existing solutions: alexwlchan/timers: A simple command-line stopwatch and countdown clock ↩︎

Nel mezzo del deserto posso dire tutto quello che voglio.