diff --git a/README.rst b/README.rst index ca07bf4..afa4b88 100644 --- a/README.rst +++ b/README.rst @@ -3,9 +3,13 @@ Copycat themes for Awesome WM 3.5 I.E. modded and localized versions of some stuff I like. Beware! They're more awesome than they appear. +**Blackburn** the wannabe definitive theme + +.. image:: http://i.imgur.com/Cz1ne3J.jpg + **Steamburn** copycatted from ok100_ -.. image:: http://i.imgur.com/AvMiFTq.jpg +.. image:: http://i.imgur.com/esHcVzj.jpg **Powerarrow Darker** copycatted from romockee_ diff --git a/rc.lua.blackburn b/rc.lua.blackburn new file mode 100755 index 0000000..47319cb --- /dev/null +++ b/rc.lua.blackburn @@ -0,0 +1,1106 @@ +--[[ ]]-- +-- +-- - +-- Blackburn Awesome WM 3.5.+ config -- +-- github.com/copycat-killer -- +-- - +--[[ ]]-- + + +-- Required Libraries + +gears = require("gears") +awful = require("awful") +awful.rules = require("awful.rules") +awful.autofocus = require("awful.autofocus") +wibox = require("wibox") +beautiful = require("beautiful") +naughty = require("naughty") +vicious = require("vicious") +scratch = require("scratch") + +-- Run once function + +function run_once(cmd) + findme = cmd + firstspace = cmd:find(" ") + if firstspace then + findme = cmd:sub(0, firstspace-1) + end + awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") +end + +-- autostart applications +run_once("urxvtd") +run_once("unclutter -idle 10") +run_once("compton") + + +-- Localization + +os.setlocale(os.getenv("LANG")) + + +-- Error Handling + +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Handle runtime errors after startup +do + in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = err }) + in_error = false + end) +end + + +-- Variable Definitions + +home = os.getenv("HOME") +confdir = home .. "/.config/awesome" +scriptdir = confdir .. "/script/" +themes = confdir .. "/themes" +active_theme = themes .. "/blackburn" +weather_icons = active_theme .. "/icons/weather/" + +beautiful.init(active_theme .. "/theme.lua") + +terminal = "urxvtc" +editor = os.getenv("EDITOR") +editor_cmd = terminal .. " -e " .. editor +gui_editor = "geany -ps" +browser = "dwb" +browser2 = "midori" +mail = terminal .. " -e mutt " +chat = terminal .. " -e irssi " +tasks = terminal .. " -e htop " +wifi = terminal .. " -e sudo wifi-menu " +musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp " + +modkey = "Mod4" +altkey = "Mod1" + +layouts = +{ + awful.layout.suit.floating, -- 1 + awful.layout.suit.tile, -- 2 + awful.layout.suit.tile.left, -- 3 + awful.layout.suit.tile.bottom, -- 4 + awful.layout.suit.tile.top, -- 5 + awful.layout.suit.fair, -- 6 + awful.layout.suit.fair.horizontal, -- 7 + awful.layout.suit.spiral, -- 8 + awful.layout.suit.spiral.dwindle, -- 9 + awful.layout.suit.max, -- 10 + --awful.layout.suit.max.fullscreen, -- 11 + --awful.layout.suit.magnifier -- 12 +} + + +-- Wallpaper + +if beautiful.wallpaper then + for s = 1, screen.count() do + gears.wallpaper.maximized(beautiful.wallpaper, s, true) + end +end + +-- Tags + +tags = { + names = { "web", "term", "docs", "media", "down"}, + layout = { layouts[1], layouts[3], layouts[4], layouts[1], layouts[7] } + } +for s = 1, screen.count() do + tags[s] = awful.tag(tags.names, s, tags.layout) +end + +-- Menu +myaccessories = { + { "archives", "7zFM" }, + { "file manager", "spacefm" }, + { "editor", gui_editor }, +} +myinternet = { + { "browser", browser }, + { "irc client" , chat }, + { "torrent" , "rtorrent" }, + { "torrtux" , terminal .. " -e torrtux " }, + { "torrent search" , "torrent-search" } +} +mygames = { + { "NES", "fceux" }, + { "Super NES", "zsnes" }, +} +mygraphics = { + { "gimp" , "gimp" }, + { "dia", "dia" }, + { "image viewer" , "viewnior" } +} +myoffice = { + { "writer" , "lowriter" }, + { "impress" , "loimpress" }, +} +mysystem = { + { "appearance" , "lxappearance" }, + { "cleaning" , "bleachbit" }, + { "powertop" , terminal .. " -e sudo powertop " }, + { "task manager" , tasks } +} +mymainmenu = awful.menu({ items = { + { "accessories" , myaccessories }, + { "graphics" , mygraphics }, + { "internet" , myinternet }, + { "games" , mygames }, + { "office" , myoffice }, + { "system" , mysystem }, + } + }) +mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, + menu = mymainmenu }) + + +-- Wibox + +-- Colours +coldef = "" +white = "" +gray = "" +red = "" + + +-- Textclock widget +mytextclock = awful.widget.textclock(white .. "%H:%M" .. coldef) + +-- attached calendar +local os = os +local string = string +local table = table +local util = awful.util + +char_width = nil +text_color = theme.fg_normal or "#FFFFFF" +today_color = theme.tasklist_fg_focus or "#FF7100" +calendar_width = 21 + +local calendar = nil +local offset = 0 + +local data = nil + +local function pop_spaces(s1, s2, maxsize) + local sps = "" + for i = 1, maxsize - string.len(s1) - string.len(s2) do + sps = sps .. " " + end + return s1 .. sps .. s2 +end + +local function create_calendar() + offset = offset or 0 + + local now = os.date("*t") + local cal_month = now.month + offset + local cal_year = now.year + if cal_month > 12 then + cal_month = (cal_month % 12) + cal_year = cal_year + 1 + elseif cal_month < 1 then + cal_month = (cal_month + 12) + cal_year = cal_year - 1 + end + + local last_day = os.date("%d", os.time({ day = 1, year = cal_year, + month = cal_month + 1}) - 86400) + local first_day = os.time({ day = 1, month = cal_month, year = cal_year}) + local first_day_in_week = + os.date("%w", first_day) + local result = "do lu ma me gi ve sa\n" + for i = 1, first_day_in_week do + result = result .. " " + end + + local this_month = false + for day = 1, last_day do + local last_in_week = (day + first_day_in_week) % 7 == 0 + local day_str = pop_spaces("", day, 2) .. (last_in_week and "" or " ") + if cal_month == now.month and cal_year == now.year and day == now.day then + this_month = true + result = result .. + string.format('%s', + today_color, day_str) + else + result = result .. day_str + end + if last_in_week and day ~= last_day then + result = result .. "\n" + end + end + + local header + if this_month then + header = os.date("%a, %d %b %Y") + else + header = os.date("%B %Y", first_day) + end + return header, string.format('%s', + theme.font, text_color, result) +end + +local function calculate_char_width() + return beautiful.get_font_height(theme.font) * 0.555 +end + +function remove_calendar() + if calendar ~= nil then + naughty.destroy(calendar) + calendar = nil + offset = 0 + end +end + +function show(inc_offset) + inc_offset = inc_offset or 0 + + local save_offset = offset + hide() + offset = save_offset + inc_offset + + local char_width = char_width or calculate_char_width() + local header, cal_text = create_calendar() + calendar = naughty.notify({ title = header, + text = cal_text, + timeout = 0, hover_timeout = 0.5, + }) +end + +function add_calendar(t_out) + hide() + local char_width = char_width or calculate_char_width() + local header, cal_text = create_calendar() + calendar = naughty.notify({ title = header, + text = cal_text, + timeout = t_out, + }) +end + +mytextclock:connect_signal("mouse::enter", function() show(0) end) +mytextclock:connect_signal("mouse::leave", remove_calendar) +mytextclock:buttons(util.table.join( awful.button({ }, 1, function() show(-1) end), + awful.button({ }, 3, function() show(1) end))) + +-- GMail widget +mygmail = wibox.widget.textbox() +notify_shown = false +vicious.register(mygmail, vicious.widgets.gmail, + function (widget, args) + notify_title = "Hai un nuovo messaggio" + notify_text = '"' .. args["{subject}"] .. '"' + if (args["{count}"] > 0 ) then + if (notify_shown == false) then + if (args["{count}"] == 1) then + notify_title = "Hai un nuovo messaggio" + notify_text = '"' .. args["{subject}"] .. '"' + else + notify_title = "Hai " .. noti .. " nuovi messaggi" + notify_text = 'Ultimo: "' .. args["{subject}"] .. '"' + end + naughty.notify({ title = notify_title, text = notify_text, + timeout = 7, + position = "top_left", + icon = beautiful.widget_mail_notify, + fg = beautiful.taglist_fg_focus, + bg = beautiful.bg_normal }) + notify_shown = true + end + return gray .. " Mail " .. coldef .. white .. args["{count}"] .. " " .. coldef + else + notify_shown = false + return '' + end +end, 60) +mygmail:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail, false) end))) + +-- Mpd widget +mpdwidget = wibox.widget.textbox() +mpdwidget:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end))) +curr_track = nil +vicious.register(mpdwidget, vicious.widgets.mpd, +function(widget, args) + if (args["{state}"] == "Play") then + if( args["{Title}"] ~= curr_track ) + then + curr_track = args["{Title}"] + run_once(scriptdir .. "mpdinfo") + end + return gray .. args["{Artist}"] .. coldef .. white .. " " .. args["{Title}"] .. coldef + elseif (args["{state}"] == "Pause") then + return gray .. "mpd " .. coldef .. white .. "in pausa" .. coldef + else + curr_track = nil + return '' + end +end, 1) + +-- MEM widget +memwidget = wibox.widget.textbox() +vicious.register(memwidget, vicious.widgets.mem, gray .. "Mem " .. coldef .. white .. "$2 " .. coldef, 13) -- in Megabytes + +-- CPU widget +cpuwidget = wibox.widget.textbox() +vicious.register(cpuwidget, vicious.widgets.cpu, gray .. "Cpu " .. coldef .. white .. "$1 " .. coldef, 3) +cpuwidget:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(tasks, false) end))) + +-- Temp widget +tempwidget = wibox.widget.textbox() +vicious.register(tempwidget, vicious.widgets.thermal, gray .. "Temp " .. coldef .. white .. "$1 " .. coldef, 9, {"coretemp.0", "core"} ) + +-- /home fs widget +fshwidget = wibox.widget.textbox() +too_much = false +vicious.register(fshwidget, vicious.widgets.fs, +function (widget, args) + if ( args["{/home used_p}"] >= 90 ) then + if ( args["{/home used_p}"] >= 99 and too_much == false ) then + naughty.notify({ title = "Attenzione", text = "Partizione /home esaurita!\nFa' un po' di spazio.", + timeout = 7, + position = "top_right", + fg = beautiful.fg_urgent, + bg = beautiful.bg_urgent }) + too_much = true + end + return gray .. " Hdd " .. coldef .. white .. args["{/home used_p}"] .. coldef .. " " + else + return "" + end +end, 600) + +-- hhd status notification +local infos = nil + +function remove_info() + if infos ~= nil then + naughty.destroy(infos) + infos = nil + end +end + +function add_info(t_out) + remove_info() + local capi = { + mouse = mouse, + screen = screen + } + local cal = awful.util.pread(scriptdir .. "dfs") + cal = string.gsub(cal, " ^%s*(.-)%s*$", "%1") + infos = naughty.notify({ + text = cal, + timeout = t_out, + position = "top_right", + margin = 10, + height = 210, + width = 680, + screen = capi.mouse.screen + }) +end + +fshwidget:connect_signal('mouse::enter', function () add_info(0) end) +fshwidget:connect_signal('mouse::leave', function () remove_info() end) + +-- Battery widget +batwidget = wibox.widget.textbox() +function batstate() + + local file = io.open("/sys/class/power_supply/BAT0/status", "r") + + if (file == nil) then + return "Cable plugged" + end + + local batstate = file:read("*line") + file:close() + + if (batstate == 'Discharging' or batstate == 'Charging') then + return batstate + else + return "Fully charged" + end +end +vicious.register(batwidget, vicious.widgets.bat, +function (widget, args) + -- plugged + if (batstate() == 'Cable plugged') then + return '' + -- critical + elseif (args[2] <= 5 and batstate() == 'Discharging') then + naughty.notify({ + text = "sto per spegnermi...", + title = "Carica quasi esaurita!", + position = "top_right", + timeout = 0, + fg="#000000", + bg="#ffffff", + screen = 1, + ontop = true, + }) + -- low + elseif (args[2] <= 10 and batstate() == 'Discharging') then + naughty.notify({ + text = "attacca il cavo!", + title = "Carica bassa", + position = "top_right", + timeout = 0, + fg="#ffffff", + bg="#262729", + screen = 1, + ontop = true, + }) + end + return gray .. "Bat " .. coldef .. white .. args[2] .. " " .. coldef +end, 1, 'BAT0') + +-- Volume widget +volumewidget = wibox.widget.textbox() +vicious.register(volumewidget, vicious.widgets.volume, +function (widget, args) + if (args[2] ~= "♩" ) then + return gray .. "Vol " .. coldef .. white .. args[1] .. " " .. coldef + else + return gray .. "Vol " .. coldef .. white .. "mute " .. coldef + end +end, 1, "Master") + +-- Net checker widget +no_net_shown = true +netwidget = wibox.widget.textbox() +vicious.register(netwidget, vicious.widgets.net, +function (widget, args) + if args["{wlan0 carrier}"] == 0 then + if no_net_shown == true then + naughty.notify({ title = "wlan0", text = "No carrier", + timeout = 7, + position = "top_left", + icon = beautiful.widget_no_net_notify, + fg = "#ff5e5e", + bg = beautiful.bg_normal }) + no_net_shown = false + end + return gray .. " Net " .. coldef .. red .. "Off " .. coldef + else + no_net_shown = true + return '' + end +end, 10) +netwidget:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(wifi) end))) + +-- Weather widget +weathericon = wibox.widget.imagebox() +weathericon:set_image(beautiful.widget_weather_0) +weatherwidget = wibox.widget.textbox() +sky = "" +vicious.register(weatherwidget, vicious.widgets.weather, + function (widget, args) + if args["{tempf}"] == "N/A" or args["{sky}"] == "N/A" + then + weathericon:set_image(beautiful.widget_weather_na) + sky = "na" + return ' ' + else + -- very long work in progress + if os.date("%H") >= "6" and os.date("%H") <= "18" + then + if args["{sky}"] == "Cloudy" then + weathericon:set_image(beautiful.widget_weather_28) + sky = "28" + elseif args["{sky}"] == "Partly Cloudy" then + weathericon:set_image(beautiful.widget_weather_30) + sky = "30" + elseif args["{sky}"] == "Mostly Cloudy" then + weathericon:set_image(beautiful.widget_weather_26) + sky = "26" + else + weathericon:set_image(beautiful_widget_weather_na) + sky = "na" + end + else + if args["{sky}"] == "Cloudy" then + weathericon:set_image(beautiful.widget_weather_27) + sky = "27" + elseif args["{sky}"] == "Partly Cloudy" then + weathericon:set_image(beautiful.widget_weather_29) + sky = "29" + elseif args["{sky}"] == "Mostly Cloudy" then + weathericon:set_image(beautiful.widget_weather_26) + sky = "26" + else + weathericon:set_image(beautiful_widget_weather_na) + sky = "na" + end + end + return " " .. white .. args["{tempc}"] .. " " .. coldef + end + end, 600, "LIRN" ) + +-- attached notification +local timer = timer +local io = require("io") +local debug = require("debug") +local string = string +local print = print +local script_path = scriptdir .. 'weather' +local script_cmd = script_path .. ' --id=' +local tmpfile = '/tmp/.awesome.weather' +local weather_data = "" +local notification = nil +local pattern = '%a.+' +local city_id = nil + +function execute(cmd, output, callback) + -- Executes command line, writes its output to temporary file, + -- and runs the callback with output as an argument. + local cmdline = cmd .. " &> " .. output .. " & " + io.popen(cmdline):close() + + local execute_timer = timer({ timeout = 7 }) + execute_timer:connect_signal("timeout", function() + execute_timer:stop() + local f = io.open(output) + callback(f:read("*all")) + f:close() + end) + execute_timer:start() +end + +function fetch_weather() + execute(script_cmd .. city_id, tmpfile, function(text) + old_weather_data = weather_data + weather_data = string.gsub(text, "[\n]$", "") + + -- Italian localization (work in progress) + -- can be used as a stub for other localizations + weather_data = string.gsub(weather_data, "Now", "Ora") + weather_data = string.gsub(weather_data, "Sun", "Dom") + weather_data = string.gsub(weather_data, "Mon", "Lun") + weather_data = string.gsub(weather_data, "Tue", "Mar") + weather_data = string.gsub(weather_data, "Wed", "Mer") + weather_data = string.gsub(weather_data, "Thu", "Gio") + weather_data = string.gsub(weather_data, "Fri", "Ven") + weather_data = string.gsub(weather_data, "Sat", "Sab") + weather_data = string.gsub(weather_data, "Sat", "Sab") + weather_data = string.gsub(weather_data, "Partly", "Parzialmente") + weather_data = string.gsub(weather_data, "Mostly", "Molto") + weather_data = string.gsub(weather_data, "Cloudy", "Nuvoloso") + weather_data = string.gsub(weather_data, "Showers", "Piogge") + weather_data = string.gsub(weather_data, "Rain", "Piogge") + weather_data = string.gsub(weather_data, "AM", "In Mattinata") + weather_data = string.gsub(weather_data, "PM", "Nel Pomeriggio") + weather_data = string.gsub(weather_data, "Wind", "Vento") + weather_data = string.gsub(weather_data, "Few", "Sporadiche") + weather_data = string.gsub(weather_data, "Light", "Leggere") + + if notification ~= nil and old_weather_data ~= weather_data then + add_weather(0) + end + end) +end + +function remove_weather() + if notification ~= nil then + naughty.destroy(notification) + notification = nil + end +end + +function add_weather(t_out) + remove_weather() + notification = naughty.notify({ + text = weather_data, + icon = weather_icons .. sky .. ".png" , + timeout = t_out, hover_timeout = 0.5 + }) +end + +function add_weather_notification(widget, id) + city_id = id + fetch_weather() + update_timer = timer({ timeout = 600 }) + update_timer:connect_signal("timeout", function() + fetch_weather() + end) + update_timer:start() + fetch_weather() + + widget:connect_signal("mouse::enter", function() + add_weather(0) + end) + widget:connect_signal("mouse::leave", function() + remove_weather() + end) + vicious.force({ weatherwidget } ) +end + +add_weather_notification(weathericon, 725051) + +-- Separators +spr = wibox.widget.textbox(' ') +leftbr = wibox.widget.textbox(white .. ' [' .. coldef) +rightbr = wibox.widget.textbox(white .. '] ' .. coldef) + + +-- Layout + +-- Create a wibox for each screen and add it +mywibox = {} +mypromptbox = {} +mylayoutbox = {} +mytaglist = {} +mytaglist.buttons = awful.util.table.join( + awful.button({ }, 1, awful.tag.viewonly), + awful.button({ modkey }, 1, awful.client.movetotag), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, awful.client.toggletag), + awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) + ) +mytasklist = {} +mytasklist.buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + -- Without this, the following + -- :isvisible() makes no sense + c.minimized = false + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, function () + if instance then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ width=250 }) + end + end), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + if client.focus then client.focus:raise() end + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end)) + +for s = 1, screen.count() do + + -- Create a promptbox for each screen + mypromptbox[s] = awful.widget.prompt() + + -- We need one layoutbox per screen. + mylayoutbox[s] = awful.widget.layoutbox(s) + mylayoutbox[s]:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), + awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) + + -- Create a taglist widget + mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons) + + -- Create a tasklist widget + mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) + + -- Create the upper wibox + mywibox[s] = awful.wibox({ position = "top", screen = s, height = 18 }) + + -- Widgets that are aligned to the upper left + local left_layout = wibox.layout.fixed.horizontal() + left_layout:add(spr) + left_layout:add(mytaglist[s]) + left_layout:add(leftbr) + left_layout:add(mylayoutbox[s]) + left_layout:add(rightbr) + left_layout:add(mypromptbox[s]) + + -- Widgets that are aligned to the upper right + local right_layout = wibox.layout.fixed.horizontal() + if s == 1 then right_layout:add(wibox.widget.systray()) end + right_layout:add(spr) + right_layout:add(mpdwidget) + right_layout:add(spr) + right_layout:add(mygmail) + right_layout:add(spr) + --right_layout:add(cpuwidget) + --right_layout:add(spr) + right_layout:add(weathericon) + right_layout:add(weatherwidget) + right_layout:add(spr) + right_layout:add(memwidget) + right_layout:add(spr) + right_layout:add(tempwidget) + right_layout:add(fshwidget) + right_layout:add(batwidget) + right_layout:add(netwidget) + right_layout:add(spr) + right_layout:add(volumewidget) + right_layout:add(spr) + right_layout:add(mytextclock) + right_layout:add(spr) + + -- Now bring it all together (with the tasklist in the middle) + local layout = wibox.layout.align.horizontal() + layout:set_left(left_layout) + layout:set_middle(mytasklist[s]) + layout:set_right(right_layout) + mywibox[s]:set_widget(layout) + +end + +-- Mouse Bindings + +root.buttons(awful.util.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) + + +-- Key bindings +globalkeys = awful.util.table.join( + + -- Capture a screenshot + awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end), + + -- Move clients + awful.key({ altkey }, "Next", function () awful.client.moveresize( 1, 1, -2, -2) end), + awful.key({ altkey }, "Prior", function () awful.client.moveresize(-1, -1, 2, 2) end), + awful.key({ altkey }, "Down", function () awful.client.moveresize( 0, 1, 0, 0) end), + awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end), + awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end), + awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end), + awful.key({ modkey, }, "Left", awful.tag.viewprev ), + awful.key({ modkey, }, "Right", awful.tag.viewnext ), + awful.key({ modkey, }, "Escape", awful.tag.history.restore), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx(-1) + if client.focus then client.focus:raise() end + end), + awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end), + + -- Show/Hide Wibox + awful.key({ modkey }, "b", function () + mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible + end), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), + awful.key({ modkey, "Control" }, "r", awesome.restart), + awful.key({ modkey, "Shift" }, "q", awesome.quit), + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), + awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), + awful.key({ modkey, "Control" }, "n", awful.client.restore), + + -- Dropdown terminal + awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), + + -- Widgets popups + awful.key({ altkey, }, "c", function () add_calendar(7) end), + awful.key({ altkey, }, "h", function () add_info(7) end), + awful.key({ altkey, }, "w", function () add_weather(5) end), + + -- Volume control + awful.key({ "Control" }, "Up", function () + awful.util.spawn("amixer set Master playback 1%+", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "Down", function () + awful.util.spawn("amixer set Master playback 1%-", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "m", function () + awful.util.spawn("amixer set Master playback mute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "u", function () + awful.util.spawn("amixer set Master playback unmute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ altkey, "Control" }, "m", function () + awful.util.spawn("amixer set Master playback 100%", false ) + vicious.force({ volumewidget }) + end), + + -- Music control + awful.key({ altkey, "Control" }, "Up", function () + awful.util.spawn( "mpc toggle", false ) + vicious.force({ mpdwidget } ) + end), + awful.key({ altkey, "Control" }, "Down", function () + awful.util.spawn( "mpc stop", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Left", function () + awful.util.spawn( "mpc prev", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Right", function () + awful.util.spawn( "mpc next", false ) + vicious.force({ mpdwidget } ) + end ), + + -- Copy to clipboard + awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + + -- User programs + awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end), + awful.key({ modkey, }, "a", function () awful.util.spawn( "midori", false ) end), + awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end), + awful.key({ modkey, }, "t", function () awful.util.spawn( "thunderbird", false ) end), + awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end), + + -- Prompt + awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), + awful.key({ modkey }, "x", + function () + awful.prompt.run({ prompt = "Run Lua code: " }, + mypromptbox[mouse.screen].widget, + awful.util.eval, nil, + awful.util.getdir("cache") .. "/history_eval") + end) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), + awful.key({ modkey, }, "o", awful.client.movetoscreen ), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end), + awful.key({ modkey, }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c.maximized_vertical = not c.maximized_vertical + end) +) + +-- Compute the maximum number of digit we need, limited to 9 +keynumber = 0 +for s = 1, screen.count() do + keynumber = math.min(9, math.max(#tags[s], keynumber)); +end + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it works on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, keynumber do + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, + function () + screen = mouse.screen + if tags[screen][i] then + awful.tag.viewonly(tags[screen][i]) + end + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + screen = mouse.screen + if tags[screen][i] then + awful.tag.viewtoggle(tags[screen][i]) + end + end), + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus and tags[client.focus.screen][i] then + awful.client.movetotag(tags[client.focus.screen][i]) + end + end), + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus and tags[client.focus.screen][i] then + awful.client.toggletag(tags[client.focus.screen][i]) + end + end)) +end + +clientbuttons = awful.util.table.join( + awful.button({ }, 1, function (c) client.focus = c; c:raise() end), + awful.button({ modkey }, 1, awful.mouse.client.move), + awful.button({ modkey }, 3, awful.mouse.client.resize)) + +-- Set keys +root.keys(globalkeys) + + +-- Rules + +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = true, + keys = clientkeys, + buttons = clientbuttons, + size_hints_honor = false + } + }, + + { rule = { class = "URxvt" }, + properties = {opacity = 0.95} }, + + { rule = { class = "MPlayer" }, + properties = { floating = true } }, + + { rule = { class = "Dwb" }, + properties = { tag = tags[1][1], + floating=true, + maximized_vertical=true, + maximized_horizontal=true } }, + + { rule = { class = "Midori" }, + properties = { tag = tags[1][1], + maximized_vertical=true, + maximized_horizontal=true } }, + + { rule = { class = "Geany" }, + properties = { tag = tags[1][2] } }, + + { rule = { class = "Zathura" }, + properties = { tag = tags[1][3] } }, + + { rule = { class = "Thunderbird" }, + properties = { tag = tags[1][3] } }, + + { rule = { class = "Dia" }, + properties = { tag = tags[1][4], + floating = true } }, + + { rule = { class = "Gimp" }, + properties = { tag = tags[1][4], + floating=true } }, + + { rule = { class = "Transmission-gtk" }, + properties = { tag = tags[1][5] } }, + + { rule = { class = "Torrent-search" }, + properties = { tag = tags[1][5] } }, +} + + +-- Signals + +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c, startup) + -- Enable sloppy focus + c:connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end + end) + + if not startup then + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- awful.client.setslave(c) + + -- Put windows in a smart way, only if they does not set an initial position. + if not c.size_hints.user_position and not c.size_hints.program_position then + awful.placement.no_overlap(c) + awful.placement.no_offscreen(c) + end + end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- Widgets that are aligned to the left + local left_layout = wibox.layout.fixed.horizontal() + left_layout:add(awful.titlebar.widget.iconwidget(c)) + + -- Widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- The title goes in the middle + local title = awful.titlebar.widget.titlewidget(c) + title:buttons(awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + )) + + -- Now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_left(left_layout) + layout:set_right(right_layout) + layout:set_middle(title) + + awful.titlebar(c):set_widget(layout) + end +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 217c958..d27336b 100755 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -73,6 +73,7 @@ end -- Useful Paths home = os.getenv("HOME") confdir = home .. "/.config/awesome" +scriptdir = confdir .. "/script/" themes = confdir .. "/themes" active_theme = themes .. "/multicolor" @@ -370,7 +371,7 @@ function add_info() mouse = mouse, screen = screen } - local cal = awful.util.pread("dfs") + local cal = awful.util.pread(scriptdir .. "dfs") cal = string.gsub(cal, " ^%s*(.-)%s*$", "%1") infos = naughty.notify({ text = string.format('%s', "Terminus", cal), @@ -379,15 +380,12 @@ function add_info() margin = 10, height = 170, width = 585, - border_color = '#404040', - border_width = 1, - opacity = 0.94, screen = capi.mouse.screen }) end -fshicon:connect_signal('mouse::enter', function () add_info() end) -fshicon:connect_signal('mouse::leave', function () remove_info() end) +fshwidget:connect_signal('mouse::enter', function () add_info() end) +fshwidget:connect_signal('mouse::leave', function () remove_info() end) -- Uptime uptimeicon = wibox.widget.imagebox() @@ -702,6 +700,7 @@ root.buttons(awful.util.table.join( -- {{{ Key bindings globalkeys = awful.util.table.join( + -- Capture a screenshot awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end), @@ -712,17 +711,15 @@ globalkeys = awful.util.table.join( awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end), awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end), awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end), - awful.key({ modkey, }, "Left", awful.tag.viewprev ), awful.key({ modkey, }, "Right", awful.tag.viewnext ), awful.key({ modkey, }, "Escape", awful.tag.history.restore), - - awful.key({ modkey, }, "j", + awful.key({ modkey, }, "k", function () awful.client.focus.byidx( 1) if client.focus then client.focus:raise() end end), - awful.key({ modkey, }, "k", + awful.key({ modkey, }, "j", function () awful.client.focus.byidx(-1) if client.focus then client.focus:raise() end @@ -732,7 +729,7 @@ globalkeys = awful.util.table.join( -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible - mybottomwibox[mouse.screen].visible = not mybottomwibox[mouse.screen].visible end), + end), -- Layout manipulation awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), @@ -752,8 +749,6 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), - - awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), @@ -762,28 +757,59 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), + -- Dropdown terminal + awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), + -- Volume control - awful.key({ "Control" }, "Up", function () awful.util.spawn("amixer set Master playback 1%+", false ) end), - awful.key({ "Control" }, "Down", function () awful.util.spawn("amixer set Master playback 1%-", false ) end), - awful.key({ "Control" }, "m", function () awful.util.spawn("amixer set Master playback mute", false ) end), - awful.key({ "Control" }, "u", function () awful.util.spawn("amixer set Master playback unmute", false ) end), - - -- Music control - awful.key({ altkey, "Control" }, "Up", function () awful.util.spawn( "mpc toggle", false ) end), - awful.key({ altkey, "Control" }, "Down", function () awful.util.spawn( "mpc stop", false ) end ), - awful.key({ altkey, "Control" }, "Left", function () awful.util.spawn( "mpc prev", false ) end ), - awful.key({ altkey, "Control" }, "Right", function () awful.util.spawn( "mpc next", false ) end ), - awful.key({ modkey, "Control" }, "Up", function () awful.util.spawn( "systemctl start mpd", false ) end), - awful.key({ modkey, "Control" }, "Down", function () awful.util.spawn( "systemctl stop mpd", false ) end), + awful.key({ "Control" }, "Up", function () + awful.util.spawn("amixer set Master playback 1%+", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "Down", function () + awful.util.spawn("amixer set Master playback 1%-", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "m", function () + awful.util.spawn("amixer set Master playback mute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "u", function () + awful.util.spawn("amixer set Master playback unmute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ altkey, "Control" }, "m", function () + awful.util.spawn("amixer set Master playback 100%", false ) + vicious.force({ volumewidget }) + end), - -- Other stuff + -- Music control + awful.key({ altkey, "Control" }, "Up", function () + awful.util.spawn( "mpc toggle", false ) + vicious.force({ mpdwidget } ) + end), + awful.key({ altkey, "Control" }, "Down", function () + awful.util.spawn( "mpc stop", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Left", function () + awful.util.spawn( "mpc prev", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Right", function () + awful.util.spawn( "mpc next", false ) + vicious.force({ mpdwidget } ) + end ), + + -- Copy to clipboard awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + + -- User programs awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end), + awful.key({ modkey, }, "a", function () awful.util.spawn( "midori", false ) end), awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end), - awful.key({ modkey, }, "t", function () awful.util.spawn(mail) end), + awful.key({ modkey, }, "t", function () awful.util.spawn( "thunderbird", false ) end), awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end), -- Prompt diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 6582e87..6e8c1ed 100755 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -427,10 +427,7 @@ function add_info() margin = 10, height = 170, width = 585, - border_color = '#404040', - border_width = 1, - opacity = 0.94, - screen = capi.mouse.screen + screen = capi.mouse.screen }) end @@ -670,6 +667,7 @@ root.buttons(awful.util.table.join( -- {{{ Key bindings globalkeys = awful.util.table.join( + -- Capture a screenshot awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end), @@ -680,11 +678,9 @@ globalkeys = awful.util.table.join( awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end), awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end), awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end), - awful.key({ modkey, }, "Left", awful.tag.viewprev ), awful.key({ modkey, }, "Right", awful.tag.viewnext ), awful.key({ modkey, }, "Escape", awful.tag.history.restore), - awful.key({ modkey, }, "k", function () awful.client.focus.byidx( 1) @@ -700,7 +696,7 @@ globalkeys = awful.util.table.join( -- Show/Hide Wibox awful.key({ modkey }, "b", function () mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible - mybottomwibox[mouse.screen].visible = not mybottomwibox[mouse.screen].visible end), + end), -- Layout manipulation awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), @@ -720,8 +716,6 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), - - awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), @@ -730,24 +724,58 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), + -- Dropdown terminal + awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), + + -- Widgets popups + awful.key({ altkey, }, "c", function () add_calendar(7) end), + -- Volume control - awful.key({ "Control" }, "Up", function () os.execute("amixer set Master playback 1%+", false ) end), - awful.key({ "Control" }, "Down", function () os.execute("amixer set Master playback 1%-", false ) end), - awful.key({ "Control" }, "m", function () os.execute("amixer set Master playback mute", false ) end), - awful.key({ "Control" }, "u", function () os.execute("amixer set Master playback unmute", false ) end), - awful.key({ altkey, "Control" }, "m", function () os.execute("amixer set Master playback 100%", false ) end), + awful.key({ "Control" }, "Up", function () + awful.util.spawn("amixer set Master playback 1%+", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "Down", function () + awful.util.spawn("amixer set Master playback 1%-", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "m", function () + awful.util.spawn("amixer set Master playback mute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "u", function () + awful.util.spawn("amixer set Master playback unmute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ altkey, "Control" }, "m", function () + awful.util.spawn("amixer set Master playback 100%", false ) + vicious.force({ volumewidget }) + end), - -- Music control - awful.key({ altkey, "Control" }, "Up", function () awful.util.spawn( "mpc toggle", false ) end), - awful.key({ altkey, "Control" }, "Down", function () awful.util.spawn( "mpc stop", false ) end ), - awful.key({ altkey, "Control" }, "Left", function () awful.util.spawn( "mpc prev", false ) end ), - awful.key({ altkey, "Control" }, "Right", function () awful.util.spawn( "mpc next", false ) end ), + -- Music control + awful.key({ altkey, "Control" }, "Up", function () + awful.util.spawn( "mpc toggle", false ) + vicious.force({ mpdwidget } ) + end), + awful.key({ altkey, "Control" }, "Down", function () + awful.util.spawn( "mpc stop", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Left", function () + awful.util.spawn( "mpc prev", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Right", function () + awful.util.spawn( "mpc next", false ) + vicious.force({ mpdwidget } ) + end ), - -- Other stuff + -- Copy to clipboard awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + + -- User programs awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end), awful.key({ modkey, }, "a", function () awful.util.spawn( "midori", false ) end), awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end), diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 861c142..b2ab462 100755 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -70,6 +70,7 @@ end home = os.getenv("HOME") confdir = home .. "/.config/awesome" +scriptdir = confdir .. "/script/" themes = confdir .. "/themes" active_theme = themes .. "/steamburn" @@ -285,13 +286,13 @@ function show(inc_offset) }) end -function show_calendar() +function add_calendar(t_out) hide() local char_width = char_width or calculate_char_width() local header, cal_text = create_calendar() calendar = naughty.notify({ title = header, text = cal_text, - timeout = 5, + timeout = t_out, }) end @@ -342,7 +343,7 @@ function(widget, args) if( args["{Title}"] ~= curr_track ) then curr_track = args["{Title}"] - run_once("mpdinfo") + run_once(scriptdir .. "mpdinfo") end return gray .. args["{Title}"] .. coldef .. white .. " " .. args["{Artist}"] .. coldef elseif (args["{state}"] == "Pause") then @@ -403,7 +404,7 @@ function add_info() mouse = mouse, screen = screen } - local cal = awful.util.pread("dfs") + local cal = awful.util.pread(scriptdir .. "dfs") cal = string.gsub(cal, " ^%s*(.-)%s*$", "%1") infos = naughty.notify({ text = string.format('%s', "Tamsyn", cal), @@ -412,10 +413,7 @@ function add_info() margin = 10, height = 210, width = 680, - border_color = '#94928f', - border_width = 1, - opacity = 0.94, - screen = capi.mouse.screen + screen = capi.mouse.screen }) end @@ -651,6 +649,7 @@ root.buttons(awful.util.table.join( -- Key bindings globalkeys = awful.util.table.join( + -- Capture a screenshot awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end), @@ -661,11 +660,9 @@ globalkeys = awful.util.table.join( awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end), awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end), awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end), - awful.key({ modkey, }, "Left", awful.tag.viewprev ), awful.key({ modkey, }, "Right", awful.tag.viewnext ), awful.key({ modkey, }, "Escape", awful.tag.history.restore), - awful.key({ modkey, }, "k", function () awful.client.focus.byidx( 1) @@ -701,9 +698,6 @@ globalkeys = awful.util.table.join( awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), - - awful.key({ "Control", }, "<", function () show_calendar() end), - awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), @@ -712,24 +706,58 @@ globalkeys = awful.util.table.join( awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - awful.key({ modkey, "Control" }, "n", awful.client.restore), + -- Dropdown terminal + awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), + + -- Widgets popups + awful.key({ altkey, }, "c", function () add_calendar(7) end), + -- Volume control - awful.key({ "Control" }, "Up", function () os.execute("amixer set Master playback 1%+", false ) end), - awful.key({ "Control" }, "Down", function () os.execute("amixer set Master playback 1%-", false ) end), - awful.key({ "Control" }, "m", function () os.execute("amixer set Master playback mute", false ) end), - awful.key({ "Control" }, "u", function () os.execute("amixer set Master playback unmute", false ) end), - awful.key({ altkey, "Control" }, "m", function () os.execute("amixer set Master playback 100%", false ) end), + awful.key({ "Control" }, "Up", function () + awful.util.spawn("amixer set Master playback 1%+", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "Down", function () + awful.util.spawn("amixer set Master playback 1%-", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "m", function () + awful.util.spawn("amixer set Master playback mute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ "Control" }, "u", function () + awful.util.spawn("amixer set Master playback unmute", false ) + vicious.force({ volumewidget }) + end), + awful.key({ altkey, "Control" }, "m", function () + awful.util.spawn("amixer set Master playback 100%", false ) + vicious.force({ volumewidget }) + end), -- Music control - awful.key({ altkey, "Control" }, "Up", function () awful.util.spawn( "mpc toggle", false ) end), - awful.key({ altkey, "Control" }, "Down", function () awful.util.spawn( "mpc stop", false ) end ), - awful.key({ altkey, "Control" }, "Left", function () awful.util.spawn( "mpc prev", false ) end ), - awful.key({ altkey, "Control" }, "Right", function () awful.util.spawn( "mpc next", false ) end ), + awful.key({ altkey, "Control" }, "Up", function () + awful.util.spawn( "mpc toggle", false ) + vicious.force({ mpdwidget } ) + end), + awful.key({ altkey, "Control" }, "Down", function () + awful.util.spawn( "mpc stop", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Left", function () + awful.util.spawn( "mpc prev", false ) + vicious.force({ mpdwidget } ) + end ), + awful.key({ altkey, "Control" }, "Right", function () + awful.util.spawn( "mpc next", false ) + vicious.force({ mpdwidget } ) + end ), - -- Other stuff + -- Copy to clipboard awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end), + + -- User programs awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end), awful.key({ modkey, }, "a", function () awful.util.spawn( "midori", false ) end), awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end), diff --git a/script/dfs b/script/dfs new file mode 100755 index 0000000..ef4404e --- /dev/null +++ b/script/dfs @@ -0,0 +1,390 @@ +#!/bin/bash +# +# Adapted from Eridan's "fs" (cleanup, enhancements and switch to bash/Linux) +# JM, 10/12/2004 +# +# Localized in Italian by a maniac, 02/03/2013 +# +# ------------------------------------------------------------------------- +# Decoding options +# ------------------------------------------------------------------------- +USAGE="--> Usage: $0 [-h(elp)] | [-n(arrow mode)] | [-w(eb output)]" + +NARROW_MODE=0 +WEB_OUTPUT=0 + +while [ $# -gt 0 ]; do +case "$1" in +"-h" ) +echo $USAGE +exit +;; +"-d" ) +DEBUG=1 +;; +"-n" ) +NARROW_MODE=1 +;; +"-w" ) +WEB_OUTPUT=1 +;; +* ) +echo $USAGE +exit +;; +esac +shift +done + +# ------------------------------------------------------------------------- +# Preparations +# ------------------------------------------------------------------------- +SYSTEM=`uname -s` +PATTERN="/" + +case "$SYSTEM" in +"Linux" ) +DF_COMMAND="/bin/df -k" +SORT_COMMAND="/usr/bin/sort -k6" +AWK_COMMAND="/bin/awk" +;; +* ) +DF_COMMAND="/bin/df -k" +SORT_COMMAND="/usr/bin/sort -k6" +AWK_COMMAND="/opt/local/bin/gawk" +;; +esac + +if [ ! -x ${AWK_COMMAND} ]; then +echo "### ${AWK_COMMAND} not present; install it! ###" +echo " On Mac OS X: install MacPorts and perform:" +echo " sudo port install gawk" +fi + +# ------------------------------------------------------------------------- +# Grabbing "df" result +# ------------------------------------------------------------------------- +DF_RESULT=`$DF_COMMAND` +if [ ! -z $DEBUG ]; then +echo "--> DF_RESULT:" +echo "$DF_RESULT" +echo "" +fi + +# ------------------------------------------------------------------------- +# Preprocessing "df" result, to join split logical lines +# ------------------------------------------------------------------------- +PREPROCESSING_RESULT=` \ + echo "$DF_RESULT" | $AWK_COMMAND -v PATTERN=$PATTERN \ + ' + NF == 1 { + printf ("%s", $0) + } + +NF == 5 { + printf ("%s\n", $0) +} + +NF > 6 { +} + +NF == 6 { + printf ("%s\n", $0) +}' +` +if [ ! -z $DEBUG ]; then +echo "--> PREPROCESSING_RESULT:" +echo "$PREPROCESSING_RESULT" +echo "" +fi + +SORTED_FILE_SYSTEMS_INFO=`echo "$PREPROCESSING_RESULT" | $SORT_COMMAND` + +if [ ! -z $DEBUG ]; then +echo "--> SORTED_FILE_SYSTEMS_INFO:" +echo "$SORTED_FILE_SYSTEMS_INFO" +echo "" +fi + +# ------------------------------------------------------------------------- +# Computing mount point max length +# ------------------------------------------------------------------------- +MOUNT_POINT_MAX_LENGTH=` \ + echo $SORTED_FILE_SYSTEMS_INFO | $AWK_COMMAND -v PATTERN=$PATTERN \ + ' + BEGIN { + mount_point_length_max = 15; + } + +END { + printf ("%d", mount_point_length_max); +} + +$0 ~ PATTERN { +# printf ("$6 = %s\n", $6); + + mount_point = $6; +# printf ("mount_point = %s\n", mount_point); + + mount_point_length = length (mount_point); +# printf ("mount_point_length = %d\n", mount_point_length); + + if (mount_point_length > mount_point_length_max) + mount_point_length_max = mount_point_length; +}' +` +if [ ! -z $DEBUG ]; then +echo "MOUNT_POINT_MAX_LENGTH: $MOUNT_POINT_MAX_LENGTH" +fi + +# ------------------------------------------------------------------------- +# Computing mount point data max size +# ------------------------------------------------------------------------- +MOUNT_POINT_MAX_SIZE=` \ + echo "$SORTED_FILE_SYSTEMS_INFO" | $AWK_COMMAND -v PATTERN=$PATTERN \ + ' + BEGIN { + mount_point_size_max = 0; + } + +END { + printf ("%d", mount_point_size_max); +} + +$0 ~ PATTERN { +# df -k shows k_bytes! +# printf ("$2 = %s\n", $2); + + mount_point_size = $2 * 1024; +# printf ("mount_point_size = %d\n", mount_point_size); + + if (mount_point_size > mount_point_size_max) + mount_point_size_max = mount_point_size; +}' +` +if [ ! -z $DEBUG ]; then +echo "MOUNT_POINT_MAX_SIZE: $MOUNT_POINT_MAX_SIZE" +fi + +# ------------------------------------------------------------------------- +# Let's go! +# ------------------------------------------------------------------------- +echo "$SORTED_FILE_SYSTEMS_INFO" | $AWK_COMMAND -v DEBUG=$DEBUG -v PATTERN=$PATTERN -v NARROW_MODE=$NARROW_MODE -v LEFT_COLUMN=$MOUNT_POINT_MAX_LENGTH -v MAX_SIZE=$MOUNT_POINT_MAX_SIZE -v SCALE=$SCALE -v WEB_OUTPUT=$WEB_OUTPUT \ + ' +# {printf ("$0 = %s\n", $0);} +# {printf ("$1 = %s\n", $1);} +# {printf ("PATTERN = %s\n", PATTERN);} +# {printf ("LEFT_COLUMN = %s\n", LEFT_COLUMN);} + + BEGIN { + k_bytes = 1024.0; + m_bytes = 1024.0 * k_bytes; + g_bytes = 1024.0 * m_bytes; + t_bytes = 1024.0 * g_bytes; + + if (WEB_OUTPUT) + { + all_stars = "**************************************************"; + current_date = strftime ("%d-%m-%Y @ %H:%M:%S", localtime (systime ())); + free_threshold = 10; # % + + printf ("\n"); + + printf ( \ + "\n" \ + "

