On 5/26/20 2:06 PM, test wrote:
Hi, when opening multiple tabs in a konsole window, the active tab is virtually indistinguishable from the tabs that aren't active. How can I make the active tab more distinguishable, like giving it different a background colour? I've tried to use the Colours settings in the System Settings to change the colour of active tabs, but there doesn't seem to be a setting for this. For most of the colour settings I can't tell what they affect, and there are too many of them to figure it out by trial and error, especially since changing the settings doesn't always apply them.
https://docs.kde.org/trunk5/en/applications/konsole/tabbarstylsheet.html https://doc.qt.io/qt-5/stylesheet-reference.html http://thesmithfam.org/blog/2009/09/10/qt-stylesheets-tutorial/ https://gist.github.com/codemedic/f11cc460b8d9544f9afc There seems to be no standardized place for user storage of Qt stylesheets that i can determine, so i suggest: mkdir ~/.qt-css/ # the following (or some variant of it) came from the 'codemedic' site above at one point long ago # it puts a blue bar at the top of the tab to highlight it from the other tabs. cat > ~/.qt-css/konsole-tab.css <<"EOF" QWidget, QTabWidget::pane, QTabWidget::tab-bar { background-color: rgb(45, 45, 45); } QTabBar::tab { color: rgb(120, 120, 120); background-color: rgb(45, 45, 45); font-size: 12px; height: 25px; padding-left: 4px; padding-right: 4px; border-left: 2px; border-right: 2px; border-color: white; } QTabBar::tab:selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #1e5799, stop: 0.08 #2989d8, stop: 0.15 rgb(45, 45, 45)); color: #4F89CC; } QTabBar::tab:hover { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #1e5799, stop: 0.01 #2989d8, stop: 0.10 rgb(45, 45, 45)); color: #4F89CC; } "EOF" then use the controls in: Settings->Configure Konsole->[TabBar]-> [X] Use user-defined stylesheet and enter the path to your css file. --or-- kwriteconfig5 --file konsolerc --group TabBar --key TabBarUseUserStyleSheet true kwriteconfig5 --file konsolerc --group TabBar --key TabBarUserStyleSheetFile file://${HOME}/.qt-css/konsole-tab.css I haven't figured out the (or any) way to signal via DBus to the konsole session that its properties changed, though, via something like: qdbus ${KONSOLE_DBUS_SERVICE} /MainApplication qdbus ${KONSOLE_DBUS_SERVICE} /MainApplication org.qtproject.Qt.QApplication.setStyleSheet "file://${HOME}/.qt-css/konsole-tab.css" # that works same as the kwriteconfig5 above), but qdbus ${KONSOLE_DBUS_SERVICE} /MainApplication org.freedesktop.DBus.Properties.PropertiesChanged doesn't do the thing i want. (it's a signal, not a method, so, try...) dbus-send --session --dest=$KONSOLE_DBUS_SERVICE --type=signal --print-reply /MainApplication org.freedesktop.DBus.Properties.PropertiesChanged that just times out. If anybody knows how to signal konsole to re-read its configuration, that'd be awesome. --stephen