Files
custum-hyprpanel/scss/style/menus/power.scss
Jas Singh 4cdda38604 Implement framework for custom modules and out of the box custom modules as well. (#213)
* 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
2024-09-02 21:10:59 -07:00

228 lines
5.5 KiB
SCSS

window#powermenu,
window#verification {
// the fraction has to be more than hyprland ignorealpha
background-color: rgba(0, 0, 0, .4);
}
$popover-padding: 0.6rem * 1.6;
window#verification .verification {
* {
font-size: $font-size * $bar-menus-menu-dashboard-confirmation_scaling * 0.01;
}
@include floating-widget;
background: if($bar-menus-monochrome, $bar-menus-background, $bar-menus-menu-dashboard-powermenu-confirmation-background);
border: $bar-menus-border-size solid if($bar-menus-monochrome, $bar-menus-border-color, $bar-menus-menu-dashboard-powermenu-confirmation-border);
padding: 0.35em * 1.6 * 1.5;
min-width: 20em;
min-height: 6em;
opacity: $bar-menus-opacity * 0.01;
.verification-content {
background: if($bar-menus-monochrome, $bar-menus-cards, $bar-menus-menu-dashboard-powermenu-confirmation-card);
border-radius: $bar-menus-border-radius * 0.5;
padding: 1em;
}
.text-box {
margin-bottom: 0.3em;
.title {
font-size: 1.5em;
color: if($bar-menus-monochrome, $bar-menus-label, $bar-menus-menu-dashboard-powermenu-confirmation-label);
margin-bottom: 0.5em;
}
.desc {
color: if($bar-menus-monochrome, $bar-menus-text, $bar-menus-menu-dashboard-powermenu-confirmation-body);
font-size: 1em;
margin-bottom: 0.55em;
padding: 1em 3em;
}
}
.verification-button {
background: $bar-menus-buttons-default;
padding: 0.7em 0em;
margin: 0.4em 1.7em;
border-radius: $bar-menus-border-radius * 0.5;
opacity: 1;
transition: border-color 0.2s ease-in-out;
transition: opacity .3s ease-in-out;
&.bar-verification_yes {
background-color: if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-confirm);
}
&.bar-verification_no {
background-color: if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-deny);
}
&:hover {
&.bar-verification_yes {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-confirm), 0.6);
transition: background-color 0.2s ease-in-out;
}
&.bar-verification_no {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-deny), 0.6);
transition: background-color 0.2s ease-in-out;
}
}
&:focus {
&.bar-verification_yes {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-confirm), 0.6);
transition: background 0.2s ease-in-out;
}
&.bar-verification_no {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-deny), 0.6);
transition: background 0.2s ease-in-out;
}
}
&:active {
&.bar-verification_yes {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-confirm), 0.6);
transition: background 0.2s ease-in-out;
}
&.bar-verification_no {
background-color: transparentize(if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-powermenu-confirmation-deny), 0.6);
transition: background 0.2s ease-in-out;
}
image {
opacity: .3;
transition: opacity .3s ease-in-out;
}
label {
opacity: .3;
transition: opacity .3s ease-in-out;
}
}
}
.bar-verification_no label {
color: if($bar-menus-monochrome, $bar-menus-buttons-text, $bar-menus-menu-dashboard-powermenu-confirmation-button_text);
}
.bar-verification_yes label {
color: if($bar-menus-monochrome, $bar-menus-buttons-text, $bar-menus-menu-dashboard-powermenu-confirmation-button_text);
}
}
window#powermenu .powermenu {
@include floating-widget;
&.line {
padding: $popover-padding * 1.5;
}
&.box {
padding: $popover-padding * 2;
}
}
.widget-button {
border-color: $crust;
min-width: 4.5em;
min-height: 4.5em;
opacity: 1;
transition: border-color 0.2s ease-in-out;
transition: opacity .3s ease-in-out;
&:hover {
&.powermenu-button-shutdown {
border-color: $red;
}
&.powermenu-button-logout {
border-color: $green;
}
&.powermenu-button-sleep {
border-color: $sky;
}
&.powermenu-button-reboot {
border-color: $peach;
}
}
&:focus {
&.powermenu-button-shutdown {
border-color: $red;
}
&.powermenu-button-logout {
border-color: $green;
}
&.powermenu-button-sleep {
border-color: $sky;
}
&.powermenu-button-reboot {
border-color: $peach;
}
}
&:active {
&.powermenu-button-shutdown {
border-color: rgba($red, .5);
}
&.powermenu-button-logout {
border-color: rgba($green, .5);
}
&.powermenu-button-sleep {
border-color: rgba($sky, .5);
}
&.powermenu-button-reboot {
border-color: rgba($peach, .5);
}
}
}
.system-button_icon {
&.shutdown {
color: $red;
}
&.logout {
color: $green;
}
&.reboot {
color: $peach;
}
&.sleep {
color: $sky;
}
}
.system-button_label {
&.shutdown {
color: $red;
}
&.logout {
color: $green;
}
&.reboot {
color: $peach;
}
&.sleep {
color: $sky;
}
}