This commit is contained in:
2024-05-24 11:26:09 +02:00
parent d4442bdf2a
commit a169ab6ab9
3 changed files with 33 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
./neovim ./neovim
./nextcloud ./nextcloud
./obs ./obs
./picard
./planify ./planify
./prusa-slicer ./prusa-slicer
./pulseaudio ./pulseaudio

View File

@@ -22,10 +22,20 @@
(box (box
:space-evenly "false" :space-evenly "false"
:halign "end" :halign "end"
(audio)
(nw) (nw)
(date) (date)
)) ))
;; The Internet Information box.
(defwidget audio []
(box :class "container"
:space-evenly "false"
:halign "end"
(label :class "iconBat" :text "${volicon} ")
(label :class "text" :text "${vol} % ")
(label :class "text" :text "${micicon} ")))
;; The Internet Information box. ;; The Internet Information box.
(defwidget nw [] (defwidget nw []
(box :class "container" (box :class "container"
@@ -46,12 +56,27 @@
;; Variables ;; Variables
(defpoll nwup (defpoll volicon
:interval "1s"
:initial "-" ; optional, defaults to poll at startup
`if [[ $(cut -d ' ' -f 2 <<< $(pulseaudio-ctl full-status)) == "yes" ]]; then echo "󰝟"; else echo ""; fi`)
(defpoll vol
:interval "1s"
:initial "-" ; optional, defaults to poll at startup
`Volume=$(cut -d ' ' -f 1 <<<$(pulseaudio-ctl full-status)); echo "$(( Volume/2 ))"`)
(defpoll micicon
:interval "1s"
:initial "-" ; optional, defaults to poll at startup
`if [[ $(cut -d ' ' -f 3 <<< $(pulseaudio-ctl full-status)) == "yes" ]]; then echo ""; else echo ""; fi`)
(defpoll nwup ;; TODO
:interval "1s" :interval "1s"
:initial "-" ; optional, defaults to poll at startup :initial "-" ; optional, defaults to poll at startup
`echo "up"`) `echo "up"`)
(defpoll nwdown (defpoll nwdown ; TODO
:interval "1s" :interval "1s"
:initial "-" ; optional, defaults to poll at startup :initial "-" ; optional, defaults to poll at startup
`echo "down"`) `echo "down"`)

View File

@@ -0,0 +1,5 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [ picard ];
}