The Selected Window Accent Mode is an Emacs package designed to 43 | visually distinguish the currently selected window by applying a 44 | unique accent color to its fringes, mode line, header line, and 45 | margins. 46 |
47 | 48 |Selected Window Accent Mode is an Emacs package that helps you keep track of which 74 | window has focus by visually accenting it. It applies distinctive colors to the 75 | fringes, mode line, and potentially tabs of the active window. 76 |
77 |This is particularly helpful when working with complex window layouts or when using 78 | themes where the distinction between active and inactive windows is subtle. 79 |
80 |The easiest way to install Selected Window Accent Mode is through MELPA. 111 |
112 |M-x package-install RET selected-window-accent-mode RET 114 |
You can also install manually by downloading the package from GitHub: 121 | https://github.com/captainflasmr/selected-window-accent-mode 122 |
123 |Here’s a simple configuration using use-package
:
143 |
(use-package selected-window-accent-mode 146 | :config (selected-window-accent-mode 1) 147 | :custom 148 | (selected-window-accent-fringe-thickness 10) 149 | (selected-window-accent-custom-color nil) 150 | (selected-window-accent-mode-style 'subtle)) 151 |
This will enable the mode with a subtle style, using the current theme’s highlight 154 | color for accents and setting the fringe thickness to 10 pixels. 155 |
156 |If you want to specify your own accent color: 161 |
162 |(use-package selected-window-accent-mode 164 | :config (selected-window-accent-mode 1) 165 | :custom 166 | (selected-window-accent-fringe-thickness 10) 167 | (selected-window-accent-custom-color "orange") 168 | (selected-window-accent-mode-style 'tiling) 169 | (selected-window-accent-percentage-darken 0) 170 | (selected-window-accent-percentage-desaturate 0) 171 | (selected-window-accent-tab-accent t) 172 | (selected-window-accent-smart-borders t)) 173 |
You can also use the theme’s highlight color but adjust it: 180 |
181 |(use-package selected-window-accent-mode 183 | :config (selected-window-accent-mode 1) 184 | :custom 185 | (selected-window-accent-fringe-thickness 10) 186 | (selected-window-accent-custom-color nil) 187 | (selected-window-accent-mode-style 'tiling) 188 | (selected-window-accent-percentage-darken 20) 189 | (selected-window-accent-percentage-desaturate 20) 190 | (selected-window-accent-tab-accent t) 191 | (selected-window-accent-smart-borders t)) 192 |
To set up a key binding for the command map: 199 |
200 |(global-set-key (kbd "C-c w") selected-window-accent-map) 202 |
Once enabled, the mode will automatically highlight the selected window. No further 224 | actions are required for basic functionality. 225 |
226 |You can interactively switch between different accent styles using: 231 |
232 |M-x selected-window-accent-switch-style RET 234 |
You’ll be prompted to choose between: 237 |
default
- Standard Emacs appearance
239 | tiling
- Thicker fringes and mode line
240 | subtle
- Minimal visual change with accent color
241 | To interactively change the accent color: 248 |
249 |M-x selected-window-accent-switch-color RET 251 |
If you’ve set up the keybinding for the command map (e.g., C-c w
), you can access
258 | the following commands:
259 |
Switch accent style 263 |
Change accent color 266 |
Toggle tab bar accenting 269 |
Synchronize tab bar with theme 272 |
Toggle smart borders 275 |
selected-window-accent-mode
Toggle the minor mode on or off. When enabled, the selected window will be visually 291 | accented. 292 |
293 |selected-window-accent-switch-style
Switch between different accent styles (default, tiling, or subtle). 296 |
297 |selected-window-accent-switch-color
Interactively choose a new accent color. 300 |
301 |selected-window-accent-toggle-tab-accent
Toggle whether to apply the accent color to the tab bar. 304 |
305 |selected-window-accent-toggle-smart-borders
Toggle whether to use smart borders (don’t accent single-window frames). 308 |
309 |selected-window-accent-sync-tab-bar-to-theme
Synchronize tab bar faces with the current theme. 312 |
selected-window-accent-fringe-thickness
The thickness of the accent fringes in pixels. Default is 6. 334 |
335 |selected-window-accent-custom-color
Custom accent color for the selected window. When nil, uses the current theme’s highlight color. 338 |
339 |selected-window-accent-mode-style
Style for accenting the selected window: ’default, ’tiling, or ’subtle. 342 |
343 |selected-window-accent-percentage-darken
Percentage to darken the accent color. Default is 20. 346 |
347 |selected-window-accent-percentage-desaturate
Percentage to desaturate the accent color. Default is 20. 350 |
351 |selected-window-accent-tab-accent
When non-nil, accent the selected tab in the tab-bar. 354 |
355 |selected-window-accent-smart-borders
When non-nil, don’t accent single-window frames. 358 |
You can access all customization options through the Emacs customization interface: 366 |
367 |M-x customize-group RET selected-window-accent RET 369 |
Selected Window Accent Mode is licensed under the GNU General Public License version 3 or later. 382 |
383 |