From f62cb382a853fa97b1e31c8333cf74feeda0fd79 Mon Sep 17 00:00:00 2001 From: shinya Date: Wed, 5 Mar 2025 17:43:05 +0100 Subject: [PATCH] cleanup --- nixos/home/apps/games.nix | 2 +- .../desktop/hyprland/eww/dashboard/eww.yuck | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/nixos/home/apps/games.nix b/nixos/home/apps/games.nix index 2187254..2140062 100644 --- a/nixos/home/apps/games.nix +++ b/nixos/home/apps/games.nix @@ -15,7 +15,7 @@ vitetris steam superTuxKart - wine + wineWowPackages.stable (writeShellScriptBin "gs" '' set -xeuo pipefail diff --git a/nixos/home/desktop/hyprland/eww/dashboard/eww.yuck b/nixos/home/desktop/hyprland/eww/dashboard/eww.yuck index 88d7679..235df2d 100644 --- a/nixos/home/desktop/hyprland/eww/dashboard/eww.yuck +++ b/nixos/home/desktop/hyprland/eww/dashboard/eww.yuck @@ -38,6 +38,13 @@ ;; Files vars (defpoll FREE :interval "5s" `df -h / | awk '{print $4}' | tail -n 1 | sed 's/G/GB/'`) +;; Bluetooth vars +;; Headphones +(defpoll BLUETOOTH_HEADPHONES_STATUS :interval "5s" `bluetooth-status EF:DD:5D:31:76:F0`) +(defpoll BLUETOOTH_HEADPHONES_BATTERY :interval "5s" `bluetooth-battery EF:DD:5D:31:76:F0`) +(defpoll BLUETOOTH_MOUSE_STATUS :interval "5s" `bluetooth-status D9:2E:B4:70:BF:D6`) +(defpoll BLUETOOTH_MOUSE_BATTERY :interval "5s" `bluetooth-battery D9:2E:B4:70:BF:D6`) + ;; ** Widgets ************************************************************************* @@ -82,7 +89,7 @@ ;; uptime (defwidget uptime [] (box :class "genwin" - (box :orientation "h" :halign "center" :spacing 40 :space-evenly "false" :vexpand "false" :hexpand "false" + (box :orientation "h" :halign "center" :spacing 5 :space-evenly "false" :vexpand "false" :hexpand "false" (label :class "icontimer" :valign "center" :text "󱎫 ") (box :orientation "v" :valign "center" :spacing 0 :space-evenly "false" :vexpand "false" :hexpand "false" (label :class "uphour" :halign "start" :wrap "true" :limit-width 25 :text UPHOUR) @@ -102,6 +109,19 @@ (box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" (scale :onscroll "playerctl position 1+" :min 0 :active "true" :max 100 :value CURRENT))))) +;; Bluetooth +(defwidget bluetooth [] + (box :class "genwin" :orientation "v" :spacing 10 + (box :orientation "h" :spacing 5 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true" + (button :class "bt_toggle" :onclick "bluetooth-toggle EF:DD:5D:31:76:F0" "󰋋")) + (box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true" + (label :class "bt_bluetooth" :text BLUETOOTH_HEADPHONES_STATUS) + (label :class "bt_bluetooth" :text BLUETOOTH_HEADPHONES_BATTERY)) + (box :orientation "h" :spacing 5 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true" + (button :class "bt_toggle" :onclick "bluetooth-toggle D9:2E:B4:70:BF:D6" "󰍽")) + (box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true" + (label :class "bt_bluetooth" :text BLUETOOTH_MOUSE_STATUS) + (label :class "bt_bluetooth" :text BLUETOOTH_MOUSE_BATTERY)))) ;; folders (defwidget folders [] (box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false" @@ -164,6 +184,11 @@ :geometry (geometry :x 515 :y 490 :width 610 :height 280) (music)) +;; bluetooth +(defwindow bluetooth :stacking "fg" :focusable "false" :monitor 0 + :geometry (geometry :x 880 :y 150 :width 220 :height 325) + (bluetooth)) + ;; folders (defwindow folders :stacking "fg" :focusable "false" :monitor 0 :geometry (geometry :x 1445 :y 490 :width 325 :height 440)