From 7939cfcd90809aeb746d0def75f474c2433c182f Mon Sep 17 00:00:00 2001 From: Jack Pugmire Date: Thu, 15 Jan 2015 23:44:22 -0500 Subject: [PATCH 01/16] Added keys to mpd_now for querying the length of a song and the current time (both in seconds). --- widgets/mpd.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 7fd611d..99624a2 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -58,7 +58,9 @@ local function worker(args) artist = "N/A", title = "N/A", album = "N/A", - date = "N/A" + date = "N/A", + time = "N/A", + elapsed= "N/A" } for line in f:lines() do @@ -69,6 +71,8 @@ local function worker(args) elseif k == "Title" then mpd_now.title = escape_f(v) elseif k == "Album" then mpd_now.album = escape_f(v) elseif k == "Date" then mpd_now.date = escape_f(v) + elseif k == "Time" then mpd_now.time = v + elseif k == "elapsed"then mpd_now.elapsed= math.floor(v) end end end -- 2.39.2 From bbe0b1903dbf0edfa996a2ef5225f00698643edc Mon Sep 17 00:00:00 2001 From: luke bonham Date: Tue, 20 Jan 2015 10:16:06 +0100 Subject: [PATCH 02/16] pull #90: fixed tabs --- widgets/mpd.lua | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 99624a2..9054c22 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -53,26 +53,26 @@ local function worker(args) function mpd.update() async.request(echo .. " | curl --connect-timeout 1 -fsm 3 " .. mpdh, function (f) mpd_now = { - state = "N/A", - file = "N/A", - artist = "N/A", - title = "N/A", - album = "N/A", - date = "N/A", - time = "N/A", - elapsed= "N/A" + state = "N/A", + file = "N/A", + artist = "N/A", + title = "N/A", + album = "N/A", + date = "N/A", + time = "N/A", + elapsed = "N/A" } for line in f:lines() do for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do - if k == "state" then mpd_now.state = v - elseif k == "file" then mpd_now.file = v - elseif k == "Artist" then mpd_now.artist = escape_f(v) - elseif k == "Title" then mpd_now.title = escape_f(v) - elseif k == "Album" then mpd_now.album = escape_f(v) - elseif k == "Date" then mpd_now.date = escape_f(v) - elseif k == "Time" then mpd_now.time = v - elseif k == "elapsed"then mpd_now.elapsed= math.floor(v) + if k = = "state" then mpd_now.state = v + elseif k = = "file" then mpd_now.file = v + elseif k = = "Artist" then mpd_now.artist = escape_f(v) + elseif k = = "Title" then mpd_now.title = escape_f(v) + elseif k = = "Album" then mpd_now.album = escape_f(v) + elseif k = = "Date" then mpd_now.date = escape_f(v) + elseif k = = "Time" then mpd_now.time = v + elseif k = = "elapsed" then mpd_now.elapsed = math.floor(v) end end end -- 2.39.2 From 3261164a88bc052e88172b4bc73d24846ad7468e Mon Sep 17 00:00:00 2001 From: luke bonham Date: Tue, 20 Jan 2015 10:18:15 +0100 Subject: [PATCH 03/16] mpd: fixed bad auto-fixed scope --- widgets/mpd.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 9054c22..0d43e34 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -65,14 +65,14 @@ local function worker(args) for line in f:lines() do for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do - if k = = "state" then mpd_now.state = v - elseif k = = "file" then mpd_now.file = v - elseif k = = "Artist" then mpd_now.artist = escape_f(v) - elseif k = = "Title" then mpd_now.title = escape_f(v) - elseif k = = "Album" then mpd_now.album = escape_f(v) - elseif k = = "Date" then mpd_now.date = escape_f(v) - elseif k = = "Time" then mpd_now.time = v - elseif k = = "elapsed" then mpd_now.elapsed = math.floor(v) + if k == "state" then mpd_now.state = v + elseif k == "file" then mpd_now.file = v + elseif k == "Artist" then mpd_now.artist = escape_f(v) + elseif k == "Title" then mpd_now.title = escape_f(v) + elseif k == "Album" then mpd_now.album = escape_f(v) + elseif k == "Date" then mpd_now.date = escape_f(v) + elseif k == "Time" then mpd_now.time = v + elseif k == "elapsed" then mpd_now.elapsed = math.floor(v) end end end -- 2.39.2 From d46745e1b37c62ebc08280e1b8e7197d56016bd0 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Fri, 30 Jan 2015 14:12:13 +0100 Subject: [PATCH 04/16] mpd: mpd_now.elapsed seconds fixed --- widgets/mpd.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 0d43e34..c10eb78 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -14,10 +14,11 @@ local escape_f = require("awful.util").escape local naughty = require("naughty") local wibox = require("wibox") -local io = { popen = io.popen } local os = { execute = os.execute, getenv = os.getenv } +local math = { floor = math.floor } local string = { format = string.format, + match = string.match, gmatch = string.gmatch } local setmetatable = setmetatable @@ -72,7 +73,7 @@ local function worker(args) elseif k == "Album" then mpd_now.album = escape_f(v) elseif k == "Date" then mpd_now.date = escape_f(v) elseif k == "Time" then mpd_now.time = v - elseif k == "elapsed" then mpd_now.elapsed = math.floor(v) + elseif k == "elapsed" then mpd_now.elapsed = string.match(v, "%d+") end end end -- 2.39.2 From eac077ace2153bc949a304d91fa1e899108a4b30 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Fri, 30 Jan 2015 14:26:37 +0100 Subject: [PATCH 05/16] new submodule: lain.util.separators --- util/separators.lua | 102 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 util/separators.lua diff --git a/util/separators.lua b/util/separators.lua new file mode 100644 index 0000000..0eb0658 --- /dev/null +++ b/util/separators.lua @@ -0,0 +1,102 @@ + +--[[ + + Licensed under GNU General Public License v2 + * (c) 2015, luke bonham + * (c) 2015, plotnikovanton + +--]] + +local wibox = require("wibox") +local beautiful = require("beautiful") +local gears = require("gears") + +-- Lain cairo separators util submodule +-- lain.util.separators +local separators = {} + +local height = beautiful.awful_widget_height or 0 +local width = beautiful.separators_width or 9 + +-- [[ Arrow + +-- Right +function separators.arrow_right(col1, col2) + local widget = wibox.widget.base.make_widget() + + widget.fit = function(m, w, h) return width, height end + + widget.draw = function(mycross, wibox, cr, width, height) + if col2 ~= "alpha" then + cr:set_source_rgb(gears.color.parse_color(col2)) + cr:new_path() + cr:move_to(0, 0) + cr:line_to(width, height/2) + cr:line_to(width, 0) + cr:close_path() + cr:fill() + + cr:new_path() + cr:move_to(0, height) + cr:line_to(width, height/2) + cr:line_to(width, height) + cr:close_path() + cr:fill() + end + + if col1 ~= "alpha" then + cr:set_source_rgb(gears.color.parse_color(col1)) + cr:new_path() + cr:move_to(0, 0) + cr:line_to(width, height/2) + cr:line_to(0, height) + cr:close_path() + cr:fill() + end + end + + return widget +end + +-- Left +function separators.arrow_left(col1, col2) + local widget = wibox.widget.base.make_widget() + + widget.fit = function(m, w, h) return width, height end + + widget.draw = function(mycross, wibox, cr, width, height) + if col1 ~= "alpha" then + cr:set_source_rgb(gears.color.parse_color(col1)) + cr:new_path() + cr:move_to(width, 0) + cr:line_to(0, height/2) + cr:line_to(0, 0) + cr:close_path() + cr:fill() + + cr:new_path() + cr:move_to(width, height) + cr:line_to(0, height/2) + cr:line_to(0, height) + cr:close_path() + cr:fill() + end + + if col2 ~= "alpha" then + cr:new_path() + cr:move_to(width, 0) + cr:line_to(0, height/2) + cr:line_to(width, height) + cr:close_path() + + cr:set_source_rgb(gears.color.parse_color(col2)) + cr:fill() + end + end + + return widget +end + +-- ]] + +return separators -- 2.39.2 From 527e38f4372a5821706295bf553b64abc6aa5b5a Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Thu, 5 Feb 2015 09:07:28 +0100 Subject: [PATCH 06/16] #91 pull + clean useless lines --- widgets/calendar.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/widgets/calendar.lua b/widgets/calendar.lua index 631b358..cbba676 100644 --- a/widgets/calendar.lua +++ b/widgets/calendar.lua @@ -37,17 +37,12 @@ function calendar:show(t_out, inc_offset, scr) local tims = t_out or 0 local f, c_text local today = tonumber(os.date('%d')) - local init_t = calendar.cal .. ' | sed -r -e "s/(^| )( ' + local init_t = calendar.cal .. ' | sed -r -e "s/_\\x08//g" | sed -r -e "s/(^| )(' calendar.offset = calendar.offset + offs if offs == 0 or calendar.offset == 0 then -- current month showing, today highlighted - if today >= 10 - then - init_t = calendar.cal .. ' | sed -r -e "s/_\\x08//g" | sed -r -e "s/(^| )(' - end - calendar.offset = 0 calendar.notify_icon = calendar.icons .. today .. ".png" -- 2.39.2 From 7f203ab08d80c6e7b663f184d1b34fd6d87564b3 Mon Sep 17 00:00:00 2001 From: luke bonham Date: Sun, 1 Feb 2015 11:39:26 +0100 Subject: [PATCH 07/16] asyncshell.request: removed unused argument --- asyncshell.lua | 3 +-- helpers.lua | 2 +- util/separators.lua | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/asyncshell.lua b/asyncshell.lua index 4a01caa..36ccc47 100644 --- a/asyncshell.lua +++ b/asyncshell.lua @@ -44,8 +44,7 @@ function asyncshell.request(command, callback) string.format("sh -c '%s > %s; " .. 'echo "asyncshell.deliver(%s)" | ' .. "awesome-client' 2> /dev/null", - string.gsub(command, "'", "'\\''"), tmpfname, - id, tmpfname) + string.gsub(command, "'", "'\\''"), tmpfname, id) spawn(req, false) return id end diff --git a/helpers.lua b/helpers.lua index 1dfb09b..9c4a83f 100644 --- a/helpers.lua +++ b/helpers.lua @@ -9,7 +9,7 @@ local debug = require("debug") local capi = { timer = timer } -local io = { open = io.open, +local io = { open = io.open, lines = io.lines } local rawget = rawget diff --git a/util/separators.lua b/util/separators.lua index 0eb0658..d2a3891 100644 --- a/util/separators.lua +++ b/util/separators.lua @@ -2,7 +2,7 @@ --[[ Licensed under GNU General Public License v2 - * (c) 2015, luke bonham + * (c) 2015, Luke Bonham * (c) 2015, plotnikovanton --]] @@ -11,7 +11,7 @@ local wibox = require("wibox") local beautiful = require("beautiful") local gears = require("gears") --- Lain cairo separators util submodule +-- Lain Cairo separators util submodule -- lain.util.separators local separators = {} -- 2.39.2 From d93913253e61b1e23351ba7ef0ba54475f814be5 Mon Sep 17 00:00:00 2001 From: worron Date: Thu, 12 Feb 2015 20:16:14 +0300 Subject: [PATCH 08/16] Vertical client resizing fix --- layout/uselesstile.lua | 66 +++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/layout/uselesstile.lua b/layout/uselesstile.lua index d244f43..bd365a8 100644 --- a/layout/uselesstile.lua +++ b/layout/uselesstile.lua @@ -35,19 +35,18 @@ local function swap(geometry) return { x = geometry.y, y = geometry.x, width = geometry.height, height = geometry.width } end --- Find geometry for column/row tiling -local function cut_area(wa, total, index, is_horizontal) - local wa = is_horizontal and swap(wa) or wa - local height = wa.height / total +-- Find geometry for secondary windows column +local function cut_column(wa, n, index) + local width = wa.width / n + local area = { x = wa.x + (index - 1) * width, y = wa.y, width = width, height = wa.height } - local area = { - x = wa.x, - y = wa.y + (index - 1) * height, - width = wa.width, - height = height - } + return area +end - if is_horizontal then area = swap(area) end +-- Find geometry for certain window in column +local function cut_row(wa, factor, index, used) + local height = wa.height * factor.window[index] / factor.total + local area = { x = wa.x, y = wa.y + used, width = wa.width, height = height } return area end @@ -60,11 +59,33 @@ local function size_correction(c, geometry, useless_gap) geometry.y = geometry.y + useless_gap / 2 end +-- Check size factor for group of clients and calculate total +local function calc_factor(n, winfactors) + local factor = { window = winfactors, total = 0, min = 1 } + + for i = 1, n do + if not factor.window[i] then + factor.window[i] = factor.min + else + factor.min = math.min(factor.window[i], factor.min) + if factor.window[i] < 0.05 then factor.window[i] = 0.05 end + end + factor.total = factor.total + factor.window[i] + end + + return factor +end + -- Tile group of clients in given area -- @canvas need for proper transformation only -local function tile_column(canvas, area, list, useless_gap, transformation) +-- @winfactors table with clients size factors +local function tile_column(canvas, area, list, useless_gap, transformation, winfactors) + local used = 0 + local factor = calc_factor(#list, winfactors) + for i, c in ipairs(list) do - local g = cut_area(area, #list, i) + local g = cut_row(area, factor, i, used) + used = used + g.height -- swap workarea dimensions if transformation.flip then g = flip(canvas, g) end @@ -102,6 +123,14 @@ local function tile(p, orientation) mwfact = 1 end + -- clients size factor + local data = tag.getdata(t).windowfact + + if not data then + data = {} + tag.getdata(t).windowfact = data + end + -- Workarea size correction depending on useless gap and global border wa.height = wa.height - 2 * global_border - useless_gap wa.width = wa.width - 2 * global_border - useless_gap @@ -136,7 +165,8 @@ local function tile(p, orientation) height = wa.height } - tile_column(wa, master_area, cls_master, useless_gap, transformation) + if not data[0] then data[0] = {} end + tile_column(wa, master_area, cls_master, useless_gap, transformation, data[0]) -- Tile other windows local other_area = { @@ -164,9 +194,11 @@ local function tile(p, orientation) client_index = client_index + 1 end - -- and tile - local column_area = cut_area(other_area, ncol, position, true) - tile_column(wa, column_area, column, useless_gap, transformation) + -- and tile + local column_area = cut_column(other_area, ncol, position) + + if not data[i] then data[i] = {} end + tile_column(wa, column_area, column, useless_gap, transformation, data[i]) end end -- 2.39.2 From 82442ce10b2fb8406f8be3b517f1515b47c39ae3 Mon Sep 17 00:00:00 2001 From: emikkva Date: Mon, 16 Feb 2015 23:43:06 +0200 Subject: [PATCH 09/16] Add a card attribute for alsa and alsabar Currently alsa.lua and alsabar.lua do not support the amixer command line option "-c" which allows defining which card to use. For at least new Dell E-series laptops, the card is not the default (0) and therefore this functionality is required for these widgets to work. --- widgets/alsa.lua | 6 ++++-- widgets/alsabar.lua | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/widgets/alsa.lua b/widgets/alsa.lua index f62a150..5a4335e 100644 --- a/widgets/alsa.lua +++ b/widgets/alsa.lua @@ -12,7 +12,8 @@ local newtimer = require("lain.helpers").newtimer local wibox = require("wibox") local io = { popen = io.popen } -local string = { match = string.match } +local string = { match = string.match, + format = string.format } local setmetatable = setmetatable @@ -22,6 +23,7 @@ local alsa = {} local function worker(args) local args = args or {} + local card = args.card or "0" local timeout = args.timeout or 5 local channel = args.channel or "Master" local settings = args.settings or function() end @@ -29,7 +31,7 @@ local function worker(args) alsa.widget = wibox.widget.textbox('') function alsa.update() - local f = assert(io.popen('amixer -M get ' .. channel)) + local f = assert(io.popen(string.format("amixer -c %s -M get %s", card, channel))) local mixer = f:read("*a") f:close() diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index 65a2b33..fa10bc2 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -25,6 +25,7 @@ local setmetatable = setmetatable -- ALSA volume bar -- lain.widgets.alsabar local alsabar = { + card = "0", channel = "Master", step = "5%", @@ -97,6 +98,7 @@ local function worker(args) local ticks_size = args.ticks_size or 7 local vertical = args.vertical or false + alsabar.card = args.card or alsabar.card alsabar.channel = args.channel or alsabar.channel alsabar.step = args.step or alsabar.step alsabar.colors = args.colors or alsabar.colors @@ -115,7 +117,7 @@ local function worker(args) function alsabar.update() -- Get mixer control contents - local f = io.popen("amixer -M get " .. alsabar.channel) + local f = assert(io.popen(string.format("amixer -c %s -M get %s", alsabar.card, alsabar.channel))) local mixer = f:read("*a") f:close() @@ -129,7 +131,6 @@ local function worker(args) alsabar._current_level = tonumber(volu) alsabar.bar:set_value(alsabar._current_level / 100) - if not mute and tonumber(volu) == 0 or mute == "off" then alsabar._muted = true @@ -154,15 +155,15 @@ local function worker(args) awful.util.spawn(alsabar.mixer) end), awful.button ({}, 3, function() - awful.util.spawn(string.format("amixer set %s toggle", alsabar.channel)) + awful.util.spawn(string.format("amixer -c %s set %s toggle", alsabar.card, alsabar.channel)) alsabar.update() end), awful.button ({}, 4, function() - awful.util.spawn(string.format("amixer set %s %s+", alsabar.channel, alsabar.step)) + awful.util.spawn(string.format("amixer -c %s set %s %s+", alsabar.card, alsabar.channel, alsabar.step)) alsabar.update() end), awful.button ({}, 5, function() - awful.util.spawn(string.format("amixer set %s %s-", alsabar.channel, alsabar.step)) + awful.util.spawn(string.format("amixer -c %s set %s %s-", alsabar.card, alsabar.channel, alsabar.step)) alsabar.update() end) )) -- 2.39.2 From 223125b60b652d6dd45168f02b732eca86ab8456 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Mon, 9 Mar 2015 21:33:11 +0100 Subject: [PATCH 10/16] alsa: added card, channel to widget table --- widgets/alsa.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/widgets/alsa.lua b/widgets/alsa.lua index 5a4335e..7d25096 100644 --- a/widgets/alsa.lua +++ b/widgets/alsa.lua @@ -23,15 +23,16 @@ local alsa = {} local function worker(args) local args = args or {} - local card = args.card or "0" local timeout = args.timeout or 5 - local channel = args.channel or "Master" local settings = args.settings or function() end + alsa.card = args.card or "0" + alsa.channel = args.channel or "Master" + alsa.widget = wibox.widget.textbox('') function alsa.update() - local f = assert(io.popen(string.format("amixer -c %s -M get %s", card, channel))) + local f = assert(io.popen(string.format("amixer -c %s -M get %s", alsa.card, alsa.channel))) local mixer = f:read("*a") f:close() -- 2.39.2 From 49221b80556abd4f0c6203fa0aafdd5436db03ce Mon Sep 17 00:00:00 2001 From: luke bonham Date: Wed, 25 Mar 2015 19:41:08 +0100 Subject: [PATCH 11/16] #103: revert to original fs implementation --- widgets/alsabar.lua | 2 +- widgets/fs.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index fa10bc2..b12e55c 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -27,7 +27,7 @@ local setmetatable = setmetatable local alsabar = { card = "0", channel = "Master", - step = "5%", + step = "2%", colors = { background = beautiful.bg_normal, diff --git a/widgets/fs.lua b/widgets/fs.lua index 3b99cba..8b51178 100644 --- a/widgets/fs.lua +++ b/widgets/fs.lua @@ -66,7 +66,7 @@ local function worker(args) function update() fs_info = {} fs_now = {} - local f = io.popen("LC_ALL=C df -kP " .. partition) + local f = assert(io.popen("LC_ALL=C df -kP")) for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount) local s = string.match(line, "^.-[%s]([%d]+)") -- 2.39.2 From 12f2ec0817f25b8bb822ac1c3ffac0f989aee98c Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sat, 28 Mar 2015 11:39:45 +0100 Subject: [PATCH 12/16] alsabar: string.format use for preset.text in alsabar._notify --- widgets/alsabar.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index b12e55c..d233b28 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -70,11 +70,9 @@ function alsabar.notify() preset.title = alsabar.channel .. " - " .. alsabar._current_level .. "%" end - int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size) - preset.text = "[" - .. string.rep("|", int) - .. string.rep(" ", alsabar.notifications.bar_size - int) - .. "]" + local int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size) + preset.text = string.format("[%s%s]", string.rep("|", int), + string.rep(" ", alsabar.notifications.bar_size - int)) if alsabar._notify ~= nil then alsabar._notify = naughty.notify ({ -- 2.39.2 From 5e1f73369d067b5a7fcb4a6baaf782305ff291ae Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sat, 28 Mar 2015 11:40:06 +0100 Subject: [PATCH 13/16] alsabar: string.format use for preset.text in alsabar._notify --- widgets/alsabar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua index d233b28..b2cba9e 100644 --- a/widgets/alsabar.lua +++ b/widgets/alsabar.lua @@ -71,7 +71,7 @@ function alsabar.notify() end local int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size) - preset.text = string.format("[%s%s]", string.rep("|", int), + preset.text = string.format("[%s%s]", string.rep("|", int), string.rep(" ", alsabar.notifications.bar_size - int)) if alsabar._notify ~= nil then -- 2.39.2 From e5b730dbf0408c6c1bda7d16aa02873815a79623 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Mon, 13 Apr 2015 11:38:44 +0200 Subject: [PATCH 14/16] yawn: fair/windy icon added --- widgets/yawn/icons/DayFairWindy.png | 1 + widgets/yawn/icons/NightFairWindy.png | 1 + 2 files changed, 2 insertions(+) create mode 120000 widgets/yawn/icons/DayFairWindy.png create mode 120000 widgets/yawn/icons/NightFairWindy.png diff --git a/widgets/yawn/icons/DayFairWindy.png b/widgets/yawn/icons/DayFairWindy.png new file mode 120000 index 0000000..8ee94d1 --- /dev/null +++ b/widgets/yawn/icons/DayFairWindy.png @@ -0,0 +1 @@ +DayClear.png \ No newline at end of file diff --git a/widgets/yawn/icons/NightFairWindy.png b/widgets/yawn/icons/NightFairWindy.png new file mode 120000 index 0000000..23df45a --- /dev/null +++ b/widgets/yawn/icons/NightFairWindy.png @@ -0,0 +1 @@ +NightClear.png \ No newline at end of file -- 2.39.2 From 52c31db52e8ccbf99512c738b6c044784b99b94b Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Mon, 13 Apr 2015 11:49:13 +0200 Subject: [PATCH 15/16] yawn: fair/windy icon added --- widgets/yawn/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/yawn/init.lua b/widgets/yawn/init.lua index be3e614..1f6b0f4 100644 --- a/widgets/yawn/init.lua +++ b/widgets/yawn/init.lua @@ -102,10 +102,10 @@ function yawn.fetch_weather() local hour = tonumber(os.date("%H")) sky = icon_path - if forecast == "Clear" or - forecast == "Fair" or - forecast == "Partly Cloudy" or - forecast == "Mostly Cloudy" + if string.find(forecast, "Clear") or + string.find(forecast, "Fair") or + string.find(forecast, "Partly Cloudy") or + string.find(forecast, "Mostly Cloudy") then if hour >= 6 and hour <= 18 then -- 2.39.2 From 312017f3699e61973cdcf87d577a8cc21a4c2dc6 Mon Sep 17 00:00:00 2001 From: Luke Bonham Date: Tue, 19 May 2015 14:11:36 +0200 Subject: [PATCH 16/16] #109: catch n%0 --- layout/uselesstile.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/uselesstile.lua b/layout/uselesstile.lua index bd365a8..877fad1 100644 --- a/layout/uselesstile.lua +++ b/layout/uselesstile.lua @@ -179,6 +179,8 @@ local function tile(p, orientation) -- get column number for other windows local ncol = math.min(tag.getncol(t), #cls_other) + if ncol == 0 then ncol = 1 end + -- split other windows to column groups local last_small_column = ncol - #cls_other % ncol local rows_min = math.floor(#cls_other / ncol) -- 2.39.2