Added Smart Highlighting for mapped workspaces. (#288)

* Improved workspace highlighting and added smart highlight option

* Added to default workspace variant.

* Remove hover effects

* Remove unused functions.

* Remove unused hover properties

* Remove unused variable from utils.

* Make hideUnoccupied the default option
This commit is contained in:
Jas Singh
2024-09-28 12:48:01 -07:00
committed by GitHub
parent 233c97aff3
commit a3ae60f621
7 changed files with 51 additions and 12 deletions

View File

@@ -28,6 +28,7 @@ export const occupiedWses = (monitor: number): BoxWidget => {
options.bar.workspaces.workspaceIconMap.bind('value'),
options.bar.workspaces.showWsIcons.bind('value'),
options.theme.matugen.bind('value'),
options.theme.bar.buttons.workspaces.smartHighlight.bind('value'),
ignored.bind('value'),
],
(
@@ -46,6 +47,7 @@ export const occupiedWses = (monitor: number): BoxWidget => {
wsIconMap: WorkspaceIconMap,
showWsIcons: boolean,
matugen: boolean,
smartHighlight: boolean,
) => {
let allWkspcs = range(totalWkspcs || 8);
@@ -104,12 +106,13 @@ export const occupiedWses = (monitor: number): BoxWidget => {
vpack: 'center',
css:
`margin: 0rem ${0.375 * spacing}rem;` +
`${showWsIcons && !matugen ? getWsColor(wsIconMap, i) : ''}`,
`${showWsIcons && !matugen ? getWsColor(wsIconMap, i, smartHighlight) : ''}`,
class_name: renderClassnames(
showIcons,
showNumbered,
numberedActiveIndicator,
showWsIcons,
smartHighlight,
i,
),
label: renderLabel(