mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-25 05:16:55 +02:00
feat: panel new style
This commit is contained in:
parent
89989f40ab
commit
f1ba2fc05c
10 changed files with 733 additions and 721 deletions
|
@ -1,11 +1,16 @@
|
|||
@mixin widget() {
|
||||
padding: 5px 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
margin: 5px 2px;
|
||||
color: $white0;
|
||||
padding: 6px;
|
||||
margin: 5px 2px;
|
||||
border-radius: 8px;
|
||||
background-color: $surface0;
|
||||
}
|
||||
|
||||
.widget {
|
||||
@include widget;
|
||||
}
|
||||
|
||||
.controlpanel-widget {
|
||||
@include widget;
|
||||
margin: 5px;
|
||||
}
|
||||
|
|
167
hypr-configs/hyprland/eww/assets/scss/windows/panel.scss
Normal file
167
hypr-configs/hyprland/eww/assets/scss/windows/panel.scss
Normal file
|
@ -0,0 +1,167 @@
|
|||
.controlpanelwindow {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.userinfo label {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.titlesel {
|
||||
font-size: 20px;
|
||||
// font-weight: bold;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $base;
|
||||
background-color: $accent;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $white0;
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tricontrol label {
|
||||
@extend .title;
|
||||
font-size: 22px;
|
||||
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;
|
||||
}
|
||||
|
||||
.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 {
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.quoteauthor {
|
||||
color: $white0;
|
||||
font-size: 14px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
// color: $light_blue;
|
||||
font-size: 18px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.coolmpd label {
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.mpdcover {
|
||||
transition: 500ms ease;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.circiconcontain {
|
||||
border-radius: 70px;
|
||||
background-color: $surface0;
|
||||
}
|
||||
|
||||
.circiconcontain label {
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 30px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
border-radius: 70px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.circsys {
|
||||
color: $accent;
|
||||
background-color: $surface1;
|
||||
}
|
||||
|
||||
.revcal {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wmctrlslide {
|
||||
trough {
|
||||
min-width: 160px;
|
||||
min-height: 10px;
|
||||
slider {
|
||||
background-color: $white2;
|
||||
min-height: 15px;
|
||||
min-width: 15px;
|
||||
margin: -10px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fadeoutbox {
|
||||
background-image: linear-gradient(180deg, transparent, $surface0);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
// stupid window overview thing
|
||||
.overviewworkspace {
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.overviewwindow {
|
||||
background-color: $base;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: $surface2;
|
||||
border-width: 2px;
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
@import "./assets/scss/windows/vbar.scss";
|
||||
|
||||
@import "./src/control-panel/styles.scss";
|
||||
@import "./assets/scss/windows/panel.scss";
|
||||
|
||||
@import "./src/dashboard/styles.scss";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(include "./src/_definitions.yuck")
|
||||
|
||||
(include "./setups/sidebar.yuck")
|
||||
(include "./src/control-panel/main.yuck")
|
||||
(include "./setups/panel.yuck")
|
||||
(include "./src/wallpapers/main.yuck")
|
||||
(include "./src/dashboard/main.yuck")
|
||||
(include "./src/dock/main.yuck")
|
||||
|
|
14
hypr-configs/hyprland/eww/setups/panel.yuck
Normal file
14
hypr-configs/hyprland/eww/setups/panel.yuck
Normal file
|
@ -0,0 +1,14 @@
|
|||
(include "./src/windows/panel/main.yuck")
|
||||
|
||||
(defwindow control_panel
|
||||
:geometry
|
||||
(geometry
|
||||
:x 10
|
||||
:y 10
|
||||
:width 340
|
||||
:anchor "top left"
|
||||
)
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
|
||||
(control_widget))
|
|
@ -79,7 +79,7 @@
|
|||
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
||||
|
||||
; Controlpanel
|
||||
(defvar revealControlpanel false)
|
||||
(defvar revealControlpanel true)
|
||||
(defvar revealWeather false)
|
||||
(deflisten timerdis "./scripts/timer.py subscribe")
|
||||
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
||||
|
|
|
@ -1,536 +0,0 @@
|
|||
(defwindow control_panel
|
||||
:geometry (geometry
|
||||
:x 10
|
||||
:y 10
|
||||
:width 340
|
||||
:anchor "top left"
|
||||
)
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
|
||||
(control_widget)
|
||||
)
|
||||
|
||||
(defwidget control_widget []
|
||||
(box
|
||||
:class "controlpanelwindow"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
(user)
|
||||
(chooser)
|
||||
; (weather)
|
||||
|
||||
; (coolmpd :h 150 :permashow true)
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 180
|
||||
:halign "fill"
|
||||
(timer)
|
||||
(bigslides))
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:vexpand true
|
||||
:visible true
|
||||
(toolbox)
|
||||
(notifications_weather_box))
|
||||
))
|
||||
|
||||
(defwidget toolbox []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "tricontrol unbarwidget"
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:height 60
|
||||
:halign "fill"
|
||||
(button :onclick "./scripts/pop colourpick" (label :text ""))
|
||||
(button :onclick "./scripts/pop scrop" (label :text ""))
|
||||
(button :onclick "~/.config/eww/themeswitch/scripts/pop" (label :text "")))))
|
||||
|
||||
(defwidget chooser []
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height 60
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal4=${!reveal4} reveal5=false reveal6=false"
|
||||
:onrightclick "foot nvim ~/Documents/fuck.txt"
|
||||
(label :class {reveal4 ? "titlesel" : "title"} :text "Notes"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal5=${!reveal5} reveal4=false reveal6=false"
|
||||
(label :class {reveal5 ? "titlesel" : "title"} :text "System"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal6=${!reveal6} reveal5=false reveal4=false"
|
||||
(label :class {reveal6 ? "titlesel" : "title"} :text "Hyprland")))
|
||||
|
||||
(notes)
|
||||
(sysinfo)
|
||||
(wmctrl)))
|
||||
|
||||
|
||||
(defwidget notes []
|
||||
(revealer
|
||||
:reveal reveal4
|
||||
:transition "slideup"
|
||||
(box
|
||||
:height 140
|
||||
(box
|
||||
:orientation "h"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll true
|
||||
(label :text notesc))))))
|
||||
|
||||
(defwidget wmctrl []
|
||||
(revealer
|
||||
:reveal reveal6
|
||||
:transition "slideup"
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:height 140
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(wmslider
|
||||
:name "gaps outer"
|
||||
:val gapsouter
|
||||
:onchange "swaymsg gaps outer all set {}"
|
||||
:max 300
|
||||
:reset "${EWW_CMD} update gapsouter=0 && swaymsg gaps outer all set 0")
|
||||
(wmslider
|
||||
:name "gaps inner"
|
||||
:val gapsinner
|
||||
:onchange "swaymsg gaps inner all set {}"
|
||||
:max 150
|
||||
:reset "${EWW_CMD} update gapsinner=15 && swaymsg gaps inner all set 15")
|
||||
(wmslider
|
||||
:name "border size"
|
||||
:val borderpixel
|
||||
:onchange "swaymsg default_border pixel {} && swaymsg '[app_id=\".*\"] border pixel {}'"
|
||||
:max 50
|
||||
:reset "${EWW_CMD} update borderpixel=2 && swaymsg default_border pixel 2 && swaymsg '[app_id=\".*\"] border pixel 2'")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "natural scrolling")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" natural_scroll enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" natural_scroll disable"))
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "disable when typing")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" dwt enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" dwt disable"
|
||||
))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "caffeine")
|
||||
(checkbox
|
||||
:onchecked "swaymsg [app_id='.*'] inhibit_idle open && ${EWW_CMD} update caffeine=true"
|
||||
:onunchecked "swaymsg [app_id='.*'] inhibit_idle none && ${EWW_CMD} update caffeine=false"
|
||||
))
|
||||
))))
|
||||
|
||||
(defwidget sysinfo []
|
||||
(revealer
|
||||
:reveal reveal5
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:height 140
|
||||
(systat :icon "" :val { EWW_CPU.avg })
|
||||
(systat :icon "" :val { EWW_RAM.used_mem_perc })
|
||||
(systat :icon "" :val { gpu })
|
||||
(systat :icon "" :val { EWW_BATTERY.BAT0.capacity })
|
||||
)))
|
||||
|
||||
(defwidget wmslider [name val onchange max reset]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:width 20
|
||||
:vexpand false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label
|
||||
:text name)
|
||||
(scale
|
||||
:min 0
|
||||
:max max
|
||||
:class "wmctrlslide"
|
||||
:tooltip val
|
||||
:value val
|
||||
:onchange onchange)
|
||||
(button
|
||||
:onclick reset
|
||||
:style "padding: 0px 8px 0px 3px;"
|
||||
"")))
|
||||
|
||||
(defwidget systat [icon val]
|
||||
(overlay
|
||||
(circular-progress
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "circsys"
|
||||
:thickness 40
|
||||
:value val)
|
||||
|
||||
(box
|
||||
:class "circiconcontain"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:height 55
|
||||
:width 55
|
||||
(label :text icon))))
|
||||
|
||||
(defwidget user[]
|
||||
(revealer
|
||||
:reveal {!reveal4 && !reveal5 && !reveal6}
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 140
|
||||
:width 320
|
||||
:class "unbarwidget"
|
||||
:valign "start"
|
||||
:halign "fill"
|
||||
:hexpand true
|
||||
(image :style "margin: 10px;" :image-width 80 :image-height 80 :path "./assets/image/fieshidle.gif")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "userinfo"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
(label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
|
||||
(label :halign "start" :text uptime :style "font-size: 12px;"))))))
|
||||
|
||||
(defwidget notifications_weather_box []
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealWeather=false"
|
||||
(label :class {!revealWeather ? "titlesel" : "title"} :text "Notifications"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealWeather=true"
|
||||
(label :class {revealWeather ? "titlesel" : "title"} :text "Weather")))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:vexpand true
|
||||
:hexpand true
|
||||
:space-evenly false
|
||||
|
||||
(revealer
|
||||
:reveal {!revealWeather}
|
||||
:hexpand {!revealWeather}
|
||||
:transition "slideleft"
|
||||
|
||||
(notificationlog))
|
||||
|
||||
(revealer
|
||||
:reveal revealWeather
|
||||
:hexpand revealWeather
|
||||
:transition "slideleft"
|
||||
|
||||
(weather)))))
|
||||
|
||||
(defwidget weather[]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
|
||||
(weathermain)
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for hour in {weatherjson.hourly}
|
||||
(weatherhour :hour hour)))))
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox")
|
||||
))
|
||||
|
||||
(defwidget weatherhour[hour]
|
||||
(box
|
||||
:class "smallentry"
|
||||
:orientation "h"
|
||||
:height 80
|
||||
:halign "fill"
|
||||
:valign "center"
|
||||
:vexpand false
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(label :style "font-size: 20px;" :text {hour.time})
|
||||
(image
|
||||
:image-width 50
|
||||
:image-height 50
|
||||
:path "./assets/image/weather/${hour.icon}.svg")
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label :halign "start" :text "${hour.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "rain: ${hour.chanceofrain}%"))))
|
||||
|
||||
(defwidget weathermain[]
|
||||
(box
|
||||
:class "mainentry"
|
||||
:orientation "h"
|
||||
:halign "fill"
|
||||
:height 150
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
(image
|
||||
:image-width 100
|
||||
:image-height 100
|
||||
:style "margin: 10px;"
|
||||
:path "./assets/image/weather/${weatherjson.icon}.svg")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:valign "fill"
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
(label :halign "start" :text {weatherjson.weatherDesc[0].value})
|
||||
(label :halign "start" :text "Feels like ${weatherjson.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "← ${weatherjson.windspeedKmph} km/h")
|
||||
;; (label :halign "start" :text "${weatherjson.visibility} km")
|
||||
;; (label :halign "start" :text "${weatherjson.precipMM} mm")
|
||||
))))
|
||||
|
||||
(defwidget timer[]
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "unbarwidget"
|
||||
:space-evenly false
|
||||
:width 180
|
||||
:valign "fill"
|
||||
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "timer_butt"
|
||||
:valign "end"
|
||||
(button :onclick "./scripts/timer.py timedec" (label :text "-"))
|
||||
(button :onclick "./scripts/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
||||
(button :onclick "./scripts/timer.py timeinc" (label :text "+")))))
|
||||
|
||||
(defwidget bigslides []
|
||||
(box
|
||||
:valign "fill"
|
||||
:halign "fill"
|
||||
:class "unbarwidget"
|
||||
:hexpand true
|
||||
:space-evenly true
|
||||
(bigvol)
|
||||
(bigmic)
|
||||
(bigbright)))
|
||||
|
||||
(defwidget bigvol []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
: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 []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
: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 []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
:class "bigslide"
|
||||
:value brightness
|
||||
:onchange "brightnessctl set {}%"
|
||||
:orientation "v"
|
||||
:tooltip "${brightness}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true)
|
||||
(label
|
||||
:class "slideicon"
|
||||
:valign "end"
|
||||
:text "")))
|
||||
|
||||
(defwidget notificationlog []
|
||||
(overlay
|
||||
(box
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
:valign "fill"
|
||||
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for noti in {notifications.notifications}
|
||||
(singlenotif :noti noti :initial false))))
|
||||
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox")
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "./scripts/notifManage --clear"
|
||||
(label
|
||||
:class "title"
|
||||
:text "Clear All"))
|
||||
(button
|
||||
:onclick "./scripts/notifManage --toggle"
|
||||
(label
|
||||
:class { notifications.dnd ? "titlesel" : "title"}
|
||||
:text "Do Not Disturb")))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
(defwidget quote []
|
||||
(box
|
||||
:class "quotewid unbarwidget"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(scroll :vexpand true :hscroll true :vscroll true
|
||||
(label
|
||||
:class "quote"
|
||||
:text {quotejson.content}
|
||||
:wrap true
|
||||
:width 300))
|
||||
(label
|
||||
:class "quoteauthor"
|
||||
:text "- ${quotejson.author}")))
|
||||
|
||||
(defwidget coolmpd [h permashow]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height h
|
||||
:class { pcover != "" ? "mpdcover" : "unbarwidget"}
|
||||
:style "background-image: url('${pcover}')"
|
||||
:visible {permashow ? true : pcover != "" })
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(image :image-width 100 :image-height 100 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover })
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:width 200
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "coolmpd"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :style "font-size: 20px;" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :text partist))
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "mpd_controls"
|
||||
(button :onclick "playerctl previous"
|
||||
(label :text ""))
|
||||
(button :style "padding-right: 3px;" :onclick "playerctl play-pause"
|
||||
(label :text { pstatus == "Playing" ? "" : ""} ))
|
||||
(button :onclick "playerctl next"
|
||||
(label :text "")))))))
|
|
@ -1,167 +0,0 @@
|
|||
|
||||
.controlpanelwindow {
|
||||
background-color: $base;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.userinfo label {
|
||||
font-size: 18px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.titlesel {
|
||||
font-size: 20px;
|
||||
// font-weight: bold;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $base;
|
||||
background-color: $accent;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
color: $white0;
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tricontrol label {
|
||||
@extend .title;
|
||||
font-size: 22px;
|
||||
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;
|
||||
}
|
||||
|
||||
.bigslide trough {
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
min-width: 60px;
|
||||
background-color: $surface1;
|
||||
slider {
|
||||
all: unset;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.bigslide trough highlight{
|
||||
background-color: $surface2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.slideicon {
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 30px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.unbarwidget {
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.quoteauthor {
|
||||
color: $white0;
|
||||
font-size: 14px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.quote {
|
||||
// color: $light_blue;
|
||||
font-size: 18px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.coolmpd label {
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.mpdcover {
|
||||
transition: 500ms ease;
|
||||
background-color: $surface0;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.circiconcontain {
|
||||
border-radius: 70px;
|
||||
background-color: $surface0;
|
||||
}
|
||||
|
||||
.circiconcontain label {
|
||||
font-family: "Symbols Nerd Font";
|
||||
font-size: 30px;
|
||||
min-width: 1em;
|
||||
min-height: 1em;
|
||||
border-radius: 70px;
|
||||
color: $white0;
|
||||
}
|
||||
|
||||
.circsys {
|
||||
color: $accent;
|
||||
background-color: $surface1;
|
||||
}
|
||||
|
||||
.revcal {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wmctrlslide {
|
||||
trough {
|
||||
min-width: 160px;
|
||||
min-height: 10px;
|
||||
slider {
|
||||
background-color: $white2;
|
||||
min-height: 15px;
|
||||
min-width: 15px;
|
||||
margin: -10px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fadeoutbox {
|
||||
background-image: linear-gradient(180deg, transparent, $surface0);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
// stupid window overview thing
|
||||
.overviewworkspace {
|
||||
background-color: $surface1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.overviewwindow {
|
||||
background-color: $base;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-color: $surface2;
|
||||
border-width: 2px;
|
||||
}
|
523
hypr-configs/hyprland/eww/src/windows/panel/main.yuck
Normal file
523
hypr-configs/hyprland/eww/src/windows/panel/main.yuck
Normal file
|
@ -0,0 +1,523 @@
|
|||
(defwidget control_widget []
|
||||
(box
|
||||
:class "controlpanelwindow"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
(user)
|
||||
(chooser)
|
||||
; (weather)
|
||||
|
||||
; (coolmpd :h 150 :permashow true)
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 180
|
||||
:halign "fill"
|
||||
(timer)
|
||||
(bigslides))
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:vexpand true
|
||||
:visible true
|
||||
(toolbox)
|
||||
(notifications_weather_box))
|
||||
))
|
||||
|
||||
(defwidget toolbox []
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "tricontrol unbarwidget"
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:height 60
|
||||
:halign "fill"
|
||||
(button :onclick "./scripts/pop colourpick" (label :text ""))
|
||||
(button :onclick "./scripts/pop scrop" (label :text ""))
|
||||
(button :onclick "~/.config/eww/themeswitch/scripts/pop" (label :text "")))))
|
||||
|
||||
(defwidget chooser []
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height 60
|
||||
:class "controlpanel-widget"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal4=${!reveal4} reveal5=false reveal6=false"
|
||||
:onrightclick "foot nvim ~/Documents/fuck.txt"
|
||||
(label :class {reveal4 ? "titlesel" : "title"} :text "Notes"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal5=${!reveal5} reveal4=false reveal6=false"
|
||||
(label :class {reveal5 ? "titlesel" : "title"} :text "System"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update reveal6=${!reveal6} reveal5=false reveal4=false"
|
||||
(label :class {reveal6 ? "titlesel" : "title"} :text "Hyprland")))
|
||||
|
||||
(notes)
|
||||
(sysinfo)
|
||||
(wmctrl)))
|
||||
|
||||
|
||||
(defwidget notes []
|
||||
(revealer
|
||||
:reveal reveal4
|
||||
:transition "slideup"
|
||||
(box
|
||||
:height 140
|
||||
(box
|
||||
:orientation "h"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll true
|
||||
(label :text notesc))))))
|
||||
|
||||
(defwidget wmctrl []
|
||||
(revealer
|
||||
:reveal reveal6
|
||||
:transition "slideup"
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:height 140
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "fill"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(wmslider
|
||||
:name "gaps outer"
|
||||
:val gapsouter
|
||||
:onchange "swaymsg gaps outer all set {}"
|
||||
:max 300
|
||||
:reset "${EWW_CMD} update gapsouter=0 && swaymsg gaps outer all set 0")
|
||||
(wmslider
|
||||
:name "gaps inner"
|
||||
:val gapsinner
|
||||
:onchange "swaymsg gaps inner all set {}"
|
||||
:max 150
|
||||
:reset "${EWW_CMD} update gapsinner=15 && swaymsg gaps inner all set 15")
|
||||
(wmslider
|
||||
:name "border size"
|
||||
:val borderpixel
|
||||
:onchange "swaymsg default_border pixel {} && swaymsg '[app_id=\".*\"] border pixel {}'"
|
||||
:max 50
|
||||
:reset "${EWW_CMD} update borderpixel=2 && swaymsg default_border pixel 2 && swaymsg '[app_id=\".*\"] border pixel 2'")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "natural scrolling")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" natural_scroll enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" natural_scroll disable"))
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "disable when typing")
|
||||
(checkbox
|
||||
:onchecked "swaymsg input \"type:touchpad\" dwt enable"
|
||||
:onunchecked "swaymsg input \"type:touchpad\" dwt disable"
|
||||
))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:spacing 10
|
||||
(label :text "caffeine")
|
||||
(checkbox
|
||||
:onchecked "swaymsg [app_id='.*'] inhibit_idle open && ${EWW_CMD} update caffeine=true"
|
||||
:onunchecked "swaymsg [app_id='.*'] inhibit_idle none && ${EWW_CMD} update caffeine=false"
|
||||
))
|
||||
))))
|
||||
|
||||
(defwidget sysinfo []
|
||||
(revealer
|
||||
:reveal reveal5
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:height 140
|
||||
(systat :icon "" :val { EWW_CPU.avg })
|
||||
(systat :icon "" :val { EWW_RAM.used_mem_perc })
|
||||
(systat :icon "" :val { gpu })
|
||||
(systat :icon "" :val { EWW_BATTERY.BAT0.capacity })
|
||||
)))
|
||||
|
||||
(defwidget wmslider [name val onchange max reset]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:width 20
|
||||
:vexpand false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label
|
||||
:text name)
|
||||
(scale
|
||||
:min 0
|
||||
:max max
|
||||
:class "wmctrlslide"
|
||||
:tooltip val
|
||||
:value val
|
||||
:onchange onchange)
|
||||
(button
|
||||
:onclick reset
|
||||
:style "padding: 0px 8px 0px 3px;"
|
||||
"")))
|
||||
|
||||
(defwidget systat [icon val]
|
||||
(overlay
|
||||
(circular-progress
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "circsys"
|
||||
:thickness 40
|
||||
:value val)
|
||||
|
||||
(box
|
||||
:class "circiconcontain"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:height 55
|
||||
:width 55
|
||||
(label :text icon))))
|
||||
|
||||
(defwidget user[]
|
||||
(revealer
|
||||
:reveal {!reveal4 && !reveal5 && !reveal6}
|
||||
:transition "slideup"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:height 140
|
||||
:width 320
|
||||
:class "controlpanel-widget"
|
||||
:valign "start"
|
||||
:halign "fill"
|
||||
:hexpand true
|
||||
(image :style "margin: 10px;" :image-width 80 :image-height 80 :path "./assets/image/fieshidle.gif")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "userinfo"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
(label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
|
||||
(label :halign "start" :text uptime :style "font-size: 12px;"))))))
|
||||
|
||||
(defwidget notifications_weather_box []
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:class "controlpanel-widget"
|
||||
:space-evenly false
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealWeather=false"
|
||||
(label :class {!revealWeather ? "titlesel" : "title"} :text "Notifications"))
|
||||
(button
|
||||
:onclick "${EWW_CMD} update revealWeather=true"
|
||||
(label :class {revealWeather ? "titlesel" : "title"} :text "Weather")))
|
||||
|
||||
(box
|
||||
:orientation "h"
|
||||
:vexpand true
|
||||
:hexpand true
|
||||
:space-evenly false
|
||||
|
||||
(revealer
|
||||
:reveal {!revealWeather}
|
||||
:hexpand {!revealWeather}
|
||||
:transition "slideleft"
|
||||
|
||||
(notificationlog))
|
||||
|
||||
(revealer
|
||||
:reveal revealWeather
|
||||
:hexpand revealWeather
|
||||
:transition "slideleft"
|
||||
|
||||
(weather)))))
|
||||
|
||||
(defwidget weather[]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
|
||||
(weathermain)
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for hour in {weatherjson.hourly}
|
||||
(weatherhour :hour hour)))))
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox")
|
||||
))
|
||||
|
||||
(defwidget weatherhour[hour]
|
||||
(box
|
||||
:class "smallentry"
|
||||
:orientation "h"
|
||||
:height 80
|
||||
:halign "fill"
|
||||
:valign "center"
|
||||
:vexpand false
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(label :style "font-size: 20px;" :text {hour.time})
|
||||
(image
|
||||
:image-width 50
|
||||
:image-height 50
|
||||
:path "./assets/image/weather/${hour.icon}.svg")
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(label :halign "start" :text "${hour.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "rain: ${hour.chanceofrain}%"))))
|
||||
|
||||
(defwidget weathermain[]
|
||||
(box
|
||||
:class "mainentry"
|
||||
:orientation "h"
|
||||
:halign "fill"
|
||||
:height 150
|
||||
:space-evenly false
|
||||
:spacing 10
|
||||
(image
|
||||
:image-width 100
|
||||
:image-height 100
|
||||
:style "margin: 10px;"
|
||||
:path "./assets/image/weather/${weatherjson.icon}.svg")
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:valign "fill"
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "v"
|
||||
(label :halign "start" :text {weatherjson.weatherDesc[0].value})
|
||||
(label :halign "start" :text "Feels like ${weatherjson.FeelsLikeC}°C")
|
||||
(label :halign "start" :text "← ${weatherjson.windspeedKmph} km/h")
|
||||
;; (label :halign "start" :text "${weatherjson.visibility} km")
|
||||
;; (label :halign "start" :text "${weatherjson.precipMM} mm")
|
||||
))))
|
||||
|
||||
(defwidget timer[]
|
||||
(box
|
||||
:orientation "v"
|
||||
:class "controlpanel-widget"
|
||||
:space-evenly false
|
||||
:width 180
|
||||
:valign "fill"
|
||||
(label :class "timer" :valign "center" :vexpand true :text timerdis)
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "timer_butt"
|
||||
:valign "end"
|
||||
(button :onclick "./scripts/timer.py timedec" (label :text "-"))
|
||||
(button :onclick "./scripts/timer.py toggle" (label :style "padding-right: 3px;" :text { !matches(timerdis, ":") ? "" : ""}))
|
||||
(button :onclick "./scripts/timer.py timeinc" (label :text "+")))))
|
||||
|
||||
(defwidget bigslides []
|
||||
(box
|
||||
:valign "fill"
|
||||
:halign "fill"
|
||||
:class "controlpanel-widget"
|
||||
:hexpand true
|
||||
:space-evenly true
|
||||
(bigvol)
|
||||
(bigmic)
|
||||
(bigbright)))
|
||||
|
||||
(defwidget bigvol []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
: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 []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
: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 []
|
||||
(overlay
|
||||
(scale
|
||||
:width 50
|
||||
:class "bigslide"
|
||||
:value brightness
|
||||
:onchange "brightnessctl set {}%"
|
||||
:orientation "v"
|
||||
:tooltip "${brightness}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:flipped true)
|
||||
(label
|
||||
:class "slideicon"
|
||||
:valign "end"
|
||||
:text "")))
|
||||
|
||||
(defwidget notificationlog []
|
||||
(overlay
|
||||
(box
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
|
||||
(scroll
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:vexpand true
|
||||
:valign "fill"
|
||||
|
||||
(box
|
||||
:orientation "v"
|
||||
:valign "start"
|
||||
:space-evenly false
|
||||
(for noti in {notifications.notifications}
|
||||
(singlenotif :noti noti :initial false))))
|
||||
|
||||
(box
|
||||
:valign "end"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
:height 80
|
||||
:class "fadeoutbox")
|
||||
(box
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "./scripts/notifManage --clear"
|
||||
(label
|
||||
:class "title"
|
||||
:text "Clear All"))
|
||||
(button
|
||||
:onclick "./scripts/notifManage --toggle"
|
||||
(label
|
||||
:class { notifications.dnd ? "titlesel" : "title"}
|
||||
:text "Do Not Disturb")))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
(defwidget quote []
|
||||
(box
|
||||
:class "quotewid controlpanel-widget"
|
||||
:halign "fill"
|
||||
:valign "fill"
|
||||
:vexpand true
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(scroll :vexpand true :hscroll true :vscroll true
|
||||
(label
|
||||
:class "quote"
|
||||
:text {quotejson.content}
|
||||
:wrap true
|
||||
:width 300))
|
||||
(label
|
||||
:class "quoteauthor"
|
||||
:text "- ${quotejson.author}")))
|
||||
|
||||
(defwidget coolmpd [h permashow]
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "fill"
|
||||
:height h
|
||||
:class { pcover != "" ? "mpdcover" : "controlpanel-widget"}
|
||||
:style "background-image: url('${pcover}')"
|
||||
:visible {permashow ? true : pcover != "" })
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:spacing 10
|
||||
(image :image-width 100 :image-height 100 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover })
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:width 200
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "coolmpd"
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :style "font-size: 20px;" :text psong))
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
(label :text partist))
|
||||
(box
|
||||
:orientation "h"
|
||||
:class "mpd_controls"
|
||||
(button :onclick "playerctl previous"
|
||||
(label :text ""))
|
||||
(button :style "padding-right: 3px;" :onclick "playerctl play-pause"
|
||||
(label :text { pstatus == "Playing" ? "" : ""} ))
|
||||
(button :onclick "playerctl next"
|
||||
(label :text "")))))))
|
|
@ -158,11 +158,11 @@
|
|||
:orientation "v"
|
||||
:class "widget"
|
||||
:space-evenly false
|
||||
(revealer
|
||||
(revealer
|
||||
:reveal reveal3
|
||||
:transition "slideup"
|
||||
:duration "500ms"
|
||||
(box
|
||||
(box
|
||||
:class "touch"
|
||||
:orientation "v"
|
||||
:spacing 5
|
||||
|
@ -178,24 +178,27 @@
|
|||
:transition "slidedown"
|
||||
))))
|
||||
|
||||
(defwidget playerctl []
|
||||
(defwidget playerctl [?cover]
|
||||
(eventbox
|
||||
:cursor "pointer"
|
||||
(box
|
||||
:class "playerctl widget"
|
||||
:class "widget"
|
||||
:orientation "v"
|
||||
:space-evenly true
|
||||
:spacing 6
|
||||
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} open music --toggle"
|
||||
(image :path { pcover == "" ? "./assets/image/emptympd.png" : pcover } :image-width 20 :image-height 20))
|
||||
|
||||
(button :onclick "playerctl previous"
|
||||
(label :class "picon" :text ""))
|
||||
(button :onclick "playerctl play-pause"
|
||||
(label :class "picon" :text { pstatus == "Playing" ? "" : "" }))
|
||||
(label :class "picon" :text { pstatus == "Playing" ? "" : "" }))
|
||||
(button :onclick "playerctl next"
|
||||
(label :class "picon" :text ""))
|
||||
)))
|
||||
|
||||
(defwidget sliders []
|
||||
(box
|
||||
:class "widget"
|
||||
|
@ -203,8 +206,10 @@
|
|||
:space-evenly false
|
||||
:spacing 5
|
||||
:valign "end"
|
||||
|
||||
(button :onclick "alacritty -e nmtui" :tooltip wifi_essid
|
||||
(label :class "icon" :style "font-size: 18px;" :text wifi_icon))
|
||||
|
||||
(reveal_on_hover
|
||||
:var revealVolume
|
||||
:varname "revealVolume"
|
||||
|
@ -212,10 +217,8 @@
|
|||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "sound"
|
||||
(label :class "icon" :text {volumemute == 'false' ? "" : ""})
|
||||
;; {volumemute == 'no' ? volume : " Muted"})
|
||||
)
|
||||
(scale
|
||||
(label :class "icon" :text {volumemute == 'false' ? "" : ""}))
|
||||
(scale
|
||||
:class "volslide"
|
||||
:value volume
|
||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
|
@ -224,6 +227,7 @@
|
|||
:max 101
|
||||
:min 0
|
||||
:flipped true))
|
||||
|
||||
(reveal_on_hover
|
||||
:var revealMicrophone
|
||||
:varname "revealMicrophone"
|
||||
|
@ -241,6 +245,7 @@
|
|||
:max 101
|
||||
:min 0
|
||||
:flipped true))
|
||||
|
||||
(reveal_on_hover
|
||||
:var revealBrightness
|
||||
:varname "revealBrightness"
|
||||
|
@ -259,9 +264,10 @@
|
|||
:min 0
|
||||
:flipped true))
|
||||
))
|
||||
;; other windows
|
||||
|
||||
(defwindow calendar
|
||||
:geometry (geometry :x "0"
|
||||
:geometry (geometry
|
||||
:x "0"
|
||||
:y "0"
|
||||
:width "100"
|
||||
:height "35"
|
||||
|
|
Loading…
Add table
Reference in a new issue