diff --git a/rc.lua.holo b/rc.lua.holo index 3bb3249..8dd1412 100755 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -815,7 +815,7 @@ for s = 1, screen.count() do mybottomwibox[s]:set_widget(bottom_layout) -- Set proper backgrounds, instead of beautiful.bg_normal - mywibox[s]:set_bg(beautiful.bg_normal_png) + mywibox[s]:set_bg(beautiful.topbar_path .. screen[1].workarea.width .. ".png") mybottomwibox[s]:set_bg("#242424") end diff --git a/themes/holo/icons/topbar/1024.png b/themes/holo/icons/topbar/1024.png new file mode 100644 index 0000000..bc1449b Binary files /dev/null and b/themes/holo/icons/topbar/1024.png differ diff --git a/themes/holo/icons/topbar/1152.png b/themes/holo/icons/topbar/1152.png new file mode 100644 index 0000000..8f16c02 Binary files /dev/null and b/themes/holo/icons/topbar/1152.png differ diff --git a/themes/holo/icons/topbar/1280.png b/themes/holo/icons/topbar/1280.png new file mode 100644 index 0000000..c4f7637 Binary files /dev/null and b/themes/holo/icons/topbar/1280.png differ diff --git a/themes/holo/icons/bg_normal.png b/themes/holo/icons/topbar/1366.png similarity index 100% rename from themes/holo/icons/bg_normal.png rename to themes/holo/icons/topbar/1366.png diff --git a/themes/holo/icons/topbar/1440.png b/themes/holo/icons/topbar/1440.png new file mode 100644 index 0000000..4fb7c7f Binary files /dev/null and b/themes/holo/icons/topbar/1440.png differ diff --git a/themes/holo/icons/topbar/1600.png b/themes/holo/icons/topbar/1600.png new file mode 100644 index 0000000..f58f733 Binary files /dev/null and b/themes/holo/icons/topbar/1600.png differ diff --git a/themes/holo/icons/topbar/1680.png b/themes/holo/icons/topbar/1680.png new file mode 100644 index 0000000..2abea88 Binary files /dev/null and b/themes/holo/icons/topbar/1680.png differ diff --git a/themes/holo/icons/topbar/1920.png b/themes/holo/icons/topbar/1920.png new file mode 100644 index 0000000..c9adc46 Binary files /dev/null and b/themes/holo/icons/topbar/1920.png differ diff --git a/themes/holo/icons/topbar/2560.png b/themes/holo/icons/topbar/2560.png new file mode 100644 index 0000000..6b496ac Binary files /dev/null and b/themes/holo/icons/topbar/2560.png differ diff --git a/themes/holo/original_plain_wall.png b/themes/holo/original_wall.png similarity index 100% rename from themes/holo/original_plain_wall.png rename to themes/holo/original_wall.png diff --git a/themes/holo/theme.lua b/themes/holo/theme.lua index c65592c..80dc4d8 100644 --- a/themes/holo/theme.lua +++ b/themes/holo/theme.lua @@ -12,12 +12,13 @@ theme.icon_dir = os.getenv("HOME") .. "/.config/awe theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/holo/wall.png" +theme.topbar_path = "png:" .. theme.icon_dir .. "/topbar/" + theme.font = "Tamsyn 10" theme.taglist_font = "Tamsyn 8" theme.fg_normal = "#FFFFFF" theme.fg_focus = "#0099CC" theme.bg_normal = "#242424" -theme.bg_normal_png = "png:" .. theme.icon_dir .. "/bg_normal.png" theme.fg_urgent = "#CC9393" theme.bg_urgent = "#2A1F1E" theme.border_width = "1" diff --git a/yawn/README.md b/yawn/README.md deleted file mode 100644 index dfa5cf0..0000000 --- a/yawn/README.md +++ /dev/null @@ -1,85 +0,0 @@ -Yahoo's Awesome (WM) Weather Notification -================================ - -Yawn is a module for Awesome WM providing brief and compact -weather notification via naughty lib and Yahoo! Weather API. - -Originally a fork of perceptive, it became a completely new module after various improvements and style changes. - -Usage ------ -Clone yawn repository into your $XDG_CONFIG_HOME/awesome (Awesome config dir). -Then, add in your rc.lua: - - require("yawn") - yawn.register(123456) - -where the function argument is so-called WOEID code of your city. -To obtain it you can google 'yahoo weather %CITYNAME%' and follow the first link. -It will look like - - http://weather.yahoo.com/united-states/california/san-diego-2487889/ - -and the last number in that link will be the ID you need. - -Default units and text widget color are Celsius and #D7D7D7, but they can be changed. -If you just want to change the color, add a second argument like this: - - yawn.register(123456, "#EEEEEE") - -if you want to set Fahrenheit units, add a third argument like this: - - yawn.register(123456, "#EEEEEE", "f") - -color argument can be *nil* if you don't want to change it. - -Finally, add yawn to your wibox of choice, for instance: - - right_layout:add(yawn.icon) - right_layout:add(yawn.widget) - -if you just want the notification attached to an existent widget, use *attach* instead: - - yawn.attach(*yourwidget*, 123456) - -or - - yawn.attach(*yourwidgetagain*, 123456, "f") - -you can also create a shortcut for the weather popup. In my rc.lua I've got this: - - awful.key({ altkey, }, "w", function () yawn.show_weather(5) end) - -where altkey is set right below modkey like this: - - altkey = "Mod1" - -so I can call the popup for 5 seconds pressing Alt+w. - -Localization ------ -The default language is English, but if you wish to have a localization, you -have to add a proper file in ``localizations``. You'll find a -template to fill in the subdirectory. - -Once you're done, rename it like your locale id, without ".utf8". In my case: - - $ lua - Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio - > print(os.getenv("LANG")) - it_IT.utf8 - > - -hence my file (Italian localization) has been named "it_IT". - -**NOTE:** If you create a localization, feel free to send me! I will add it. - -Screenshot ------ -![Screenshot][1] - -[1]: http://i.imgur.com/6JtjdBF.jpg - -License ------ - diff --git a/yawn/icons/00.png b/yawn/icons/00.png deleted file mode 100755 index d30e120..0000000 Binary files a/yawn/icons/00.png and /dev/null differ diff --git a/yawn/icons/01.png b/yawn/icons/01.png deleted file mode 100755 index aceb054..0000000 Binary files a/yawn/icons/01.png and /dev/null differ diff --git a/yawn/icons/02.png b/yawn/icons/02.png deleted file mode 100755 index 0a07b7b..0000000 Binary files a/yawn/icons/02.png and /dev/null differ diff --git a/yawn/icons/03.png b/yawn/icons/03.png deleted file mode 100755 index 758b01e..0000000 Binary files a/yawn/icons/03.png and /dev/null differ diff --git a/yawn/icons/04.png b/yawn/icons/04.png deleted file mode 100755 index 7f0d252..0000000 Binary files a/yawn/icons/04.png and /dev/null differ diff --git a/yawn/icons/05.png b/yawn/icons/05.png deleted file mode 100755 index 6a66140..0000000 Binary files a/yawn/icons/05.png and /dev/null differ diff --git a/yawn/icons/06.png b/yawn/icons/06.png deleted file mode 100755 index c924fac..0000000 Binary files a/yawn/icons/06.png and /dev/null differ diff --git a/yawn/icons/07.png b/yawn/icons/07.png deleted file mode 100755 index d00552a..0000000 Binary files a/yawn/icons/07.png and /dev/null differ diff --git a/yawn/icons/08.png b/yawn/icons/08.png deleted file mode 100755 index 3cc6665..0000000 Binary files a/yawn/icons/08.png and /dev/null differ diff --git a/yawn/icons/09.png b/yawn/icons/09.png deleted file mode 100755 index d797ee9..0000000 Binary files a/yawn/icons/09.png and /dev/null differ diff --git a/yawn/icons/10.png b/yawn/icons/10.png deleted file mode 100755 index cf08c5c..0000000 Binary files a/yawn/icons/10.png and /dev/null differ diff --git a/yawn/icons/11.png b/yawn/icons/11.png deleted file mode 100755 index 30534a2..0000000 Binary files a/yawn/icons/11.png and /dev/null differ diff --git a/yawn/icons/12.png b/yawn/icons/12.png deleted file mode 100755 index 6223f8f..0000000 Binary files a/yawn/icons/12.png and /dev/null differ diff --git a/yawn/icons/13.png b/yawn/icons/13.png deleted file mode 100755 index ddcb8f3..0000000 Binary files a/yawn/icons/13.png and /dev/null differ diff --git a/yawn/icons/14.png b/yawn/icons/14.png deleted file mode 100755 index 8ee6a7b..0000000 Binary files a/yawn/icons/14.png and /dev/null differ diff --git a/yawn/icons/15.png b/yawn/icons/15.png deleted file mode 100755 index 96c582e..0000000 Binary files a/yawn/icons/15.png and /dev/null differ diff --git a/yawn/icons/16.png b/yawn/icons/16.png deleted file mode 100755 index 009039f..0000000 Binary files a/yawn/icons/16.png and /dev/null differ diff --git a/yawn/icons/17.png b/yawn/icons/17.png deleted file mode 100755 index 5dc1356..0000000 Binary files a/yawn/icons/17.png and /dev/null differ diff --git a/yawn/icons/18.png b/yawn/icons/18.png deleted file mode 100755 index bac1e7e..0000000 Binary files a/yawn/icons/18.png and /dev/null differ diff --git a/yawn/icons/19.png b/yawn/icons/19.png deleted file mode 100755 index d8b3673..0000000 Binary files a/yawn/icons/19.png and /dev/null differ diff --git a/yawn/icons/20.png b/yawn/icons/20.png deleted file mode 100755 index 22b929c..0000000 Binary files a/yawn/icons/20.png and /dev/null differ diff --git a/yawn/icons/21.png b/yawn/icons/21.png deleted file mode 100755 index 01fcf46..0000000 Binary files a/yawn/icons/21.png and /dev/null differ diff --git a/yawn/icons/22.png b/yawn/icons/22.png deleted file mode 100755 index eacc98d..0000000 Binary files a/yawn/icons/22.png and /dev/null differ diff --git a/yawn/icons/23.png b/yawn/icons/23.png deleted file mode 100755 index 84ea140..0000000 Binary files a/yawn/icons/23.png and /dev/null differ diff --git a/yawn/icons/24.png b/yawn/icons/24.png deleted file mode 100755 index d9e2745..0000000 Binary files a/yawn/icons/24.png and /dev/null differ diff --git a/yawn/icons/25.png b/yawn/icons/25.png deleted file mode 100755 index 9e4404d..0000000 Binary files a/yawn/icons/25.png and /dev/null differ diff --git a/yawn/icons/26.png b/yawn/icons/26.png deleted file mode 100755 index 8fd0a5b..0000000 Binary files a/yawn/icons/26.png and /dev/null differ diff --git a/yawn/icons/27.png b/yawn/icons/27.png deleted file mode 100755 index 9279254..0000000 Binary files a/yawn/icons/27.png and /dev/null differ diff --git a/yawn/icons/28.png b/yawn/icons/28.png deleted file mode 100755 index cb803d7..0000000 Binary files a/yawn/icons/28.png and /dev/null differ diff --git a/yawn/icons/29.png b/yawn/icons/29.png deleted file mode 100755 index c2e8626..0000000 Binary files a/yawn/icons/29.png and /dev/null differ diff --git a/yawn/icons/30.png b/yawn/icons/30.png deleted file mode 100755 index d32ad22..0000000 Binary files a/yawn/icons/30.png and /dev/null differ diff --git a/yawn/icons/31.png b/yawn/icons/31.png deleted file mode 100755 index 4d6d47a..0000000 Binary files a/yawn/icons/31.png and /dev/null differ diff --git a/yawn/icons/32.png b/yawn/icons/32.png deleted file mode 100755 index f9f9f5d..0000000 Binary files a/yawn/icons/32.png and /dev/null differ diff --git a/yawn/icons/33.png b/yawn/icons/33.png deleted file mode 100755 index c74dfd1..0000000 Binary files a/yawn/icons/33.png and /dev/null differ diff --git a/yawn/icons/na.png b/yawn/icons/na.png deleted file mode 100755 index 62a5350..0000000 Binary files a/yawn/icons/na.png and /dev/null differ diff --git a/yawn/icons/source b/yawn/icons/source deleted file mode 100644 index f3baf5d..0000000 --- a/yawn/icons/source +++ /dev/null @@ -1 +0,0 @@ -http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 \ No newline at end of file diff --git a/yawn/init.lua b/yawn/init.lua deleted file mode 100644 index 5a11404..0000000 --- a/yawn/init.lua +++ /dev/null @@ -1,190 +0,0 @@ --- yawn, a weather notification module for Awesome WM 3.5+ - -local os = require("os") -local wibox = require("wibox") -local beautiful = require("beautiful") -local naughty = require("naughty") -local io = require("io") -local debug = require("debug") - -local string = string -local timer = timer -local print = print -local tonumber = tonumber - -module('yawn') - -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 chosen_units = '?u=c&w=' -- default is Celsius -local weather_data = nil -local notification = nil -local city_id = nil -sky_na = icon_path .. "na.png" -local sky = nil -local chosen_color = nil -local language = string.gsub(os.getenv("LANG"), ".utf8", "") - -icon = wibox.widget.imagebox() -widget = wibox.widget.textbox() - -function execute(url, callback) - - -- Reads from url, then runs the callback function on it - - local f = io.popen("curl --connect-timeout 1 -fsm 3 '" .. url .. "'" ) - local ws = f:read("*all") - f:close() - - local execute_timer = timer({ timeout = 7 }) - execute_timer:connect_signal("timeout", function() - execute_timer:stop() - callback(ws) - end) - execute_timer:start() -end - -function fetch_weather() - execute(api_url..chosen_units..city_id, function(text) - - -- In case of no connection or invalid city ID, widgets won't display - if text == "" or text:match("City not found") - then - sky = sky_na - if text == "" then - weather_data = "Service not available at the moment." - else - weather_data = "City not found!\n" .. - "Are you sure " .. city_id .. " is your Yahoo city ID?" - end - return - end - - -- Processing raw data - weather_data = text:gsub("<.->", "") - weather_data = weather_data:match("Current Conditions:.-Full") - 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) - local forecast = now:sub(1, now:find(",")-1) - local units = now:sub(now:find(",")+2, -2) - - -- Day/Night icon change - hour = tonumber(os.date("%H")) if hour >= 6 and hour <= 18 - then -- Day - if forecast == "Clear" or forecast == "Fair" then sky = icon_path .. "24.png" - elseif forecast == "Partly Cloudy" then sky = icon_path .. "26.png" - elseif forecast == "Mostly Cloudy" then sky = icon_path .. "20.png" - end - else -- Night - if forecast == "Clear" or forecast == "Fair" then sky = icon_path .. "23.png" - elseif forecast == "Partly Cloudy" then sky = icon_path .. "25.png" - elseif forecast == "Mostly Cloudy" then sky = icon_path .. "19.png" - end - end - - if sky == nil then - if forecast == "Cloudy" then sky = icon_path .. "18.png" - elseif forecast == "Sunny" then sky = icon_path .. "10.png" - elseif forecast == "Rain/Thunder" then sky = icon_path .. "00.png" - elseif forecast == "Light Snow Showers" then sky = icon_path .. "09.png" - elseif forecast == "Snow Flurries" or - forecast == "Blowing Snow" then sky = icon_path .. "12.png" - elseif forecast:find("Snow Showers") ~= nil or - forecast:find("Snow") ~= nil or - forecast:find("Sleet") ~= nil then sky = icon_path .. "11.png" - elseif forecast == "Mixed Rain And Snow" then sky = icon_path .. "02.png" - elseif forecast == "Mixed Rain And Sleet" then sky = icon_path .. "04.png" - elseif forecast == "Mixed Rain And Hail" then sky = icon_path .. "03.png" - elseif forecast == "Freezing Drizzle" then sky = icon_path .. "05.png" - elseif forecast == "Freezing Rain" then sky = icon_path .. "06png" - elseif forecast:find("Wind") ~= nil then sky = icon_path .. "17.png" - elseif forecast == "Heavy Snow" then sky = icon_path .. "13.png" - elseif forecast:find("Rain") ~= nil or - forecast:find("Drizzle") ~= nil then sky = icon_path .. "07.png" - elseif forecast:find("Showers") ~= nil or - forecast:find("Thunderstorm") ~= nil or - forecast:find("Thunder") ~= nil then sky = icon_path .. "08.png" - elseif forecast == "Hail" then sky = icon_path .. "14.png" - elseif forecast == "Foggy" or forecast == "Haze" then sky = icon_path .. "16.png" - else sky = sky_na - end - end - - -- Setting widgets - icon:set_image(sky) - widget:set_markup(" " .. units .. "") - - -- Localization - if language:find("en_") == nil - then - 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 - end) -end - -function remove_weather() - if notification ~= nil then - naughty.destroy(notification) - notification = nil - end -end - -function show_weather(t_out) - fetch_weather() - remove_weather() - notification = naughty.notify({ - text = weather_data, - icon = sky, - timeout = t_out, - hover_timeout = 0.5, - --fg = beautiful.fg_normal, - fg = "#D4D4D4", - bg = beautiful.bg_normal - }) -end - -function register(id, color, u) - if u == "f" then chosen_units = '?u=f&w=' end - chosen_color = color or "#d7d7d7" - city_id = id - fetch_weather() - update_timer = timer({ timeout = 600 }) - update_timer:connect_signal("timeout", function() - fetch_weather() - end) - update_timer:start() - fetch_weather() - - icon:connect_signal("mouse::enter", function() - show_weather(0) - end) - icon:connect_signal("mouse::leave", function() - remove_weather() - end) -end - -function attach(widget, id, u) - register(id, nil, u) - widget:connect_signal("mouse::enter", function() - show_weather(0) - end) - widget:connect_signal("mouse::leave", function() - remove_weather() - end) -end diff --git a/yawn/localizations/it_IT b/yawn/localizations/it_IT deleted file mode 100644 index cb0a857..0000000 --- a/yawn/localizations/it_IT +++ /dev/null @@ -1,56 +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|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 -Heavy 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 -Rain|Piovoso -Windy|Ventoso -Wind|Ventoso -Snow|Neve -Sleet|Nevischio -Drizzle|Pioggerella -Freezing Drizzle|Pioggerella Congelantesi -Hail|Grandine -Foggy|Nebbia -Haze|Nebbia -Light|Leggere diff --git a/yawn/localizations/localization_stub b/yawn/localizations/localization_stub deleted file mode 100644 index 59be2b6..0000000 --- a/yawn/localizations/localization_stub +++ /dev/null @@ -1,56 +0,0 @@ -Now:| -Sun:| -Mon:| -Tue:| -Wed:| -Thu:| -Fri:| -Sat:| -Mostly Sunny| -Sunny| -Sun| -Rain/Thunder| -Isolated Thunderstorms| -Scattered Thunderstorms| -Thundershowers| -Thunderstorms| -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| -Rain| -Windy| -Wind| -Snow| -Sleet| -Drizzle| -Freezing Drizzle| -Hail| -Foggy| -Haze| -Light|