Upgrade to Agsv2 + Astal (#533)
* migrate to astal * Reorganize project structure. * progress * Migrate Dashboard and Window Title modules. * Migrate clock and notification bar modules. * Remove unused code * Media menu * Rework network and volume modules * Finish custom modules. * Migrate battery bar module. * Update battery module and organize helpers. * Migrate workspace module. * Wrap up bar modules. * Checkpoint before I inevitbly blow something up. * Updates * Fix event propagation logic. * Type fixes * More type fixes * Fix padding for event boxes. * Migrate volume menu and refactor scroll event handlers. * network module WIP * Migrate network service. * Migrate bluetooth menu * Updates * Migrate notifications * Update scrolling behavior for custom modules. * Improve popup notifications and add timer functionality. * Migration notifications menu header/controls. * Migrate notifications menu and consolidate notifications menu code. * Migrate power menu. * Dashboard progress * Migrate dashboard * Migrate media menu. * Reduce media menu nesting. * Finish updating media menu bindings to navigate active player. * Migrate battery menu * Consolidate code * Migrate calendar menu * Fix workspace logic to update on client add/change/remove and consolidate code. * Migrate osd * Consolidate hyprland service connections. * Implement startup dropdown menu position allocation. * Migrate settings menu (WIP) * Settings dialo menu fixes * Finish Dashboard menu * Type updates * update submoldule for types * update github ci * ci * Submodule update * Ci updates * Remove type checking for now. * ci fix * Fix a bunch of stuff, losing track... need rest. Brb coffee * Validate dropdown menu before render. * Consolidate code and add auto-hide functionality. * Improve auto-hide behavior. * Consolidate audio menu code * Organize bluetooth code * Improve active player logic * Properly dismiss a notification on action button resolution. * Implement CLI command engine and migrate CLI commands. * Handle variable disposal * Bar component fixes and add hyprland startup rules. * Handle potentially null bindings network and bluetooth bindings. * Handle potentially null wired adapter. * Fix GPU stats * Handle poller for GPU * Fix gpu bar logic. * Clean up logic for stat bars. * Handle wifi and wired bar icon bindings. * Fix battery percentages * Fix switch behavior * Wifi staging fixes * Reduce redundant hyprland service calls. * Code cleanup * Document the option code and reduce redundant calls to optimize performance. * Remove outdated comment. * Add JSDocs * Add meson to build hyprpanel * Consistency updates * Organize commands * Fix images not showing up on notifications. * Remove todo * Move hyprpanel configuration to the ~/.config/hyprpanel directory and add utility commands. * Handle SRC directory for the bundled/built hyprpanel. * Add namespaces to all windows * Migrate systray * systray updates * Update meson to include ts, tsx and scss files. * Remove log from meson * Fix file choose path and make it float. * Added a command to check the dependency status * Update dep names. * Get scale directly from env * Add todo
This commit is contained in:
43
src/components/settings/pages/config/menus/clock.tsx
Normal file
43
src/components/settings/pages/config/menus/clock.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
|
||||
export const ClockMenuSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable name={'Clock Menu'} vscroll={Gtk.PolicyType.AUTOMATIC}>
|
||||
<box className="bar-theme-page paged-container" vertical>
|
||||
<Header title="Time" />
|
||||
<Option opt={options.menus.clock.time.military} title="Use 24hr time" type="boolean" />
|
||||
<Option opt={options.menus.clock.time.hideSeconds} title="Hide seconds" type="boolean" />
|
||||
|
||||
<Header title="Weather" />
|
||||
<Option opt={options.menus.clock.weather.enabled} title="Enabled" type="boolean" />
|
||||
<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="API Key or path to JSON file containing 'weather_api_key'"
|
||||
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"
|
||||
/>
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
240
src/components/settings/pages/config/menus/dashboard.tsx
Normal file
240
src/components/settings/pages/config/menus/dashboard.tsx
Normal file
@@ -0,0 +1,240 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
|
||||
export const DashboardMenuSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable
|
||||
name={'Dashboard Menu'}
|
||||
className="bar-theme-page paged-container"
|
||||
vscroll={Gtk.PolicyType.ALWAYS}
|
||||
hscroll={Gtk.PolicyType.AUTOMATIC}
|
||||
vexpand
|
||||
overlayScrolling
|
||||
>
|
||||
<box vertical>
|
||||
<Header title="Power Menu" />
|
||||
<Option
|
||||
opt={options.menus.dashboard.powermenu.avatar.image}
|
||||
title="Profile Image"
|
||||
type="img"
|
||||
subtitle="By default uses '~/.face.icon'"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.dashboard.powermenu.avatar.name}
|
||||
title="Profile Name"
|
||||
subtitle="Use 'system' for auto 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.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 title="Controls" />
|
||||
<Option opt={options.menus.dashboard.controls.enabled} title="Enabled" type="boolean" />
|
||||
|
||||
<Header title="Resource Usage Metrics" />
|
||||
<Option opt={options.menus.dashboard.stats.enabled} title="Enabled" type="boolean" />
|
||||
<Option
|
||||
opt={options.menus.dashboard.stats.enable_gpu}
|
||||
title="Track GPU"
|
||||
subtitle="Only for NVidia + python-gpustat"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.dashboard.stats.interval}
|
||||
title="Update Interval"
|
||||
subtitle="Frequency of system metrics polling."
|
||||
type="number"
|
||||
min={100}
|
||||
increment={500}
|
||||
/>
|
||||
|
||||
<Header title="Shortcuts" />
|
||||
<Option opt={options.menus.dashboard.shortcuts.enabled} title="Enabled" type="boolean" />
|
||||
{/* Left 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"
|
||||
/>
|
||||
|
||||
{/* Right Shortcuts */}
|
||||
<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 title="Directories" />
|
||||
<Option opt={options.menus.dashboard.directories.enabled} title="Enabled" type="boolean" />
|
||||
|
||||
{/* Left 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"
|
||||
/>
|
||||
|
||||
{/* Right Directories */}
|
||||
<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"
|
||||
/>
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
29
src/components/settings/pages/config/menus/media.tsx
Normal file
29
src/components/settings/pages/config/menus/media.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
|
||||
export const MediaMenuSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable name={'Media Menu'} vscroll={Gtk.PolicyType.AUTOMATIC}>
|
||||
<box className="bar-theme-page paged-container" vertical>
|
||||
<Header title="Media" />
|
||||
<Option opt={options.menus.media.hideAuthor} title="Hide Author" type="boolean" />
|
||||
<Option opt={options.menus.media.hideAlbum} title="Hide Album" type="boolean" />
|
||||
<Option opt={options.menus.media.displayTime} title="Display Time Info" type="boolean" />
|
||||
<Option
|
||||
opt={options.menus.media.displayTimeTooltip}
|
||||
title="Display Time Tooltip"
|
||||
subtitle="Show media time info on hover"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.media.noMediaText}
|
||||
title="No Media Placeholder"
|
||||
subtitle="Text when no media is playing"
|
||||
type="string"
|
||||
/>
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
49
src/components/settings/pages/config/menus/power.tsx
Normal file
49
src/components/settings/pages/config/menus/power.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
|
||||
export const PowerMenuSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable
|
||||
name={'Power Menu'}
|
||||
className="bar-theme-page paged-container"
|
||||
vscroll={Gtk.PolicyType.ALWAYS}
|
||||
hscroll={Gtk.PolicyType.AUTOMATIC}
|
||||
vexpand
|
||||
overlayScrolling
|
||||
>
|
||||
<box vertical>
|
||||
<Header title="Power Menu" />
|
||||
<Option opt={options.menus.power.showLabel} title="Show Label" type="boolean" />
|
||||
<Option
|
||||
opt={options.menus.power.lowBatteryNotification}
|
||||
title="Show Notification For Low Battery"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.power.lowBatteryThreshold}
|
||||
title="Battery Level For Notification"
|
||||
type="number"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.power.lowBatteryNotificationTitle}
|
||||
title="Low Battery Notification Title"
|
||||
subtitle="Use $POWER_LEVEL for battery percent"
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.menus.power.lowBatteryNotificationText}
|
||||
title="Low Battery Notification Body"
|
||||
subtitle="Use $POWER_LEVEL for battery percent"
|
||||
type="string"
|
||||
/>
|
||||
<Option opt={options.menus.power.confirmation} title="Confirmation Dialog" type="boolean" />
|
||||
<Option opt={options.menus.power.shutdown} title="Shutdown Command" type="string" />
|
||||
<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" />
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
20
src/components/settings/pages/config/menus/volume.tsx
Normal file
20
src/components/settings/pages/config/menus/volume.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
|
||||
export const VolumeMenuSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable name={'Volume'} vscroll={Gtk.PolicyType.AUTOMATIC}>
|
||||
<box className="bar-theme-page paged-container" vertical>
|
||||
<Header title="Volume" />
|
||||
<Option
|
||||
opt={options.menus.volume.raiseMaximumVolume}
|
||||
title="Allow Raising Volume Above 100%"
|
||||
subtitle="Allows up to 150% volume"
|
||||
type="boolean"
|
||||
/>
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user