diff --git a/roles/eww/TODO b/roles/eww/TODO new file mode 100644 index 0000000..14f4ffa --- /dev/null +++ b/roles/eww/TODO @@ -0,0 +1,4 @@ +# sway widget +- get-window-title : https://wiki.hyprland.org/Useful-Utilities/Status-Bars/#eww +- multi-monitor +- resize mode diff --git a/roles/eww/files/get-outputs b/roles/eww/files/get-outputs new file mode 100755 index 0000000..a0b40ea --- /dev/null +++ b/roles/eww/files/get-outputs @@ -0,0 +1,13 @@ +#!/bin/bash + +function run() { + swaymsg -t get_outputs | jq -rc 'to_entries | map({name: .value.name, id: .key, active: .value.active})' +} + +run + +swaymsg -t subscribe '["workspace"]' --monitor | { + while read -r; do + run + done +} diff --git a/roles/eww/files/start-eww b/roles/eww/files/start-eww new file mode 100755 index 0000000..fe466cd --- /dev/null +++ b/roles/eww/files/start-eww @@ -0,0 +1,5 @@ +#!/bin/bash + +EWW="$HOME/dev/eww/target/release/eww" +$EWW --restart daemon +$EWW open bartop diff --git a/roles/eww/tasks/main.yml b/roles/eww/tasks/main.yml index 2a46fbe..d1a941b 100644 --- a/roles/eww/tasks/main.yml +++ b/roles/eww/tasks/main.yml @@ -41,3 +41,5 @@ dest: "$HOME/.config/eww/scripts" loop: - get-workspaces + - get-outputs + - start-eww