Files
custum-hyprpanel/widget/settings/pages/config/osd/index.ts
painerp 1e6f1570b1 Fixes a OSD bug when un-/muting and adds a toggle to display volume as 0 when muting (#151)
* added muted_zero option to only display 0 volume in osd when enabled

* Fix OSD brightness persisting overflow class

* Update modules/osd/bar/index.ts

* Apply suggestions from code review

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
2024-08-19 20:57:23 -07:00

26 lines
1.7 KiB
TypeScript

import { Option } from "widget/settings/shared/Option";
import { Header } from "widget/settings/shared/Header";
import options from "options";
export const OSDSettings = () => {
return Widget.Scrollable({
vscroll: "automatic",
child: Widget.Box({
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.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' }),
]
})
})
}