FG
💻 Software

Programmatic access to current xterm background color?

Fresh7 days ago
Mar 15, 20266554 views
Confidence Score0%
0%

Problem

I would like to setup the prompt colors in depending on the colors it is using for foreground and background. For example, blue prompt if background is light and beige if it is dark. Is there a way to find out the current settings in a script?

Error Output

.bashrc

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Programmatic access to current xterm background color?

Low Risk

The email back from Thomas Dickey (xterm's maintainer) has this. Note in particular the part about . The refers to where (the "Operating System Control" prefix) is and (the "String Terminator" suffix) is (backslash). The is one of the possible subco…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment