Compare commits

..

No commits in common. "main" and "dev" have entirely different histories.
main ... dev

5 changed files with 47 additions and 117 deletions

101
bar/.yuck Executable file → Normal file
View File

@ -1,47 +1,27 @@
(defwindow bar (defpoll time :interval "10s"
:monitor 1 "date '+%H:%M %b %d, %Y'")
:geometry (geometry
:x "0px"
:y "0px"
:width "100%"
:height "0"
:anchor "top center"
)
:stacking "fg"
:exclusive true
:focusable false
(bar)
)
(defwidget bar [] (defwidget system-tray []
(box :class "bar" (systray
:orientation "h" :halign "center"
:hexpand true ))
:space-evenly true
(left)
(center)
(right)
)
)
(defwidget left [] (defwidget left []
(box (box
:class "panel" :class "panel"
:orientation "h" :orientation "h"
:halign "start" :halign "end"
:valign "fill"
:space-evenly false :space-evenly false
(workspaces_indicator :hexpand true :valign "center") (system-tray)
) (label :text time)
) ))
(defwidget center [] (defwidget center []
(box (box
:class "panel" :class "panel"
:halign "center" :halign "center"
:valign "fill"
:space-evenly false :space-evenly false
(label :text "Hareworks" :class "center") (label :text "Hareworks")
) )
) )
@ -49,50 +29,39 @@
(box (box
:class "panel" :class "panel"
:orientation "h" :orientation "h"
:halign "end" :halign "start"
:valign "fill"
:space-evenly false :space-evenly false
(system-tray) (workspaces)
(label :text time)
) )
) )
(defwidget workspaces_indicator [] (defwidget workspaces []
(literal (literal :content get_workspaces))
:content workspaces_indicator :hexpand true :valign "center"
)
)
(deflisten workspaces_indicator `sh ~/.config/eww/bar/workspace.sh 1`) (deflisten get_workspaces `sh ~/.config/eww/bar/workspace.sh 1`)
(defpoll time :interval "10s" (defwidget bar []
"date '+%H:%M %b %d, %Y'") (box :class "bar"
:orientation "h"
:hexpand true
:space-evenly true
(right)
(center)
(left)
))
(defwidget system-tray [] (defwindow bar
(systray
:halign "center"
:icon-size 24
:height 32
)
)
(defwindow roundedEdge
:monitor 1 :monitor 1
:geometry (geometry :geometry (geometry
:x "0px" :x "0px"
:y "0px" :y "8px"
:width "100%" :width "2544px"
:height "15px" :height "30px"
:anchor "top center") :anchor "top center")
:stacking "bg" :stacking "fg"
:exclusive false :exclusive true
:focusable false :focusable false
(box :class "roundededge" (bar))
:orientation "h"
:space-evenly false
(label :text "" :class "left" :width 15)
(label :text "" :class "center" :hexpand true)
(label :text "" :class "right" :width 15)
)
)

42
bar/style.scss Executable file → Normal file
View File

@ -1,43 +1,19 @@
@import "../colors.scss";
.bar { .bar {
font-size: 16px; font-size: 18px;
margin: 0px; margin: 0px;
background-color: $background_color_dark;
.panel { .panel {
background-color: $background_color; background: rgba(89, 89, 89, 0.667);
border-radius: 16px; border-radius: 15px;
margin: 6px;
padding: 0 6px 0 6px;
}
.center {
padding: 0 10px 0 10px; padding: 0 10px 0 10px;
} }
.workspaces { .workspace {
> .workspace { background: rgba(89, 89, 89, 0.667);
background: $background_color_dark; border-radius: 15px;
border-radius: 50%; padding: 0 10px 0 10px;
border: 2px solid $accent-color; &.focused {
&.focused { background: rgba(255, 255, 255, 0.667);
background: $accent-color;
}
}
> .label {
color: $text-color;
padding: 0 26px 0 4px;
} }
} }
} }
.roundededge {
>.right {
background-image: radial-gradient(circle at calc(100% - 15px) 15px, transparent 15px, $background_color_dark 0px);
}
>.left {
background-image: radial-gradient(circle at 15px 15px, transparent 15px, $background_color_dark 0px);
}
}

7
bar/workspace.sh Executable file → Normal file
View File

@ -8,14 +8,13 @@ print_workspaces() {
for w in $(echo $output | jq -r '.id'); do for w in $(echo $output | jq -r '.id'); do
text=$(echo $output | jq -r "select(.id == $w) | .name") text=$(echo $output | jq -r "select(.id == $w) | .name")
if [ $w -eq $focused ]; then if [ $w -eq $focused ]; then
buf="$buf (button :class \"workspace focused\" :width 20 :height 20)" buf="$buf (label :class \"workspace focused\" :text \"$text\")"
else else
buf="$buf (button :class \"workspace\" :width 20 :height 20)" buf="$buf (label :class \"workspace\" :text \"$text\")"
fi fi
done done
focused=$(echo $output | jq -r "select(.id == $focused) | .name")
echo "(box :class \"workspaces\" :orientation \"h\" :space-evenly false :spacing 4 :hexpand true :valign \"center\"$buf (label :class \"label\" :text \"$focused\"))" echo "(box :class \"workspaces\" :orientation \"h\" :valign \"start\"$buf)"
} }
print_workspaces print_workspaces

View File

@ -1,14 +0,0 @@
$primary-color: #ff4081;
$secondary-color: #3f51b5;
$accent-color: #caf9ff;
$background-color: #3b3b3b;
$background-color-light: #616161;
$background-color-dark: #212121;
$text-color: #e2e2e2;
$text-color-black: #2c2c2c;
$success-color: #4caf50;
$error-color: #f44336;
$warning-color: #ff9800;
$info-color: #2196f3;

0
eww.scss Executable file → Normal file
View File