* Create declarative module scaffolding * Added ram module (WIP) * Updates to options, styling and more. * Added function for styling custom modules. * Added utility functions and cleaned up code * Type and fn name updates. * Update module utils to handle absent values. * Added icon color in style2 that was missing. * Linted utils.ts * Add CPU module and update RAM module to use /proc/meminfo. * Added disk storage module. * Consolidate code * Added netstat module and removed elements from systray default ignore list. * Added keyboard layout module. * Fix hook types and move module to customModules directory * Added updates modules. * Spacing updates * Added weather module. * Added power menu and power module in bar. Increased update default interval to 6 ours. * Updated styling of bar buttons, made power menu label toggleable, etc. * Consolidate code and add dynamic tooltips based on data being used. * Make default custom mogules matugen compatible * Update base theme * Fix custom module background coloring * Remove testing opacity. * Update themes to account for new modules * Update nix stuff for libgtop (Need someone to test this) * Update nix * Update fractions to multiplications * Move styling in style directory * Implement a polling framework for variables that can dynamically adjust polling intervals. * Netstat module updates when interface name is changed. * Readme update
107 lines
6.0 KiB
TypeScript
107 lines
6.0 KiB
TypeScript
import { Option } from "widget/settings/shared/Option";
|
|
import { Header } from "widget/settings/shared/Header";
|
|
|
|
import options from "options";
|
|
|
|
export const CustomModuleTheme = () => {
|
|
return Widget.Scrollable({
|
|
vscroll: "automatic",
|
|
hscroll: "automatic",
|
|
class_name: "menu-theme-page customModules paged-container",
|
|
child: Widget.Box({
|
|
class_name: "bar-theme-page paged-container",
|
|
vertical: true,
|
|
children: [
|
|
Header('RAM'),
|
|
Option({ opt: options.theme.bar.buttons.modules.ram.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.ram.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.ram.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.ram.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('CPU'),
|
|
Option({ opt: options.theme.bar.buttons.modules.cpu.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.cpu.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.cpu.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.cpu.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Storage'),
|
|
Option({ opt: options.theme.bar.buttons.modules.storage.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.storage.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.storage.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.storage.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Netstat'),
|
|
Option({ opt: options.theme.bar.buttons.modules.netstat.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.netstat.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.netstat.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.netstat.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Keyboard Layout'),
|
|
Option({ opt: options.theme.bar.buttons.modules.kbLayout.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.kbLayout.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.kbLayout.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.kbLayout.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Updates'),
|
|
Option({ opt: options.theme.bar.buttons.modules.updates.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.updates.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.updates.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.updates.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Weather'),
|
|
Option({ opt: options.theme.bar.buttons.modules.weather.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.weather.text, title: 'Text', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.weather.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.weather.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
|
|
Header('Power'),
|
|
Option({ opt: options.theme.bar.buttons.modules.power.icon, title: 'Icon', type: 'color' }),
|
|
Option({ opt: options.theme.bar.buttons.modules.power.background, title: 'Label Background', type: 'color' }),
|
|
Option({
|
|
opt: options.theme.bar.buttons.modules.power.icon_background,
|
|
title: 'Icon Background',
|
|
subtitle: 'Applies a background color to the icon section of the button.\nRequires \'split\' button styling.',
|
|
type: 'color'
|
|
}),
|
|
]
|
|
})
|
|
})
|
|
}
|
|
|
|
|