Implement custom icons per workspace. (#261)

* Implement custom icons per workspace.

* Finish custom workspace icon implementation

* Remove unsupported color definition.
This commit is contained in:
Jas Singh
2024-09-15 15:19:32 -07:00
committed by GitHub
parent 8c2537b917
commit f09ffa7699
12 changed files with 437 additions and 360 deletions

View File

@@ -136,6 +136,14 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
******************************
*/
Header('Workspaces'),
Option({
opt: options.theme.bar.buttons.workspaces.fontSize,
title: 'Indicator Size',
subtitle:
'Only applicable to numbered workspaces and mapped icons\n' +
'Adjust with caution as it may cause the bar to expand',
type: 'string',
}),
Option({
opt: options.bar.workspaces.show_icons,
title: 'Show Workspace Icons',
@@ -180,6 +188,16 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
subtitle: 'Only applicable if Workspace Numbers are enabled',
type: 'string',
}),
Option({
opt: options.bar.workspaces.showWsIcons,
title: 'Map Workspaces to Icons',
type: 'boolean',
}),
Option({
opt: options.bar.workspaces.workspaceIconMap,
title: 'Workspace Icon Mappings',
type: 'object',
}),
Option({
opt: options.bar.workspaces.spacing,
title: 'Spacing',

View File

@@ -1,6 +1,6 @@
import options from 'options';
const { show_numbered, show_icons } = options.bar.workspaces;
const { show_numbered, show_icons, showWsIcons } = options.bar.workspaces;
const { monochrome: monoBar } = options.theme.bar.buttons;
const { monochrome: monoMenu } = options.theme.bar.menus;
const { matugen } = options.theme;
@@ -8,12 +8,21 @@ const { matugen } = options.theme;
show_numbered.connect('changed', ({ value }) => {
if (value === true) {
show_icons.value = false;
showWsIcons.value = false;
}
});
show_icons.connect('changed', ({ value }) => {
if (value === true) {
show_numbered.value = false;
showWsIcons.value = false;
}
});
showWsIcons.connect('changed', ({ value }) => {
if (value === true) {
show_numbered.value = false;
show_icons.value = false;
}
});