2

I like adapting the style of my terminal depending on what I am doing inside. Using tilda, I am therefore looking for a way to dynamically change the cursor shape, say, with a command line.

I know that this option can be changed without having to restart tilda since I can do this from the gui config editor. However, running

sed "s/^cursor_shape = 0/cursor_shape = 1/" -i ~/.config/tilda/config_0

does not work, even if it does change the desired file in the desired way. Moreover, the change is canceled if I quit tilda then restart it, which means to me that some information is stored elsewhere in some way.

Is there a way I can make this change immediately effective? (like a function I would call to make tilda read the config file again?)

iago-lito
  • 2,581
  • 4
  • 20
  • 35
  • @don_crissti I did compile `1.3`. The feature is available indeed, but doesn't seem to be usable from the command line. Maybe I should contact them directly.. – iago-lito Jul 20 '15 at 21:29

1 Answers1

3

Thanks to Lanoxx, who is currently developping tilda. I can now answer this question.

tilda saves the configuration on exit to the config files. Therefore, editing them while it is running has no effect. Changing the configuration from the command line is not supported yet. It would require a dbus interface to be implemented against tilda, which is quite a job and will probably not be done soon. tilda is still a great terminal emulator anyway :)

iago-lito
  • 2,581
  • 4
  • 20
  • 35
  • It has been almost two years, is the situation the same? I use Tmux so I should be able to stash the session and restart tilda with different configuration values, but this is a very heavy-handed approach to something that might have a better approach. Could Tilda have key bindings that perform the same changes as the live configuration menu? – John P Jun 27 '17 at 17:13
  • @JohnP I finally went on with `gnome-terminal`, whose version 3.22.1 now supports escape sequences like `\\e[5 q` for "ibeam" cursor shape and `\\e[1 q` for "block" cursor shape. I don't know what's up with `tilda` now :\ – iago-lito Jun 28 '17 at 08:27
  • The cursor shape may be set from the terminal options, which I assume gnome-terminal issues to the shell over stdin. I could be wrong. If that is the case, escape codes can control things like cursor position, color, etc. as long as the shell interprets the code. The terminal emulator listens to mouse and key events and intercepts some (right clicks, bound keys, etc.) while forwarding the rest. It needs to do the same from the shell output, or accept some kind of interrupt to configure internal properties like transparency. – John P Jul 04 '17 at 18:18
  • To be clear, I would really like a client-server model, but I would be happy with an added key binding (like `F9` -> 'Toggle Transparency', which proves it's possible.) I might just look at the source to see what my options are. What prompted you to switch to gnome-terminal, if you don't mind my asking? – John P Jul 04 '17 at 18:29
  • I have found a decent workaround, which may actually be closer to the 'right' approach. I looked at my compositor settings and found "inactive window opacity", then looked up how to set it from the command line. In my case this was `xfce4-settings-editor` for lookup and `xfconf-query -c xfwm4 -p /general/inactive_opacity -s `. Now I can bind keys to calls to these settings and more, without worrying about which programs make ideal use of my compositor. – John P Jul 09 '17 at 18:55
  • I have never coded anything like a terminal emulator, but it kind of feels odd that you can change somethings and not others. Secondly, can the app not save its state and rerun with the new config without the user noticing? I imagine the time that takes for the terminal to return the response to the change config command is enough to reload the app again without user knowing it – Max Jan 10 '23 at 08:57