Updated for new lain version, fixed mcstatus to follow tag
This commit is contained in:
parent
c02e3dda18
commit
220bc3fe88
|
@ -3,6 +3,7 @@ local wibox = require("wibox")
|
||||||
local json = require("dkjson")
|
local json = require("dkjson")
|
||||||
local https = require("ssl.https")
|
local https = require("ssl.https")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
|
local focused = require("awful.screen").focused
|
||||||
|
|
||||||
local function factory(args)
|
local function factory(args)
|
||||||
local args = args or {}
|
local args = args or {}
|
||||||
|
@ -11,16 +12,24 @@ local function factory(args)
|
||||||
local minecraft = { widget = wibox.widget.textbox() }
|
local minecraft = { widget = wibox.widget.textbox() }
|
||||||
local settings = args.settings or function() end
|
local settings = args.settings or function() end
|
||||||
local hideempty = args.hideempty or false
|
local hideempty = args.hideempty or false
|
||||||
local hideoffline = args.hideoffline or true
|
local hideoffline = args.hideoffline or true
|
||||||
|
local followtag = args.followtag or true
|
||||||
|
local notification_preset = args.notification_preset or {}
|
||||||
|
|
||||||
minecraft.widget:set_markup("N/A")
|
minecraft.widget:set_markup("N/A")
|
||||||
|
|
||||||
function minecraft.show(tout)
|
function minecraft.show(tout)
|
||||||
minecraft.hide()
|
minecraft.hide()
|
||||||
|
|
||||||
|
if followtag then
|
||||||
|
notification_preset.screen = focused()
|
||||||
|
end
|
||||||
|
|
||||||
minecraft.notification = naughty.notify({
|
minecraft.notification = naughty.notify({
|
||||||
text = minecraft.notification_text,
|
text = minecraft.notification_text,
|
||||||
-- icon = minecraft.icon
|
-- icon = minecraft.icon
|
||||||
timeout = 0
|
timeout = 0,
|
||||||
|
preset = notification_preset,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ mygputemp = wibox.widget.textbox()
|
||||||
vicious.register(mygputemp, gputemp, create_markup("GPU", "$0", "℃", valuecolor), 15, "AMD")
|
vicious.register(mygputemp, gputemp, create_markup("GPU", "$0", "℃", valuecolor), 15, "AMD")
|
||||||
|
|
||||||
-- Volume
|
-- Volume
|
||||||
volume = lain.widget.pulseaudio({
|
volume = lain.widget.pulse({
|
||||||
scallback = function()
|
scallback = function()
|
||||||
return "pacmd list-sinks | grep -Paoz \"(?s)(\\* index.*$(pactl info | grep -e 'ink' | cut -d' ' -f3).*(index)?)\" | tr -d '\\000' | grep -e 'index' -e 'device.string' -e 'name:' -e 'volume: front' -e 'muted'"
|
return "pacmd list-sinks | grep -Paoz \"(?s)(\\* index.*$(pactl info | grep -e 'ink' | cut -d' ' -f3).*(index)?)\" | tr -d '\\000' | grep -e 'index' -e 'device.string' -e 'name:' -e 'volume: front' -e 'muted'"
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user