aboutsummaryrefslogtreecommitdiff
path: root/share/home
diff options
context:
space:
mode:
Diffstat (limited to 'share/home')
-rw-r--r--share/home/eww/config/eww.scss9
-rw-r--r--share/home/eww/config/eww.yuck60
2 files changed, 52 insertions, 17 deletions
diff --git a/share/home/eww/config/eww.scss b/share/home/eww/config/eww.scss
index 8172b28..418f725 100644
--- a/share/home/eww/config/eww.scss
+++ b/share/home/eww/config/eww.scss
@@ -5,9 +5,16 @@
.bar {
background-color: #3a3a3a;
color: #fff;
+ padding: 1rem .25rem;
}
.workspaces {
- font-size: 1.5em;
+ font-size: 2em;
}
+
+.card {
+ background-color: #1d2021;
+ margin: 1px;
+ padding: 5px 2px;
+}
diff --git a/share/home/eww/config/eww.yuck b/share/home/eww/config/eww.yuck
index 0f27d9f..4cb9bc9 100644
--- a/share/home/eww/config/eww.yuck
+++ b/share/home/eww/config/eww.yuck
@@ -1,8 +1,9 @@
(defwidget bar []
(centerbox :orientation "v"
+ :class "bar"
(workspaces)
- "test"
- (battery)))
+ "t1"
+ (sidestuff)))
(defwidget workspace-btn [n ?icon]
(button :onclick "hyprctl dispatch 'workspace ${n}'"
@@ -26,25 +27,52 @@
(workspace-btn :n 8 :icon "")
(workspace-btn :n 9 :icon "")))
-(defwidget battery []
- (metric :label "󰁹"
- :value {EWW_BATTERY}
- :onchange ""))
-(defwidget metric [label value onchange]
- (box :orientation "v"
- :class "metric"
+(defwidget sidestuff []
+ (box :class "sidestuff"
+ :orientation "v"
+ :space-evenly false
+ :spacing 10
+ :valign "end"
+ (netstats :device "wlp2s0")
+ (battery :device "BAT0")
+ (clock)))
+
+(defwidget metric [icon ?font-size]
+ (box :class "metric card"
+ :orientation "v"
+ (label :class "metric-icon"
+ :style {font-size != "" ? "font-size: ${font-size}rem;" : ""}
+ :text icon)
+ (children)))
+
+(defwidget netstats [device]
+ (box :class "netstats"
+ :orientation "v"
:space-evenly false
- (box :class "label" label)
- (scale :min 0
- :max 101
- :active {onchange != ""}
- :value value
- :onchange onchange)))
+ :valign "end"
+ :halign "center"
+ device
+ "up"
+ {EWW_NET[device].NET_UP}))
+
+(defwidget battery [device]
+ (metric :icon "bat"
+ "${EWW_BATTERY[device].capacity}%"))
+
+(defwidget clock []
+ (box :class "card"
+ :orientation "v"
+ :valign "end"
+ :spacing -3
+ {formattime(EWW_TIME, "%a")}
+ {formattime(EWW_TIME, "%-d")}
+ {formattime(EWW_TIME, "%-m")}
+ {formattime(EWW_TIME, "%-y")}))
(defwindow bar
:monitor 0
- :geometry (geometry :width "1.25%"
+ :geometry (geometry :width "1.5%"
:height "98%"
:anchor "right center")
:stacking "fg"