how to change colorset of running sakura

Asked by Nikola Maric

I'm interested in running a command that would change a colorset of some sakura window/process. Is this possible via some kind of IPC mechanism?

Why? Because I want to change the colors of my terminal when I ssh into different servers. And I want it done in the same terminal window, dynamically when I log in and out from different servers.

P.S. I'm aware of shell escape sequences, but these can be reversed/changed by another program output, and in order for them to work on remote machines, one of .profile .bashrc .zshrc... of those users would need to be edited, which changes the paradigm to more decentralized solution. And I'd prefer to configure everything on my client machine, in my terminal of choice - sakura.

Question information

Language:
English Edit question
Status:
Answered
For:
Sakura Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Gómez (dabisu) said :
#1

You have the --colorset command line option. Isn't that what you need? I'm afraid there's no IPC mechanism to change it, and the only way to change sakura colorsets is through the menus or editing directly the config file (or the --colorset command line option I've mentioned).

Revision history for this message
Nikola Maric (maricn) said :
#2

Thanks for the quick reply.

I am aware of it, but it's only useful if I'm spawning a new sakura process, but not usable on already running one, which is my idea. Imagine something like the "focus fade" feature, but instead of dimming you can change a colorset, and instead of focus you can trigger the colorset change by sending a message to sakura. Basically any g_signal_connect reacts on GTK events.

Honestly, I don't know much about GTK nor POSIX, but they both have systems for passing user defined signals. I'm aware that would greatly change the architecture of sakura, but it would introduce some real-time configurability. Whether you think it's a good idea to implement something like this or not is up to you.

Thanks for your reply anyways, and if you think it makes any sense, I can make a feature request to keep this tracked.

Revision history for this message
Nikola Maric (maricn) said :
#3

Here are some existing terminal emulator solutions.

* Using special ANSI escape code (not one commonly used for coloring fg/bg, because that can be reconfigured by any programs output) like mentioned here - https://unix.stackexchange.com/a/326417/57288.
* Konsole solution which resembles my idea the most - https://forum.kde.org/viewtopic.php?f=227&t=96156.
* Same thing is used by iTerm2 on OSX - https://github.com/erangaeb/dev-notes/blob/master/oh-my-zsh/iTrem2-ssh.zsh
* But it's also capable of receiving such command via AppleScript - https://gist.github.com/porras/5856906.
* Full usage example - https://coderwall.com/p/t7a-tq/change-terminal-color-when-ssh-from-os-x.

Revision history for this message
David Gómez (dabisu) said :
#4

Yes, now I understand what you mean. Please feel free create a feature request here in launchpad.

Can you help with this problem?

Provide an answer of your own, or ask Nikola Maric for more information if necessary.

To post a message you must log in.