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

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

@ -1,43 +1,19 @@
@import "../colors.scss";
.bar {
font-size: 16px;
font-size: 18px;
margin: 0px;
background-color: $background_color_dark;
.panel {
background-color: $background_color;
border-radius: 16px;
margin: 6px;
padding: 0 6px 0 6px;
}
.center {
background: rgba(89, 89, 89, 0.667);
border-radius: 15px;
padding: 0 10px 0 10px;
}
.workspaces {
> .workspace {
background: $background_color_dark;
border-radius: 50%;
border: 2px solid $accent-color;
&.focused {
background: $accent-color;
}
.workspace {
background: rgba(89, 89, 89, 0.667);
border-radius: 15px;
padding: 0 10px 0 10px;
&.focused {
background: rgba(255, 255, 255, 0.667);
}
> .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
text=$(echo $output | jq -r "select(.id == $w) | .name")
if [ $w -eq $focused ]; then
buf="$buf (button :class \"workspace focused\" :width 20 :height 20)"
buf="$buf (label :class \"workspace focused\" :text \"$text\")"
else
buf="$buf (button :class \"workspace\" :width 20 :height 20)"
buf="$buf (label :class \"workspace\" :text \"$text\")"
fi
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

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