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:
286
src/components/bar/settings/config.tsx
Normal file
286
src/components/bar/settings/config.tsx
Normal file
@@ -0,0 +1,286 @@
|
||||
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 CustomModuleSettings = (): JSX.Element => {
|
||||
return (
|
||||
<scrollable
|
||||
name={'Custom Modules'}
|
||||
className="menu-theme-page customModules paged-container"
|
||||
vscroll={Gtk.PolicyType.AUTOMATIC}
|
||||
hscroll={Gtk.PolicyType.AUTOMATIC}
|
||||
>
|
||||
<box className="menu-theme-page paged-container" vertical>
|
||||
{/* General Section */}
|
||||
<Header title="General" />
|
||||
<Option opt={options.bar.customModules.scrollSpeed} title="Scrolling Speed" type="number" />
|
||||
|
||||
{/* RAM Section */}
|
||||
<Header title="RAM" />
|
||||
<Option opt={options.theme.bar.buttons.modules.ram.enableBorder} title="Button Border" type="boolean" />
|
||||
<Option opt={options.bar.customModules.ram.icon} title="Ram Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.ram.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.ram.spacing} title="Spacing" type="string" />
|
||||
<Option
|
||||
opt={options.bar.customModules.ram.labelType}
|
||||
title="Label Type"
|
||||
type="enum"
|
||||
enums={['used/total', 'used', 'free', 'percentage']}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.ram.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.ram.pollingInterval}
|
||||
title="Polling Interval"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.ram.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.ram.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.ram.middleClick} title="Middle Click" type="string" />
|
||||
|
||||
{/* CPU Section */}
|
||||
<Header title="CPU" />
|
||||
<Option opt={options.theme.bar.buttons.modules.cpu.enableBorder} title="Button Border" type="boolean" />
|
||||
<Option opt={options.bar.customModules.cpu.icon} title="Cpu Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.cpu.spacing} title="Spacing" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.cpu.pollingInterval}
|
||||
title="Polling Interval"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.cpu.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.cpu.scrollDown} title="Scroll Down" type="string" />
|
||||
|
||||
{/* CPU Temperature Section */}
|
||||
<Header title="CPU Temperature" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.cpuTemp.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.cpuTemp.sensor}
|
||||
title="CPU Temperature Sensor"
|
||||
subtitle="Wiki: https://hyprpanel.com/configuration/panel.html#custom-modules"
|
||||
subtitleLink="https://hyprpanel.com/configuration/panel.html#custom-modules"
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.cpuTemp.unit}
|
||||
title="CPU Temperature Unit"
|
||||
type="enum"
|
||||
enums={['imperial', 'metric']}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.cpuTemp.showUnit} title="Show Unit" type="boolean" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.icon} title="Cpu Temperature Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.cpuTemp.spacing} title="Spacing" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.cpuTemp.pollingInterval}
|
||||
title="Polling Interval"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.cpuTemp.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.cpuTemp.scrollDown} title="Scroll Down" type="string" />
|
||||
|
||||
{/* Storage Section */}
|
||||
<Header title="Storage" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.storage.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.storage.icon} title="Storage Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.storage.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.storage.spacing} title="Spacing" type="string" />
|
||||
<Option
|
||||
opt={options.bar.customModules.storage.labelType}
|
||||
title="Label Type"
|
||||
type="enum"
|
||||
enums={['used/total', 'used', 'free', 'percentage']}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.storage.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.storage.pollingInterval}
|
||||
title="Polling Interval"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.storage.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.storage.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.storage.middleClick} title="Middle Click" type="string" />
|
||||
|
||||
{/* Netstat Section */}
|
||||
<Header title="Netstat" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.netstat.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.networkInterface}
|
||||
title="Network Interface"
|
||||
subtitle="Wiki: https://hyprpanel.com/configuration/panel.html#custom-modules"
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.dynamicIcon}
|
||||
title="Use Network Icon"
|
||||
subtitle="If enabled, shows current network icon indicators instead of static icon"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.netstat.icon} title="Netstat Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.netstat.label} title="Show Label" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.rateUnit}
|
||||
title="Rate Unit"
|
||||
type="enum"
|
||||
enums={['GiB', 'MiB', 'KiB', 'auto']}
|
||||
/>
|
||||
<Option opt={options.theme.bar.buttons.modules.netstat.spacing} title="Spacing" type="string" />
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.labelType}
|
||||
title="Label Type"
|
||||
type="enum"
|
||||
enums={['full', 'in', 'out']}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.netstat.round} title="Round" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.netstat.pollingInterval}
|
||||
title="Polling Interval"
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.netstat.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.netstat.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.netstat.middleClick} title="Middle Click" type="string" />
|
||||
|
||||
{/* Keyboard Layout Section */}
|
||||
<Header title="Keyboard Layout" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.kbLayout.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.kbLayout.icon} title="Keyboard Layout Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.label} title="Show Label" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.kbLayout.labelType}
|
||||
title="Label Type"
|
||||
type="enum"
|
||||
enums={['layout', 'code']}
|
||||
/>
|
||||
<Option opt={options.theme.bar.buttons.modules.kbLayout.spacing} title="Spacing" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.kbLayout.scrollDown} title="Scroll Down" type="string" />
|
||||
|
||||
{/* Updates Section */}
|
||||
<Header title="Updates" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.updates.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.updates.updateCommand}
|
||||
title="Check Updates Command"
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.updates.icon.pending}
|
||||
title="Updates Available Icon"
|
||||
type="string"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.updates.icon.updated} title="No Updates Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.updates.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.bar.customModules.updates.padZero} title="Pad with 0" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.updates.spacing} title="Spacing" type="string" />
|
||||
<Option
|
||||
opt={options.bar.customModules.updates.pollingInterval}
|
||||
title="Polling Interval"
|
||||
subtitle="WARNING: Be careful of your package manager's rate limit."
|
||||
type="number"
|
||||
min={100}
|
||||
max={60 * 24 * 1000}
|
||||
increment={1000}
|
||||
/>
|
||||
<Option opt={options.bar.customModules.updates.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.updates.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.updates.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.updates.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.updates.scrollDown} title="Scroll Down" type="string" />
|
||||
|
||||
{/* Submap Section */}
|
||||
<Header title="Submap" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.submap.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option
|
||||
opt={options.bar.customModules.submap.showSubmapName}
|
||||
title="Show Submap Name"
|
||||
subtitle="Displays current submap name instead of Enabled/Disabled text."
|
||||
type="boolean"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.submap.enabledIcon} title="Enabled Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.disabledIcon} title="Disabled Icon" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.enabledText} title="Enabled Text" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.disabledText} title="Disabled Text" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.label} title="Show Label" type="boolean" />
|
||||
<Option opt={options.theme.bar.buttons.modules.submap.spacing} title="Spacing" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.submap.scrollDown} title="Scroll Down" type="string" />
|
||||
|
||||
{/* Weather Section */}
|
||||
<Header title="Weather" />
|
||||
<Option
|
||||
opt={options.theme.bar.buttons.modules.weather.enableBorder}
|
||||
title="Button Border"
|
||||
type="boolean"
|
||||
/>
|
||||
<Option opt={options.bar.customModules.weather.label} title="Show Label" type="boolean" />
|
||||
<Option
|
||||
opt={options.bar.customModules.weather.unit}
|
||||
title="Units"
|
||||
type="enum"
|
||||
enums={['imperial', 'metric']}
|
||||
/>
|
||||
<Option opt={options.theme.bar.buttons.modules.weather.spacing} title="Spacing" type="string" />
|
||||
<Option opt={options.bar.customModules.weather.leftClick} title="Left Click" type="string" />
|
||||
<Option opt={options.bar.customModules.weather.rightClick} title="Right Click" type="string" />
|
||||
<Option opt={options.bar.customModules.weather.middleClick} title="Middle Click" type="string" />
|
||||
<Option opt={options.bar.customModules.weather.scrollUp} title="Scroll Up" type="string" />
|
||||
<Option opt={options.bar.customModules.weather.scrollDown} title="Scroll Down" type="string" />
|
||||
</box>
|
||||
</scrollable>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user