Adds more window title options (#169)
* Adds options for windowtitle to toggle: custom title, icon and truncation * Implements window title toggles: showIcon and showCustomTitle; Adds a new default title function and truncates it if specified * incorporate new show label option into window title * fix window title spacing to work with new styles * allows truncation for custom window titles * allows custom window title icon with default window title * add option to show the window class name or title; refactor for consistency and easier readability * remove redundant custom window title check
This commit is contained in:
@@ -220,22 +220,50 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
*/
|
||||
Header("Window Titles"),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.label,
|
||||
title: "Show Window Title Label",
|
||||
type: "boolean",
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.windowtitle.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
opt: options.bar.windowtitle.custom_title,
|
||||
title: 'Use Custom Title',
|
||||
type: 'boolean'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.title_map,
|
||||
title: "Window Title Mappings",
|
||||
subtitle: "Wiki Link: https://hyprpanel.com/configuration/panel.html#window-title-mappings",
|
||||
type: "object",
|
||||
subtitleLink: "https://hyprpanel.com/configuration/panel.html#window-title-mappings",
|
||||
title: 'Window Title Mappings',
|
||||
subtitle: 'Only applicable if Show Custom Title is enabled\nWiki Link: https://hyprpanel.com/configuration/panel.html#window-title-mappings',
|
||||
type: 'object',
|
||||
subtitleLink: 'https://hyprpanel.com/configuration/panel.html#window-title-mappings'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.class_name,
|
||||
title: 'Use Class Name',
|
||||
subtitle: 'Only applicable if Show Custom Title is disabled\nDisplays the window\'s class name instead of its title.',
|
||||
type: 'boolean'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.label,
|
||||
title: 'Show Window Title Label',
|
||||
type: 'boolean'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.icon,
|
||||
title: 'Show Icon',
|
||||
type: 'boolean'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.truncation,
|
||||
title: 'Truncate Window Title',
|
||||
subtitle: 'Will truncate the window title to the specified size below.',
|
||||
type: 'boolean'
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.truncation_size,
|
||||
title: 'Truncation Size',
|
||||
type: 'number',
|
||||
min: 10
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.windowtitle.spacing,
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string'
|
||||
}),
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user