%s -- STATUS OF ALCOR FILE SYSTEMS


\n", + current_date ) + + printf ("\n"); + + printf ( \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" ); + } + else + { + narrow_margin = " "; +# printf ("%-*s", LEFT_COLUMN + 2, "Mount point"); + if (NARROW_MODE) + printf ("\n%s", narrow_margin); + else + printf ("%-*s", LEFT_COLUMN + 2, ""); + print " Usato Libero Totale"; + if (! NARROW_MODE) + print ""; + } + } + +END { + if (WEB_OUTPUT) + { + printf ("
Mount point%% Usato (*)" \ + " - %% Free (*)%% UsatoSpazio liberoSpazio totale
\n"); + + printf ("\n"); + } + else + { + if (NARROW_MODE) + printf ("%s", narrow_margin); + else + printf ("%-*s", LEFT_COLUMN + 2, ""); + print "|----|----|----|----|----|----|----|----|----|----|" + if (NARROW_MODE) + printf ("\n%s", narrow_margin); + else + printf ("%-*s", LEFT_COLUMN + 2, ""); + print "0 10 20 30 40 50 60 70 80 90 100"; + print ""; + } +} + +$0 ~ PATTERN { + + if (index ($0, "members") == 0 && index ($0, "Download") == 0 && index ($0, "admin") == 0) + { +# df -k shows k_bytes! + + total_size = $2 * k_bytes; + free_size = $4 * k_bytes; + percentage_occupied = substr($5, 0, 3); + mount_point = $6; + + percentage_free = int (100 - percentage_occupied); + +# reduction_factor: 2 + stars_number = int (percentage_occupied / 2); + + if (WEB_OUTPUT) + { + posGroup = index (mount_point, "scratch"); + if (posGroup == 0) + posGroup = index (mount_point, "u1"); + if (posGroup == 0) + posGroup = index (mount_point, "u2"); + if (posGroup == 0) + posGroup = index (mount_point, "u4"); + if (posGroup == 0) + posGroup = index (mount_point, "u5"); + + printf ("\n"); + + if (posGroup > 0 || percentage_free < free_threshold) + { + if (percentage_free < free_threshold) + { + class = "titlered"; + if (posGroup == 0) + posGroup = 1; # to display the whole mount_point in this color anyway + } + else if ((index (mount_point, "scratch") != 0) || (index (mount_point, "u1") != 0) || (index (mount_point, "u2") != 0)) + { + class = "titleorange"; + posGroup = 1; # to display the whole mount_point in this color + } + else if ((index (mount_point, "u4") != 0) || (index (mount_point, "u5") != 0)) + { + class = "titlebrown"; + posGroup = 1; # to display the whole mount_point in this color + } + + printf ( \ + "%s%s\n", + substr (mount_point, 1, posGroup - 1), + class, + substr (mount_point, posGroup) ); + } + else + { + printf ("%s\n", mount_point); + } + + printf ( \ + "%s%s\n", + substr (all_stars, 1, stars_number), substr (all_stars, stars_number + 1, 49) ); + + if (percentage_free < free_threshold) + { + color_beginning = ""; + color_end = "" + } + else + { + color_beginning = ""; + color_end = "" + } + + if (total_size > 1 * t_bytes) + printf ( \ + "%s%3d%%%s%5.1f Tb%5.1f Tb\n", \ + color_beginning, percentage_occupied, color_end, free_size / t_bytes, total_size / t_bytes \ + ); + else if (total_size > 1 * g_bytes) + printf ( \ + "%s%3d%%%s%5.1f Gb%5.1f Gb\n", \ + color_beginning, percentage_occupied, color_end, free_size / g_bytes, total_size / g_bytes \ + ); + else if (total_size > 1 * m_byptes) + printf ( \ + "%s%3d%%%s%5.1f Mb%5.1f Mb\n", \ + color_beginning, percentage_occupied, color_end, free_size / m_bytes, total_size / m_bytes \ + ); + else + printf ( \ + "%s%3d%%%s%5.1f Kb%5.1f Kb\n", \ + color_beginning, percentage_occupied, color_end, free_size / k_bytes, total_size / k_bytes \ + ); + + printf ("\n"); + } + + else + { +# printf ("percentage_occupied = %d\n", percentage_occupied); +# printf ("percentage_free = %d\n", percentage_free); + + printf ("%-*s", LEFT_COLUMN + 2, mount_point); + if (NARROW_MODE) + printf ("\n%s", narrow_margin); + +# printf ("stars_number = %d\n", stars_number); + + printf ("|"); + for (i = 1; i <= stars_number; i++) + { + printf ("%s", "*"); + } + for (i = stars_number + 1; i <= 49; i++) + { + printf ("%s", "-"); + } + + + if (total_size > 1 * t_bytes) + printf ( \ + "| %3d%% %5.1f %5.1f Tb\n", \ + percentage_occupied, free_size / t_bytes, total_size / t_bytes \ + ); + else if (total_size > 1 * g_bytes) + printf ( \ + "| %3d%% %5.1f %5.1f Gb\n", \ + percentage_occupied, free_size / g_bytes, total_size / g_bytes \ + ); + else if (total_size > 1 * m_byptes) + printf ( \ + "| %3d%% %5.1f %5.1f Mb\n", \ + percentage_occupied, free_size / m_bytes, total_size / m_bytes \ + ); + else + printf ( \ + "| %3d%% %5.1f %5.1f Kb\n", \ + percentage_occupied, free_size / k_bytes, total_size / k_bytes \ + ); + } + } # if +}' diff --git a/script/mpdinfo b/script/mpdinfo new file mode 100755 index 0000000..b9eb862 --- /dev/null +++ b/script/mpdinfo @@ -0,0 +1,88 @@ +#!/bin/bash + +# A simple notify script for now-playing songs on mpd. This script uses +# notify-send and mpc to get the current song information. + +# Requirements (* = optional) +# - mpd +# - mpc +# - notify-send (libnotify) +# * ImageMagick (convert) + +# Author : Wolfgang Mueller +# You can use, edit and redistribute this script in any way you like. +# (Just make sure not to hurt any kittens) + +# Configuration------------------------------------------------------- + +# The music directory that contains the music and cover files +MUSIC_DIR="$HOME/Musica" + +# The default cover to use (optional) +DEFAULT_ART="" + +# The following track metadata delimiters can be changed. +# You can find all possible delimiters in the 'mpc' manpage. +# It's also possible to use pango markup like and + +# How to format artist/album information +A_FORMAT="%artist%[ (%album%)] - %date%" + +# How to format title information +T_FORMAT="%title%" + +# Regex expression used for image search +IMG_REG="(front|cover|art|Folder|folder)\.(jpg|jpeg|png|gif)$" + +# Title of the notification +NOTIFY_TITLE="Now Playing" + +# Path of temporary resized cover +TEMP_PATH="/tmp/mpdnotify_cover.png" + +# Resize cover to (optional, recommended) +COVER_RESIZE="100x100" + +# Thumbnail background (transparent by default) +COVER_BACKGROUND="none" + +# Logfile +LOGFILE="$HOME/.mpdnotify.log" + +#-------------------------------------------------------------------- + +# determine file +file="$(mpc current -f %file%)" + +# check if anything is playing at all +[[ -z $file ]] && exit 1 + +# Get title info +title="$(mpc current -f "$A_FORMAT")" + +# Get song info +song="$(mpc current -f "$T_FORMAT")" + +# Art directory +art="$MUSIC_DIR/${file%/*}" + +# find every file that matches IMG_REG set the first matching file to be the +# cover. +cover="$(find "$art/" -maxdepth 1 -type f | egrep -i -m1 "$IMG_REG")" + +# when no cover is found, use DEFAULT_ART as cover +cover="${cover:=$DEFAULT_ART}" + +# check if art is available +if [[ -n $cover ]]; then + +if [[ -n $COVER_RESIZE ]]; then +convert "$cover" -thumbnail $COVER_RESIZE -gravity center \ + -background "$COVER_BACKGROUND" -extent $COVER_RESIZE "$TEMP_PATH" >> "$LOGFILE" 2>&1 + cover="$TEMP_PATH" + fi + +notify-send -t 5000 --hint=int:transient:1 "$NOTIFY_TITLE" "$title\n$song" -i "$cover" >> "$LOGFILE" 2>&1 +else +notify-send -t 5000 --hint=int:transient:1 "$NOTIFY_TITLE" "$title\n$song" >> "$LOGFILE" 2>&1 +fi diff --git a/script/weather b/script/weather new file mode 100755 index 0000000..a0ccbe9 --- /dev/null +++ b/script/weather @@ -0,0 +1,87 @@ +#!/usr/bin/env python2.7 +# coding=utf-8 +"""Fetch weather using Yandex XML API.""" + +__author__ = "Ilia Glazkov" + +import argparse +from urllib2 import urlopen +from xml.etree.ElementTree import ElementTree + + +WEATHER_API_PREFIX = "http://weather.yahooapis.com/forecastrss?u=c&w=" +URLOPEN_TIMEOUT = 5 + +CELSIUS = '°C' +DASH = "—" + +CURRENT_DAY = 'Now' + + +def weather_url_by_id(id): + return WEATHER_API_PREFIX + str(id) + + +def fetch_weather_tree(id): + return ElementTree().parse( + urlopen(weather_url_by_id(id), timeout=URLOPEN_TIMEOUT)) + + +def format_date_string(day, text, temp, max_temp=None): + day = day or 'Now' + + if max_temp: + temp_string = DASH.join((str(temp), str(max_temp))) + else: + temp_string = str(temp) + + return '%s: %s, %s%s.' % (day, text, temp_string, CELSIUS) + + +class WeatherElement(object): + def __init__(self, element): + self.element = element + + @property + def day(self): + return self.element.get('day') or CURRENT_DAY + + @property + def text(self): + return self.element.get('text') + + @property + def temp(self): + temp = self.element.get('temp') + if temp is not None: + return str(temp) + + low, high = self.element.get('low'), self.element.get('high') + if low is not None and high is not None: + return DASH.join((str(low), str(high))) + + def get_format_string(self): + return '%s: %s, %s%s.' % (self.day, self.text, self.temp, CELSIUS) + + +def get_weather_string(tree): + condition = next(el for el in tree.iter() + if el.tag.endswith('condition')) + forecast = [el for el in tree.iter() + if el.tag.endswith('forecast')] + forecast.insert(0, condition) + + return '\n'.join(( + WeatherElement(element).get_format_string() + for element in forecast)) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--id', type=int, required=True, + help='Yahoo WEOID of the city') + args = parser.parse_args() + print get_weather_string(fetch_weather_tree(args.id)) + +if __name__ == "__main__": + main() diff --git a/themes/blackburn/icons/no_net_notify.png b/themes/blackburn/icons/no_net_notify.png new file mode 100755 index 0000000..1a3e8a8 Binary files /dev/null and b/themes/blackburn/icons/no_net_notify.png differ diff --git a/themes/blackburn/icons/weather/00.png b/themes/blackburn/icons/weather/00.png new file mode 100755 index 0000000..d30e120 Binary files /dev/null and b/themes/blackburn/icons/weather/00.png differ diff --git a/themes/blackburn/icons/weather/01.png b/themes/blackburn/icons/weather/01.png new file mode 100755 index 0000000..aceb054 Binary files /dev/null and b/themes/blackburn/icons/weather/01.png differ diff --git a/themes/blackburn/icons/weather/02.png b/themes/blackburn/icons/weather/02.png new file mode 100755 index 0000000..aceb054 Binary files /dev/null and b/themes/blackburn/icons/weather/02.png differ diff --git a/themes/blackburn/icons/weather/03.png b/themes/blackburn/icons/weather/03.png new file mode 100755 index 0000000..d30e120 Binary files /dev/null and b/themes/blackburn/icons/weather/03.png differ diff --git a/themes/blackburn/icons/weather/04.png b/themes/blackburn/icons/weather/04.png new file mode 100755 index 0000000..d30e120 Binary files /dev/null and b/themes/blackburn/icons/weather/04.png differ diff --git a/themes/blackburn/icons/weather/05.png b/themes/blackburn/icons/weather/05.png new file mode 100755 index 0000000..0a07b7b Binary files /dev/null and b/themes/blackburn/icons/weather/05.png differ diff --git a/themes/blackburn/icons/weather/06.png b/themes/blackburn/icons/weather/06.png new file mode 100755 index 0000000..758b01e Binary files /dev/null and b/themes/blackburn/icons/weather/06.png differ diff --git a/themes/blackburn/icons/weather/07.png b/themes/blackburn/icons/weather/07.png new file mode 100755 index 0000000..7f0d252 Binary files /dev/null and b/themes/blackburn/icons/weather/07.png differ diff --git a/themes/blackburn/icons/weather/08.png b/themes/blackburn/icons/weather/08.png new file mode 100755 index 0000000..6a66140 Binary files /dev/null and b/themes/blackburn/icons/weather/08.png differ diff --git a/themes/blackburn/icons/weather/09.png b/themes/blackburn/icons/weather/09.png new file mode 100755 index 0000000..d00552a Binary files /dev/null and b/themes/blackburn/icons/weather/09.png differ diff --git a/themes/blackburn/icons/weather/10.png b/themes/blackburn/icons/weather/10.png new file mode 100755 index 0000000..c924fac Binary files /dev/null and b/themes/blackburn/icons/weather/10.png differ diff --git a/themes/blackburn/icons/weather/11.png b/themes/blackburn/icons/weather/11.png new file mode 100755 index 0000000..d00552a Binary files /dev/null and b/themes/blackburn/icons/weather/11.png differ diff --git a/themes/blackburn/icons/weather/12.png b/themes/blackburn/icons/weather/12.png new file mode 100755 index 0000000..3cc6665 Binary files /dev/null and b/themes/blackburn/icons/weather/12.png differ diff --git a/themes/blackburn/icons/weather/13.png b/themes/blackburn/icons/weather/13.png new file mode 100755 index 0000000..d797ee9 Binary files /dev/null and b/themes/blackburn/icons/weather/13.png differ diff --git a/themes/blackburn/icons/weather/14.png b/themes/blackburn/icons/weather/14.png new file mode 100755 index 0000000..30534a2 Binary files /dev/null and b/themes/blackburn/icons/weather/14.png differ diff --git a/themes/blackburn/icons/weather/15.png b/themes/blackburn/icons/weather/15.png new file mode 100755 index 0000000..6223f8f Binary files /dev/null and b/themes/blackburn/icons/weather/15.png differ diff --git a/themes/blackburn/icons/weather/16.png b/themes/blackburn/icons/weather/16.png new file mode 100755 index 0000000..ddcb8f3 Binary files /dev/null and b/themes/blackburn/icons/weather/16.png differ diff --git a/themes/blackburn/icons/weather/17.png b/themes/blackburn/icons/weather/17.png new file mode 100755 index 0000000..d30e120 Binary files /dev/null and b/themes/blackburn/icons/weather/17.png differ diff --git a/themes/blackburn/icons/weather/18.png b/themes/blackburn/icons/weather/18.png new file mode 100755 index 0000000..8ee6a7b Binary files /dev/null and b/themes/blackburn/icons/weather/18.png differ diff --git a/themes/blackburn/icons/weather/19.png b/themes/blackburn/icons/weather/19.png new file mode 100755 index 0000000..96c582e Binary files /dev/null and b/themes/blackburn/icons/weather/19.png differ diff --git a/themes/blackburn/icons/weather/20.png b/themes/blackburn/icons/weather/20.png new file mode 100755 index 0000000..009039f Binary files /dev/null and b/themes/blackburn/icons/weather/20.png differ diff --git a/themes/blackburn/icons/weather/21.png b/themes/blackburn/icons/weather/21.png new file mode 100755 index 0000000..a6e2c49 Binary files /dev/null and b/themes/blackburn/icons/weather/21.png differ diff --git a/themes/blackburn/icons/weather/22.png b/themes/blackburn/icons/weather/22.png new file mode 100755 index 0000000..96c582e Binary files /dev/null and b/themes/blackburn/icons/weather/22.png differ diff --git a/themes/blackburn/icons/weather/23.png b/themes/blackburn/icons/weather/23.png new file mode 100755 index 0000000..5dc1356 Binary files /dev/null and b/themes/blackburn/icons/weather/23.png differ diff --git a/themes/blackburn/icons/weather/24.png b/themes/blackburn/icons/weather/24.png new file mode 100755 index 0000000..5dc1356 Binary files /dev/null and b/themes/blackburn/icons/weather/24.png differ diff --git a/themes/blackburn/icons/weather/25.png b/themes/blackburn/icons/weather/25.png new file mode 100755 index 0000000..62a5350 Binary files /dev/null and b/themes/blackburn/icons/weather/25.png differ diff --git a/themes/blackburn/icons/weather/26.png b/themes/blackburn/icons/weather/26.png new file mode 100755 index 0000000..bac1e7e Binary files /dev/null and b/themes/blackburn/icons/weather/26.png differ diff --git a/themes/blackburn/icons/weather/27.png b/themes/blackburn/icons/weather/27.png new file mode 100755 index 0000000..d8b3673 Binary files /dev/null and b/themes/blackburn/icons/weather/27.png differ diff --git a/themes/blackburn/icons/weather/28.png b/themes/blackburn/icons/weather/28.png new file mode 100755 index 0000000..22b929c Binary files /dev/null and b/themes/blackburn/icons/weather/28.png differ diff --git a/themes/blackburn/icons/weather/29.png b/themes/blackburn/icons/weather/29.png new file mode 100755 index 0000000..01fcf46 Binary files /dev/null and b/themes/blackburn/icons/weather/29.png differ diff --git a/themes/blackburn/icons/weather/30.png b/themes/blackburn/icons/weather/30.png new file mode 100755 index 0000000..eacc98d Binary files /dev/null and b/themes/blackburn/icons/weather/30.png differ diff --git a/themes/blackburn/icons/weather/31.png b/themes/blackburn/icons/weather/31.png new file mode 100755 index 0000000..84ea140 Binary files /dev/null and b/themes/blackburn/icons/weather/31.png differ diff --git a/themes/blackburn/icons/weather/32.png b/themes/blackburn/icons/weather/32.png new file mode 100755 index 0000000..d9e2745 Binary files /dev/null and b/themes/blackburn/icons/weather/32.png differ diff --git a/themes/blackburn/icons/weather/33.png b/themes/blackburn/icons/weather/33.png new file mode 100755 index 0000000..9e4404d Binary files /dev/null and b/themes/blackburn/icons/weather/33.png differ diff --git a/themes/blackburn/icons/weather/34.png b/themes/blackburn/icons/weather/34.png new file mode 100755 index 0000000..8fd0a5b Binary files /dev/null and b/themes/blackburn/icons/weather/34.png differ diff --git a/themes/blackburn/icons/weather/35.png b/themes/blackburn/icons/weather/35.png new file mode 100755 index 0000000..d30e120 Binary files /dev/null and b/themes/blackburn/icons/weather/35.png differ diff --git a/themes/blackburn/icons/weather/36.png b/themes/blackburn/icons/weather/36.png new file mode 100755 index 0000000..cf08c5c Binary files /dev/null and b/themes/blackburn/icons/weather/36.png differ diff --git a/themes/blackburn/icons/weather/37.png b/themes/blackburn/icons/weather/37.png new file mode 100755 index 0000000..9279254 Binary files /dev/null and b/themes/blackburn/icons/weather/37.png differ diff --git a/themes/blackburn/icons/weather/38.png b/themes/blackburn/icons/weather/38.png new file mode 100755 index 0000000..9279254 Binary files /dev/null and b/themes/blackburn/icons/weather/38.png differ diff --git a/themes/blackburn/icons/weather/39.png b/themes/blackburn/icons/weather/39.png new file mode 100755 index 0000000..cb803d7 Binary files /dev/null and b/themes/blackburn/icons/weather/39.png differ diff --git a/themes/blackburn/icons/weather/40.png b/themes/blackburn/icons/weather/40.png new file mode 100755 index 0000000..3cc6665 Binary files /dev/null and b/themes/blackburn/icons/weather/40.png differ diff --git a/themes/blackburn/icons/weather/41.png b/themes/blackburn/icons/weather/41.png new file mode 100755 index 0000000..c2e8626 Binary files /dev/null and b/themes/blackburn/icons/weather/41.png differ diff --git a/themes/blackburn/icons/weather/42.png b/themes/blackburn/icons/weather/42.png new file mode 100755 index 0000000..d32ad22 Binary files /dev/null and b/themes/blackburn/icons/weather/42.png differ diff --git a/themes/blackburn/icons/weather/43.png b/themes/blackburn/icons/weather/43.png new file mode 100755 index 0000000..6223f8f Binary files /dev/null and b/themes/blackburn/icons/weather/43.png differ diff --git a/themes/blackburn/icons/weather/44.png b/themes/blackburn/icons/weather/44.png new file mode 100755 index 0000000..62a5350 Binary files /dev/null and b/themes/blackburn/icons/weather/44.png differ diff --git a/themes/blackburn/icons/weather/45.png b/themes/blackburn/icons/weather/45.png new file mode 100755 index 0000000..4d6d47a Binary files /dev/null and b/themes/blackburn/icons/weather/45.png differ diff --git a/themes/blackburn/icons/weather/46.png b/themes/blackburn/icons/weather/46.png new file mode 100755 index 0000000..f9f9f5d Binary files /dev/null and b/themes/blackburn/icons/weather/46.png differ diff --git a/themes/blackburn/icons/weather/47.png b/themes/blackburn/icons/weather/47.png new file mode 100755 index 0000000..c74dfd1 Binary files /dev/null and b/themes/blackburn/icons/weather/47.png differ diff --git a/themes/blackburn/icons/weather/na.png b/themes/blackburn/icons/weather/na.png new file mode 100755 index 0000000..62a5350 Binary files /dev/null and b/themes/blackburn/icons/weather/na.png differ diff --git a/themes/blackburn/icons/weather/source b/themes/blackburn/icons/weather/source new file mode 100644 index 0000000..f3baf5d --- /dev/null +++ b/themes/blackburn/icons/weather/source @@ -0,0 +1 @@ +http://merlinthered.deviantart.com/art/plain-weather-icons-157162192 \ No newline at end of file diff --git a/themes/blackburn/theme.lua b/themes/blackburn/theme.lua index 2f96b4b..2e51010 100644 --- a/themes/blackburn/theme.lua +++ b/themes/blackburn/theme.lua @@ -1,7 +1,6 @@ --[[ ]]-- ---- - ---- Blackburn Awesome WM 3.5.+ theme -- --- - just a dark Steamburn - - ---- github.com/copycat-killer -- ---- - ----[[ ]]-- @@ -59,5 +58,56 @@ theme.tasklist_maximized_horizontal = "" theme.tasklist_maximized_vertical = "" theme.widget_mail_notify = themes_dir .. "/icons/mail_notify.png" +theme.widget_no_net_notify = themes_dir .. "/icons/no_net_notify.png" + +theme.widget_weather_na = themes_dir .. "/icons/weather/na.png" +theme.widget_weather_00 = themes_dir .. "/icons/weather/00.png" +theme.widget_weather_01 = themes_dir .. "/icons/weather/01.png" +theme.widget_weather_02 = themes_dir .. "/icons/weather/02.png" +theme.widget_weather_03 = themes_dir .. "/icons/weather/03.png" +theme.widget_weather_04 = themes_dir .. "/icons/weather/04.png" +theme.widget_weather_05 = themes_dir .. "/icons/weather/05.png" +theme.widget_weather_06 = themes_dir .. "/icons/weather/06.png" +theme.widget_weather_07 = themes_dir .. "/icons/weather/07.png" +theme.widget_weather_08 = themes_dir .. "/icons/weather/08.png" +theme.widget_weather_09 = themes_dir .. "/icons/weather/09.png" +theme.widget_weather_10 = themes_dir .. "/icons/weather/10.png" +theme.widget_weather_11 = themes_dir .. "/icons/weather/11.png" +theme.widget_weather_12 = themes_dir .. "/icons/weather/12.png" +theme.widget_weather_13 = themes_dir .. "/icons/weather/13.png" +theme.widget_weather_14 = themes_dir .. "/icons/weather/14.png" +theme.widget_weather_15 = themes_dir .. "/icons/weather/15.png" +theme.widget_weather_16 = themes_dir .. "/icons/weather/16.png" +theme.widget_weather_17 = themes_dir .. "/icons/weather/17.png" +theme.widget_weather_18 = themes_dir .. "/icons/weather/18.png" +theme.widget_weather_19 = themes_dir .. "/icons/weather/19.png" +theme.widget_weather_20 = themes_dir .. "/icons/weather/20.png" +theme.widget_weather_21 = themes_dir .. "/icons/weather/21.png" +theme.widget_weather_22 = themes_dir .. "/icons/weather/22.png" +theme.widget_weather_23 = themes_dir .. "/icons/weather/23.png" +theme.widget_weather_24 = themes_dir .. "/icons/weather/24.png" +theme.widget_weather_25 = themes_dir .. "/icons/weather/25.png" +theme.widget_weather_26 = themes_dir .. "/icons/weather/26.png" +theme.widget_weather_27 = themes_dir .. "/icons/weather/27.png" +theme.widget_weather_28 = themes_dir .. "/icons/weather/28.png" +theme.widget_weather_29 = themes_dir .. "/icons/weather/29.png" +theme.widget_weather_30 = themes_dir .. "/icons/weather/30.png" +theme.widget_weather_31 = themes_dir .. "/icons/weather/31.png" +theme.widget_weather_32 = themes_dir .. "/icons/weather/32.png" +theme.widget_weather_33 = themes_dir .. "/icons/weather/33.png" +theme.widget_weather_34 = themes_dir .. "/icons/weather/34.png" +theme.widget_weather_35 = themes_dir .. "/icons/weather/35.png" +theme.widget_weather_36 = themes_dir .. "/icons/weather/36.png" +theme.widget_weather_37 = themes_dir .. "/icons/weather/37.png" +theme.widget_weather_38 = themes_dir .. "/icons/weather/38.png" +theme.widget_weather_39 = themes_dir .. "/icons/weather/39.png" +theme.widget_weather_40 = themes_dir .. "/icons/weather/40.png" +theme.widget_weather_41 = themes_dir .. "/icons/weather/41.png" +theme.widget_weather_42 = themes_dir .. "/icons/weather/42.png" +theme.widget_weather_43 = themes_dir .. "/icons/weather/43.png" +theme.widget_weather_44 = themes_dir .. "/icons/weather/44.png" +theme.widget_weather_45 = themes_dir .. "/icons/weather/45.png" +theme.widget_weather_46 = themes_dir .. "/icons/weather/46.png" +theme.widget_weather_47 = themes_dir .. "/icons/weather/47.png" return theme diff --git a/themes/multicolor/theme.lua b/themes/multicolor/theme.lua index 562b2b7..c195b3d 100644 --- a/themes/multicolor/theme.lua +++ b/themes/multicolor/theme.lua @@ -7,7 +7,7 @@ theme = {} -theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/lukes" +theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor" theme.font = "Terminus 8" --theme.taglist_font = @@ -50,6 +50,7 @@ theme.menu_bg_focus = "#050505dd" theme.menu_submenu_icon = theme.confdir .. "/submenu.png" theme.widget_temp = theme.confdir .. "/widgets/temp.png" +theme.widget_uptime = theme.confdir .. "/widgets/ac.png" theme.widget_cpu = theme.confdir .. "/widgets/cpu.png" theme.widget_mem = theme.confdir .. "/widgets/mem.png" theme.widget_fs = theme.confdir .. "/widgets/fs.png"