fixing things for eww and hyprland

This commit is contained in:
Chris Cochrun 2023-08-30 17:29:01 -05:00
parent d34f4ab2b4
commit 849b950c02
8 changed files with 29 additions and 102 deletions

View file

@ -18,11 +18,10 @@
(defpoll HOST :interval "1h" "hostname")
(defpoll DISK :interval "1m" "disk")
(deflisten volume_percent :interval "0.5s" "tail -F /tmp/vol")
(deflisten workspace "scripts/workspace")
(deflisten appname "scripts/appname")
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(deflisten workspaces :initial "[]" "scripts/get-workspaces")
(deflisten current_workspace :initial "1" "scripts/get-active-workspace")
(defvar vol_reveal false)
(defvar br_reveal false)
@ -39,15 +38,22 @@
:onscroll "echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace"
:valign "center"
(box
:class "works"
:class "worksbox"
:orientation "h"
:spacing 5
:space-evenly "true"
:spacing 20
:space-evenly false
:valign "center"
(for workspace in workspaces
(button :onclick "hyprctl dispatch workspace ${workspace.id}" :class "works ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}" "${workspace.name}")))))
(button :onclick "hyprctl dispatch workspace ${workspace.id}" :class "works ${workspace.id == current_workspace ? "current_workspace" : ""} ${workspace.windows > 0 ? "occupied_workspace" : "empty_workspace"}"
"${workspace.id == 1 ? "" :
workspace.id == 2 ? "" :
workspace.id == 3 ? "󰈙" :
workspace.id == 4 ? "󰍨" :
workspace.id == 5 ? "" :
workspace.id == 9 ? "" :
workspace.id}")))))
(defwidget appnames []
(eventbox