Comments (5)
I made a minimal reproduction:
local gears = require("gears")
local lgi = require("lgi")
local wibox = require("wibox")
local widget = wibox.widget.textbox()
local Playerctl = lgi.Playerctl
gears.timer.delayed_call(function()
local manager = Playerctl.PlayerManager()
function manager:on_name_appeared(name)
local player = Playerctl.Player.new_from_name(name)
manager:manage_player(player)
function player:on_metadata(metadata)
if self:get_title() then
widget:set_text(self:get_artist() .. " – " .. self:get_title())
else
widget:set_text("-")
end
end
function player:on_playback_status()
if self:get_title() then
widget:set_text(self:get_artist() .. " – " .. self:get_title())
else
widget:set_text("-")
end
end
widget:connect_signal("button::press", function() player:play_pause() end)
end
end)
It seems that the issue only happens when you use Playerctl.PlayerManager
. If you use Playerctl.Player
directly, the issue no longer occurs. This is probably an upstream issue, but the repo has not been active for almost 2 years now...
from bling.
EDIT: Oops sorry. I thought we were in the Awesome repository. Feel free to dismiss my comment.
Hello @musjj,
This issue sounds unrelated to Awesome.
LGI (https://github.com/lgi-devs/lgi) is a Lua binding to GObject based libraries. It can be used independently from Awesome. So you could try to make the minimal example be a simple script.
Also, when reporting issues, stack strace/error messages/logs are useful to understand what's going on.
from bling.
No worries, that's actually helpful. This time, AwesomeWM didn't crash, but the player still took a long time to launch. So I looked at AwesomeWM's stderr and I found this:
2023-08-24 15:13:52 W: awesome: a_glib_poll:477: Last main loop iteration took
25.012281 seconds! Increasing limit for this warning to that value.
It looks like it got stuck in a loop somewhere? This might be an AwesomeWM issue, rather than playerctl
, but I'm not so sure.
from bling.
This error basically means that something blocked the Awesome process for a long period of time. It is problematic because while Awesome is blocked, the computer feels frozen to the user.
I guess the something blocking Awesome is the Payerctl stuff, but I also can't guarantee it's that. 🤷
from bling.
The error disappears if I remove the playerctl
part. So I guess either lgi
or playerctl
is the culprit here.
from bling.
Related Issues (20)
- Request: Horizontal mstab HOT 1
- Flash focus dual monitor not flash HOT 1
- bling tag preview cut off image HOT 4
- Provide a theme option for master on right side HOT 1
- Tabbar and mstab theme variable are not applied HOT 1
- Tiled Wallpaper preview image in docs is dead HOT 1
- Error in app launcher HOT 3
- [Feature Request] Navigate in tabbed containers via index numbers? HOT 2
- Task Preview does not follow widget structure
- Is it possible to exclude applications from Flash Focus? HOT 1
- Option to not focus the scratchpad when toggled on?
- The method "get_bounding_geometry" captures the resolution of the other screen HOT 1
- Unable to launch flatpak desktop files with app launcher HOT 3
- scratchpads not working with st terminal HOT 2
- Scratchpad-specific keybindings HOT 3
- Scratchpad module 'ruled' not found HOT 4
- Tag Preview only showing app icons instead of images of windows HOT 1
- Feature Request: Whitelist support for window swallowing HOT 2
- launching apps that use qt in bling applauncher in nixos makes qt theme not apply
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bling.