From 56560fd597f94dfe6fe5fa79648398ab29d05775 Mon Sep 17 00:00:00 2001 From: xero Date: Mon, 14 Jul 2014 13:23:05 -0400 Subject: updated repo to manage dotfiles via gnu stow, the symlink farm manager. happy birthday commit! :birthday: :sparkles: --- .../lain/widgets/yawn/icons/BlowingSnow.png | Bin 11454 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Cloudy.png | Bin 7469 -> 0 bytes .../awesome/lain/widgets/yawn/icons/DayClear.png | Bin 6147 -> 0 bytes .../awesome/lain/widgets/yawn/icons/DayFair.png | 1 - .../lain/widgets/yawn/icons/DayMostlyCloudy.png | Bin 8016 -> 0 bytes .../lain/widgets/yawn/icons/DayPartlyCloudy.png | Bin 7478 -> 0 bytes .../awesome/lain/widgets/yawn/icons/Drizzle.png | 1 - .config/awesome/lain/widgets/yawn/icons/Fog.png | 1 - .config/awesome/lain/widgets/yawn/icons/Foggy.png | Bin 7325 -> 0 bytes .../lain/widgets/yawn/icons/FreezingDrizzle.png | Bin 13166 -> 0 bytes .../lain/widgets/yawn/icons/FreezingRain.png | Bin 13979 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Hail.png | Bin 7325 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Haze.png | 1 - .../awesome/lain/widgets/yawn/icons/HeavyRain.png | 1 - .../awesome/lain/widgets/yawn/icons/HeavySnow.png | Bin 12733 -> 0 bytes .../awesome/lain/widgets/yawn/icons/LightRain.png | 1 - .../awesome/lain/widgets/yawn/icons/LightSnow.png | 1 - .../lain/widgets/yawn/icons/LightSnowShowers.png | Bin 8779 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Mist.png | 1 - .../lain/widgets/yawn/icons/MixedRainAndHail.png | Bin 9060 -> 0 bytes .../lain/widgets/yawn/icons/MixedRainAndSleet.png | Bin 10978 -> 0 bytes .../lain/widgets/yawn/icons/MixedRainAndSnow.png | Bin 10808 -> 0 bytes .../awesome/lain/widgets/yawn/icons/NightClear.png | Bin 5198 -> 0 bytes .../awesome/lain/widgets/yawn/icons/NightFair.png | 1 - .../lain/widgets/yawn/icons/NightMostlyCloudy.png | Bin 7058 -> 0 bytes .../lain/widgets/yawn/icons/NightPartlyCloudy.png | Bin 6583 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/README.md | 6 - .config/awesome/lain/widgets/yawn/icons/Rain.png | Bin 8052 -> 0 bytes .../lain/widgets/yawn/icons/RainThunder.png | Bin 9879 -> 0 bytes .../awesome/lain/widgets/yawn/icons/Showers.png | Bin 9694 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Sleet.png | 1 - .config/awesome/lain/widgets/yawn/icons/Snow.png | 1 - .../lain/widgets/yawn/icons/SnowFlurries.png | 1 - .../lain/widgets/yawn/icons/SnowShowers.png | Bin 9961 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/Sunny.png | Bin 14018 -> 0 bytes .../widgets/yawn/icons/ThunderintheVicinity.png | 1 - .config/awesome/lain/widgets/yawn/icons/Wind.png | Bin 8726 -> 0 bytes .config/awesome/lain/widgets/yawn/icons/na.png | Bin 11160 -> 0 bytes .config/awesome/lain/widgets/yawn/init.lua | 200 --------------------- .../awesome/lain/widgets/yawn/localizations/it_IT | 60 ------- .../yawn/localizations/localization_template | 60 ------- 41 files changed, 339 deletions(-) delete mode 100755 .config/awesome/lain/widgets/yawn/icons/BlowingSnow.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Cloudy.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/DayClear.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/DayFair.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/DayMostlyCloudy.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/DayPartlyCloudy.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Drizzle.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Fog.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Foggy.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/FreezingDrizzle.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/FreezingRain.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Hail.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Haze.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/HeavyRain.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/HeavySnow.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/LightRain.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/LightSnow.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/LightSnowShowers.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Mist.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/MixedRainAndHail.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/MixedRainAndSleet.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/MixedRainAndSnow.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/NightClear.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/NightFair.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/NightMostlyCloudy.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/NightPartlyCloudy.png delete mode 100644 .config/awesome/lain/widgets/yawn/icons/README.md delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Rain.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/RainThunder.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Showers.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Sleet.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/Snow.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/SnowFlurries.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/SnowShowers.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Sunny.png delete mode 120000 .config/awesome/lain/widgets/yawn/icons/ThunderintheVicinity.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/Wind.png delete mode 100755 .config/awesome/lain/widgets/yawn/icons/na.png delete mode 100644 .config/awesome/lain/widgets/yawn/init.lua delete mode 100644 .config/awesome/lain/widgets/yawn/localizations/it_IT delete mode 100644 .config/awesome/lain/widgets/yawn/localizations/localization_template (limited to '.config/awesome/lain/widgets/yawn') diff --git a/.config/awesome/lain/widgets/yawn/icons/BlowingSnow.png b/.config/awesome/lain/widgets/yawn/icons/BlowingSnow.png deleted file mode 100755 index 6223f8f..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/BlowingSnow.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Cloudy.png b/.config/awesome/lain/widgets/yawn/icons/Cloudy.png deleted file mode 100755 index bac1e7e..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Cloudy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/DayClear.png b/.config/awesome/lain/widgets/yawn/icons/DayClear.png deleted file mode 100755 index d9e2745..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/DayClear.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/DayFair.png b/.config/awesome/lain/widgets/yawn/icons/DayFair.png deleted file mode 120000 index 8ee94d1..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/DayFair.png +++ /dev/null @@ -1 +0,0 @@ -DayClear.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/DayMostlyCloudy.png b/.config/awesome/lain/widgets/yawn/icons/DayMostlyCloudy.png deleted file mode 100755 index 22b929c..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/DayMostlyCloudy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/DayPartlyCloudy.png b/.config/awesome/lain/widgets/yawn/icons/DayPartlyCloudy.png deleted file mode 100755 index 8fd0a5b..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/DayPartlyCloudy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Drizzle.png b/.config/awesome/lain/widgets/yawn/icons/Drizzle.png deleted file mode 120000 index df34463..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Drizzle.png +++ /dev/null @@ -1 +0,0 @@ -Rain.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/Fog.png b/.config/awesome/lain/widgets/yawn/icons/Fog.png deleted file mode 120000 index b615645..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Fog.png +++ /dev/null @@ -1 +0,0 @@ -Foggy.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/Foggy.png b/.config/awesome/lain/widgets/yawn/icons/Foggy.png deleted file mode 100755 index 009039f..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Foggy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/FreezingDrizzle.png b/.config/awesome/lain/widgets/yawn/icons/FreezingDrizzle.png deleted file mode 100755 index 6a66140..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/FreezingDrizzle.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/FreezingRain.png b/.config/awesome/lain/widgets/yawn/icons/FreezingRain.png deleted file mode 100755 index c924fac..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/FreezingRain.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Hail.png b/.config/awesome/lain/widgets/yawn/icons/Hail.png deleted file mode 100755 index 009039f..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Hail.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Haze.png b/.config/awesome/lain/widgets/yawn/icons/Haze.png deleted file mode 120000 index 0874a83..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Haze.png +++ /dev/null @@ -1 +0,0 @@ -Hail.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/HeavyRain.png b/.config/awesome/lain/widgets/yawn/icons/HeavyRain.png deleted file mode 120000 index ace2a94..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/HeavyRain.png +++ /dev/null @@ -1 +0,0 @@ -Showers.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/HeavySnow.png b/.config/awesome/lain/widgets/yawn/icons/HeavySnow.png deleted file mode 100755 index ddcb8f3..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/HeavySnow.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/LightRain.png b/.config/awesome/lain/widgets/yawn/icons/LightRain.png deleted file mode 120000 index df34463..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/LightRain.png +++ /dev/null @@ -1 +0,0 @@ -Rain.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/LightSnow.png b/.config/awesome/lain/widgets/yawn/icons/LightSnow.png deleted file mode 120000 index aa8b28e..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/LightSnow.png +++ /dev/null @@ -1 +0,0 @@ -LightSnowShowers.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/LightSnowShowers.png b/.config/awesome/lain/widgets/yawn/icons/LightSnowShowers.png deleted file mode 100755 index d797ee9..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/LightSnowShowers.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Mist.png b/.config/awesome/lain/widgets/yawn/icons/Mist.png deleted file mode 120000 index b615645..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Mist.png +++ /dev/null @@ -1 +0,0 @@ -Foggy.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndHail.png b/.config/awesome/lain/widgets/yawn/icons/MixedRainAndHail.png deleted file mode 100755 index 758b01e..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndHail.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSleet.png b/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSleet.png deleted file mode 100755 index 7f0d252..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSleet.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSnow.png b/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSnow.png deleted file mode 100755 index 0a07b7b..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/MixedRainAndSnow.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/NightClear.png b/.config/awesome/lain/widgets/yawn/icons/NightClear.png deleted file mode 100755 index 84ea140..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/NightClear.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/NightFair.png b/.config/awesome/lain/widgets/yawn/icons/NightFair.png deleted file mode 120000 index 23df45a..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/NightFair.png +++ /dev/null @@ -1 +0,0 @@ -NightClear.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/NightMostlyCloudy.png b/.config/awesome/lain/widgets/yawn/icons/NightMostlyCloudy.png deleted file mode 100755 index d8b3673..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/NightMostlyCloudy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/NightPartlyCloudy.png b/.config/awesome/lain/widgets/yawn/icons/NightPartlyCloudy.png deleted file mode 100755 index 9e4404d..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/NightPartlyCloudy.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/README.md b/.config/awesome/lain/widgets/yawn/icons/README.md deleted file mode 100644 index e4dc111..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Yawn icons -========== - -These are [Plain Weather Icons](http://merlinthered.deviantart.com/art/plain-weather-icons-157162192), created by [MerlinTheRed](http://merlinthered.deviantart.com/). - - diff --git a/.config/awesome/lain/widgets/yawn/icons/Rain.png b/.config/awesome/lain/widgets/yawn/icons/Rain.png deleted file mode 100755 index d00552a..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Rain.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/RainThunder.png b/.config/awesome/lain/widgets/yawn/icons/RainThunder.png deleted file mode 100755 index d30e120..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/RainThunder.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Showers.png b/.config/awesome/lain/widgets/yawn/icons/Showers.png deleted file mode 100755 index 3cc6665..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Showers.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Sleet.png b/.config/awesome/lain/widgets/yawn/icons/Sleet.png deleted file mode 120000 index f8f9693..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Sleet.png +++ /dev/null @@ -1 +0,0 @@ -SnowShowers.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/Snow.png b/.config/awesome/lain/widgets/yawn/icons/Snow.png deleted file mode 120000 index f8f9693..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/Snow.png +++ /dev/null @@ -1 +0,0 @@ -SnowShowers.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/SnowFlurries.png b/.config/awesome/lain/widgets/yawn/icons/SnowFlurries.png deleted file mode 120000 index 2e090cd..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/SnowFlurries.png +++ /dev/null @@ -1 +0,0 @@ -BlowingSnow.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/SnowShowers.png b/.config/awesome/lain/widgets/yawn/icons/SnowShowers.png deleted file mode 100755 index 30534a2..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/SnowShowers.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/Sunny.png b/.config/awesome/lain/widgets/yawn/icons/Sunny.png deleted file mode 100755 index cf08c5c..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Sunny.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/ThunderintheVicinity.png b/.config/awesome/lain/widgets/yawn/icons/ThunderintheVicinity.png deleted file mode 120000 index 1fb3b9c..0000000 --- a/.config/awesome/lain/widgets/yawn/icons/ThunderintheVicinity.png +++ /dev/null @@ -1 +0,0 @@ -Cloudy.png \ No newline at end of file diff --git a/.config/awesome/lain/widgets/yawn/icons/Wind.png b/.config/awesome/lain/widgets/yawn/icons/Wind.png deleted file mode 100755 index 5dc1356..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/Wind.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/icons/na.png b/.config/awesome/lain/widgets/yawn/icons/na.png deleted file mode 100755 index 62a5350..0000000 Binary files a/.config/awesome/lain/widgets/yawn/icons/na.png and /dev/null differ diff --git a/.config/awesome/lain/widgets/yawn/init.lua b/.config/awesome/lain/widgets/yawn/init.lua deleted file mode 100644 index 3f08cd5..0000000 --- a/.config/awesome/lain/widgets/yawn/init.lua +++ /dev/null @@ -1,200 +0,0 @@ - ---[[ - - Licensed under GNU General Public License v2 - * (c) 2013, Luke Bonham - ---]] - -local newtimer = require("lain.helpers").newtimer - -local naughty = require("naughty") -local wibox = require("wibox") - -local debug = { getinfo = debug.getinfo } -local io = io -local os = { date = os.date, - getenv = os.getenv } -local string = { find = string.find, - match = string.match, - gsub = string.gsub, - sub = string.sub } -local tonumber = tonumber - -local setmetatable = setmetatable - --- YAhoo! Weather Notification --- lain.widgets.yawn -local yawn = -{ - icon = wibox.widget.imagebox(), - widget = wibox.widget.textbox('') -} - -local project_path = debug.getinfo(1, 'S').source:match[[^@(.*/).*$]] -local localizations_path = project_path .. 'localizations/' -local icon_path = project_path .. 'icons/' -local api_url = 'http://weather.yahooapis.com/forecastrss' -local units_set = '?u=c&w=' -- Default is Celsius -local language = string.match(os.getenv("LANG"), "(%S*$*)[.]") -local weather_data = nil -local notification = nil -local city_id = nil -local sky = nil -local settings = function() end - -yawn_notification_preset = {} - -local function fetch_weather() - local url = api_url .. units_set .. city_id - local f = io.popen("curl --connect-timeout 1 -fsm 3 '" .. url .. "'" ) - local text = f:read("*all") - f:close() - - -- In case of no connection or invalid city ID - -- widgets won't display - if text == "" or text:match("City not found") - then - yawn.icon:set_image(icon_path .. "na.png") - if text == "" then - weather_data = "Service not available at the moment." - yawn.widget:set_text(" N/A ") - else - weather_data = "City not found!\n" .. - "Are you sure " .. city_id .. - " is your Yahoo city ID?" - yawn.widget:set_text(" ? ") - end - return - end - - -- Processing raw data - weather_data = text:gsub("<.->", "") - weather_data = weather_data:match("Current Conditions:.-Full") or "" - - -- may still happens in case of bad connectivity - if weather_data == "" then - yawn.icon:set_image(icon_path .. "na.png") - yawn.widget:set_text(" ? ") - return - end - - weather_data = weather_data:gsub("Current Conditions:.-\n", "Now: ") - weather_data = weather_data:gsub("Forecast:.-\n", "") - weather_data = weather_data:gsub("\nFull", "") - weather_data = weather_data:gsub("[\n]$", "") - weather_data = weather_data:gsub(" [-] " , ": ") - weather_data = weather_data:gsub("[.]", ",") - weather_data = weather_data:gsub("High: ", "") - weather_data = weather_data:gsub(" Low: ", " - ") - - -- Getting info for text widget - local now = weather_data:sub(weather_data:find("Now:")+5, - weather_data:find("\n")-1) - forecast = now:sub(1, now:find(",")-1) - units = now:sub(now:find(",")+2, -2) - - -- Day/Night icon change - local hour = tonumber(os.date("%H")) - sky = icon_path - - if forecast == "Clear" or - forecast == "Fair" or - forecast == "Partly Cloudy" or - forecast == "Mostly Cloudy" - then - if hour >= 6 and hour <= 18 - then - sky = sky .. "Day" - else - sky = sky .. "Night" - end - end - - sky = sky .. forecast:gsub(" ", ""):gsub("/", "") .. ".png" - - -- In case there's no defined icon for current forecast - if io.open(sky) == nil then - sky = icon_path .. "na.png" - end - - -- Localization - local f = io.open(localizations_path .. language, "r") - if language:find("en_") == nil and f ~= nil - then - f:close() - for line in io.lines(localizations_path .. language) - do - word = string.sub(line, 1, line:find("|")-1) - translation = string.sub(line, line:find("|")+1) - weather_data = string.gsub(weather_data, word, translation) - end - end - - -- Finally setting infos - yawn.icon:set_image(sky) - widget = yawn.widget - - forecast = weather_data:match(": %S.-,"):gsub(": ", ""):gsub(",", "") - units = units:gsub(" ", "") - - settings() -end - -function yawn.hide() - if notification ~= nil then - naughty.destroy(notification) - notification = nil - end -end - -function yawn.show(t_out) - if yawn.widget._layout.text:match("?") - then - fetch_weather(settings) - end - - yawn.hide() - - notification = naughty.notify({ - preset = yawn_notification_preset, - text = weather_data, - icon = sky, - timeout = t_out - }) -end - -function yawn.register(id, args) - local args = args or {} - local timeout = args.timeout or 600 - settings = args.settings or function() end - - if args.u == "f" then units_set = '?u=f&w=' end - - city_id = id - - newtimer("yawn", timeout, fetch_weather) - - yawn.icon:connect_signal("mouse::enter", function() - yawn.show(0) - end) - yawn.icon:connect_signal("mouse::leave", function() - yawn.hide() - end) - - return yawn -end - -function yawn.attach(widget, id, args) - yawn.register(id, args) - - widget:connect_signal("mouse::enter", function() - yawn.show(0) - end) - - widget:connect_signal("mouse::leave", function() - yawn.hide() - end) -end - -return setmetatable(yawn, { __call = function(_, ...) return yawn.register(...) end }) diff --git a/.config/awesome/lain/widgets/yawn/localizations/it_IT b/.config/awesome/lain/widgets/yawn/localizations/it_IT deleted file mode 100644 index 70b0eef..0000000 --- a/.config/awesome/lain/widgets/yawn/localizations/it_IT +++ /dev/null @@ -1,60 +0,0 @@ -Now:|Ora: -Sun:|Dom: -Mon:|Lun: -Tue:|Mar: -Wed:|Mer: -Thu:|Gio: -Fri:|Ven: -Sat:|Sab: -Mostly Sunny|Abbastanza Soleggiato -Sunny|Soleggiato -Sun|Soleggiato -Rain/Thunder|Temporali -Isolated Thunderstorms|Temporali Isolati -Scattered Thunderstorms|Temporali Sparsi -Thundershowers|Rovesci Temporaleschi -Thunderstorms|Temporali -Thunder in the Vicinity|Tuoni in prossimità -Thunder|Temporale -AM|In Mattinata -PM|Nel Pomeriggio -Early|In Mattinata -Late|In Serata -Few|Sporadiche -Severe|Forti -Clear|Sereno -Fair|Sereno -Partly|Parzialmente -Mostly|Molto -Cloudy|Nuvoloso -Clouds|Nuvoloso -Scattered Showers|Temporali Sparsi -Light Snow Showers|Nevicate Leggere -Snow Showers|Nevicate -aeavy Snow|Forti Nevicate -Scattered Snow Showers|Nevicate Sparse -Mixed Rain And Snow|Pioggia E Neve -Mixed Rain And Sleet|Pioggia E Nevischio -Mixed Snow And Sleet|Neve E Nevischio -Mixed Rain And Hail|Pioggia E Grandine -Snow Flurries|Folate Di Neve -Blowing Snow|Neve Battente -Blowing Rain|Pioggia Battente -Heavy Rain|Forti Piogge -Freezing Rain|Pioggia Congelantesi -Showers|Piogge -Light Rain|Pioggia Leggera -Heavy|Forti -Rain|Piovoso -Windy|Ventoso -Wind|Ventoso -Snow|Neve -Sleet|Nevischio -Light Drizzle|Pioggia Leggera -Drizzle|Pioggia Leggera -Freezing Drizzle|Pioggerella Congelantesi -Hail|Grandine -Fog|Nebbia -Foggy|Nebbioso -Haze|Nebbia -Light|Leggere diff --git a/.config/awesome/lain/widgets/yawn/localizations/localization_template b/.config/awesome/lain/widgets/yawn/localizations/localization_template deleted file mode 100644 index 453807e..0000000 --- a/.config/awesome/lain/widgets/yawn/localizations/localization_template +++ /dev/null @@ -1,60 +0,0 @@ -Now:| -Sun:| -Mon:| -Tue:| -Wed:| -Thu:| -Fri:| -Sat:| -Mostly Sunny| -Sunny| -Sun| -Rain/Thunder| -Isolated Thunderstorms| -Scattered Thunderstorms| -Thundershowers| -Thunderstorms| -Thunder in the Vicinity| -Thunder| -AM| -PM| -Early| -Late| -Few| -Severe| -Clear| -Fair| -Partly| -Mostly| -Cloudy| -Clouds| -Scattered Showers| -Light Snow Showers| -Snow Showers| -Heavy Snow| -Scattered Snow Showers| -Mixed Rain And Snow| -Mixed Rain And Sleet| -Mixed Snow And Sleet| -Mixed Rain And Hail| -Snow Flurries| -Blowing Snow| -Blowing Rain| -Heavy Rain| -Freezing Rain| -Showers| -Light Rain| -Heavy| -Rain| -Windy| -Wind| -Snow| -Sleet| -Freezing Drizzle| -Light Drizzle| -Drizzle| -Hail| -Fog| -Foggy| -Haze| -Light| -- cgit v1.2.1