From 8fff6bd4084695bc08a1ad41c1c56295f20087a4 Mon Sep 17 00:00:00 2001 From: eoli3n Date: Wed, 8 Nov 2023 20:50:11 +0100 Subject: [PATCH] added todo and some eww scripts --- roles/eww/TODO | 4 ++++ roles/eww/files/get-outputs | 13 +++++++++++++ roles/eww/files/start-eww | 5 +++++ roles/eww/tasks/main.yml | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 roles/eww/TODO create mode 100755 roles/eww/files/get-outputs create mode 100755 roles/eww/files/start-eww 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