diff options
| author | venomade <venomade@venomade.com> | 2026-02-16 17:31:16 +0000 |
|---|---|---|
| committer | venomade <venomade@venomade.com> | 2026-02-16 17:31:16 +0000 |
| commit | a568a964fd6a9efba388b2b4919339c0b7dfe51d (patch) | |
| tree | 0c6adbf753de1c0b469e911668a82c6b2002f5f8 /.config/luastatus/playerctl.lua | |
| parent | 9d2c3f898a97de16b986d4e494f31e6c6f3d176a (diff) | |
Asahi is just not perfectly usable yet. Moved stuff, went nix.
Diffstat (limited to '.config/luastatus/playerctl.lua')
| -rw-r--r-- | .config/luastatus/playerctl.lua | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/.config/luastatus/playerctl.lua b/.config/luastatus/playerctl.lua deleted file mode 100644 index a3e743c..0000000 --- a/.config/luastatus/playerctl.lua +++ /dev/null @@ -1,43 +0,0 @@ -local player = 'jellyfin-tui' - -widget = { - plugin = 'timer', - opts = { period = 2 }, - cb = function() - - local handle = io.popen('playerctl -p ' .. player .. ' status') - local playerctl_status = string.sub(handle:read("*a"), 1, -2) - handle:close() - - local symbol = '' - - if (playerctl_status == 'Playing') or (playerctl_status == 'Paused') then - local handle = io.popen('playerctl -p ' .. player ..' metadata title') - local playerctl_title = string.sub(handle:read("*a"), 1, -2) - handle:close() - - local handle = io.popen('playerctl -p ' .. player .. ' metadata artist') - local playerctl_artist = string.sub(handle:read("*a"), 1, -2) - handle:close() - - if playerctl_status == 'Playing' then - symbol = '' - end - - return { - { full_text = string.format('%s - %s %s', playerctl_artist, playerctl_title, symbol), color = "#f2cdcd" } - } - end - - return { - { full_text = " "} - } - end, - -- TODO: Figure out if this can stop being hardcoded - event = [[ - local t = ... - if t.button == 1 then - os.execute('playerctl -p jellyfin-tui play-pause') - end - ]], -} |
