Sick day? But still tinkering on my desktop.

in #dev8 days ago

Hey everyone,

I haven't been feeling too well recently. My back is acting up again, which is something I've dealt with since I broke it back in 2007. When I'm stuck not being able to do much, I tend to tinker with my desktop. So, I decided to work on a few new widgets for my Qtile setup.

screenshot-20250926-075353.png


The HiveRewards Widget

First, I created a widget that displays my unclaimed Hive reward balances directly in my status bar. It's a simple polling widget that uses my hive-nectar library to fetch the current reward_hive_balance, reward_hbd_balance, and reward_vesting_balance for my account. It's read-only, so no keys are required. It pairs nicely with the CoinGeckoTicker widget to give me a quick overview.

new_bar.png

The NowPlaying Widget

I've talked before about how I listen to SiriusXM through a custom command-line tools. To get the currently playing song into my bar, I created a NowPlaying widget. This polls a local JSON endpoint that I recently added to my SiriusXM service, which is much cleaner than running a CLI tool every few seconds to see what's playing. The channel is set in the config, but I also added a command so I can change it on the fly without restarting Qtile.

qtile cmd-obj -o widget nowplaying -f set_channel -a "octane"

new_bar2.png

Automatic Terminal Swallowing

Finally, I implemented a feature from my sorta-suckless tools: terminal swallowing. This is a utility that automatically detects when a GUI application is launched from a terminal. When it happens, the terminal is minimized. Then, when you close the GUI application, the original terminal is automatically restored and focused. It works by walking the new application's process tree to find its parent terminal window. All this without having to prefix all GUI apps with the cli tool first, which is how my sorta-suckless version worked. It’s a small improvement that makes a huge difference.


All of these new widgets are available in my qtile_widgets repository on GitHub for anyone who is interested.

As always,
Michael Garcia a.k.a. TheCrazyGM

Sort:  

I love desktop and system tinkering, though I haven't had too much time to do it lately. Very cool widget tools, and I definitely dig your sorta-suckless terminal swallowing trick, as I launch many GUI apps from the terminal. I'm glad that you had some tinkering fun, and I hope that your back feels good post haste. 😁🙏💚✨🤙

Sorry to hear about the back flare up, hope the tinkering gave you a small win today :(
That terminal swallowing with the process tree walk is slick and defnitely the kind of friction killer that makes daily work smoother.
I love how it restores focus to the original terminal when the GUI closes, feels like magic and also keeps my workspace tidy.
Tiny feature ask from an accounting brain, a small ADmin toggle to log when an app was swallowed could help track context for later review :)

I did add debug logging just now, it's noisy when you make logging debug in qtile. but you can see the pid traversal. I'll see what I can do to make it more of a feature and less debugging later but thought that might help some for now.

That helps a ton, even if the debug is a bit noizy :) seeing the PID traversal makes the behavior obvious.
Maybe keep the deep traverasl lines at DEBUG and add a one line INFO summary like "swallowed app X from terminal Y, took Z ms" so regular logs stay sane.
A tiny flag like swallow_log=summary or an env var to toggel it on the fly would make it feel like a feature, not a hack.

Smart. Let me get that put in there :)

Awesome, cant wait to try it out :) Small touches like an env toggle plus a one line summary make the logs nice nice and practical. If you drop a quick README note with HIVE_SWALLOW_DEBUG=1, that will save folks time'

Congratulations @thecrazygm! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 7000 HP as payout for your posts, comments and curation.
Your next payout target is 8000 HP.
The unit is Hive Power equivalent because post and comment rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Hive Power Up Day - October 1st 2025