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);
$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 {
background-color: $bg-color;
border-radius: 2.5rem;
border-radius: 30px;
font-size: $font-size;
}
.workspace {
background: rgba(0, 0, 0, 0);
.time {
border: 1px solid red;
border-radius: 15px;
}

View file

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

View file

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