diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2024-10-11 20:43:20 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2024-10-11 20:43:20 -0500 |
commit | ce020ab718b0ea09224dd15fc9a5796b3acc7904 (patch) | |
tree | 5d1ab3fb93f85d6fbf1b9fe84dfcd3484ce6ef33 /awesome/widgets/pipewire.lua | |
parent | 5e84a09eb67772b07a73102538d2445ecb403613 (diff) | |
download | dotconfig-ce020ab718b0ea09224dd15fc9a5796b3acc7904.tar.xz dotconfig-ce020ab718b0ea09224dd15fc9a5796b3acc7904.zip |
overhaul awesome
Diffstat (limited to 'awesome/widgets/pipewire.lua')
-rw-r--r-- | awesome/widgets/pipewire.lua | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/awesome/widgets/pipewire.lua b/awesome/widgets/pipewire.lua deleted file mode 100644 index 3195ee7..0000000 --- a/awesome/widgets/pipewire.lua +++ /dev/null @@ -1,34 +0,0 @@ -local awful = require("awful") -local wibox = require("wibox") - ---local get_volume_cmd = "wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume: //;s/0*\\.//'" ---local set_volume_cmd = "wpctl set-volume @DEFAULT_AUDIO_SINK@ %d%%%s" -- will be formatted -local get_volume_cmd = "wpctl get-volume @DEFAULT_AUDIO_SINK@" - -local widget = { - textbox = wibox.widget.textbox() -} - -local updating = false -function update_volume() - if updating then - return - end - awful.spawn.easy_async(get_volume_cmd, function(vol) - updating = true - vol = vol:sub(8) * 100 -- skip `Volume: ` whos len is 8 - widget.textbox:set_text(math.floor(vol)) - updating = false - end) -end - --- NOTE pulseaudio-utils (pactl) is still required due to the dependence on the --- `pactl subscribe` command. in the future it would be advantageous to replace --- this. currently it is (probably) only really possible with dbus. -awful.spawn.with_line_callback("pactl subscribe", { stdout = function(stdout) - --update_volume() -end }) - -update_volume() - -return widget.textbox |