Docs update
This commit is contained in:
parent
b58be9a81f
commit
c5392f4fbf
|
@ -64,21 +64,24 @@ awesome.connect_signal("bling::playerctl::title_artist_album",
|
|||
-- Set art widget
|
||||
art:set_image(gears.surface.load_uncached(art_path))
|
||||
|
||||
local my_title = "No Title"
|
||||
local my_artist = "No Artist"
|
||||
|
||||
if title then
|
||||
my_title = title
|
||||
my_artist = artist
|
||||
end
|
||||
|
||||
-- Set title and artist widgets
|
||||
title_widget:set_markup_silently(my_title)
|
||||
artist_widget:set_markup_silently(my_artist)
|
||||
title_widget:set_markup_silently(title)
|
||||
artist_widget:set_markup_silently(artist)
|
||||
end)
|
||||
```
|
||||
Thats all! You don't even have to worry about updating the widgets, the signals will handle that for you.
|
||||
|
||||
Here's another example in which you get a notification with the album art, title, and artist whenever the song changes.
|
||||
|
||||
```lua
|
||||
local naughty = require("naughty")
|
||||
|
||||
awesome.connect_signal("bling::playerctl::title_artist_album",
|
||||
function(title, artist, art_path)
|
||||
naughty.notify({title = title, text = artist, image = art_path})
|
||||
end)
|
||||
```
|
||||
|
||||
### Theme Variables
|
||||
```lua
|
||||
theme.playerctl_position_update_interval = 1 -- the update interval for fetching the position from playerctl
|
||||
|
|
Loading…
Reference in New Issue