set environment variable on profile change

Bug #1340542 reported by Fake51
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
New
Wishlist
Unassigned

Bug Description

I run programs with different settings depending on terminator profile. Essentially I have two profiles, solarized dark and light. When I run VIM I need to set appearance settings there as well, depending on which profile I have chosen, to get proper results.

If terminator set an environment variable in the shell matching it's profile, then VIM and other programs could be scripted to automatically choose the proper settings.

Currently, my solution is to manually switch profiles in terminator with right click, then use tmux to issue a command to all windows to set an appropriate environment var. This is extra work for no added benefit - so would be awesome to do away with it.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Terminator can set the initial environment of your shell, but there's no way it could alter it later on a profile change. So your suggested approach couldn't work.

If Terminator finally upgraded to a newer VTE (bug 1030562), you could use "xtermcontrol --get-bg" or similar command to query the current colors (see also https://bugzilla.gnome.org/show_bug.cgi?id=733423), this would allow you to script vim as you desire.

Revision history for this message
Fake51 (peter-e-lind) wrote :

Hmmm, good point - I guess fallback option is update a file when profile is switched, so one can poll the information/watch the directory for changes.

I might have a look at creating a patch for creating a file somewhere that displays current profile

Changed in terminator:
importance: Undecided → Wishlist
tags: removed: feature-request
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.