New backup 2025-03-12 22:15:01
This commit is contained in:
parent
a574a0f4b0
commit
6e1b2ec305
3 changed files with 19 additions and 9 deletions
|
@ -1,8 +1,9 @@
|
|||
(defpoll inhibit_active :initial false
|
||||
:interval "60s"
|
||||
"scripts/bar/inhibit-status")
|
||||
;(defpoll inhibit_active :initial false
|
||||
; :interval "60s"
|
||||
; "scripts/bar/inhibit-status")
|
||||
(defvar inhibit_active false)
|
||||
|
||||
(defwidget idleinhibit []
|
||||
(button :onclick {inhibit_active ? 'killall eww-idle-inhibit' : 'systemd-inhibit --what="idle" --mode="block" scripts/bar/eww-idle-inhibit'}
|
||||
(button :onclick {inhibit_active ? 'killall eww-idle-inhibit;eww update inhibit_active=false' : 'systemd-inhibit --what="idle" --mode="block" scripts/bar/eww-idle-inhibit & eww update inhibit_active=true'}
|
||||
:class {inhibit_active ? "active" : ""}
|
||||
{inhibit_active ? "" : ""}))
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
{(volume == 0) ? "" : ((volume > 50) ? "" : "")})
|
||||
(volume_children)))
|
||||
|
||||
(defpoll volume :initial 0
|
||||
:interval "60s"
|
||||
"scripts/bar/volume-status")
|
||||
(deflisten volume :initial "50"
|
||||
"scripts/bar/volume")
|
||||
(defwidget volume_children []
|
||||
(box :class "reveal_children"
|
||||
:orientation "h"
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
pactl subscribe | awk '/new/ && /sink-input/' while read -r event;do
|
||||
echo "test"
|
||||
function print_volume() {
|
||||
if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then
|
||||
echo 0
|
||||
else
|
||||
echo "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')"
|
||||
fi
|
||||
}
|
||||
|
||||
print_volume
|
||||
|
||||
pactl subscribe | awk '{ if($0 ~ "new") if($0 ~ "sink-input") {system("echo hi")} }' | while read -r event;do
|
||||
print_volume
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue