eww changes

This commit is contained in:
KoenDR06 2025-03-31 23:50:46 +02:00
parent 842243683c
commit ea0c454902
3 changed files with 106 additions and 92 deletions

View file

@ -3,19 +3,21 @@ $text-color: rgba(255, 255, 255, 1);
$main-color: rgba(255, 0, 0, 1); $main-color: rgba(255, 0, 0, 1);
$accent-color: rgba(0, 255, 0, 1); $accent-color: rgba(0, 255, 0, 1);
$font-size: 1.25rem; $font-size: 20px;
* { * {
margin: 0.25rem; margin: 4px;
background: rgba(0, 0, 0, 0)
} }
window { window {
background-color: $bg-color; background-color: $bg-color;
border-radius: 2.5rem; border-radius: 30px;
font-size: $font-size; font-size: $font-size;
} }
.workspace { .time {
background: rgba(0, 0, 0, 0); border: 1px solid red;
border-radius: 15px;
} }

View file

@ -6,43 +6,58 @@
:x "0%" :x "0%"
:y "0%" :y "0%"
:width "50%" :width "50%"
:height "50%" ; :height "50%"
:anchor "center") :anchor "center")
:stacking "fg" :stacking "fg"
:exclusive false :exclusive false
:focusable false :focusable false
(box :class "main-box"
:orientation "vertical"
(topbar) (topbar)
(runner)
)
)
(defwidget runner []
(box :class "runner"
:orientation "vertical"
(input :class "runner-input"
:value "baaa"
:onchange "eww toggle main"
)
)
) )
(defwidget topbar [] (defwidget topbar []
(centerbox :class="topbar" (centerbox :class "topbar"
("a") (label :text {time} :class "time")
{time}
(workspaces) (workspaces)
(utils) (utils)
) )
) )
(defwidget utils [] (defwidget utils []
(box :class="utils" (box :class "utils"
("a") :space-evenly false
{battery} {battery}
(button :class "util-button"
:onclick "eww close main"
"×")
) )
) )
(defwidget workspaces [] (defwidget workspaces []
(box :class="workspaces" (box :class "workspaces"
("a") ;(button :class "workspace" :onclick "hyprctl dispatch workspace 1" { workspace == 1 ? "◆" : windows-1 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 1" { workspace == 1 ? "◆" : windows-1 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 2" { workspace == 2 ? "◆" : windows-2 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 2" { workspace == 2 ? "◆" : windows-2 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 3" { workspace == 3 ? "◆" : windows-3 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 3" { workspace == 3 ? "◆" : windows-3 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 4" { workspace == 4 ? "◆" : windows-4 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 4" { workspace == 4 ? "◆" : windows-4 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 5" { workspace == 5 ? "◆" : windows-5 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 5" { workspace == 5 ? "◆" : windows-5 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 6" { workspace == 6 ? "◆" : windows-6 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 6" { workspace == 6 ? "◆" : windows-6 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 7" { workspace == 7 ? "◆" : windows-7 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 7" { workspace == 7 ? "◆" : windows-7 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 8" { workspace == 8 ? "◆" : windows-8 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 8" { workspace == 8 ? "◆" : windows-8 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 9" { workspace == 9 ? "◆" : windows-9 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 9" { workspace == 9 ? "◆" : windows-9 }) ;(button :class "workspace" :onclick "hyprctl dispatch workspace 10" { workspace == 10 ? "◆" : windows-10 })
(button :class "workspace" :onclick "hyprctl dispatch workspace 10" { workspace == 10 ? "◆" : windows-10 })
) )
) )

View file

@ -14,74 +14,71 @@
"./scripts/battery.sh" "./scripts/battery.sh"
) )
(defpoll wifi
:interval "1s"
)
; ---- WORKSPACES ---- ; ---- WORKSPACES ----
(defpoll workspace ;(defpoll workspace
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"hyprctl -j activeworkspace | jq '.id'" ; "hyprctl -j activeworkspace | jq '.id'"
) ;)
;
(defpoll windows-1 ;(defpoll windows-1
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 1" ; "./scripts/windows.sh 1"
) ;)
;
(defpoll windows-2 ;(defpoll windows-2
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 2" ; "./scripts/windows.sh 2"
) ;)
;
(defpoll windows-3 ;(defpoll windows-3
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 3" ; "./scripts/windows.sh 3"
) ;)
;
(defpoll windows-4 ;(defpoll windows-4
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 4" ; "./scripts/windows.sh 4"
) ;)
;
(defpoll windows-5 ;(defpoll windows-5
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 5" ; "./scripts/windows.sh 5"
) ;)
;
(defpoll windows-6 ;(defpoll windows-6
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 6" ; "./scripts/windows.sh 6"
) ;)
;
(defpoll windows-7 ;(defpoll windows-7
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 7" ; "./scripts/windows.sh 7"
) ;)
;
(defpoll windows-8 ;(defpoll windows-8
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 8" ; "./scripts/windows.sh 8"
) ;)
;
(defpoll windows-9 ;(defpoll windows-9
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 9" ; "./scripts/windows.sh 9"
) ;)
;
(defpoll windows-10 ;(defpoll windows-10
:interval '0.1s' ; :interval '0.1s'
:initial-value "" ; :initial-value ""
"./scripts/windows.sh 10" ; "./scripts/windows.sh 10"
) ;)