mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-06-04 02:13:42 +02:00
feat: big bar sliders
This commit is contained in:
parent
41309f96a1
commit
0323554224
6 changed files with 58 additions and 85 deletions
|
@ -87,7 +87,7 @@
|
||||||
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
||||||
|
|
||||||
; Controlpanel
|
; Controlpanel
|
||||||
(defvar revealControlpanel false)
|
(defvar revealControlpanel true)
|
||||||
(defvar revealWeather false)
|
(defvar revealWeather false)
|
||||||
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
||||||
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
|
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
|
||||||
|
|
|
@ -42,3 +42,22 @@
|
||||||
font-size: get-token(font-sizes, large);
|
font-size: get-token(font-sizes, large);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.big-bar-slider {
|
||||||
|
trough {
|
||||||
|
background-color: $surface1;
|
||||||
|
margin: 5px;
|
||||||
|
min-width: 60px;
|
||||||
|
border-radius: get-token(border-radius);
|
||||||
|
|
||||||
|
highlight {
|
||||||
|
background-color: $surface2;
|
||||||
|
border-radius: get-token(border-radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
font-size: get-token(font-sizes, extra);
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ $design-tokens: (
|
||||||
small: 16px,
|
small: 16px,
|
||||||
default: 18px,
|
default: 18px,
|
||||||
large: 20px,
|
large: 20px,
|
||||||
|
extra: 30px,
|
||||||
),
|
),
|
||||||
padding: (
|
padding: (
|
||||||
small: 8px,
|
small: 8px,
|
||||||
|
|
|
@ -48,32 +48,6 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigslide trough {
|
|
||||||
margin: 5px;
|
|
||||||
min-width: 4em;
|
|
||||||
border-radius: 0.8em;
|
|
||||||
background-color: $surface1;
|
|
||||||
|
|
||||||
slider {
|
|
||||||
all: unset;
|
|
||||||
min-width: 20px;
|
|
||||||
min-height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
highlight {
|
|
||||||
background-color: $surface2;
|
|
||||||
border-radius: 0.8em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.slideicon {
|
|
||||||
min-width: 1em;
|
|
||||||
min-height: 1em;
|
|
||||||
font-family: "Symbols Nerd Font";
|
|
||||||
font-size: 30px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unbarwidget {
|
.unbarwidget {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
|
@ -1,10 +1,31 @@
|
||||||
(defwidget VerticalBarSlider [var ?onchange]
|
(defwidget VerticalBarSlider [var ?onchange]
|
||||||
(scale
|
(scale
|
||||||
:value var
|
:value {var}
|
||||||
:onchange onchange
|
:onchange {onchange}
|
||||||
:class "vertical-bar-slider"
|
:class "vertical-bar-slider"
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
:tooltip "${var}%"
|
:tooltip "${var}%"
|
||||||
:max 101
|
:max 101
|
||||||
:min 0
|
:min 0
|
||||||
:flipped true))
|
:flipped true))
|
||||||
|
|
||||||
|
(defwidget BigBarSlider [var ?icon ?onchange]
|
||||||
|
(box
|
||||||
|
:class "big-bar-slider"
|
||||||
|
|
||||||
|
(overlay
|
||||||
|
(scale
|
||||||
|
:value var
|
||||||
|
:onchange {onchange}
|
||||||
|
:orientation "v"
|
||||||
|
:tooltip "${var}%"
|
||||||
|
:max 101
|
||||||
|
:min 0
|
||||||
|
:flipped true)
|
||||||
|
|
||||||
|
(label
|
||||||
|
:class "icon"
|
||||||
|
:valign "end"
|
||||||
|
:text {icon}))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
:height 180
|
:height 180
|
||||||
|
|
||||||
(Timer)
|
(Timer)
|
||||||
(bigslides))
|
(BigSliders))
|
||||||
|
|
||||||
(box
|
(box
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
@ -295,7 +295,6 @@
|
||||||
(box
|
(box
|
||||||
:halign "fill"
|
:halign "fill"
|
||||||
:valign "fill"
|
:valign "fill"
|
||||||
:width 320
|
|
||||||
:vexpand true
|
:vexpand true
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
|
@ -321,7 +320,7 @@
|
||||||
:valign "start"
|
:valign "start"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(for notif in {notifications.notifications}
|
(for notif in {notifications.notifications}
|
||||||
(singlenotif :noti notif :initial false))))
|
(SingleNotification :noti notif :initial false))))
|
||||||
)
|
)
|
||||||
|
|
||||||
(box
|
(box
|
||||||
|
@ -404,7 +403,6 @@
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
:class "panel-widget"
|
:class "panel-widget"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:valign "fill"
|
|
||||||
:width 200
|
:width 200
|
||||||
|
|
||||||
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
||||||
|
@ -416,64 +414,24 @@
|
||||||
(button :onclick "./scripts/python/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
(button :onclick "./scripts/python/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
||||||
(button :onclick "./scripts/python/timer.py timeinc" (label :text "+")))))
|
(button :onclick "./scripts/python/timer.py timeinc" (label :text "+")))))
|
||||||
|
|
||||||
(defwidget bigslides []
|
(defwidget BigSliders []
|
||||||
(box
|
(box
|
||||||
:valign "fill"
|
:valign "fill"
|
||||||
:halign "fill"
|
:halign "fill"
|
||||||
:class "panel-widget"
|
:class "panel-widget"
|
||||||
:hexpand true
|
:hexpand true
|
||||||
:space-evenly true
|
:space-evenly true
|
||||||
(bigvol)
|
|
||||||
(bigmic)
|
|
||||||
(bigbright)))
|
|
||||||
|
|
||||||
(defwidget bigvol []
|
(BigBarSlider :var {volume} :icon {volumemute == 'false' ? "" : ""}
|
||||||
(overlay
|
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%")
|
||||||
(scale
|
|
||||||
:class "bigslide"
|
|
||||||
:value volume
|
|
||||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
|
||||||
:orientation "v"
|
|
||||||
:tooltip "${volume}%"
|
|
||||||
:max 100
|
|
||||||
:min 0
|
|
||||||
:flipped true)
|
|
||||||
(label
|
|
||||||
:class "slideicon"
|
|
||||||
:valign "end"
|
|
||||||
:text {volumemute == 'false' ? "" : ""})))
|
|
||||||
|
|
||||||
(defwidget bigmic []
|
(BigBarSlider :var {mic_volume} :icon {volumemute == 'false' ? "" : ""}
|
||||||
(overlay
|
:onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%")
|
||||||
(scale
|
|
||||||
:class "bigslide"
|
|
||||||
:value mic_volume
|
|
||||||
:onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%"
|
|
||||||
:orientation "v"
|
|
||||||
:tooltip "${mic_volume}%"
|
|
||||||
:max 100
|
|
||||||
:min 0
|
|
||||||
:flipped true)
|
|
||||||
(label
|
|
||||||
:class "slideicon"
|
|
||||||
:valign "end"
|
|
||||||
:text {volumemute == 'false' ? "" : ""})))
|
|
||||||
|
|
||||||
(defwidget bigbright []
|
(BigBarSlider :var {brightness} :icon ""
|
||||||
(overlay
|
:onchange "brightnessctl set {}%")
|
||||||
(scale
|
|
||||||
:class "bigslide"
|
))
|
||||||
:value brightness
|
|
||||||
:onchange "brightnessctl set {}%"
|
|
||||||
:orientation "v"
|
|
||||||
:tooltip "${brightness}%"
|
|
||||||
:max 100
|
|
||||||
:min 0
|
|
||||||
:flipped true)
|
|
||||||
(label
|
|
||||||
:class "slideicon"
|
|
||||||
:valign "end"
|
|
||||||
:text "")))
|
|
||||||
|
|
||||||
(defwidget quote []
|
(defwidget quote []
|
||||||
(box
|
(box
|
||||||
|
|
Loading…
Add table
Reference in a new issue