feat(lyrics): update to 1.4.3 (#94)
* feat(lyrics): update to 1.4.3 * fix(lyrics): rely on host scroll setting
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
# Noctalia Lyrics 1.4.2
|
# Noctalia Lyrics 1.4.3
|
||||||
|
|
||||||
Synchronized lyrics for the Noctalia bar, with multiple MPRIS players,
|
Synchronized lyrics for the Noctalia bar, with multiple MPRIS players,
|
||||||
translation and romanization layers, configurable sources, karaoke highlighting,
|
translation and romanization layers, configurable sources, karaoke highlighting,
|
||||||
|
|||||||
+11
-1
@@ -4,6 +4,8 @@
|
|||||||
noctalia.setUpdateInterval(33)
|
noctalia.setUpdateInterval(33)
|
||||||
|
|
||||||
local glyph = noctalia.getConfig("glyph")
|
local glyph = noctalia.getConfig("glyph")
|
||||||
|
local showGlyph = noctalia.getConfig("show_glyph")
|
||||||
|
if showGlyph == nil then showGlyph = true end
|
||||||
local showArtist = noctalia.getConfig("show_artist")
|
local showArtist = noctalia.getConfig("show_artist")
|
||||||
local hideWhenPaused = noctalia.getConfig("hide_when_paused")
|
local hideWhenPaused = noctalia.getConfig("hide_when_paused")
|
||||||
local showCover = noctalia.getConfig("show_cover")
|
local showCover = noctalia.getConfig("show_cover")
|
||||||
@@ -445,7 +447,7 @@ local function render()
|
|||||||
or coverShape == "square" and 0
|
or coverShape == "square" and 0
|
||||||
or math.min(coverRadius, coverSize / 2)
|
or math.min(coverRadius, coverSize / 2)
|
||||||
prefix[#prefix + 1] = ui.image({ path = coverPath, width = coverSize, height = coverSize, radius = radius, fit = "cover" })
|
prefix[#prefix + 1] = ui.image({ path = coverPath, width = coverSize, height = coverSize, radius = radius, fit = "cover" })
|
||||||
else
|
elseif showGlyph then
|
||||||
prefix[#prefix + 1] = ui.glyph({
|
prefix[#prefix + 1] = ui.glyph({
|
||||||
name = glyph,
|
name = glyph,
|
||||||
size = 14,
|
size = 14,
|
||||||
@@ -580,6 +582,14 @@ function onRightClick()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function onScroll(axis, steps)
|
||||||
|
if axis ~= "vertical" or playerInstance == "" then return end
|
||||||
|
local direction = tonumber(steps) or 0
|
||||||
|
if direction == 0 then return end
|
||||||
|
local action = direction < 0 and "next" or "previous"
|
||||||
|
noctalia.runAsync("playerctl --player " .. shellQuote(playerInstance) .. " " .. action, function() end)
|
||||||
|
end
|
||||||
|
|
||||||
function update()
|
function update()
|
||||||
local now = os.clock()
|
local now = os.clock()
|
||||||
local delta = lastClock > 0 and now - lastClock or 0
|
local delta = lastClock > 0 and now - lastClock or 0
|
||||||
|
|||||||
+9
-1
@@ -1,6 +1,6 @@
|
|||||||
id = "h465855hgg/lyrics"
|
id = "h465855hgg/lyrics"
|
||||||
name = "Lyrics"
|
name = "Lyrics"
|
||||||
version = "1.4.2"
|
version = "1.4.3"
|
||||||
plugin_api = 3
|
plugin_api = 3
|
||||||
author = "h465855hgg"
|
author = "h465855hgg"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -461,11 +461,19 @@ entry = "lyrics_service.luau"
|
|||||||
id = "lyrics"
|
id = "lyrics"
|
||||||
entry = "lyrics.luau"
|
entry = "lyrics.luau"
|
||||||
|
|
||||||
|
[[widget.setting]]
|
||||||
|
key = "show_glyph"
|
||||||
|
type = "bool"
|
||||||
|
label_key = "settings.show_glyph.label"
|
||||||
|
description_key = "settings.show_glyph.description"
|
||||||
|
default = true
|
||||||
|
|
||||||
[[widget.setting]]
|
[[widget.setting]]
|
||||||
key = "glyph"
|
key = "glyph"
|
||||||
type = "glyph"
|
type = "glyph"
|
||||||
label_key = "settings.glyph.label"
|
label_key = "settings.glyph.label"
|
||||||
default = "music"
|
default = "music"
|
||||||
|
visible_when = { key = "show_glyph", values = ["true"] }
|
||||||
|
|
||||||
[[widget.setting]]
|
[[widget.setting]]
|
||||||
key = "show_artist"
|
key = "show_artist"
|
||||||
|
|||||||
@@ -129,6 +129,10 @@
|
|||||||
"glyph": {
|
"glyph": {
|
||||||
"label": "Glyph"
|
"label": "Glyph"
|
||||||
},
|
},
|
||||||
|
"show_glyph": {
|
||||||
|
"label": "Show glyph",
|
||||||
|
"description": "Display the configured glyph when no album cover is available."
|
||||||
|
},
|
||||||
"gradient": {
|
"gradient": {
|
||||||
"description": "Light up each character as the song progresses (karaoke style).",
|
"description": "Light up each character as the song progresses (karaoke style).",
|
||||||
"label": "Per-character gradient"
|
"label": "Per-character gradient"
|
||||||
|
|||||||
@@ -129,6 +129,10 @@
|
|||||||
"glyph": {
|
"glyph": {
|
||||||
"label": "图标"
|
"label": "图标"
|
||||||
},
|
},
|
||||||
|
"show_glyph": {
|
||||||
|
"label": "显示图标",
|
||||||
|
"description": "没有专辑封面时显示设置的图标。"
|
||||||
|
},
|
||||||
"gradient": {
|
"gradient": {
|
||||||
"description": "根据播放进度逐字点亮当前歌词。",
|
"description": "根据播放进度逐字点亮当前歌词。",
|
||||||
"label": "逐字渐变"
|
"label": "逐字渐变"
|
||||||
|
|||||||
Reference in New Issue
Block a user