From 99db3d7ac26154bc6a87f68cb5922010fce7aa04 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sat, 11 Oct 2014 14:17:05 +0200 Subject: [PATCH] #66 removed hardcoded screen def in widgets notification --- widgets/alsabar.lua | 2 -- widgets/bat.lua | 2 -- widgets/calendar.lua | 1 - widgets/contrib/init.lua | 1 - widgets/contrib/task.lua | 6 +----- widgets/fs.lua | 2 -- widgets/imap.lua | 1 - widgets/mpd.lua | 1 - widgets/net.lua | 1 - widgets/yawn/init.lua | 1 - 10 files changed, 1 insertion(+), 17 deletions(-) diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index 8675cb5..96d57b0 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -77,12 +77,10 @@ function alsabar.notify() alsabar._notify = naughty.notify ({ replaces_id = alsabar._notify.id, preset = preset, - screen = client.focus and client.focus.screen or 1 }) else alsabar._notify = naughty.notify ({ preset = preset, - screen = client.focus and client.focus.screen or 1 }) end end diff --git a/widgets/bat.lua b/widgets/bat.lua index 2ace758..572d099 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -130,14 +130,12 @@ local function worker(args) bat.id = naughty.notify({ preset = bat_notification_critical_preset, replaces_id = bat.id, - screen = client.focus and client.focus.screen or 1 }).id elseif nperc <= 15 then bat.id = naughty.notify({ preset = bat_notification_low_preset, replaces_id = bat.id, - screen = client.focus and client.focus.screen or 1 }).id end end diff --git a/widgets/calendar.lua b/widgets/calendar.lua index d07a5b4..f9aed39 100644 --- a/widgets/calendar.lua +++ b/widgets/calendar.lua @@ -99,7 +99,6 @@ function calendar:show(t_out, inc_offset) fg = calendar.fg, bg = calendar.bg, timeout = tims, - screen = client.focus and client.focus.screen or 1 }) end diff --git a/widgets/contrib/init.lua b/widgets/contrib/init.lua index 9a9fa63..ccaed82 100644 --- a/widgets/contrib/init.lua +++ b/widgets/contrib/init.lua @@ -8,7 +8,6 @@ Licensed under GNU General Public License v2 * (c) 2013, Luke Bonham - * (c) 2010-2012, Peter Hofmann --]] diff --git a/widgets/contrib/task.lua b/widgets/contrib/task.lua index 6e6ebae..2e30cdc 100644 --- a/widgets/contrib/task.lua +++ b/widgets/contrib/task.lua @@ -2,7 +2,6 @@ --[[ Licensed under GNU General Public License v2 - * (c) 2013, Luke Bonham * (c) 2013, Jan Xie --]] @@ -20,7 +19,7 @@ local tonumber = tonumber local setmetatable = setmetatable -- Taskwarrior notification --- lain.widgets.task +-- lain.widgets.contrib.task local task = {} local task_notification = nil @@ -52,7 +51,6 @@ function task:show() fg = task.fg, bg = task.bg, timeout = task.timeout, - screen = client.focus and client.focus.screen or 1 }) end @@ -75,7 +73,6 @@ function task:prompt_add() fg = task.fg, bg = task.bg, timeout = task.timeout, - screen = client.focus and client.focus.screen or 1 }) end, nil, @@ -109,7 +106,6 @@ function task:prompt_search() fg = task.fg, bg = task.bg, timeout = task.timeout, - screen = client.focus and client.focus.screen or 1 }) end, nil, diff --git a/widgets/fs.lua b/widgets/fs.lua index f78cfe0..3b99cba 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -47,7 +47,6 @@ function fs:show(t_out) preset = fs_notification_preset, text = ws, timeout = t_out, - screen = client.focus and client.focus.screen or 1 }) end @@ -100,7 +99,6 @@ local function worker(args) timeout = 8, fg = "#000000", bg = "#FFFFFF", - screen = client.focus and client.focus.screen or 1 }) helpers.set_map("fs", true) else diff --git a/widgets/imap.lua b/widgets/imap.lua index 3a6da8d..d4b4cba 100644 --- a/widgets/imap.lua +++ b/widgets/imap.lua @@ -77,7 +77,6 @@ local function worker(args) naughty.notify({ preset = mail_notification_preset, text = nt, - screen = client.focus and client.focus.screen or 1 }) end diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 385b5bb..7fd611d 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -91,7 +91,6 @@ local function worker(args) preset = mpd_notification_preset, icon = "/tmp/mpdcover.png", replaces_id = mpd.id, - screen = client.focus and client.focus.screen or 1 }).id end elseif mpd_now.state ~= "pause" diff --git a/widgets/net.lua b/widgets/net.lua index 9575000..2bfd375 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -88,7 +88,6 @@ local function worker(args) position = "top_left", icon = helpers.icons_dir .. "no_net.png", fg = notify_fg or "#FFFFFF", - screen = client.focus and client.focus.screen or 1 }) helpers.set_map(iface, false) end diff --git a/widgets/yawn/init.lua b/widgets/yawn/init.lua index aa58ed1..b034395 100644 --- a/widgets/yawn/init.lua +++ b/widgets/yawn/init.lua @@ -167,7 +167,6 @@ function yawn.show(t_out) text = weather_data, icon = sky, timeout = t_out, - screen = client.focus and client.focus.screen or 1 }) end