diff options
| author | venomade <venomade@venomade.com> | 2026-02-11 11:42:58 +0000 |
|---|---|---|
| committer | venomade <venomade@venomade.com> | 2026-02-11 11:42:58 +0000 |
| commit | 0bd150185551b6d8835d022c15a5f6e832d51113 (patch) | |
| tree | 10bf3f3443df49a44eb47b328b73b7e76b0a4924 /.config/luastatus/alsa.lua | |
| parent | 8d688d1107c46b6dfdcaf02fa5c9c4c8a4640e65 (diff) | |
Asahi
Soft reset of dotfiles specific to Asahi, Sway and Neovim.
Diffstat (limited to '.config/luastatus/alsa.lua')
| -rw-r--r-- | .config/luastatus/alsa.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.config/luastatus/alsa.lua b/.config/luastatus/alsa.lua new file mode 100644 index 0000000..fb97270 --- /dev/null +++ b/.config/luastatus/alsa.lua @@ -0,0 +1,23 @@ +widget = { + plugin = 'alsa', + cb = function(t) + local symbol = '' + if t.mute then + return { full_text = ' ', color = '#ed8796' } + else + local percent = (t.vol.cur - t.vol.min) / (t.vol.max - t.vol.min) * 100 + if percent <= 30 then + symbol = '' + elseif percent >= 70 then + symbol = '' + end + return { full_text = string.format('%s%3d%%', symbol, math.floor(0.5 + percent)), color = '#b7bdf8' } + end + end, + event = [[ + local t = ... + if t.button == 1 then + os.execute('pactl set-sink-mute @DEFAULT_SINK@ toggle &') + end + ]], +} |
