Repository navigation
Customizing Dock Mode Indicator Priority #1182
|
First of all, thank you for creating such great software! I've recently switched from tmux to tuios. Ideally, I'd love to have customizable indicators with conditional logic based on the current mode. Is something like this possible with the current custom dock functionality? |
Replies: 2 comments 3 replies
|
The built-in mode pill can't do it. A custom dock component gets close, with a short delay. Why the pill always says tiling. In Option 1: a custom component that polls the mode. None of the dock's refresh events fire on a terminal/window switch, so it has to poll. The data is there, though. [dock]
left = ["mode", "custom/uimode", "workspaces", "trail", "tape"]
[dock.custom.uimode]
command = '''tuios run-command --json -s "$TUIOS_SESSION" GetSessionInfo | jq -r 'if .mode == "terminal" then "TERM" else "WIN" end' '''
refresh = "1s"The catch is that interval refresh has a one-second floor, so the label can trail a mode switch by up to a second. Change Option 2: make the colours impossible to miss. This one is instant. The window-mode pill uses the theme's chrome {
"id": "tuios",
"base": "tuios",
"chrome": {
"accent": "#7aa2f7",
"success": "#ff9e64"
}
}(use your theme's id for The proper fix would be in tuios itself. In the two tiling branches it could keep the mode's own icon and append the split letter ( |
|
Thanks so much for switching over @k-kuroguro, and for such a clear write-up! You're right that with tiling always on, the pill only changed colour, which isn't much to go on. #1202 adds a new option: [appearance]
dock_mode_pill = "input"With that set, the pill keeps the window or terminal icon while tiling is on and puts the split letter after it, so you get something like And big thanks to @ska2704 for digging into the code and posting both workarounds. The theme colour trick is a nice one to keep in mind even with the new option. |
Thanks so much for switching over @k-kuroguro, and for such a clear write-up! You're right that with tiling always on, the pill only changed colour, which isn't much to go on.
#1202 adds a new option:
With that set, the pill keeps the window or terminal icon while tiling is on and puts the split letter after it, so you get something like
WM Vor>_ V. The default stays the same, so nobody else's dock changes, and you can also flip it from the settings page under Dock.And big thanks to @ska2704 for digging into the code and posting both workarounds. The theme colour trick is a nice one to keep in mind even with the new option.