SolvedConEmu Active tab is hard to see
✔️Accepted Answer
So here's a more concrete proposal: have tab templates support a new %*
token for the Selected tab, which would translate to ⬤ in the tab name. See it here in action:
From a19bb4b8fb0185c6c6bf5cf50c5273d9a39b9ee7 Mon Sep 17 00:00:00 2001
From: Christian Boos <cboos@bct-technology.com>
Date: Sat, 3 Dec 2016 23:49:53 +0100
Subject: [PATCH] gh-552: Add %* format in tab templates for selected indicator
---
src/ConEmu/ConEmu.rc | 2 +-
src/ConEmu/TabBar.cpp | 6 ++++++
src/ConEmuCD/ConsoleMain.cpp | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ConEmu/ConEmu.rc b/src/ConEmu/ConEmu.rc
index 5f1f4a2..e9ec0f6 100644
--- a/src/ConEmu/ConEmu.rc
+++ b/src/ConEmu/ConEmu.rc
@@ -1007,7 +1007,7 @@ BEGIN
RTEXT "Charset:",stTabFontCharset,225,79,90,8
COMBOBOX tTabFontCharset,319,77,54,67,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
EDITTEXT tTabConsole,58,130,106,12,ES_AUTOHSCROLL
- LTEXT "%s - Title, %c - Console #, %n - Active process name, %p - PID,\n%a - ‘Admin’, %d - current shell directory, %f - folder, %% - %",stTabTemplateDescr,57,110,314,16
+ LTEXT "%s - Title, %c - Console #, %n - Active process name, %p - PID, %* - Selected tab\n%a - ‘Admin’, %d - current shell directory, %f - folder, %% - %",stTabTemplateDescr,57,110,314,16
RTEXT "Maximum tab width (in chars):",stTabLenMax,8,168,123,8
EDITTEXT tTabLenMax,135,166,40,12,ES_AUTOHSCROLL
EDITTEXT tAdminSuffix,301,189,72,12,ES_AUTOHSCROLL
diff --git a/src/ConEmu/TabBar.cpp b/src/ConEmu/TabBar.cpp
index 5c912e1..60d0d61 100644
--- a/src/ConEmu/TabBar.cpp
+++ b/src/ConEmu/TabBar.cpp
@@ -1597,6 +1597,12 @@ int CTabBarClass::PrepareTab(CTab& pTab, CVirtualConsole *apVCon)
_wsprintf(szTmp, SKIPLEN(countof(szTmp)) _T("%i"), pTab->Info.nIndex);
pszText = szTmp;
break;
+ case _T('*'): // %* - Selected tab indicator
+ if (gpConEmu->isVConValid(apVCon) == GetCurSel() + 1)
+ {
+ pszText = L"\x2b24"; /*"⬤"*/
+ }
+ break;
case _T('p'): case _T('P'): // %p - Active process PID
if (!apVCon || !apVCon->RCon())
{
diff --git a/src/ConEmuCD/ConsoleMain.cpp b/src/ConEmuCD/ConsoleMain.cpp
index 71d2180..0e8cb5c 100644
--- a/src/ConEmuCD/ConsoleMain.cpp
+++ b/src/ConEmuCD/ConsoleMain.cpp
@@ -6980,7 +6980,7 @@ bool IsKeyboardLayoutChanged(DWORD* pdwLayout)
{
wchar_t szErr[80];
_wsprintf(szErr, SKIPCOUNT(szErr) L"ConsKeybLayout failed with code=%u forcing to GetKeyboardLayoutName or 0409", nErr);
- _ASSERTE(FALSE && "ConsKeybLayout failed");
+ // _ASSERTE(FALSE && "ConsKeybLayout failed");
LogString(szErr);
if (!GetKeyboardLayoutName(szCurKeybLayout) || (szCurKeybLayout[0] == 0))
{
--
2.10.0.windows.1
@Maximus5, if you like the proposal and would prefer a proper pull request instead of a patch, please tell me.
(the patch also contains an unrelated change in src/ConEmuCD/ConsoleMain.cpp
which avoids a "trap" dialog on startup)
Other Answers:
For a really visible big black square on active tab, go to:
Settings → Main → Tab Bar → Console, and then paste:
%m
⬛ m %s
Works great
Just a thought: what about altering the formatting of the tab number?
The tabs have currently the following text content:
| <1> cmd.exe | <2> cmd.exe Admin | <3> bash.exe |
I think it would already be helpful to hint at the active tab at the level of the tab number:
| <1> cmd.exe | *2* cmd.exe Admin | <3> bash.exe |
(or use some more fancy unicode bracket characters, like ❰2❱
, if that's possible in that place)
Alternatively, only keep <n>
for the active tab:
| 1: cmd.exe | <2>: cmd.exe Admin | 3: bash.exe |
Other than maybe putting #552 (comment) @cboos solution into the default config (I'm personally using %m⬤ m
), this works great.
Thanks for the great software @Maximus5 !
Good morning Maxim,
I'd like again raise the question about the visibility of the active tab (not in the sense of active split area as Vitaly mentioned in the issue #164, but directly the tab area). Under WIndows 10 (and I guess Windows 8) the default difference between active and inactive tab is almost invisible, which makes it hard to work.
You can check what I mean with the following screenshots:
https://www.dropbox.com/sh/wofj7iy3q92ujgv/AAAUanJjY7XWTbYBXaBl8jXva?dl=0
Thank you and regards,
Anton