From 220bc3fe88bb894d1753712a57c6bfbc5fbab2f7 Mon Sep 17 00:00:00 2001 From: lanxu Date: Tue, 31 Oct 2017 21:05:06 +0200 Subject: [PATCH] Updated for new lain version, fixed mcstatus to follow tag --- .config/awesome/lanxu/mcstatus.lua | 15 ++++++++++++--- .config/awesome/widgets.lua | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.config/awesome/lanxu/mcstatus.lua b/.config/awesome/lanxu/mcstatus.lua index 471dfbb..6e24f96 100644 --- a/.config/awesome/lanxu/mcstatus.lua +++ b/.config/awesome/lanxu/mcstatus.lua @@ -3,6 +3,7 @@ local wibox = require("wibox") local json = require("dkjson") local https = require("ssl.https") local gears = require("gears") +local focused = require("awful.screen").focused local function factory(args) local args = args or {} @@ -11,16 +12,24 @@ local function factory(args) local minecraft = { widget = wibox.widget.textbox() } local settings = args.settings or function() end 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") function minecraft.show(tout) minecraft.hide() - + + if followtag then + notification_preset.screen = focused() + end + minecraft.notification = naughty.notify({ text = minecraft.notification_text, -- icon = minecraft.icon - timeout = 0 + timeout = 0, + preset = notification_preset, }) end diff --git a/.config/awesome/widgets.lua b/.config/awesome/widgets.lua index 29d0108..b655b20 100644 --- a/.config/awesome/widgets.lua +++ b/.config/awesome/widgets.lua @@ -42,7 +42,7 @@ mygputemp = wibox.widget.textbox() vicious.register(mygputemp, gputemp, create_markup("GPU", "$0", "℃", valuecolor), 15, "AMD") -- Volume -volume = lain.widget.pulseaudio({ +volume = lain.widget.pulse({ 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'" end,