diff --git a/README.md b/README.md index 3078f9d..f31fd0d 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,29 @@ hyprctl monitors -j It can be used as a title widget in Eww with config similar to below. ```yuck -(deflisten window0 "hyprland-activewindow `hyprctl monitors -j | jq -r \".[0].name\"`") +(deflisten window0 "hyprland-activewindow eDP-1") (defwidget title0 [] (label :text "${window0}")) -(deflisten window1 "hyprland-activewindow `hyprctl monitors -j | jq -r \".[1].name\"`") +(deflisten window1 "hyprland-activewindow DP-1") (defwidget title1 [] (label :text "${window1}")) + +(defwidget bar0 [] + (box + ...other config... + (window0) + ...other config... + ) +) + +(defwidget bar1 [] + (box + ...other config... + (window1) + ...other config... + ) +) ``` ### Advanced Mode @@ -56,4 +72,16 @@ This allows simplified Eww config similar to this: (label :text "${windows['${monitor}'].title}") ) ) + +(defwidget bar0 [] + (box + (window :monitor 0) + ) +) + +(defwidget bar1 [] + (box + (window :monitor 1) + ) +) ``` \ No newline at end of file