4 ms·
> Kitty also had a command line flag to allow setting the window class That's quite fortunate/fortuiutous and makes for a nifty shortcut that works so well. Is
by politelemon 3y ago
> Kitty also had a command line flag to allow setting the window class
That's quite fortunate/fortuiutous and makes for a nifty shortcut that works so well. Is this common for all terminals, eg does gnome-terminal have a --class that would let it slot in to this .desktop setup?
Tbh the Mac version looks a bit too involved and hinges on or works around specific behaviors, I'm not sure I'd want to go that far as it then ventures into the territory of 'maintenance'.
- friend_and_foe 3y agoWell if you want to do this with a terminal that doesn't you can just use a pipe.
- padthai 3y agoWould you mind to elaborate? It is the first time I hear a pipe can be used for setting the class/title.
- friend_and_foe 3y agoNo I mean, opening a terminal window with a program running in it. Pipe the command to the terminal when you run the terminal. I do this for TUI apps on my Sway desktop, just put some bash scripts with a single line in them, they're my shortcuts so I can run them from my menu.
- eadmund 3y agoA lot of older X11 apps support -class for this. I use X window classes to differentiate between all of my Firefox instances. No idea if Wayland even supports the idea of window classes (so that I can raise the instance I need with a single hotkey), but if not that’s yet another blocker for me.
- cycomanic 3y agowayland has app-id, which is sort of equivalent. IIRC most modern terminals set the app-id when you use the --class (or similar) flag on wayland.
- cweagans 3y agoMost of the terminals that I've looked at have a `--class` flag (gnome-terminal, wezterm, alacritty, and kitty all have it). https://github.com/fmoralesc/neovim-gnome-terminal-wrapper https://github.com/fmoralesc/neovim-gnome-terminal-wrapper also exists if you want to go that route. I tried it for a little while and it worked pretty well, but it's not particularly easy to re-use for other applications. The mac version is a bit of a pain to set up the first time, but it's pretty straightforward after that!