From 3e35f54face36176ff2aacbae9d4369e95f1e61d Mon Sep 17 00:00:00 2001 From: The_miro Date: Tue, 18 Nov 2025 13:03:23 +0100 Subject: [PATCH] added tooltip with disk data --- desktopenvs/hyprland/eww-nobattery/eww.yuck | 11 +++++++++-- desktopenvs/hyprland/eww/eww.yuck | 11 +++++++++-- desktopenvs/hyprland/scripts/dysk-phydisks.sh | 3 ++- 3 files changed, 20 insertions(+), 5 deletions(-) mode change 100644 => 100755 desktopenvs/hyprland/scripts/dysk-phydisks.sh diff --git a/desktopenvs/hyprland/eww-nobattery/eww.yuck b/desktopenvs/hyprland/eww-nobattery/eww.yuck index f17d55c..571a889 100644 --- a/desktopenvs/hyprland/eww-nobattery/eww.yuck +++ b/desktopenvs/hyprland/eww-nobattery/eww.yuck @@ -32,10 +32,12 @@ :value volume :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%" :onclick "hyprctl dispatch exec \[tag +mixer\] pavucontrol") - (metric :label "" + (box + :tooltip {disks} + (metric :label "" :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :onchange "" - :onclick "") + :onclick "")) (clock) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true) )) @@ -105,3 +107,8 @@ (defpoll calender :interval "600s" "~/Dotfiles/desktopenvs/hyprland/scripts/calender-fix.sh") + + +(defpoll disks :interval "600s" + "~/Dotfiles/desktopenvs/hyprland/scripts/dysk-phydisks.sh") + diff --git a/desktopenvs/hyprland/eww/eww.yuck b/desktopenvs/hyprland/eww/eww.yuck index 2841629..46609d4 100644 --- a/desktopenvs/hyprland/eww/eww.yuck +++ b/desktopenvs/hyprland/eww/eww.yuck @@ -37,10 +37,13 @@ :value volume :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%" :onclick "hyprctl dispatch exec \[tag +mixer\] pavucontrol") - (metric :label "" + (box + :tooltip {disks} + (metric :label "" :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} :onchange "" - :onclick "") + :onclick "")) + (clock) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true) )) @@ -110,3 +113,7 @@ (defpoll calender :interval "600s" "~/Dotfiles/desktopenvs/hyprland/scripts/calender-fix.sh") + +(defpoll disks :interval "600s" + "~/Dotfiles/desktopenvs/hyprland/scripts/dysk-phydisks.sh") + diff --git a/desktopenvs/hyprland/scripts/dysk-phydisks.sh b/desktopenvs/hyprland/scripts/dysk-phydisks.sh old mode 100644 new mode 100755 index e92d21f..44510a1 --- a/desktopenvs/hyprland/scripts/dysk-phydisks.sh +++ b/desktopenvs/hyprland/scripts/dysk-phydisks.sh @@ -1,2 +1,3 @@ #!/bin/bash -dysk -a -f 'disk=ssd | disk=hdd' +rawdiskstr=$(dysk -a -f 'disk=ssd | disk=hdd') +echo "$rawdiskstr" | sed '$d'