Compare commits
No commits in common. "87d53df0fa80b4be180afe9f5a6adb140b608586" and "191d137fd49347c347eabe159da6de00c61d9ba8" have entirely different histories.
87d53df0fa
...
191d137fd4
67
bar/.yuck
67
bar/.yuck
|
@ -1,67 +0,0 @@
|
|||
(defpoll time :interval "10s"
|
||||
"date '+%H:%M %b %d, %Y'")
|
||||
|
||||
(defwidget system-tray []
|
||||
(systray
|
||||
:halign "center"
|
||||
))
|
||||
|
||||
(defwidget left []
|
||||
(box
|
||||
:class "panel"
|
||||
:orientation "h"
|
||||
:halign "end"
|
||||
:space-evenly false
|
||||
(system-tray)
|
||||
(label :text time)
|
||||
))
|
||||
|
||||
(defwidget center []
|
||||
(box
|
||||
:class "panel"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
(label :text "Hareworks")
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget right []
|
||||
(box
|
||||
:class "panel"
|
||||
:orientation "h"
|
||||
:halign "start"
|
||||
:space-evenly false
|
||||
(workspaces)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspaces []
|
||||
(literal :content get_workspaces))
|
||||
|
||||
(deflisten get_workspaces `sh ~/.config/eww/bar/workspace.sh 1`)
|
||||
|
||||
(defwidget bar []
|
||||
(box :class "bar"
|
||||
:orientation "h"
|
||||
:hexpand true
|
||||
:space-evenly true
|
||||
(right)
|
||||
(center)
|
||||
(left)
|
||||
))
|
||||
|
||||
(defwindow bar
|
||||
:monitor 1
|
||||
:geometry (geometry
|
||||
:x "0px"
|
||||
:y "8px"
|
||||
:width "2544px"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
:focusable false
|
||||
(bar))
|
||||
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
.bar {
|
||||
font-size: 18px;
|
||||
margin: 0px;
|
||||
|
||||
.panel {
|
||||
background: rgba(89, 89, 89, 0.667);
|
||||
border-radius: 15px;
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
.workspace {
|
||||
background: rgba(89, 89, 89, 0.667);
|
||||
border-radius: 15px;
|
||||
padding: 0 10px 0 10px;
|
||||
&.focused {
|
||||
background: rgba(255, 255, 255, 0.667);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/sh
|
||||
monitor_id=$1
|
||||
|
||||
print_workspaces() {
|
||||
buf=""
|
||||
output=$(hyprctl -j workspaces | jq -r ".[] | select(.monitorID == $monitor_id)")
|
||||
focused=$(hyprctl monitors -j | jq -r ".[] | select(.id == $monitor_id) | .activeWorkspace.id")
|
||||
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 (label :class \"workspace focused\" :text \"$text\")"
|
||||
else
|
||||
buf="$buf (label :class \"workspace\" :text \"$text\")"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "(box :class \"workspaces\" :orientation \"h\" :valign \"start\"$buf)"
|
||||
}
|
||||
|
||||
print_workspaces
|
||||
|
||||
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do
|
||||
case $line in
|
||||
workspace\>\>*)
|
||||
echo $line
|
||||
print_workspaces
|
||||
;;
|
||||
esac
|
||||
done
|
Loading…
Reference in New Issue
Block a user