rocky / shell-term-background

POSIX shell scripts to figure out if a terminal has a dark or light background
GNU General Public License v2.0
35 stars 4 forks source link

Vimscript-equivalence? #5

Open egberts opened 4 years ago

egberts commented 4 years ago

Is there going to be a vim script equivalence to this?

rocky commented 4 years ago

Depends if someone is up for writing it. Hey, how about you?

(I use GNU Emacs)

egberts commented 4 years ago

It's a battle. Some think that ANSI Operating System Command (OSC) should be exchanged below the terminal at VTE-level; other thinks, it should be at application-level doing side-checking with window-manager or OS directly.

No clear winner there.

rocky commented 4 years ago

No clear winner there.

Suggestion: pick whichever one you prefer, and do it.

If it happens to piss off someone in the other camp suficiently, then maybe that person can come up with the other solution and there can be a flag that suggests which method (or both) should be tried. And if it doesn't piss off the other half sufficently, that's good too.

egberts commented 4 years ago

At the moment, there's documented efforts to get many other terminal authors on board to using certain subsets of OSC (Esc-]), but not all. The VTE and libvte got the biggest traction (which has the most number of terminal programs). Apple isn't on board yet. Nor is BSD.

Sticking point is 'paste', do we want terminal program to perform auto-paste in response to what they see? (Imagine executing rm -rf / <enter> just by reading a certain file, escaped OSC-style)?