diff --git a/bindings.lua b/bindings.lua index b11babe..f7672aa 100644 --- a/bindings.lua +++ b/bindings.lua @@ -50,9 +50,9 @@ globalkeys = awful.util.table.join( -- --{{{ Spawns awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, }, "f", function () awful.util.spawn("firefox") end), - awful.key({ modkey, }, "t", function () awful.util.spawn("claws-mail") end), - awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end), + awful.key({ modkey, }, "f", function () awful.util.spawn("webbrowser") end), + awful.key({ modkey, }, "t", function () awful.util.spawn("mail-client") end), + awful.key({ modkey, }, "p", function () awful.util.spawn("im-client") end), awful.key({ modkey, }, "g", function () awful.util.spawn("gmpc") end), awful.key({ modkey, }, "w", function () awful.util.spawn("awsetbg -a -r /home/crater2150/.config/awesome/walls/ &") end), awful.key({ modkey, "Control" }, "r", awesome.restart), @@ -68,7 +68,11 @@ globalkeys = awful.util.table.join( awful.key({ modkey }, "x", function () teardrop("cellwriter","top","center", 0.99, 0.4)end ), awful.key({ modkey, "Control" }, "Delete", function () awful.util.spawn("xlock") end), - --}}} + awful.key({ hyper }, "1", function () awful.util.spawn("/usr/local/bin/tabletstick 1") end), + awful.key({ hyper }, "2", function () awful.util.spawn("/usr/local/bin/tabletstick 2") end), + awful.key({ hyper }, "3", function () awful.util.spawn("/usr/local/bin/tabletstick 3") end), + awful.key({ hyper }, "4", function () awful.util.spawn("/usr/local/bin/tabletstick 4") end), + awful.key({ hyper }, "5", function () awful.util.spawn("/usr/local/bin/tabletstick 4") end), --{{{ Audio control awful.key({ }, "Print", function () teardrop("urxvtc -e alsamixer","top","center", 0.99, 0.4)end ), diff --git a/rules.lua b/rules.lua index c17578e..70f614e 100644 --- a/rules.lua +++ b/rules.lua @@ -37,10 +37,12 @@ awful.rules.rules = { callback = awful.client.setslave}, { rule = { class = "Claws-mail" }, properties = { tag = tags[2][4] } }, + { rule = { instance = "Gmutt" }, + properties = { tag = tags[2][4] } }, { rule = { class = "Gmpc" }, - properties = { tag = tags[1][6] } }, + properties = { tag = tags[2][6] } }, { rule = { class = "Deluge" }, - properties = { tag = tags[1][7] } }, + properties = { tag = tags[2][7] } }, { rule = { class = "Xhtop" }, properties = { tag = tags[1][22] } }, { rule = { class = "Cellwriter" }, diff --git a/wibox.lua b/wibox.lua index 5693239..8dd56e0 100644 --- a/wibox.lua +++ b/wibox.lua @@ -13,11 +13,7 @@ end spacer = widget({ type = "textbox", name = "spacer" }) spacer.text = " " -separator = widget({ type = "textbox", name = "separator", align = "center" }) -separator.text = " )( " - nullwidget = widget({ type = "textbox", name = "nullwidget" }) -separator.text = "" -- }}} -- {{{ Wibox @@ -31,23 +27,89 @@ mysystray = widget({ type = "systray" }) clock = widget({ type = "textbox" }) vicious.register(clock, vicious.widgets.date, "%b %d, %R", 60) -memwidget = widget({ type = "textbox" }) -vicious.register(memwidget, vicious.widgets.mem, "RAM: $1% ($2MB / $3MB) ", 13) + +-- mail widget {{{ +mailwidget = widget({ type = "textbox" }) +vicious.register(mailwidget, vicious.widgets.mdir, + function(widget, args) + if args[1] > 0 then + naughty.notify({ + title = "New mail arrived", + text = "Unread "..args[2].." / New "..args[1], + position = "top_left" + + }) + widget.bg = theme.bg_urgent + widget.fg = theme.fg_urgent + elseif args[2] > 0 then + widget.bg = theme.bg_focus + widget.fg = theme.fg_focus + else + widget.bg = theme.bg_normal + widget.fg = theme.fg_normal + end + return "⬓⬓ Unread "..args[2].." / New "..args[1].. " " + end, 181, {os.getenv("HOME") .. "/.maildir/"}) +--}}} + + +-- battery {{{ if exists("/proc/acpi/battery/BAT0") then - batwidget1 = widget({ type = "textbox" }) - vicious.register(batwidget1, vicious.widgets.bat, " )( BAT0: $1$2% - $3", 61, "BAT0") -else batwidget1 = nullwidget end + batwidget0 = widget({ type = "textbox" }) + vicious.register(batwidget0, vicious.widgets.bat, + function (widget, args) + if args[2] == 0 then return "" + else + if args[2] < 15 then + widget.bg = theme.bg_urgent + widget.fg = theme.fg_urgent + else + widget.bg = theme.bg_normal + widget.fg = theme.fg_normal + end + return "( BAT0: "..args[1]..args[2].."% - "..args[3].." )" + end + end, 61, "BAT0") +else batwidget0 = nullwidget end if exists("/proc/acpi/battery/BAT1") then - batwidget2 = widget({ type = "textbox" }) - vicious.register(batwidget2, vicious.widgets.bat, " )( BAT1: $1$2% - $3", 61, "BAT1") -else batwidget2 = nullwidget end + batwidget1 = widget({ type = "textbox" }) + vicious.register(batwidget1, vicious.widgets.bat, + function (widget, args) + if args[2] == 0 then return "" + else + if args[2] < 15 then + widget.bg = theme.bg_urgent + widget.fg = theme.fg_urgent + else + widget.bg = theme.bg_normal + widget.fg = theme.fg_normal + end + return "( BAT1: "..args[1]..args[2].."% - "..args[3].." )" + end + end, 61, "BAT1") +else batwidget1 = nullwidget end if exists("/proc/acpi/battery/BAT2") then - batwidget3 = widget({ type = "textbox" }) - vicious.register(batwidget3, vicious.widgets.bat, " )( BAT2: $1$2% - $3", 61, "BAT2") -else batwidget3 = nullwidget end + batwidget2 = widget({ type = "textbox" }) + vicious.register(batwidget2, vicious.widgets.bat, + function (widget, args) + if args[2] == 0 then return "" + else + if args[2] < 15 then + widget.bg = theme.bg_urgent + widget.fg = theme.fg_urgent + else + widget.bg = theme.bg_normal + widget.fg = theme.fg_normal + end + return "( BAT2: "..args[1]..args[2].."% - "..args[3].." )" + end + end, 61, "BAT2") +else batwidget2 = nullwidget end + +--}}} cpulabel = widget({ type = "textbox" }) vicious.register(cpulabel, vicious.widgets.cpu, "CPU: $1%") @@ -89,18 +151,18 @@ for s = 1, screen.count() do leftwibox[s].widgets = { mytaglist[s], mylayoutbox[s], + mailwidget, spacer, layout = awful.widget.layout.horizontal.rightleft } rightwibox[s].widgets = { { - clock, - separator, spacer, memwidget, + clock, spacer, + batwidget0, batwidget1, batwidget2, - batwidget3, wlanwidget, - separator, spacer, cpulabel, cpuwidget, + spacer, cpulabel, cpuwidget, spacer, layout = awful.widget.layout.horizontal.leftright }, @@ -109,3 +171,5 @@ for s = 1, screen.count() do } end -- }}} +-- +-- vim:foldmethod=marker diff --git a/zenburn/theme.lua b/zenburn/theme.lua index 121252d..031c54a 100644 --- a/zenburn/theme.lua +++ b/zenburn/theme.lua @@ -26,7 +26,7 @@ theme.bg_urgent = "#DA4E4E" -- {{{ Borders theme.border_width = "2" theme.border_normal = "#3F3F3F" -theme.border_focus = "#6F6F6F" +theme.border_focus = "#AAAAFF" theme.border_marked = "#CC9393" -- }}}