aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar Fabian Homborg <FHomborg@gmail.com>2015-10-20 17:02:32 +0200
committerGravatar Fabian Homborg <FHomborg@gmail.com>2015-12-10 12:47:45 +0100
commitb73bf53bd30cb8b6056888a473368968041dbe66 (patch)
treeb713388c6de9453784df466fa2dac09235140edc /share
parentd90169e79b9f3eead31a06f61978323a5651111f (diff)
Enable 24-bit mode for selected terminals
Unfortunately, there's no standard way to detect support (importantly, terminfo doesn't encode it), but there's a variety of terminals that support it that we can detect. It's better than letting this functionality go to waste. Check KONSOLE_PROFILE_NAME instead of DBUS_SESSION because Konsole can be compiled without dbus support. Check ITERM_SESSION_ID's format for 24bit support This has changed since the last release, just like 24bit support. So if we check one, we get the other.
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_config_interactive.fish9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish
index 2f170522..23c60195 100644
--- a/share/functions/__fish_config_interactive.fish
+++ b/share/functions/__fish_config_interactive.fish
@@ -320,4 +320,13 @@ function __fish_config_interactive -d "Initializations that should be performed
fish_fallback_prompt
end
end
+
+ if begin set -q KONSOLE_PROFILE_NAME # KDE's konsole
+ or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here
+ or string match -q -- "st-*" $TERM # suckless' st
+ or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0
+ or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
+ end
+ set -g fish_term24bit 1
+ end
end