This commit is contained in:
shinya 2025-03-05 17:43:05 +01:00
parent 35e64c371b
commit f62cb382a8
2 changed files with 27 additions and 2 deletions

View File

@ -15,7 +15,7 @@
vitetris
steam
superTuxKart
wine
wineWowPackages.stable
(writeShellScriptBin "gs" ''
set -xeuo pipefail

View File

@ -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)