mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-25 16:06:54 +02:00
feat: eww timer module
This commit is contained in:
parent
abb016ac6e
commit
7a8e6a399f
6 changed files with 60 additions and 36 deletions
|
@ -109,3 +109,27 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.timer {
|
||||
@extend .panel-widget;
|
||||
|
||||
font-size: $text-2xl;
|
||||
|
||||
.timer-controls {
|
||||
button {
|
||||
padding: $p-base;
|
||||
margin: $m-base;
|
||||
border-radius: $rounded;
|
||||
|
||||
background-color: $accent;
|
||||
|
||||
&:hover {
|
||||
background-color: $surface2;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
@extend .icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,26 @@
|
|||
$rounded: 0.8em;
|
||||
$rounded: 0.8rem;
|
||||
|
||||
$widget-padding: 0.75em 0.65em;
|
||||
$widget-margin: 0.2em;
|
||||
$widget-padding: 0.75rem 0.65rem;
|
||||
$widget-margin: 0.2rem;
|
||||
|
||||
$panel-widget-margin: 0.4em;
|
||||
$panel-widget-margin: 0.4rem;
|
||||
|
||||
$icon-size: 1.25em;
|
||||
$font-size: 1.2em;
|
||||
$icon-size: 1.25rem;
|
||||
|
||||
$text-base: 1.2rem;
|
||||
$text-lg: 1.4rem;
|
||||
$text-xl: 1.8rem;
|
||||
$text-2xl: 2.6rem;
|
||||
|
||||
$m-base: 0.4rem;
|
||||
$m-lg: 1.5rem;
|
||||
$m-xl: 2rem;
|
||||
$m-2xl: 3rem;
|
||||
|
||||
$p-base: 1rem;
|
||||
$p-lg: 1.5rem;
|
||||
$p-xl: 2rem;
|
||||
$p-2xl: 3rem;
|
||||
|
||||
$design-tokens: (
|
||||
font-sizes: (
|
||||
|
|
|
@ -32,21 +32,6 @@
|
|||
font-family: "Symbols Nerd font";
|
||||
padding: 5px;
|
||||
}
|
||||
.timer {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.timer_butt button {
|
||||
background-color: $accent;
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.timer_butt label {
|
||||
color: $base;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.unbarwidget {
|
||||
padding: 5px;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
(include "./src/-components/_stats.yuck")
|
||||
|
||||
(include "./src/-modules/_language.yuck")
|
||||
(include "./src/-modules/_timer.yuck")
|
||||
(include "./src/-modules/_system-tray.yuck")
|
||||
(include "./src/-modules/_workspaces.yuck")
|
||||
(include "./src/-modules/_time.yuck")
|
||||
|
|
15
hypr-configs/hyprland/eww/src/-modules/_timer.yuck
Normal file
15
hypr-configs/hyprland/eww/src/-modules/_timer.yuck
Normal file
|
@ -0,0 +1,15 @@
|
|||
(defwidget Timer []
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "timer"
|
||||
:space-evenly false
|
||||
|
||||
(label :valign "center" :vexpand true :text timerdis)
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "timer-controls"
|
||||
|
||||
(button :onclick "./scripts/python/timer.py timedec" (label :text "-"))
|
||||
(button :onclick "./scripts/python/timer.py toggle" (label :text { !matches(timerdis, ":") ? "" : ""}))
|
||||
(button :onclick "./scripts/python/timer.py timeinc" (label :text "+")))))
|
|
@ -253,21 +253,6 @@
|
|||
;; (label :halign "start" :text "${weatherjson.precipMM} mm")
|
||||
))))
|
||||
|
||||
(defwidget Timer []
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "panel-widget"
|
||||
:space-evenly false
|
||||
|
||||
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "timer_butt"
|
||||
:valign "end"
|
||||
(button :onclick "./scripts/python/timer.py timedec" (label :text "-"))
|
||||
(button :onclick "./scripts/python/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
||||
(button :onclick "./scripts/python/timer.py timeinc" (label :text "+")))))
|
||||
|
||||
(defwidget BigSliders []
|
||||
(box
|
||||
:class "panel-widget"
|
||||
|
|
Loading…
Add table
Reference in a new issue