Implemented strict linting standards and prettier formatting config. (#248)
* Implemented strict linting standards and prettier formatting config. * More linter fixes and type updates. * More linter updates and type fixes * Remove noisy comments * Linter and type updates * Linter, formatting and type updates. * Linter updates * Type updates * Type updates * fixed all linter errors * Fixed all linting, formatting and type issues. * Resolve merge conflicts.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import Scrollable from "types/widgets/scrollable";
|
||||
import Gtk from "types/@girs/gtk-3.0/gtk-3.0";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import Gtk from 'types/@girs/gtk-3.0/gtk-3.0';
|
||||
|
||||
export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
return Widget.Scrollable({
|
||||
vscroll: "always",
|
||||
hscroll: "automatic",
|
||||
class_name: "menu-theme-page paged-container",
|
||||
vscroll: 'always',
|
||||
hscroll: 'automatic',
|
||||
class_name: 'menu-theme-page paged-container',
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
children: [
|
||||
@@ -18,16 +18,16 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* LAYOUTS *
|
||||
******************************
|
||||
*/
|
||||
Header("Layouts"),
|
||||
Header('Layouts'),
|
||||
Option(
|
||||
{
|
||||
opt: options.bar.layouts,
|
||||
title: "Bar Layouts for Monitors",
|
||||
subtitle: "Wiki Link: https://hyprpanel.com/configuration/panel.html#layouts",
|
||||
type: "object",
|
||||
subtitleLink: "https://hyprpanel.com/configuration/panel.html#layouts",
|
||||
title: 'Bar Layouts for Monitors',
|
||||
subtitle: 'Wiki Link: https://hyprpanel.com/configuration/panel.html#layouts',
|
||||
type: 'object',
|
||||
subtitleLink: 'https://hyprpanel.com/configuration/panel.html#layouts',
|
||||
},
|
||||
"bar-layout-input"
|
||||
'bar-layout-input',
|
||||
),
|
||||
|
||||
/*
|
||||
@@ -35,75 +35,75 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* SPACING *
|
||||
******************************
|
||||
*/
|
||||
Header("Spacing"),
|
||||
Header('Spacing'),
|
||||
Option({
|
||||
opt: options.theme.bar.outer_spacing,
|
||||
title: "Outer Spacing",
|
||||
subtitle: "Spacing on the outer left and right edges of the bar.",
|
||||
type: "string",
|
||||
title: 'Outer Spacing',
|
||||
subtitle: 'Spacing on the outer left and right edges of the bar.',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.y_margins,
|
||||
title: "Vertical Margins",
|
||||
subtitle: "Spacing above/below the buttons in the bar.",
|
||||
type: "string",
|
||||
title: 'Vertical Margins',
|
||||
subtitle: 'Spacing above/below the buttons in the bar.',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.spacing,
|
||||
title: "Button Spacing",
|
||||
subtitle: "Spacing between the buttons in the bar.",
|
||||
type: "string",
|
||||
title: 'Button Spacing',
|
||||
subtitle: 'Spacing between the buttons in the bar.',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.padding_x,
|
||||
title: "Button Horizontal Padding",
|
||||
type: "string",
|
||||
title: 'Button Horizontal Padding',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.padding_y,
|
||||
title: "Button Vertical Padding",
|
||||
type: "string",
|
||||
title: 'Button Vertical Padding',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.radius,
|
||||
title: "Button Radius",
|
||||
type: "string",
|
||||
title: 'Button Radius',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.floating,
|
||||
title: "Floating Bar",
|
||||
type: "boolean",
|
||||
title: 'Floating Bar',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.layer,
|
||||
title: "Layer",
|
||||
type: "enum",
|
||||
subtitle: "Layer determines the Z index of your bar.",
|
||||
enums: ["top", "bottom", "overlay", "background"],
|
||||
title: 'Layer',
|
||||
type: 'enum',
|
||||
subtitle: 'Layer determines the Z index of your bar.',
|
||||
enums: ['top', 'bottom', 'overlay', 'background'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.margin_top,
|
||||
title: "Margin Top",
|
||||
subtitle: "Only applies if floating is enabled",
|
||||
type: "string",
|
||||
title: 'Margin Top',
|
||||
subtitle: 'Only applies if floating is enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.margin_bottom,
|
||||
title: "Margin Bottom",
|
||||
subtitle: "Only applies if floating is enabled",
|
||||
type: "string",
|
||||
title: 'Margin Bottom',
|
||||
subtitle: 'Only applies if floating is enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.margin_sides,
|
||||
title: "Margin Sides",
|
||||
subtitle: "Only applies if floating is enabled",
|
||||
type: "string",
|
||||
title: 'Margin Sides',
|
||||
subtitle: 'Only applies if floating is enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.border_radius,
|
||||
title: "Border Radius",
|
||||
subtitle: "Only applies if floating is enabled",
|
||||
type: "string",
|
||||
title: 'Border Radius',
|
||||
subtitle: 'Only applies if floating is enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -111,11 +111,11 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* DASHBOARD *
|
||||
******************************
|
||||
*/
|
||||
Header("Dashboard"),
|
||||
Header('Dashboard'),
|
||||
Option({
|
||||
opt: options.bar.launcher.icon,
|
||||
title: "Dashboard Menu Icon",
|
||||
type: "string",
|
||||
title: 'Dashboard Menu Icon',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -123,94 +123,95 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* WORKSPACES *
|
||||
******************************
|
||||
*/
|
||||
Header("Workspaces"),
|
||||
Header('Workspaces'),
|
||||
Option({
|
||||
opt: options.bar.workspaces.show_icons,
|
||||
title: "Show Workspace Icons",
|
||||
type: "boolean",
|
||||
title: 'Show Workspace Icons',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.icons.available,
|
||||
title: "Workspace Available",
|
||||
type: "string",
|
||||
title: 'Workspace Available',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.icons.active,
|
||||
title: "Workspace Active",
|
||||
type: "string",
|
||||
title: 'Workspace Active',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.icons.occupied,
|
||||
title: "Workspace Occupied",
|
||||
type: "string",
|
||||
title: 'Workspace Occupied',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.show_numbered,
|
||||
title: "Show Workspace Numbers",
|
||||
type: "boolean",
|
||||
title: 'Show Workspace Numbers',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.numbered_active_indicator,
|
||||
title: "Numbered Workspace Identifier",
|
||||
subtitle: "Only applicable if Workspace Numbers are enabled",
|
||||
type: "enum",
|
||||
enums: ["underline", "highlight", "color"],
|
||||
title: 'Numbered Workspace Identifier',
|
||||
subtitle: 'Only applicable if Workspace Numbers are enabled',
|
||||
type: 'enum',
|
||||
enums: ['underline', 'highlight', 'color'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.workspaces.numbered_active_highlight_border,
|
||||
title: "Highlight Radius",
|
||||
subtitle: "Only applicable if Workspace Numbers are enabled",
|
||||
type: "string",
|
||||
title: 'Highlight Radius',
|
||||
subtitle: 'Only applicable if Workspace Numbers are enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.workspaces.numbered_active_highlight_padding,
|
||||
title: "Highlight Padding",
|
||||
subtitle: "Only applicable if Workspace Numbers are enabled",
|
||||
type: "string",
|
||||
title: 'Highlight Padding',
|
||||
subtitle: 'Only applicable if Workspace Numbers are enabled',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.spacing,
|
||||
title: "Spacing",
|
||||
subtitle: "Spacing between workspace icons",
|
||||
type: "float",
|
||||
title: 'Spacing',
|
||||
subtitle: 'Spacing between workspace icons',
|
||||
type: 'float',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.workspaces,
|
||||
title: "Total Workspaces",
|
||||
subtitle: "The least amount of workspaces to always show.",
|
||||
type: "number",
|
||||
title: 'Total Workspaces',
|
||||
subtitle: 'The least amount of workspaces to always show.',
|
||||
type: 'number',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.monitorSpecific,
|
||||
title: "Monitor Specific",
|
||||
title: 'Monitor Specific',
|
||||
subtitle:
|
||||
"Only workspaces applicable to the monitor will be displayed.\n" +
|
||||
'Only workspaces applicable to the monitor will be displayed.\n' +
|
||||
"Works in conjuction with 'Total Workspaces'.",
|
||||
type: "boolean",
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.hideUnoccupied,
|
||||
title: "Hide Unoccupied",
|
||||
subtitle: "Only show workspaces that are occupied or active",
|
||||
type: "boolean",
|
||||
title: 'Hide Unoccupied',
|
||||
subtitle: 'Only show workspaces that are occupied or active',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.workspaceMask,
|
||||
title: "Mask Workspace Numbers On Monitors",
|
||||
subtitle: "Only applicable if Workspace Numbers and Monitor Specific are enabled.\n" +
|
||||
title: 'Mask Workspace Numbers On Monitors',
|
||||
subtitle:
|
||||
'Only applicable if Workspace Numbers and Monitor Specific are enabled.\n' +
|
||||
"Forces each Monitor's Workspace labels to start from 1.",
|
||||
type: "boolean",
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.reverse_scroll,
|
||||
title: "Invert Scroll",
|
||||
subtitle: "Scrolling up will go to the previous workspace rather than the next.",
|
||||
type: "boolean",
|
||||
title: 'Invert Scroll',
|
||||
subtitle: 'Scrolling up will go to the previous workspace rather than the next.',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.workspaces.scroll_speed,
|
||||
title: "Scrolling Speed",
|
||||
type: "number",
|
||||
title: 'Scrolling Speed',
|
||||
type: 'number',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -218,52 +219,54 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* WINDOW TITLES *
|
||||
******************************
|
||||
*/
|
||||
Header("Window Titles"),
|
||||
Header('Window Titles'),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.custom_title,
|
||||
title: 'Use Custom Title',
|
||||
type: 'boolean'
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.title_map,
|
||||
title: 'Window Title Mappings',
|
||||
subtitle: 'Only applicable if Show Custom Title is enabled\nWiki Link: https://hyprpanel.com/configuration/panel.html#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'
|
||||
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'
|
||||
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'
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.icon,
|
||||
title: 'Show Icon',
|
||||
type: 'boolean'
|
||||
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'
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.windowtitle.truncation_size,
|
||||
title: 'Truncation Size',
|
||||
type: 'number',
|
||||
min: 10
|
||||
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'
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -271,17 +274,17 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* VOLUME *
|
||||
******************************
|
||||
*/
|
||||
Header("Volume"),
|
||||
Header('Volume'),
|
||||
Option({
|
||||
opt: options.bar.volume.label,
|
||||
title: "Show Volume Percentage",
|
||||
type: "boolean",
|
||||
title: 'Show Volume Percentage',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.volume.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -289,28 +292,28 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* NETWORK *
|
||||
******************************
|
||||
*/
|
||||
Header("Network"),
|
||||
Header('Network'),
|
||||
Option({
|
||||
opt: options.bar.network.label,
|
||||
title: "Show Network Name",
|
||||
type: "boolean",
|
||||
title: 'Show Network Name',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.network.truncation,
|
||||
title: "Truncate Network Name",
|
||||
subtitle: "Will truncate the network name to the specified size below.",
|
||||
type: "boolean",
|
||||
title: 'Truncate Network Name',
|
||||
subtitle: 'Will truncate the network name to the specified size below.',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.network.truncation_size,
|
||||
title: "Truncation Size",
|
||||
type: "number",
|
||||
title: 'Truncation Size',
|
||||
type: 'number',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.network.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -318,17 +321,17 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* BLUETOOTH *
|
||||
******************************
|
||||
*/
|
||||
Header("Bluetooth"),
|
||||
Header('Bluetooth'),
|
||||
Option({
|
||||
opt: options.bar.bluetooth.label,
|
||||
title: "Show Bluetooth Label",
|
||||
type: "boolean",
|
||||
title: 'Show Bluetooth Label',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.bluetooth.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -336,17 +339,17 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* BATTERY *
|
||||
******************************
|
||||
*/
|
||||
Header("Battery"),
|
||||
Header('Battery'),
|
||||
Option({
|
||||
opt: options.bar.battery.label,
|
||||
title: "Show Battery Percentage",
|
||||
type: "boolean",
|
||||
title: 'Show Battery Percentage',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.battery.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -354,15 +357,15 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* SYSTEM TRAY *
|
||||
******************************
|
||||
*/
|
||||
Header("System Tray"),
|
||||
Header('System Tray'),
|
||||
Option({
|
||||
opt: options.bar.systray.ignore,
|
||||
title: "Ignore List",
|
||||
title: 'Ignore List',
|
||||
subtitle:
|
||||
"An array of applications to prevent from showing in the system tray.\n" +
|
||||
"Wiki: https://hyprpanel.com/configuration/panel.html#system-tray",
|
||||
subtitleLink: "https://hyprpanel.com/configuration/panel.html#system-tray",
|
||||
type: "object",
|
||||
'An array of applications to prevent from showing in the system tray.\n' +
|
||||
'Wiki: https://hyprpanel.com/configuration/panel.html#system-tray',
|
||||
subtitleLink: 'https://hyprpanel.com/configuration/panel.html#system-tray',
|
||||
type: 'object',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -370,32 +373,32 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* CLOCK *
|
||||
******************************
|
||||
*/
|
||||
Header("Clock"),
|
||||
Header('Clock'),
|
||||
Option({
|
||||
opt: options.bar.clock.format,
|
||||
title: "Clock Format",
|
||||
type: "string",
|
||||
title: 'Clock Format',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.clock.icon,
|
||||
title: "Icon",
|
||||
type: "string",
|
||||
title: 'Icon',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.clock.showIcon,
|
||||
title: "Show Icon",
|
||||
type: "boolean",
|
||||
title: 'Show Icon',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.clock.showTime,
|
||||
title: "Show Time",
|
||||
type: "boolean",
|
||||
title: 'Show Time',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.clock.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -403,41 +406,41 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* MEDIA *
|
||||
******************************
|
||||
*/
|
||||
Header("Media"),
|
||||
Header('Media'),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.media.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.media.show_artist,
|
||||
title: "Show Track Artist",
|
||||
type: "boolean",
|
||||
title: 'Show Track Artist',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.media.show_label,
|
||||
title: "Toggle Media Label",
|
||||
type: "boolean",
|
||||
title: 'Toggle Media Label',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.media.truncation,
|
||||
title: "Truncate Media Label",
|
||||
subtitle: "Only applicable if Toggle Media Label is enabled",
|
||||
type: "boolean",
|
||||
title: 'Truncate Media Label',
|
||||
subtitle: 'Only applicable if Toggle Media Label is enabled',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.media.truncation_size,
|
||||
title: "Truncation Size",
|
||||
subtitle: "Only applicable if Toggle Media Label is enabled",
|
||||
type: "number",
|
||||
title: 'Truncation Size',
|
||||
subtitle: 'Only applicable if Toggle Media Label is enabled',
|
||||
type: 'number',
|
||||
min: 10,
|
||||
}),
|
||||
Option({
|
||||
opt: options.bar.media.show_active_only,
|
||||
title: "Auto Hide",
|
||||
subtitle: "Button will automatically hide if no media is detected.",
|
||||
type: "boolean",
|
||||
title: 'Auto Hide',
|
||||
subtitle: 'Button will automatically hide if no media is detected.',
|
||||
type: 'boolean',
|
||||
}),
|
||||
|
||||
/*
|
||||
@@ -445,17 +448,17 @@ export const BarSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
* NOTIFICATIONS *
|
||||
******************************
|
||||
*/
|
||||
Header("Notifications"),
|
||||
Header('Notifications'),
|
||||
Option({
|
||||
opt: options.bar.notifications.show_total,
|
||||
title: "Show Total # of notifications",
|
||||
type: "boolean",
|
||||
title: 'Show Total # of notifications',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.buttons.notifications.spacing,
|
||||
title: "Inner Spacing",
|
||||
subtitle: "Spacing between the icon and the label inside the buttons.",
|
||||
type: "string",
|
||||
title: 'Inner Spacing',
|
||||
subtitle: 'Spacing between the icon and the label inside the buttons.',
|
||||
type: 'string',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
|
||||
export const BarGeneral = () => {
|
||||
export const BarGeneral = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
vscroll: "automatic",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vscroll: 'automatic',
|
||||
child: Widget.Box({
|
||||
vertical: true,
|
||||
children: [
|
||||
Header('General Settings'),
|
||||
Option({ opt: options.theme.font.name, title: 'Font', type: 'font' }),
|
||||
Option({ opt: options.theme.font.size, title: 'Font Size', type: 'string' }),
|
||||
Option({ opt: options.theme.font.weight, title: 'Font Weight', subtitle: "100, 200, 300, etc.", type: 'number', increment: 100, min: 100, max: 900 }),
|
||||
Option({
|
||||
opt: options.theme.font.weight,
|
||||
title: 'Font Weight',
|
||||
subtitle: '100, 200, 300, etc.',
|
||||
type: 'number',
|
||||
increment: 100,
|
||||
min: 100,
|
||||
max: 900,
|
||||
}),
|
||||
Option({
|
||||
opt: options.dummy,
|
||||
title: 'Config',
|
||||
@@ -21,34 +31,130 @@ export const BarGeneral = () => {
|
||||
type: 'config_import',
|
||||
exportData: {
|
||||
filePath: OPTIONS,
|
||||
themeOnly: false
|
||||
}
|
||||
themeOnly: false,
|
||||
},
|
||||
}),
|
||||
Option({
|
||||
opt: options.terminal,
|
||||
title: 'Terminal',
|
||||
subtitle: "Tools such as 'btop' will open in this terminal",
|
||||
type: 'string',
|
||||
}),
|
||||
Option({ opt: options.terminal, title: 'Terminal', subtitle: "Tools such as 'btop' will open in this terminal", type: 'string' }),
|
||||
Option({
|
||||
opt: options.tear,
|
||||
title: 'Tearing Compatible',
|
||||
subtitle:
|
||||
"Makes HyprPanel compatible with Hyprland tearing.\n" +
|
||||
"Enabling this will change all overlays (Notifications, OSDs, Bar) to the \'top\' layer instead the \'overlay\' layer.",
|
||||
type: 'boolean'
|
||||
'Makes HyprPanel compatible with Hyprland tearing.\n' +
|
||||
"Enabling this will change all overlays (Notifications, OSDs, Bar) to the 'top' layer instead the 'overlay' layer.",
|
||||
type: 'boolean',
|
||||
}),
|
||||
|
||||
Header('Scaling'),
|
||||
Option({ opt: options.theme.bar.scaling, title: 'Bar', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.notification.scaling, title: 'Notifications', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.osd.scaling, title: 'OSD', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.dashboard.scaling, title: 'Dashboard Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.dashboard.confirmation_scaling, title: 'Confirmation Dialog', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.media.scaling, title: 'Media Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.volume.scaling, title: 'Volume Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.network.scaling, title: 'Network Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.bluetooth.scaling, title: 'Bluetooth Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.battery.scaling, title: 'Battery Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.clock.scaling, title: 'Clock Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.notifications.scaling, title: 'Notifications Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
Option({ opt: options.theme.bar.menus.menu.power.scaling, title: 'Power Menu', type: 'number', min: 1, max: 100, increment: 5 }),
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
Option({
|
||||
opt: options.theme.bar.scaling,
|
||||
title: 'Bar',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.notification.scaling,
|
||||
title: 'Notifications',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.scaling,
|
||||
title: 'OSD',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.dashboard.scaling,
|
||||
title: 'Dashboard Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.dashboard.confirmation_scaling,
|
||||
title: 'Confirmation Dialog',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.media.scaling,
|
||||
title: 'Media Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.volume.scaling,
|
||||
title: 'Volume Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.network.scaling,
|
||||
title: 'Network Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.bluetooth.scaling,
|
||||
title: 'Bluetooth Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.battery.scaling,
|
||||
title: 'Battery Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.clock.scaling,
|
||||
title: 'Clock Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.notifications.scaling,
|
||||
title: 'Notifications Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.power.scaling,
|
||||
title: 'Power Menu',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
max: 100,
|
||||
increment: 5,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,68 +1,70 @@
|
||||
import { BarGeneral } from "./general/index";
|
||||
import { BarSettings } from "./bar/index";
|
||||
import { ClockMenuSettings } from "./menus/clock";
|
||||
import { DashboardMenuSettings } from "./menus/dashboard";
|
||||
import { NotificationSettings } from "./notifications/index";
|
||||
import { OSDSettings } from "./osd/index";
|
||||
import { CustomModuleSettings } from "customModules/config";
|
||||
import { PowerMenuSettings } from "./menus/power";
|
||||
import { BarGeneral } from './general/index';
|
||||
import { BarSettings } from './bar/index';
|
||||
import { ClockMenuSettings } from './menus/clock';
|
||||
import { DashboardMenuSettings } from './menus/dashboard';
|
||||
import { NotificationSettings } from './notifications/index';
|
||||
import { OSDSettings } from './osd/index';
|
||||
import { CustomModuleSettings } from 'customModules/config';
|
||||
import { PowerMenuSettings } from './menus/power';
|
||||
import { GBox } from 'lib/types/widget';
|
||||
|
||||
type Page = "General"
|
||||
| "Bar"
|
||||
| "Clock Menu"
|
||||
| "Dashboard Menu"
|
||||
| "Power Menu"
|
||||
| "Notifications"
|
||||
| "OSD"
|
||||
| "Custom Modules";
|
||||
type Page =
|
||||
| 'General'
|
||||
| 'Bar'
|
||||
| 'Clock Menu'
|
||||
| 'Dashboard Menu'
|
||||
| 'Power Menu'
|
||||
| 'Notifications'
|
||||
| 'OSD'
|
||||
| 'Custom Modules';
|
||||
|
||||
const CurrentPage = Variable<Page>("General");
|
||||
const CurrentPage = Variable<Page>('General');
|
||||
|
||||
const pagerMap: Page[] = [
|
||||
"General",
|
||||
"Bar",
|
||||
"Notifications",
|
||||
"OSD",
|
||||
"Power Menu",
|
||||
"Clock Menu",
|
||||
"Dashboard Menu",
|
||||
"Custom Modules",
|
||||
]
|
||||
'General',
|
||||
'Bar',
|
||||
'Notifications',
|
||||
'OSD',
|
||||
'Power Menu',
|
||||
'Clock Menu',
|
||||
'Dashboard Menu',
|
||||
'Custom Modules',
|
||||
];
|
||||
|
||||
export const SettingsMenu = () => {
|
||||
export const SettingsMenu = (): GBox => {
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
children: CurrentPage.bind("value").as(v => {
|
||||
children: CurrentPage.bind('value').as((v) => {
|
||||
return [
|
||||
Widget.Box({
|
||||
class_name: "option-pages-container",
|
||||
hpack: "center",
|
||||
class_name: 'option-pages-container',
|
||||
hpack: 'center',
|
||||
hexpand: true,
|
||||
children: pagerMap.map((page) => {
|
||||
return Widget.Button({
|
||||
hpack: "center",
|
||||
hpack: 'center',
|
||||
class_name: `pager-button ${v === page ? 'active' : ''}`,
|
||||
label: page,
|
||||
on_primary_click: () => CurrentPage.value = page
|
||||
})
|
||||
})
|
||||
on_primary_click: () => (CurrentPage.value = page),
|
||||
});
|
||||
}),
|
||||
}),
|
||||
Widget.Stack({
|
||||
vexpand: true,
|
||||
class_name: "themes-menu-stack",
|
||||
class_name: 'themes-menu-stack',
|
||||
children: {
|
||||
"General": BarGeneral(),
|
||||
"Bar": BarSettings(),
|
||||
"Notifications": NotificationSettings(),
|
||||
"OSD": OSDSettings(),
|
||||
"Clock Menu": ClockMenuSettings(),
|
||||
"Dashboard Menu": DashboardMenuSettings(),
|
||||
"Custom Modules": CustomModuleSettings(),
|
||||
"Power Menu": PowerMenuSettings(),
|
||||
General: BarGeneral(),
|
||||
Bar: BarSettings(),
|
||||
Notifications: NotificationSettings(),
|
||||
OSD: OSDSettings(),
|
||||
'Clock Menu': ClockMenuSettings(),
|
||||
'Dashboard Menu': DashboardMenuSettings(),
|
||||
'Custom Modules': CustomModuleSettings(),
|
||||
'Power Menu': PowerMenuSettings(),
|
||||
},
|
||||
shown: CurrentPage.bind("value")
|
||||
})
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
shown: CurrentPage.bind('value'),
|
||||
}),
|
||||
];
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,24 +1,46 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
|
||||
export const ClockMenuSettings = () => {
|
||||
export const ClockMenuSettings = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
vscroll: "automatic",
|
||||
vscroll: 'automatic',
|
||||
child: Widget.Box({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vertical: true,
|
||||
children: [
|
||||
Header('Time'),
|
||||
Option({ opt: options.menus.clock.time.military, title: 'Use 24hr time', type: 'boolean' }),
|
||||
|
||||
Header('Weather'),
|
||||
Option({ opt: options.menus.clock.weather.location, title: 'Location', subtitle: 'Zip Code, Postal Code, City, etc.', type: 'string' }),
|
||||
Option({ opt: options.menus.clock.weather.key, title: 'Weather API Key', subtitle: 'May require AGS restart. https://weatherapi.com/', type: 'string' }),
|
||||
Option({ opt: options.menus.clock.weather.unit, title: 'Units', type: 'enum', enums: ['imperial', 'metric'] }),
|
||||
Option({ opt: options.menus.clock.weather.interval, title: 'Weather Fetching Interval (ms)', subtitle: 'May require AGS restart.', type: 'number' }),
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
Option({
|
||||
opt: options.menus.clock.weather.location,
|
||||
title: 'Location',
|
||||
subtitle: 'Zip Code, Postal Code, City, etc.',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.clock.weather.key,
|
||||
title: 'Weather API Key',
|
||||
subtitle: 'May require AGS restart. https://weatherapi.com/',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.clock.weather.unit,
|
||||
title: 'Units',
|
||||
type: 'enum',
|
||||
enums: ['imperial', 'metric'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.clock.weather.interval,
|
||||
title: 'Weather Fetching Interval (ms)',
|
||||
subtitle: 'May require AGS restart.',
|
||||
type: 'number',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
|
||||
export const DashboardMenuSettings = () => {
|
||||
export const DashboardMenuSettings = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
vscroll: "always",
|
||||
hscroll: "automatic",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vscroll: 'always',
|
||||
hscroll: 'automatic',
|
||||
vexpand: true,
|
||||
overlayScrolling: true,
|
||||
child: Widget.Box({
|
||||
@@ -15,53 +17,195 @@ export const DashboardMenuSettings = () => {
|
||||
children: [
|
||||
Header('Power Menu'),
|
||||
Option({ opt: options.menus.dashboard.powermenu.avatar.image, title: 'Profile Image', type: 'img' }),
|
||||
Option({ opt: options.menus.dashboard.powermenu.avatar.name, title: 'Profile Name', subtitle: 'Use \'system\' to automatically set system name', type: 'string' }),
|
||||
Option({ opt: options.theme.bar.menus.menu.dashboard.profile.size, title: 'Profile Image Size', type: 'string' }),
|
||||
Option({ opt: options.theme.bar.menus.menu.dashboard.profile.radius, title: 'Profile Image Radius', type: 'string' }),
|
||||
Option({
|
||||
opt: options.menus.dashboard.powermenu.avatar.name,
|
||||
title: 'Profile Name',
|
||||
subtitle: "Use 'system' to automatically set system name",
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.dashboard.profile.size,
|
||||
title: 'Profile Image Size',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.dashboard.profile.radius,
|
||||
title: 'Profile Image Radius',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
Option({ opt: options.menus.dashboard.powermenu.confirmation, title: 'Show Confirmation Dialogue', type: 'boolean' }),
|
||||
Option({
|
||||
opt: options.menus.dashboard.powermenu.confirmation,
|
||||
title: 'Show Confirmation Dialogue',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({ opt: options.menus.dashboard.powermenu.shutdown, title: 'Shutdown Command', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.powermenu.reboot, title: 'Reboot Command', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.powermenu.logout, title: 'Logout Command', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.powermenu.sleep, title: 'Sleep Command', type: 'string' }),
|
||||
|
||||
Header('Resource Usage Metrics'),
|
||||
Option({ opt: options.menus.dashboard.stats.enable_gpu, title: 'Track GPU', subtitle: 'NOTE: This is currently only available for NVidia GPUs and requires \'python-gpustat\'.', type: 'boolean' }),
|
||||
Option({
|
||||
opt: options.menus.dashboard.stats.enable_gpu,
|
||||
title: 'Track GPU',
|
||||
subtitle: "NOTE: This is currently only available for NVidia GPUs and requires 'python-gpustat'.",
|
||||
type: 'boolean',
|
||||
}),
|
||||
|
||||
Header('Shortcuts'),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut1.icon, title: 'Left - Shortcut 1 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut1.command, title: 'Left - Shortcut 1 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut1.tooltip, title: 'Left - Shortcut 1 (Tooltip)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut2.icon, title: 'Left - Shortcut 2 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut2.command, title: 'Left - Shortcut 2 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut2.tooltip, title: 'Left - Shortcut 2 (Tooltip)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut3.icon, title: 'Left - Shortcut 3 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut3.command, title: 'Left - Shortcut 3 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut3.tooltip, title: 'Left - Shortcut 3 (Tooltip)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut4.icon, title: 'Left - Shortcut 4 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut4.command, title: 'Left - Shortcut 4 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.left.shortcut4.tooltip, title: 'Left - Shortcut 4 (Tooltip)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut1.icon, title: 'Right - Shortcut 1 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut1.command, title: 'Right - Shortcut 1 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut1.tooltip, title: 'Right - Shortcut 1 (Tooltip)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut3.icon, title: 'Right - Shortcut 3 (Icon)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut3.command, title: 'Right - Shortcut 3 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.shortcuts.right.shortcut3.tooltip, title: 'Right - Shortcut 3 (Tooltip)', type: 'string' }),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut1.icon,
|
||||
title: 'Left - Shortcut 1 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut1.command,
|
||||
title: 'Left - Shortcut 1 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut1.tooltip,
|
||||
title: 'Left - Shortcut 1 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut2.icon,
|
||||
title: 'Left - Shortcut 2 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut2.command,
|
||||
title: 'Left - Shortcut 2 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut2.tooltip,
|
||||
title: 'Left - Shortcut 2 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut3.icon,
|
||||
title: 'Left - Shortcut 3 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut3.command,
|
||||
title: 'Left - Shortcut 3 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut3.tooltip,
|
||||
title: 'Left - Shortcut 3 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut4.icon,
|
||||
title: 'Left - Shortcut 4 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut4.command,
|
||||
title: 'Left - Shortcut 4 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.left.shortcut4.tooltip,
|
||||
title: 'Left - Shortcut 4 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut1.icon,
|
||||
title: 'Right - Shortcut 1 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut1.command,
|
||||
title: 'Right - Shortcut 1 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut1.tooltip,
|
||||
title: 'Right - Shortcut 1 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut3.icon,
|
||||
title: 'Right - Shortcut 3 (Icon)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut3.command,
|
||||
title: 'Right - Shortcut 3 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.shortcuts.right.shortcut3.tooltip,
|
||||
title: 'Right - Shortcut 3 (Tooltip)',
|
||||
type: 'string',
|
||||
}),
|
||||
|
||||
Header('Directories'),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory1.label, title: 'Left - Directory 1 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory1.command, title: 'Left - Directory 1 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory2.label, title: 'Left - Directory 2 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory2.command, title: 'Left - Directory 2 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory3.label, title: 'Left - Directory 3 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.left.directory3.command, title: 'Left - Directory 3 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory1.label, title: 'Right - Directory 1 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory1.command, title: 'Right - Directory 1 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory2.label, title: 'Right - Directory 2 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory2.command, title: 'Right - Directory 2 (Command)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory3.label, title: 'Right - Directory 3 (Label)', type: 'string' }),
|
||||
Option({ opt: options.menus.dashboard.directories.right.directory3.command, title: 'Right - Directory 3 (Command)', type: 'string' }),
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory1.label,
|
||||
title: 'Left - Directory 1 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory1.command,
|
||||
title: 'Left - Directory 1 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory2.label,
|
||||
title: 'Left - Directory 2 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory2.command,
|
||||
title: 'Left - Directory 2 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory3.label,
|
||||
title: 'Left - Directory 3 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.left.directory3.command,
|
||||
title: 'Left - Directory 3 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory1.label,
|
||||
title: 'Right - Directory 1 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory1.command,
|
||||
title: 'Right - Directory 1 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory2.label,
|
||||
title: 'Right - Directory 2 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory2.command,
|
||||
title: 'Right - Directory 2 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory3.label,
|
||||
title: 'Right - Directory 3 (Label)',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.menus.dashboard.directories.right.directory3.command,
|
||||
title: 'Right - Directory 3 (Command)',
|
||||
type: 'string',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import options from 'options';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
|
||||
export const PowerMenuSettings = () => {
|
||||
export const PowerMenuSettings = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
vscroll: "always",
|
||||
hscroll: "automatic",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vscroll: 'always',
|
||||
hscroll: 'automatic',
|
||||
vexpand: true,
|
||||
overlayScrolling: true,
|
||||
child: Widget.Box({
|
||||
@@ -20,7 +22,7 @@ export const PowerMenuSettings = () => {
|
||||
Option({ opt: options.menus.power.reboot, title: 'Reboot Command', type: 'string' }),
|
||||
Option({ opt: options.menus.power.logout, title: 'Logout Command', type: 'string' }),
|
||||
Option({ opt: options.menus.power.sleep, title: 'Sleep Command', type: 'string' }),
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import Scrollable from "types/widgets/scrollable";
|
||||
import Gtk from "types/@girs/gtk-3.0/gtk-3.0";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
|
||||
export const NotificationSettings = (): Scrollable<Gtk.Widget, Gtk.Widget> => {
|
||||
export const NotificationSettings = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
vscroll: "automatic",
|
||||
vscroll: 'automatic',
|
||||
child: Widget.Box({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vertical: true,
|
||||
children: [
|
||||
Header("Notification Settings"),
|
||||
Header('Notification Settings'),
|
||||
Option({
|
||||
opt: options.notifications.ignore,
|
||||
title: "Ignored Applications",
|
||||
subtitle: "Applications to ignore.\n" +
|
||||
"Wiki: https://hyprpanel.com/configuration/notifications.html#ignored-applications",
|
||||
subtitleLink: "https://hyprpanel.com/configuration/notifications.html#ignored-applications",
|
||||
type: "object",
|
||||
enums: ["top left", "top", "top right", "right", "bottom right", "bottom", "bottom left", "left"],
|
||||
title: 'Ignored Applications',
|
||||
subtitle:
|
||||
'Applications to ignore.\n' +
|
||||
'Wiki: https://hyprpanel.com/configuration/notifications.html#ignored-applications',
|
||||
subtitleLink: 'https://hyprpanel.com/configuration/notifications.html#ignored-applications',
|
||||
type: 'object',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.position,
|
||||
title: "Notification Location",
|
||||
type: "enum",
|
||||
enums: ["top left", "top", "top right", "right", "bottom right", "bottom", "bottom left", "left"],
|
||||
title: 'Notification Location',
|
||||
type: 'enum',
|
||||
enums: ['top left', 'top', 'top right', 'right', 'bottom right', 'bottom', 'bottom left', 'left'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.notification.border_radius,
|
||||
title: "Border Radius",
|
||||
type: "string",
|
||||
title: 'Border Radius',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.monitor,
|
||||
title: "Monitor",
|
||||
subtitle: "The ID of the monitor on which to display the notification",
|
||||
type: "number",
|
||||
title: 'Monitor',
|
||||
subtitle: 'The ID of the monitor on which to display the notification',
|
||||
type: 'number',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.active_monitor,
|
||||
title: "Follow Cursor",
|
||||
subtitle: "The notification will follow the monitor of your cursor",
|
||||
type: "boolean",
|
||||
title: 'Follow Cursor',
|
||||
subtitle: 'The notification will follow the monitor of your cursor',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.timeout,
|
||||
title: "Notification Timeout",
|
||||
subtitle: "How long notification popups will last (in milliseconds).",
|
||||
type: "number",
|
||||
title: 'Notification Timeout',
|
||||
subtitle: 'How long notification popups will last (in milliseconds).',
|
||||
type: 'number',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.cache_actions,
|
||||
title: "Preserve Actions",
|
||||
subtitle: "This will persist the action buttons of a notification after rebooting.",
|
||||
type: "boolean",
|
||||
title: 'Preserve Actions',
|
||||
subtitle: 'This will persist the action buttons of a notification after rebooting.',
|
||||
type: 'boolean',
|
||||
}),
|
||||
|
||||
Header("Notification Menu Settings"),
|
||||
Header('Notification Menu Settings'),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.notifications.height,
|
||||
title: "Notification Menu Height",
|
||||
type: "string",
|
||||
title: 'Notification Menu Height',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.notifications.displayedTotal,
|
||||
title: "Displayed Total",
|
||||
subtitle: "How many notifications to show in the menu at once.\n" +
|
||||
"Newer notifications will display towards the top.",
|
||||
type: "number",
|
||||
title: 'Displayed Total',
|
||||
subtitle:
|
||||
'How many notifications to show in the menu at once.\n' +
|
||||
'Newer notifications will display towards the top.',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.notifications.pager.show,
|
||||
title: "Show Pager",
|
||||
subtitle: "Shows the pagination footer at the bottom of the menu.",
|
||||
type: "boolean",
|
||||
title: 'Show Pager',
|
||||
subtitle: 'Shows the pagination footer at the bottom of the menu.',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.notifications.scrollbar.width,
|
||||
title: "Scrollbar Width",
|
||||
type: "string",
|
||||
title: 'Scrollbar Width',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.bar.menus.menu.notifications.scrollbar.radius,
|
||||
title: "Scrollbar Radius",
|
||||
type: "string",
|
||||
title: 'Scrollbar Radius',
|
||||
type: 'string',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,26 +1,71 @@
|
||||
import { Option } from "widget/settings/shared/Option";
|
||||
import { Header } from "widget/settings/shared/Header";
|
||||
import { Option } from 'widget/settings/shared/Option';
|
||||
import { Header } from 'widget/settings/shared/Header';
|
||||
|
||||
import options from "options";
|
||||
import options from 'options';
|
||||
import Scrollable from 'types/widgets/scrollable';
|
||||
import { Attribute, Child } from 'lib/types/widget';
|
||||
|
||||
export const OSDSettings = () => {
|
||||
export const OSDSettings = (): Scrollable<Child, Attribute> => {
|
||||
return Widget.Scrollable({
|
||||
vscroll: "automatic",
|
||||
vscroll: 'automatic',
|
||||
child: Widget.Box({
|
||||
class_name: "bar-theme-page paged-container",
|
||||
class_name: 'bar-theme-page paged-container',
|
||||
vertical: true,
|
||||
children: [
|
||||
Header('On Screen Display'),
|
||||
Option({ opt: options.theme.osd.enable, title: 'Enabled', type: 'boolean' }),
|
||||
Option({ opt: options.theme.osd.duration, title: 'Duration', type: 'number', min: 100, max: 10000, increment: 500 }),
|
||||
Option({ opt: options.theme.osd.orientation, title: 'Orientation', type: 'enum', enums: ["horizontal", "vertical"] }),
|
||||
Option({ opt: options.theme.osd.location, title: 'Position', subtitle: 'Position of the OSD on the screen', type: 'enum', enums: ["top left", "top", "top right", "right", "bottom right", "bottom", "bottom left", "left"] }),
|
||||
Option({ opt: options.theme.osd.monitor, title: 'Monitor', subtitle: 'The ID of the monitor on which to display the OSD', type: 'number' }),
|
||||
Option({ opt: options.theme.osd.active_monitor, title: 'Follow Cursor', subtitle: 'The OSD will follow the monitor of your cursor', type: 'boolean' }),
|
||||
Option({ opt: options.theme.osd.radius, title: 'Radius', subtitle: 'Radius of the on-screen-display that indicates volume/brightness change', type: 'string' }),
|
||||
Option({ opt: options.theme.osd.margins, title: 'Margins', subtitle: 'Margins in the following format: top right bottom left', type: 'string' }),
|
||||
Option({ opt: options.theme.osd.muted_zero, title: 'Mute Volume as Zero', subtitle: 'Display volume as 0 when muting, instead of previous device volume', type: 'boolean' }),
|
||||
]
|
||||
})
|
||||
})
|
||||
}
|
||||
Option({
|
||||
opt: options.theme.osd.duration,
|
||||
title: 'Duration',
|
||||
type: 'number',
|
||||
min: 100,
|
||||
max: 10000,
|
||||
increment: 500,
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.orientation,
|
||||
title: 'Orientation',
|
||||
type: 'enum',
|
||||
enums: ['horizontal', 'vertical'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.location,
|
||||
title: 'Position',
|
||||
subtitle: 'Position of the OSD on the screen',
|
||||
type: 'enum',
|
||||
enums: ['top left', 'top', 'top right', 'right', 'bottom right', 'bottom', 'bottom left', 'left'],
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.monitor,
|
||||
title: 'Monitor',
|
||||
subtitle: 'The ID of the monitor on which to display the OSD',
|
||||
type: 'number',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.active_monitor,
|
||||
title: 'Follow Cursor',
|
||||
subtitle: 'The OSD will follow the monitor of your cursor',
|
||||
type: 'boolean',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.radius,
|
||||
title: 'Radius',
|
||||
subtitle: 'Radius of the on-screen-display that indicates volume/brightness change',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.margins,
|
||||
title: 'Margins',
|
||||
subtitle: 'Margins in the following format: top right bottom left',
|
||||
type: 'string',
|
||||
}),
|
||||
Option({
|
||||
opt: options.theme.osd.muted_zero,
|
||||
title: 'Mute Volume as Zero',
|
||||
subtitle: 'Display volume as 0 when muting, instead of previous device volume',
|
||||
type: 'boolean',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user