Allen Guarnes guest@allenguarnes:~$
blog/givetray-a-simple-systray-for-terminal-commands

givetray: A Simple System Tray for Terminal Commands

Some projects start with a grand plan.

This one started with me rolling my eyes at my own terminal.

I use scrcpy a lot to mirror my Android phone to my desktop. It’s a great tool, and I’m perfectly happy living in the CLI. But the one thing that kept annoying me was how often I had to run the same command.

After the 50th time, I stopped thinking "I need a better way to do this" and started thinking "why isn’t this just a tray toggle?"

Not because I wanted to escape the terminal. I just wanted my already-working command to be one click away.

Why not use an existing GUI?

There are plenty of GUI wrappers for scrcpy, and some of them are honestly impressive. They just weren’t for me.

I didn’t want a full app with a bunch of options I’d never touch. I wanted something small that sat in the tray and did exactly two things:

  • start the command
  • stop the command

That’s it.

Why Rust?

Since this was supposed to be a simple little tray app, I treated it as an excuse to use a language that’s known for being efficient.

Rust felt like a good fit for something that’s meant to sit in the background all day without being a resource hog. Also, I’ll be honest: I just wanted a reason to write more Rust.

How givetray started

The first version was basically "scrcpy, but in the tray." Super narrow scope, intentionally.

But once I had the scaffolding in place (tray icon, menu items, process management), it hit me: none of this code actually cared about scrcpy.

It cared about running a terminal command.

The pivot

So I refactored it.

Instead of hardcoding scrcpy, I made it work with any command. That’s the whole idea of givetray: put your everyday CLI commands behind a tiny tray UI, without turning them into a whole application.

It’s still very much a "terminal person’s" tool. You define the commands. givetray just gives them a home in the corner of your screen.

What it’s for (and what it isn’t)

If you want a polished GUI that replaces your terminal workflow, givetray probably isn’t it.

If you already have a command you like, and you just want to stop retyping it, this is exactly the kind of thing.

Project Links

If you try it and something feels rough, open an issue. I built this because I wanted it for my own setup, but I’m happy to nudge it in a direction that makes it useful for other CLI-heavy workflows too.