1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 19:22:32 +00:00

steamburn: updated weather localization

This commit is contained in:
luke bonham 2013-03-27 21:25:55 +01:00
parent 620f1c4880
commit 24689086bc

View file

@ -1,9 +1,9 @@
--[[ ]]-- --[[ ]]--
-- -
-- Steamburn Awesome WM 3.5.+ config --
-- github.com/copycat-killer --
-- - -- -
-- Steamburn Awesome WM 3.5.+ config -- --[[ ]--
-- github.com/copycat-killer --
-- -
--[[ ]]--
-- Required Libraries -- Required Libraries
@ -28,7 +28,7 @@ function run_once(cmd)
findme = cmd:sub(0, firstspace-1) findme = cmd:sub(0, firstspace-1)
end end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")") awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end end
run_once("urxvtd") run_once("urxvtd")
run_once("unclutter -idle 10") run_once("unclutter -idle 10")
@ -114,7 +114,6 @@ if beautiful.wallpaper then
end end
end end
-- Tags -- Tags
tags = { tags = {
@ -124,7 +123,7 @@ tags = {
for s = 1, screen.count() do for s = 1, screen.count() do
tags[s] = awful.tag(tags.names, s, tags.layout) tags[s] = awful.tag(tags.names, s, tags.layout)
end end
-- Menu -- Menu
myaccessories = { myaccessories = {
{ "archives", "7zFM" }, { "archives", "7zFM" },
@ -340,10 +339,10 @@ vicious.register(mpdwidget, vicious.widgets.mpd,
function(widget, args) function(widget, args)
-- play -- play
if (args["{state}"] == "Play") then if (args["{state}"] == "Play") then
return gray .. args["{Title}"] .. coldef .. white .. " " .. args["{Artist}"] .. coldef return gray .. args["{Title}"] .. coldef .. white .. " " .. args["{Artist}"] .. coldef
-- pause -- pause
elseif (args["{state}"] == "Pause") then elseif (args["{state}"] == "Pause") then
return gray .. "mpd " .. coldef .. white .. "in pausa" .. coldef return gray .. "mpd " .. coldef .. white .. "in pausa" .. coldef
else else
return "" return ""
end end
@ -382,13 +381,13 @@ function (widget, args)
fg = beautiful.fg_urgent, fg = beautiful.fg_urgent,
bg = beautiful.bg_urgent }) bg = beautiful.bg_urgent })
end end
return gray .. "Hdd " .. coldef .. white .. args["{/home used_p}"] .. coldef return gray .. "Hdd " .. coldef .. white .. args["{/home used_p}"] .. coldef
end, 600) end, 600)
local infos = nil local infos = nil
function remove_info() function remove_info()
if infos ~= nil then if infos ~= nil then
naughty.destroy(infos) naughty.destroy(infos)
infos = nil infos = nil
end end
@ -446,7 +445,7 @@ vicious.register(batwidget, vicious.widgets.bat,
function (widget, args) function (widget, args)
-- plugged -- plugged
if (batstate() == 'Cable plugged') then if (batstate() == 'Cable plugged') then
baticon:set_image(beautiful.widget_ac) baticon:set_image(beautiful.widget_ac)
return '' return ''
-- critical -- critical
elseif (args[2] <= 5 and batstate() == 'Discharging') then elseif (args[2] <= 5 and batstate() == 'Discharging') then
@ -483,9 +482,9 @@ end, 1, 'BAT0')
volicon = wibox.widget.imagebox() volicon = wibox.widget.imagebox()
volicon:set_image(beautiful.widget_vol) volicon:set_image(beautiful.widget_vol)
volumewidget = wibox.widget.textbox() volumewidget = wibox.widget.textbox()
vicious.register(volumewidget, vicious.widgets.volume, vicious.register(volumewidget, vicious.widgets.volume,
function (widget, args) function (widget, args)
if (args[2] ~= "♩" ) then if (args[2] ~= "♩" ) then
return gray .. "Vol " .. coldef .. white .. args[1] .. " " .. coldef return gray .. "Vol " .. coldef .. white .. args[1] .. " " .. coldef
else else
return gray .. "Vol " .. coldef .. white .. "mute " .. coldef return gray .. "Vol " .. coldef .. white .. "mute " .. coldef
@ -504,12 +503,11 @@ weatherwidget = wibox.widget.textbox()
vicious.register(weatherwidget, vicious.widgets.weather, vicious.register(weatherwidget, vicious.widgets.weather,
function (widget, args) function (widget, args)
if args["{tempf}"] == "N/A" then if args["{tempf}"] == "N/A" then
return "No Info" return gray .. "No " .. coldef .. white .. "Info " .. coldef
else else
-- work in progress -- work in progress - ☂☔☃ ⛆⛇⛈ 🌂
-- ☀☂☔☃ ⛆⛇⛈ 🌂 if( args["{sky}"] == "N/A" or string.find(args["{sky}"], "Clear") ~= nil ) then args["{sky}"] = "<span font=\"Symbola 10\" rise=\"-1535\">☼</span>"
if( args["{sky}"] == "N/A" ) then args["{sky}"] = "☼" elseif( string.find(args["{sky}"], "Cloudy") ~= nil ) then args["{sky}"] = "<span font=\"Symbola 11\" rise=\"-1620\">☁</span>"
elseif( string.find(args["{sky}"], "Cloudy") ~= nil ) then args["{sky}"] = "<span font=\"Terminus 11\" rise=\"-1620\">⛅</span>"
end end
return gray .. args["{sky}"] .. coldef .. " " .. white .. args["{tempc}"] .. " " .. coldef return gray .. args["{sky}"] .. coldef .. " " .. white .. args["{tempc}"] .. " " .. coldef
end end
@ -572,7 +570,7 @@ mytasklist.buttons = awful.util.table.join(
end)) end))
for s = 1, screen.count() do for s = 1, screen.count() do
-- Create a promptbox for each screen -- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt() mypromptbox[s] = awful.widget.prompt()
@ -591,8 +589,8 @@ for s = 1, screen.count() do
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the upper wibox -- Create the upper wibox
mywibox[s] = awful.wibox({ position = "top", screen = s, height = 18 }) mywibox[s] = awful.wibox({ position = "top", screen = s, height = 18 })
-- Widgets that are aligned to the upper left -- Widgets that are aligned to the upper left
local left_layout = wibox.layout.fixed.horizontal() local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(spr) left_layout:add(spr)
@ -610,7 +608,7 @@ for s = 1, screen.count() do
right_layout:add(spr) right_layout:add(spr)
right_layout:add(mygmail) right_layout:add(mygmail)
right_layout:add(spr) right_layout:add(spr)
right_layout:add(cpuwidget) right_layout:add(cpuwidget)
right_layout:add(spr) right_layout:add(spr)
right_layout:add(memwidget) right_layout:add(memwidget)
right_layout:add(spr) right_layout:add(spr)
@ -633,7 +631,7 @@ for s = 1, screen.count() do
local layout = wibox.layout.align.horizontal() local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout) layout:set_left(left_layout)
layout:set_middle(mytasklist[s]) layout:set_middle(mytasklist[s])
layout:set_right(right_layout) layout:set_right(right_layout)
mywibox[s]:set_widget(layout) mywibox[s]:set_widget(layout)
end end
@ -699,7 +697,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit), awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ "Control", }, "<", function () show_calendar() end), awful.key({ "Control", }, "<", function () show_calendar() end),
awful.key({ modkey, }, "z", function () scratch.drop(terminal) end), awful.key({ modkey, }, "z", function () scratch.drop(terminal) end),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
@ -720,7 +718,7 @@ globalkeys = awful.util.table.join(
awful.key({ "Control" }, "u", function () os.execute("amixer set Master playback unmute", 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({ altkey, "Control" }, "m", function () os.execute("amixer set Master playback 100%", false ) end),
-- Music control -- Music control
awful.key({ altkey, "Control" }, "Up", function () awful.util.spawn( "mpc toggle", false ) end), 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" }, "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" }, "Left", function () awful.util.spawn( "mpc prev", false ) end ),
@ -733,7 +731,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) 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, }, "t", function () awful.util.spawn( "thunderbird", false ) end),
awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end), awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end),
-- Prompt -- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
@ -827,7 +825,7 @@ awful.rules.rules = {
size_hints_honor = false size_hints_honor = false
} }
}, },
{ rule = { class = "MPlayer" }, { rule = { class = "MPlayer" },
properties = { floating = true } }, properties = { floating = true } },
@ -851,7 +849,7 @@ awful.rules.rules = {
properties = { tag = tags[1][3] } }, properties = { tag = tags[1][3] } },
{ rule = { class = "Dia" }, { rule = { class = "Dia" },
properties = { tag = tags[1][4], properties = { tag = tags[1][4],
floating = true } }, floating = true } },
{ rule = { class = "Gimp" }, { rule = { class = "Gimp" },