diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100644 index 0000000..bcce7e6 --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,451 @@ +----------------------------- +-- AwesomeWM configuration -- +-- -- +----------------------------- + +require("awful") +require("awful.autofocus") +require("awful.rules") +require("beautiful") +require("naughty") + +-- {{{ Error handling +-- Startup +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Runtime +do + local in_error = false + awesome.add_signal("debug::error", function (err) + 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 +beautiful.init(awful.util.getdir("config") .. "/themes/dust/theme.lua") +terminal = "urxvtc" +editor = os.getenv("EDITOR") or "vim" +editor_cmd = terminal .. " -e " .. editor +modkey = "Mod4" +altkey = "Mod1" + +-- Custom widgets +require("wi") +require("scratch") + +-- Table of layouts to cover with awful.layout.inc (order matters) +layouts = { + awful.layout.suit.floating, + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + awful.layout.suit.tile.top, + awful.layout.suit.fair, + awful.layout.suit.fair.horizontal, + awful.layout.suit.spiral, + awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, + awful.layout.suit.max.fullscreen, + awful.layout.suit.magnifier +} +-- }}} + +-- {{{ Naughty presets +naughty.config.default_preset.timeout = 5 +naughty.config.default_preset.screen = 1 +naughty.config.default_preset.position = "top_right" +naughty.config.default_preset.margin = 8 +naughty.config.default_preset.gap = 1 +naughty.config.default_preset.ontop = true +naughty.config.default_preset.font = "Monaco 18" +naughty.config.default_preset.icon = nil +naughty.config.default_preset.icon_size = 16 +naughty.config.default_preset.fg = beautiful.fg_focus +naughty.config.default_preset.bg = beautiful.bg_focus +naughty.config.presets.normal.border_color = beautiful.border_focus +naughty.config.default_preset.border_width = 1 +naughty.config.default_preset.hover_timeout = nil +-- }}} + +-- {{{ Tags +tags = { + names = { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" }, + layouts = { layouts[2], layouts[10], layouts[2], layouts[2], layouts[2], + layouts[1], layouts[10], layouts[1], layouts[1], layouts[1] } +} + +for s = 1, screen.count() do + tags[s] = awful.tag(tags.names, s, tags.layouts) + awful.tag.setproperty(tags[s][1], "mwfact", 0.475) + awful.tag.setproperty(tags[s][3], "mwfact", 0.475) + awful.tag.setproperty(tags[s][4], "mwfact", 0.475) + awful.tag.setproperty(tags[s][5], "mwfact", 0.475) +end +-- }}} + +-- {{{ Menu +myawesomemenu = { + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" }, + { "restart", awesome.restart }, + { "quit", awesome.quit } +} + +mymainmenu = awful.menu({ items = { + { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "open terminal", terminal } +} }) + +mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), + menu = mymainmenu }) +-- }}} + +-- {{{ Wibox +mywibox = {} +mygraphbox = {} +mypromptbox = {} +mylayoutbox = {} +mytaglist = {} +mytasklist = {} + +-- Clock +mytextclock = awful.widget.textclock( + { align = "right" }, + " %a %m/%d @ %I:%M %p " +) + +-- Systray +mysystray = widget({ type = "systray" }) + +-- Taglist +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, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +) + +-- Tasklist +mytasklist.buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if not c:isvisible() then + awful.tag.viewonly(c:tags()[1]) + end + client.focus = c + c:raise() + 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 + -- Prompt + mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright }) + + -- Layout + 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))) + + -- Taglist + mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) + + -- Tasklist + mytasklist[s] = awful.widget.tasklist( + function(c) return awful.widget.tasklist.label.currenttags(c, s) end, + mytasklist.buttons) + + -- Widgets + mywibox[s] = awful.wibox({ position = "top", height = 24, screen = s }) + mywibox[s].widgets = { + { + mytaglist[s], spacer, + mypromptbox[s], + mylayoutbox[s], spacer, + layout = awful.widget.layout.horizontal.leftright + }, + volspacer, volbar.widget, volicon, spacer, + batbar.widget, baticon, spacer, + pacwidget, pacicon, spacer, + mpdwidget, mpdicon, spacer, + mytasklist[s], + layout = awful.widget.layout.horizontal.rightleft + } + + -- Graphs + mygraphbox[s] = awful.wibox({ position = "bottom", height = 22, screen = s, + border_width = 1, border_color = beautiful.bg_widget }) + mygraphbox[s].widgets = { + mylauncher, spacer, spacer, spacer, + cpufreq, cpugraph0.widget, cpupct0, cpugraph1.widget, cpupct1, + cpugraph2.widget, cpupct2, tab, + memused, membar.widget, mempct, tab, + swapused, swapbar.widget, swappct, tab, + rootfsused, rootfsbar.widget, rootfspct, tab, + txwidget, upgraph.widget, upwidget, tab, + rxwidget, downgraph.widget, downwidget, tab, + layout = awful.widget.layout.horizontal.leftright, + { + s == 1 and mysystray or nil, + mytextclock, weather, + layout = awful.widget.layout.horizontal.rightleft + } + } +end +-- }}} + +-- {{{ Keybindings +globalkeys = awful.util.table.join( + awful.key({ modkey, }, "Left", awful.tag.viewprev ), + awful.key({ modkey, }, "Right", awful.tag.viewnext ), + awful.key({ modkey, }, "Escape", awful.tag.history.restore), + + awful.key({ altkey, }, "Tab", + function () + awful.client.focus.byidx( 1) + if client.focus then client.focus:raise() end + end), + awful.key({ altkey, "Shift" }, "Tab", + 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), + + -- 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, }, "Tab", function() awful.screen.focus_relative( 1) end), + awful.key({ modkey, "Shift" }, "Tab", function() awful.screen.focus_relative(-1) end), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto), + awful.key({ modkey, }, "p", + 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, "Shift" }, "Return", function() awful.util.spawn("xterm") end), + awful.key({ modkey, "Control" }, "r", awesome.restart), + awful.key({ modkey, "Shift" }, "q", awesome.quit), + + awful.key({ modkey, }, "l", function() awful.tag.incmwfact( 0.015) end), + awful.key({ modkey, }, "h", function() awful.tag.incmwfact(-0.015) end), + awful.key({ modkey, }, "j", function() awful.client.incwfact( 0.03) end), + awful.key({ modkey, }, "k", function() awful.client.incwfact(-0.03) 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), + + -- Prompt + awful.key({ altkey }, "F2", function() mypromptbox[mouse.screen]:run() end), + 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), + + -- Scratchpad + awful.key({ modkey }, "`", function() + scratch.drop("xterm -name scratch", "bottom", "right", 1.0, 0.40) + end), + + -- {{{ Tag 0 + awful.key({ modkey }, 0, + function () + local screen = mouse.screen + if tags[screen][10] then + awful.tag.viewonly(tags[screen][10]) + end + end), + awful.key({ modkey, "Control" }, 0, + function () + local screen = mouse.screen + if tags[screen][10] then + tags[screen][10].selected = not tags[screen][10].selected + end + end), + awful.key({ modkey, "Shift" }, 0, + function () + if client.focus and tags[client.focus.screen][10] then + awful.client.movetotag(tags[client.focus.screen][10]) + end + end), + awful.key({ modkey, "Control", "Shift" }, 0, + function () + if client.focus and tags[client.focus.screen][10] then + awful.client.toggletag(tags[client.focus.screen][10]) + end + end) + -- }}} +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", function(c) c.fullscreen = not c.fullscreen end), + awful.key({ altkey, }, "F4", function(c) c:kill() 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, "Shift" }, "r", function(c) c:redraw() end), + awful.key({ modkey, }, "t", function(c) c.ontop = not c.ontop end), + awful.key({ modkey, }, "n", function(c) c.minimized = not c.minimized end), + + -- Maximize + awful.key({ modkey, }, "m", + function (c) + c.maximized_horizontal = not c.maximized_horizontal + c.maximized_vertical = not c.maximized_vertical + end), + + -- Scratchify + awful.key({ modkey, }, "v", + function (c) + scratch.pad.set(c, 0.50, 0.50, true) + end) +) + +keynumber = 0 +for s = 1, screen.count() do + keynumber = math.min(9, math.max(#tags[s], keynumber)); +end + +for i = 1, keynumber do + globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = mouse.screen + if tags[screen][i] then + awful.tag.viewonly(tags[screen][i]) + end + end), + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local 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)) + +root.keys(globalkeys) +-- }}} + +-- {{{ Rules +awful.rules.rules = { + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = true, + keys = clientkeys, + buttons = clientbuttons } }, + { rule = { class = "MPlayer" }, + properties = { floating = true } }, + { rule = { class = "Skype" }, + properties = { floating = true, tag = tags[1][10] } }, + { rule = { class = "Godesk" }, + properties = { floating = true } }, + { rule = { class = "pinentry" }, + properties = { floating = true } }, + { rule = { class = "gimp" }, + properties = { floating = true } }, + { rule = { class = "Firefox" }, + properties = { tag = tags[1][2] } }, + { rule = { class = "Firefox", instance = "Download" }, + properties = { floating = true } }, + { rule = { class = "Firefox", instance = "Places" }, + properties = { floating = true } }, + { rule = { class = "Thunderbird" }, + properties = { tag = tags[1][2] } }, + { rule = { class = "Thunar" }, + properties = { tag = tags[1][7] } }, + { rule = { class = "Gimp" }, + properties = { tag = tags[1][8] } } +} +-- }}} + +-- {{{ Signals +client.add_signal("manage", function (c, startup) + -- Add a titlebar + -- awful.titlebar.add(c, { modkey = modkey }) + + -- Sloppy focus + c:add_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 as slave + awful.client.setslave(c) + + 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 + + c.size_hints_honor = false +end) + +client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} diff --git a/.config/awesome/scratch/drop.lua b/.config/awesome/scratch/drop.lua new file mode 100644 index 0000000..fd8fabe --- /dev/null +++ b/.config/awesome/scratch/drop.lua @@ -0,0 +1,129 @@ +------------------------------------------------------------------- +-- Drop-down applications manager for the awesome window manager +------------------------------------------------------------------- +-- Coded by: * Lucas de Vries +-- Hacked by: * Adrian C. (anrxc) +-- Licensed under the WTFPL version 2 +-- * http://sam.zoy.org/wtfpl/COPYING +------------------------------------------------------------------- +-- To use this module add: +-- require("scratch") +-- to the top of your rc.lua, and call it from a keybinding: +-- scratch.drop(prog, vert, horiz, width, height, sticky, screen) +-- +-- Parameters: +-- prog - Program to run; "urxvt", "gmrun", "thunderbird" +-- vert - Vertical; "bottom", "center" or "top" (default) +-- horiz - Horizontal; "left", "right" or "center" (default) +-- width - Width in absolute pixels, or width percentage +-- when <= 1 (1 (100% of the screen) by default) +-- height - Height in absolute pixels, or height percentage +-- when <= 1 (0.25 (25% of the screen) by default) +-- sticky - Visible on all tags, false by default +-- screen - Screen (optional), mouse.screen by default +------------------------------------------------------------------- + +-- Grab environment +local pairs = pairs +local awful = require("awful") +local setmetatable = setmetatable +local capi = { + mouse = mouse, + client = client, + screen = screen +} + +-- Scratchdrop: drop-down applications manager for the awesome window manager +module("scratch.drop") + +local dropdown = {} + +-- Create a new window for the drop-down application when it doesn't +-- exist, or toggle between hidden and visible states when it does +function toggle(prog, vert, horiz, width, height, sticky, screen) + vert = vert or "top" + horiz = horiz or "center" + width = width or 1 + height = height or 0.25 + sticky = sticky or false + screen = screen or capi.mouse.screen + + if not dropdown[prog] then + dropdown[prog] = {} + + -- Add unmanage signal for scratchdrop programs + capi.client.add_signal("unmanage", function (c) + for scr, cl in pairs(dropdown[prog]) do + if cl == c then + dropdown[prog][scr] = nil + end + end + end) + end + + if not dropdown[prog][screen] then + spawnw = function (c) + dropdown[prog][screen] = c + + -- Scratchdrop clients are floaters + awful.client.floating.set(c, true) + + -- Client geometry and placement + local screengeom = capi.screen[screen].workarea + + if width <= 1 then width = screengeom.width * width end + if height <= 1 then height = screengeom.height * height end + + if horiz == "left" then x = screengeom.x + elseif horiz == "right" then x = screengeom.width - width + else x = screengeom.x+(screengeom.width-width)/2 end + + if vert == "bottom" then y = screengeom.height + screengeom.y - height + elseif vert == "center" then y = screengeom.y+(screengeom.height-height)/2 + else y = screengeom.y - screengeom.y end + + -- Client properties + c:geometry({ x = x, y = y, width = width, height = height }) + c.ontop = true + c.above = true + c.skip_taskbar = true + if sticky then c.sticky = true end + if c.titlebar then awful.titlebar.remove(c) end + + c:raise() + capi.client.focus = c + capi.client.remove_signal("manage", spawnw) + end + + -- Add manage signal and spawn the program + capi.client.add_signal("manage", spawnw) + awful.util.spawn(prog, false) + else + -- Get a running client + c = dropdown[prog][screen] + + -- Switch the client to the current workspace + if c:isvisible() == false then c.hidden = true + awful.client.movetotag(awful.tag.selected(screen), c) + end + + -- Focus and raise if hidden + if c.hidden then + -- Make sure it is centered + if vert == "center" then awful.placement.center_vertical(c) end + if horiz == "center" then awful.placement.center_horizontal(c) end + c.hidden = false + c:raise() + capi.client.focus = c + else -- Hide and detach tags if not + c.hidden = true + local ctags = c:tags() + for i, t in pairs(ctags) do + ctags[i] = nil + end + c:tags(ctags) + end + end +end + +setmetatable(_M, { __call = function(_, ...) return toggle(...) end }) diff --git a/.config/awesome/scratch/init.lua b/.config/awesome/scratch/init.lua new file mode 100644 index 0000000..eb037fc --- /dev/null +++ b/.config/awesome/scratch/init.lua @@ -0,0 +1,12 @@ +--------------------------------------------------------------- +-- Drop-down applications and scratchpad manager for awesome wm +--------------------------------------------------------------- +-- Coded by: * Adrian C. (anrxc) +-- Licensed under the WTFPL version 2 +-- * http://sam.zoy.org/wtfpl/COPYING +--------------------------------------------------------------- + +require("scratch.pad") +require("scratch.drop") + +module("scratch") diff --git a/.config/awesome/scratch/pad.lua b/.config/awesome/scratch/pad.lua new file mode 100644 index 0000000..920d1d6 --- /dev/null +++ b/.config/awesome/scratch/pad.lua @@ -0,0 +1,130 @@ +--------------------------------------------------------------- +-- Basic scratchpad manager for the awesome window manager +--------------------------------------------------------------- +-- Coded by: * Adrian C. (anrxc) +-- Licensed under the WTFPL version 2 +-- * http://sam.zoy.org/wtfpl/COPYING +--------------------------------------------------------------- +-- To use this module add: +-- require("scratch") +-- to the top of your rc.lua, and call: +-- scratch.pad.set(c, width, height, sticky, screen) +-- from a clientkeys binding, and: +-- scratch.pad.toggle(screen) +-- from a globalkeys binding. +-- +-- Parameters: +-- c - Client to scratch or un-scratch +-- width - Width in absolute pixels, or width percentage +-- when <= 1 (0.50 (50% of the screen) by default) +-- height - Height in absolute pixels, or height percentage +-- when <= 1 (0.50 (50% of the screen) by default) +-- sticky - Visible on all tags, false by default +-- screen - Screen (optional), mouse.screen by default +--------------------------------------------------------------- + +-- Grab environment +local pairs = pairs +local awful = require("awful") +local capi = { + mouse = mouse, + client = client, + screen = screen +} + +-- Scratchpad: basic scratchpad manager for the awesome window manager +module("scratch.pad") + +local scratchpad = {} + +-- Toggle a set of properties on a client. +local function toggleprop(c, prop) + c.ontop = prop.ontop or false + c.above = prop.above or false + c.hidden = prop.hidden or false + c.sticky = prop.stick or false + c.skip_taskbar = prop.task or false +end + +-- Scratch the focused client, or un-scratch and tile it. If another +-- client is already scratched, replace it with the focused client. +function set(c, width, height, sticky, screen) + width = width or 0.50 + height = height or 0.50 + sticky = sticky or false + screen = screen or capi.mouse.screen + + local function setscratch(c) + -- Scratchpad is floating and has no titlebar + awful.client.floating.set(c, true); awful.titlebar.remove(c) + + -- Scratchpad client properties + toggleprop(c, {ontop=true, above=true, task=true, stick=sticky}) + + -- Scratchpad geometry and placement + local screengeom = capi.screen[screen].workarea + if width <= 1 then width = screengeom.width * width end + if height <= 1 then height = screengeom.height * height end + + c:geometry({ -- Scratchpad is always centered on screen + x = screengeom.x + (screengeom.width - width) / 2, + y = screengeom.y + (screengeom.height - height) / 2, + width = width, height = height + }) + + -- Scratchpad should not loose focus + c:raise(); capi.client.focus = c + end + + -- Prepare a table for storing clients, + if not scratchpad.pad then scratchpad.pad = {} + -- add unmanage signal for scratchpad clients + capi.client.add_signal("unmanage", function (c) + for scr, cl in pairs(scratchpad.pad) do + if cl == c then scratchpad.pad[scr] = nil end + end + end) + end + + -- If the scratcphad is emtpy, store the client, + if not scratchpad.pad[screen] then + scratchpad.pad[screen] = c + -- then apply geometry and properties + setscratch(c) + else -- If a client is already scratched, + local oc = scratchpad.pad[screen] + -- unscratch, and compare it with the focused client + awful.client.floating.toggle(oc); toggleprop(oc, {}) + -- If it matches clear the table, if not replace it + if oc == c then scratchpad.pad[screen] = nil + else scratchpad.pad[screen] = c; setscratch(c) end + end +end + +-- Move the scratchpad to the current workspace, focus and raise it +-- when it's hidden, or hide it when it's visible. +function toggle(screen) + screen = screen or capi.mouse.screen + + -- Check if we have a client on storage, + if scratchpad.pad and + scratchpad.pad[screen] ~= nil + then -- and get it out, to play + local c = scratchpad.pad[screen] + + -- If it's visible on another tag hide it, + if c:isvisible() == false then c.hidden = true + -- and move it to the current worskpace + awful.client.movetotag(awful.tag.selected(screen), c) + end + + -- Focus and raise if it's hidden, + if c.hidden then + awful.placement.centered(c) + c.hidden = false + c:raise(); capi.client.focus = c + else -- hide it if it's not + c.hidden = true + end + end +end diff --git a/.config/awesome/startup.sh b/.config/awesome/startup.sh new file mode 100644 index 0000000..d9964ed --- /dev/null +++ b/.config/awesome/startup.sh @@ -0,0 +1,3 @@ +#!/bin/sh +nitrogen --restore & +exec xsetroot -cursor_name left_ptr diff --git a/.config/awesome/themes/dust/awesome22-dust.png b/.config/awesome/themes/dust/awesome22-dust.png new file mode 100644 index 0000000..10429f5 Binary files /dev/null and b/.config/awesome/themes/dust/awesome22-dust.png differ diff --git a/.config/awesome/themes/dust/layouts/dwindle.png b/.config/awesome/themes/dust/layouts/dwindle.png new file mode 100644 index 0000000..1bda457 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/dwindle.png differ diff --git a/.config/awesome/themes/dust/layouts/dwindlew.png b/.config/awesome/themes/dust/layouts/dwindlew.png new file mode 100644 index 0000000..96ac247 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/dwindlew.png differ diff --git a/.config/awesome/themes/dust/layouts/fairh.png b/.config/awesome/themes/dust/layouts/fairh.png new file mode 100644 index 0000000..1fd76b1 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fairh.png differ diff --git a/.config/awesome/themes/dust/layouts/fairhw.png b/.config/awesome/themes/dust/layouts/fairhw.png new file mode 100644 index 0000000..e6fcaab Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fairhw.png differ diff --git a/.config/awesome/themes/dust/layouts/fairv.png b/.config/awesome/themes/dust/layouts/fairv.png new file mode 100644 index 0000000..537ad2b Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fairv.png differ diff --git a/.config/awesome/themes/dust/layouts/fairvw.png b/.config/awesome/themes/dust/layouts/fairvw.png new file mode 100644 index 0000000..65ff77e Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fairvw.png differ diff --git a/.config/awesome/themes/dust/layouts/floating.png b/.config/awesome/themes/dust/layouts/floating.png new file mode 100644 index 0000000..2eadd66 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/floating.png differ diff --git a/.config/awesome/themes/dust/layouts/floatingw.png b/.config/awesome/themes/dust/layouts/floatingw.png new file mode 100644 index 0000000..05ec2a5 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/floatingw.png differ diff --git a/.config/awesome/themes/dust/layouts/fullscreen.png b/.config/awesome/themes/dust/layouts/fullscreen.png new file mode 100644 index 0000000..7e809d5 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fullscreen.png differ diff --git a/.config/awesome/themes/dust/layouts/fullscreenw.png b/.config/awesome/themes/dust/layouts/fullscreenw.png new file mode 100644 index 0000000..a29f944 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/fullscreenw.png differ diff --git a/.config/awesome/themes/dust/layouts/magnifier.png b/.config/awesome/themes/dust/layouts/magnifier.png new file mode 100644 index 0000000..021c6c7 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/magnifier.png differ diff --git a/.config/awesome/themes/dust/layouts/magnifierw.png b/.config/awesome/themes/dust/layouts/magnifierw.png new file mode 100644 index 0000000..a86b6ec Binary files /dev/null and b/.config/awesome/themes/dust/layouts/magnifierw.png differ diff --git a/.config/awesome/themes/dust/layouts/max.png b/.config/awesome/themes/dust/layouts/max.png new file mode 100644 index 0000000..7adf392 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/max.png differ diff --git a/.config/awesome/themes/dust/layouts/maxw.png b/.config/awesome/themes/dust/layouts/maxw.png new file mode 100644 index 0000000..c476904 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/maxw.png differ diff --git a/.config/awesome/themes/dust/layouts/spiral.png b/.config/awesome/themes/dust/layouts/spiral.png new file mode 100644 index 0000000..c6e811f Binary files /dev/null and b/.config/awesome/themes/dust/layouts/spiral.png differ diff --git a/.config/awesome/themes/dust/layouts/spiralw.png b/.config/awesome/themes/dust/layouts/spiralw.png new file mode 100644 index 0000000..7370f3c Binary files /dev/null and b/.config/awesome/themes/dust/layouts/spiralw.png differ diff --git a/.config/awesome/themes/dust/layouts/tile.png b/.config/awesome/themes/dust/layouts/tile.png new file mode 100644 index 0000000..a32be26 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tile.png differ diff --git a/.config/awesome/themes/dust/layouts/tilebottom.png b/.config/awesome/themes/dust/layouts/tilebottom.png new file mode 100644 index 0000000..62c7d97 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tilebottom.png differ diff --git a/.config/awesome/themes/dust/layouts/tilebottomw.png b/.config/awesome/themes/dust/layouts/tilebottomw.png new file mode 100644 index 0000000..1aa0a57 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tilebottomw.png differ diff --git a/.config/awesome/themes/dust/layouts/tileleft.png b/.config/awesome/themes/dust/layouts/tileleft.png new file mode 100644 index 0000000..ba3c6f9 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tileleft.png differ diff --git a/.config/awesome/themes/dust/layouts/tileleftw.png b/.config/awesome/themes/dust/layouts/tileleftw.png new file mode 100644 index 0000000..d5c15aa Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tileleftw.png differ diff --git a/.config/awesome/themes/dust/layouts/tiletop.png b/.config/awesome/themes/dust/layouts/tiletop.png new file mode 100644 index 0000000..cf5d539 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tiletop.png differ diff --git a/.config/awesome/themes/dust/layouts/tiletopw.png b/.config/awesome/themes/dust/layouts/tiletopw.png new file mode 100644 index 0000000..ce05741 Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tiletopw.png differ diff --git a/.config/awesome/themes/dust/layouts/tilew.png b/.config/awesome/themes/dust/layouts/tilew.png new file mode 100644 index 0000000..27d5b5b Binary files /dev/null and b/.config/awesome/themes/dust/layouts/tilew.png differ diff --git a/.config/awesome/themes/dust/taglist/square.png b/.config/awesome/themes/dust/taglist/square.png new file mode 100644 index 0000000..da8895d Binary files /dev/null and b/.config/awesome/themes/dust/taglist/square.png differ diff --git a/.config/awesome/themes/dust/taglist/squaref.png b/.config/awesome/themes/dust/taglist/squaref.png new file mode 100644 index 0000000..6f774a1 Binary files /dev/null and b/.config/awesome/themes/dust/taglist/squaref.png differ diff --git a/.config/awesome/themes/dust/theme.lua b/.config/awesome/themes/dust/theme.lua new file mode 100644 index 0000000..3f8ad1e --- /dev/null +++ b/.config/awesome/themes/dust/theme.lua @@ -0,0 +1,115 @@ +----------------------- +-- AwesomeWM theme -- +-- based on Dust GTK -- +-- -- +----------------------- + +theme = {} + +theme.font = "Monaco 12" + +theme.bg_normal = "#1a1a1a" +theme.bg_focus = "#908884" +theme.bg_urgent = "#cd7171" +theme.bg_minimize = "#444444" + +theme.fg_normal = "#aaaaaa" +theme.fg_focus = "#111111" +theme.fg_urgent = "#ffffff" +theme.fg_minimize = "#ffffff" +theme.fg_em = "#d6d6d6" + +theme.border_width = "1" +theme.border_normal = "#222222" +theme.border_focus = "#908884" +theme.border_marked = "#91231c" + +theme.bg_widget = "#2a2a2a" +theme.fg_widget = "#908884" +theme.fg_center_widget = "#636363" +theme.fg_end_widget = "#ffffff" +theme.fg_off_widget = "#22211f" + +theme.taglist_squares_sel = awful.util.getdir("config") .. "/themes/dust/taglist/squaref.png" +theme.taglist_squares_unsel = awful.util.getdir("config") .. "/themes/dust/taglist/square.png" + +theme.tasklist_floating_icon = "/usr/share/awesome/themes/default/tasklist/floatingw.png" + +theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png" +theme.menu_height = "22" +theme.menu_width = "200" + +-- Define the image to load +theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" +theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" + +theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" + +theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png" + +theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" + +theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png" + +theme.wallpaper_cmd = { "sh " .. awful.util.getdir("config") .. "/startup.sh" } + +theme.layout_fairh = awful.util.getdir("config") .. "/themes/dust/layouts/fairhw.png" +theme.layout_fairv = awful.util.getdir("config") .. "/themes/dust/layouts/fairvw.png" +theme.layout_floating = awful.util.getdir("config") .. "/themes/dust/layouts/floatingw.png" +theme.layout_magnifier = awful.util.getdir("config") .. "/themes/dust/layouts/magnifierw.png" +theme.layout_max = awful.util.getdir("config") .. "/themes/dust/layouts/maxw.png" +theme.layout_fullscreen = awful.util.getdir("config") .. "/themes/dust/layouts/fullscreenw.png" +theme.layout_tilebottom = awful.util.getdir("config") .. "/themes/dust/layouts/tilebottomw.png" +theme.layout_tileleft = awful.util.getdir("config") .. "/themes/dust/layouts/tileleftw.png" +theme.layout_tile = awful.util.getdir("config") .. "/themes/dust/layouts/tilew.png" +theme.layout_tiletop = awful.util.getdir("config") .. "/themes/dust/layouts/tiletopw.png" +theme.layout_spiral = awful.util.getdir("config") .. "/themes/dust/layouts/spiralw.png" +theme.layout_dwindle = awful.util.getdir("config") .. "/themes/dust/layouts/dwindlew.png" + +theme.awesome_icon = awful.util.getdir("config") .. "/themes/dust/awesome22-dust.png" + +theme.widget_disk = awful.util.getdir("config") .. "/themes/dust/widgets/disk.png" +theme.widget_ac = awful.util.getdir("config") .. "/themes/dust/widgets/ac.png" +theme.widget_acblink = awful.util.getdir("config") .. "/themes/dust/widgets/acblink.png" +theme.widget_blank = awful.util.getdir("config") .. "/themes/dust/widgets/blank.png" +theme.widget_batfull = awful.util.getdir("config") .. "/themes/dust/widgets/batfull.png" +theme.widget_batmed = awful.util.getdir("config") .. "/themes/dust/widgets/batmed.png" +theme.widget_batlow = awful.util.getdir("config") .. "/themes/dust/widgets/batlow.png" +theme.widget_batempty = awful.util.getdir("config") .. "/themes/dust/widgets/batempty.png" +theme.widget_vol = awful.util.getdir("config") .. "/themes/dust/widgets/vol.png" +theme.widget_mute = awful.util.getdir("config") .. "/themes/dust/widgets/mute.png" +theme.widget_pac = awful.util.getdir("config") .. "/themes/dust/widgets/pac.png" +theme.widget_pacnew = awful.util.getdir("config") .. "/themes/dust/widgets/pacnew.png" +theme.widget_mail = awful.util.getdir("config") .. "/themes/dust/widgets/mail.png" +theme.widget_mailnew = awful.util.getdir("config") .. "/themes/dust/widgets/mailnew.png" +theme.widget_temp = awful.util.getdir("config") .. "/themes/dust/widgets/temp.png" +theme.widget_tempwarn = awful.util.getdir("config") .. "/themes/dust/widgets/tempwarm.png" +theme.widget_temphot = awful.util.getdir("config") .. "/themes/dust/widgets/temphot.png" +theme.widget_wifi = awful.util.getdir("config") .. "/themes/dust/widgets/wifi.png" +theme.widget_nowifi = awful.util.getdir("config") .. "/themes/dust/widgets/nowifi.png" +theme.widget_mpd = awful.util.getdir("config") .. "/themes/dust/widgets/mpd.png" +theme.widget_play = awful.util.getdir("config") .. "/themes/dust/widgets/play.png" +theme.widget_pause = awful.util.getdir("config") .. "/themes/dust/widgets/pause.png" +theme.widget_ram = awful.util.getdir("config") .. "/themes/dust/widgets/ram.png" + +theme.widget_mem = awful.util.getdir("config") .. "/themes/dust/tp/ram.png" +theme.widget_swap = awful.util.getdir("config") .. "/themes/dust/tp/swap.png" +theme.widget_fs = awful.util.getdir("config") .. "/themes/dust/tp/fs_01.png" +theme.widget_fs2 = awful.util.getdir("config") .. "/themes/dust/tp/fs_02.png" +theme.widget_up = awful.util.getdir("config") .. "/themes/dust/tp/up.png" +theme.widget_down = awful.util.getdir("config") .. "/themes/dust/tp/down.png" + +return theme +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/.config/awesome/themes/dust/tp/cpu.png b/.config/awesome/themes/dust/tp/cpu.png new file mode 100644 index 0000000..2cd5c71 Binary files /dev/null and b/.config/awesome/themes/dust/tp/cpu.png differ diff --git a/.config/awesome/themes/dust/tp/down.png b/.config/awesome/themes/dust/tp/down.png new file mode 100644 index 0000000..ec138ac Binary files /dev/null and b/.config/awesome/themes/dust/tp/down.png differ diff --git a/.config/awesome/themes/dust/tp/fs_01.png b/.config/awesome/themes/dust/tp/fs_01.png new file mode 100644 index 0000000..6a1e007 Binary files /dev/null and b/.config/awesome/themes/dust/tp/fs_01.png differ diff --git a/.config/awesome/themes/dust/tp/fs_02.png b/.config/awesome/themes/dust/tp/fs_02.png new file mode 100644 index 0000000..7cce89c Binary files /dev/null and b/.config/awesome/themes/dust/tp/fs_02.png differ diff --git a/.config/awesome/themes/dust/tp/ram.png b/.config/awesome/themes/dust/tp/ram.png new file mode 100644 index 0000000..518a4d8 Binary files /dev/null and b/.config/awesome/themes/dust/tp/ram.png differ diff --git a/.config/awesome/themes/dust/tp/swap.png b/.config/awesome/themes/dust/tp/swap.png new file mode 100644 index 0000000..66f9f5c Binary files /dev/null and b/.config/awesome/themes/dust/tp/swap.png differ diff --git a/.config/awesome/themes/dust/tp/up.png b/.config/awesome/themes/dust/tp/up.png new file mode 100644 index 0000000..c17bb74 Binary files /dev/null and b/.config/awesome/themes/dust/tp/up.png differ diff --git a/.config/awesome/themes/dust/widgets/ac.png b/.config/awesome/themes/dust/widgets/ac.png new file mode 100644 index 0000000..be77caa Binary files /dev/null and b/.config/awesome/themes/dust/widgets/ac.png differ diff --git a/.config/awesome/themes/dust/widgets/acblink.png b/.config/awesome/themes/dust/widgets/acblink.png new file mode 100644 index 0000000..d0859eb Binary files /dev/null and b/.config/awesome/themes/dust/widgets/acblink.png differ diff --git a/.config/awesome/themes/dust/widgets/bat.png b/.config/awesome/themes/dust/widgets/bat.png new file mode 100644 index 0000000..9908b18 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/bat.png differ diff --git a/.config/awesome/themes/dust/widgets/batempty.png b/.config/awesome/themes/dust/widgets/batempty.png new file mode 100644 index 0000000..a847f7e Binary files /dev/null and b/.config/awesome/themes/dust/widgets/batempty.png differ diff --git a/.config/awesome/themes/dust/widgets/batfull.png b/.config/awesome/themes/dust/widgets/batfull.png new file mode 100644 index 0000000..3237e8d Binary files /dev/null and b/.config/awesome/themes/dust/widgets/batfull.png differ diff --git a/.config/awesome/themes/dust/widgets/batlow.png b/.config/awesome/themes/dust/widgets/batlow.png new file mode 100644 index 0000000..a9abbdd Binary files /dev/null and b/.config/awesome/themes/dust/widgets/batlow.png differ diff --git a/.config/awesome/themes/dust/widgets/batmed.png b/.config/awesome/themes/dust/widgets/batmed.png new file mode 100644 index 0000000..d149676 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/batmed.png differ diff --git a/.config/awesome/themes/dust/widgets/blank.png b/.config/awesome/themes/dust/widgets/blank.png new file mode 100644 index 0000000..d7aa9ac Binary files /dev/null and b/.config/awesome/themes/dust/widgets/blank.png differ diff --git a/.config/awesome/themes/dust/widgets/cpu.png b/.config/awesome/themes/dust/widgets/cpu.png new file mode 100644 index 0000000..c4c422d Binary files /dev/null and b/.config/awesome/themes/dust/widgets/cpu.png differ diff --git a/.config/awesome/themes/dust/widgets/crit.png b/.config/awesome/themes/dust/widgets/crit.png new file mode 100644 index 0000000..575c2c0 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/crit.png differ diff --git a/.config/awesome/themes/dust/widgets/disk.png b/.config/awesome/themes/dust/widgets/disk.png new file mode 100644 index 0000000..ab9cd7c Binary files /dev/null and b/.config/awesome/themes/dust/widgets/disk.png differ diff --git a/.config/awesome/themes/dust/widgets/down.png b/.config/awesome/themes/dust/widgets/down.png new file mode 100644 index 0000000..adf157b Binary files /dev/null and b/.config/awesome/themes/dust/widgets/down.png differ diff --git a/.config/awesome/themes/dust/widgets/fs.png b/.config/awesome/themes/dust/widgets/fs.png new file mode 100644 index 0000000..af84bfd Binary files /dev/null and b/.config/awesome/themes/dust/widgets/fs.png differ diff --git a/.config/awesome/themes/dust/widgets/fs2.png b/.config/awesome/themes/dust/widgets/fs2.png new file mode 100644 index 0000000..2421029 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/fs2.png differ diff --git a/.config/awesome/themes/dust/widgets/mail.png b/.config/awesome/themes/dust/widgets/mail.png new file mode 100644 index 0000000..0fb9243 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/mail.png differ diff --git a/.config/awesome/themes/dust/widgets/mailnew.png b/.config/awesome/themes/dust/widgets/mailnew.png new file mode 100644 index 0000000..f9ae2a7 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/mailnew.png differ diff --git a/.config/awesome/themes/dust/widgets/mpd.png b/.config/awesome/themes/dust/widgets/mpd.png new file mode 100644 index 0000000..0a48620 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/mpd.png differ diff --git a/.config/awesome/themes/dust/widgets/mute.png b/.config/awesome/themes/dust/widgets/mute.png new file mode 100644 index 0000000..160a579 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/mute.png differ diff --git a/.config/awesome/themes/dust/widgets/note.png b/.config/awesome/themes/dust/widgets/note.png new file mode 100644 index 0000000..61e9b7a Binary files /dev/null and b/.config/awesome/themes/dust/widgets/note.png differ diff --git a/.config/awesome/themes/dust/widgets/note2.png b/.config/awesome/themes/dust/widgets/note2.png new file mode 100644 index 0000000..1772eb8 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/note2.png differ diff --git a/.config/awesome/themes/dust/widgets/note3.png b/.config/awesome/themes/dust/widgets/note3.png new file mode 100644 index 0000000..417141c Binary files /dev/null and b/.config/awesome/themes/dust/widgets/note3.png differ diff --git a/.config/awesome/themes/dust/widgets/nowifi.png b/.config/awesome/themes/dust/widgets/nowifi.png new file mode 100644 index 0000000..de400e4 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/nowifi.png differ diff --git a/.config/awesome/themes/dust/widgets/pac.png b/.config/awesome/themes/dust/widgets/pac.png new file mode 100644 index 0000000..e9f2c83 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/pac.png differ diff --git a/.config/awesome/themes/dust/widgets/pacnew.png b/.config/awesome/themes/dust/widgets/pacnew.png new file mode 100644 index 0000000..e1d5a17 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/pacnew.png differ diff --git a/.config/awesome/themes/dust/widgets/pause.png b/.config/awesome/themes/dust/widgets/pause.png new file mode 100644 index 0000000..b0d87a6 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/pause.png differ diff --git a/.config/awesome/themes/dust/widgets/play.png b/.config/awesome/themes/dust/widgets/play.png new file mode 100644 index 0000000..de9e625 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/play.png differ diff --git a/.config/awesome/themes/dust/widgets/ram.png b/.config/awesome/themes/dust/widgets/ram.png new file mode 100644 index 0000000..de9f19e Binary files /dev/null and b/.config/awesome/themes/dust/widgets/ram.png differ diff --git a/.config/awesome/themes/dust/widgets/temp.png b/.config/awesome/themes/dust/widgets/temp.png new file mode 100644 index 0000000..0b1f955 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/temp.png differ diff --git a/.config/awesome/themes/dust/widgets/temphot.png b/.config/awesome/themes/dust/widgets/temphot.png new file mode 100644 index 0000000..add1f68 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/temphot.png differ diff --git a/.config/awesome/themes/dust/widgets/tempwarm.png b/.config/awesome/themes/dust/widgets/tempwarm.png new file mode 100644 index 0000000..d249494 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/tempwarm.png differ diff --git a/.config/awesome/themes/dust/widgets/up.png b/.config/awesome/themes/dust/widgets/up.png new file mode 100644 index 0000000..4fef8e2 Binary files /dev/null and b/.config/awesome/themes/dust/widgets/up.png differ diff --git a/.config/awesome/themes/dust/widgets/vol.png b/.config/awesome/themes/dust/widgets/vol.png new file mode 100644 index 0000000..d02bc2e Binary files /dev/null and b/.config/awesome/themes/dust/widgets/vol.png differ diff --git a/.config/awesome/themes/dust/widgets/wifi.png b/.config/awesome/themes/dust/widgets/wifi.png new file mode 100644 index 0000000..8467c4a Binary files /dev/null and b/.config/awesome/themes/dust/widgets/wifi.png differ diff --git a/.config/awesome/wi.lua b/.config/awesome/wi.lua new file mode 100644 index 0000000..b84f3c3 --- /dev/null +++ b/.config/awesome/wi.lua @@ -0,0 +1,410 @@ +----------------------- +-- AwesomeWM widgets -- +-- -- +----------------------- + +vicious = require("vicious") + +graphwidth = 120 +graphheight = 20 +pctwidth = 40 +netwidth = 100 + +-- {{{ SPACERS +spacer = widget({ type = "textbox" }) +spacer.text = " " +tab = widget({ type = "textbox" }) +tab.text = " " +volspacer = widget({ type = "textbox" }) +volspacer.text = " " +-- }}} + +-- {{{ PROCESSOR +-- Cache +vicious.cache(vicious.widgets.cpu) +vicious.cache(vicious.widgets.cpuinf) + +-- Core 0 freq +cpufreq = widget({ type = "textbox" }) +vicious.register(cpufreq, vicious.widgets.cpuinf, + function(widget, args) + return string.format("cpu%1.1fGHz", args["{cpu0 ghz}"]) + end, 3000) + +-- Core 0 graph +cpugraph0 = awful.widget.graph() +cpugraph0:set_width(graphwidth):set_height(graphheight) +cpugraph0:set_background_color(beautiful.bg_widget) +cpugraph0:set_border_color(nil) +cpugraph0:set_border_color(beautiful.bg_widget) +cpugraph0:set_gradient_colors({ + beautiful.fg_end_widget, + beautiful.fg_end_widget, + beautiful.fg_center_widget +}) +cpugraph0:set_gradient_angle(0) +vicious.register(cpugraph0, vicious.widgets.cpu, "$2") + +-- Core 0 % +cpupct0 = widget({ type = "textbox" }) +cpupct0.width = pctwidth +vicious.register(cpupct0, vicious.widgets.cpu, "$2%", 2) + +-- Core 1 graph +cpugraph1 = awful.widget.graph() +cpugraph1:set_width(graphwidth):set_height(graphheight) +cpugraph1:set_background_color(beautiful.bg_widget) +cpugraph1:set_border_color(nil) +cpugraph1:set_border_color(beautiful.bg_widget) +cpugraph1:set_gradient_colors({ + beautiful.fg_end_widget, + beautiful.fg_end_widget, + beautiful.fg_center_widget +}) +cpugraph1:set_gradient_angle(0) +vicious.register(cpugraph1, vicious.widgets.cpu, "$3") + +-- Core 1 % +cpupct1 = widget({ type = "textbox" }) +cpupct1.width = pctwidth +vicious.register(cpupct1, vicious.widgets.cpu, "$3%", 2) + +-- Core 2 graph +cpugraph2 = awful.widget.graph() +cpugraph2:set_width(graphwidth):set_height(graphheight) +cpugraph2:set_background_color(beautiful.bg_widget) +cpugraph2:set_border_color(nil) +cpugraph2:set_border_color(beautiful.bg_widget) +cpugraph2:set_gradient_colors({ + beautiful.fg_end_widget, + beautiful.fg_end_widget, + beautiful.fg_center_widget +}) +cpugraph2:set_gradient_angle(0) +vicious.register(cpugraph2, vicious.widgets.cpu, "$4") + +-- Core 2 % +cpupct2 = widget({ type = "textbox" }) +cpupct2.width = pctwidth +vicious.register(cpupct2, vicious.widgets.cpu, "$4%", 2) + +-- }}} + +-- {{{ MEMORY +-- Cache +vicious.cache(vicious.widgets.mem) + +-- Ram used +memused = widget({ type = "textbox" }) +vicious.register(memused, vicious.widgets.mem, + "ram$2MB", 5) + +-- Ram bar +membar = awful.widget.progressbar() +membar:set_vertical(false):set_width(graphwidth):set_height(graphheight) +membar:set_ticks(false):set_ticks_size(2) +membar:set_background_color(beautiful.bg_widget) +membar:set_border_color(nil) +membar:set_gradient_colors({ + beautiful.fg_widget, + beautiful.fg_center_widget, + beautiful.bg_widget +}) +vicious.register(membar, vicious.widgets.mem, "$1", 13) + +-- Ram % +mempct = widget({ type = "textbox" }) +mempct.width = pctwidth +vicious.register(mempct, vicious.widgets.mem, "$1%", 5) + +-- Swap used +swapused = widget({ type = "textbox" }) +vicious.register(swapused, vicious.widgets.mem, + "swap$6MB", 5) + +-- Swap bar +swapbar = awful.widget.progressbar() +swapbar:set_vertical(false):set_width(graphwidth):set_height(graphheight) +swapbar:set_ticks(false):set_ticks_size(2) +swapbar:set_background_color(beautiful.bg_widget) +swapbar:set_border_color(nil) +swapbar:set_gradient_colors({ + beautiful.fg_widget, + beautiful.fg_center_widget, + beautiful.bg_widget +}) +vicious.register(swapbar, vicious.widgets.mem, "$5", 13) + +-- Swap % +swappct = widget({ type = "textbox" }) +swappct.width = pctwidth +vicious.register(swappct, vicious.widgets.mem, "$5%", 5) + +-- {{{ FILESYSTEM +-- Cache +vicious.cache(vicious.widgets.fs) + +-- Root used +rootfsused = widget({ type = "textbox" }) +vicious.register(rootfsused, vicious.widgets.fs, + "sdd${/ used_gb}GB", 97) + +-- Root bar +rootfsbar = awful.widget.progressbar() +rootfsbar:set_vertical(false):set_width(graphwidth):set_height(graphheight) +rootfsbar:set_ticks(false):set_ticks_size(2) +rootfsbar:set_background_color(beautiful.bg_widget) +rootfsbar:set_border_color(nil) +rootfsbar:set_gradient_colors({ + beautiful.fg_widget, + beautiful.fg_center_widget, + beautiful.bg_widget +}) +vicious.register(rootfsbar, vicious.widgets.fs, "${/ used_p}", 97) + +-- Root % +rootfspct = widget({ type = "textbox" }) +rootfspct.width = pctwidth +vicious.register(rootfspct, vicious.widgets.fs, "${/ used_p}%", 97) +-- }}} + +-- {{{ NETWORK +-- Cache +vicious.cache(vicious.widgets.net) + +-- TX +txwidget = widget({ type = "textbox" }) +vicious.register(txwidget, vicious.widgets.net, + "up${eth0 tx_mb}MB", 19) + +-- Up graph +upgraph = awful.widget.graph() +upgraph:set_width(graphwidth):set_height(graphheight) +upgraph:set_background_color(beautiful.bg_widget) +upgraph:set_border_color(nil) +upgraph:set_gradient_colors({ + beautiful.fg_end_widget, + beautiful.fg_end_widget, + beautiful.fg_center_widget +}) +upgraph:set_gradient_angle(0) +vicious.register(upgraph, vicious.widgets.net, "${eth0 up_kb}") + +-- Up speed +upwidget = widget({ type = "textbox" }) +upwidget.width = netwidth +vicious.register(upwidget, vicious.widgets.net, "${eth0 up_kb}k/s", 2) + +-- RX +rxwidget = widget({ type = "textbox" }) +vicious.register(rxwidget, vicious.widgets.net, + "down${eth0 rx_mb}MB", 17) + +-- Down graph +downgraph = awful.widget.graph() +downgraph:set_width(graphwidth):set_height(graphheight) +downgraph:set_background_color(beautiful.bg_widget) +downgraph:set_border_color(nil) +downgraph:set_gradient_colors({ + beautiful.fg_end_widget, + beautiful.fg_end_widget, + beautiful.fg_center_widget +}) +downgraph:set_gradient_angle(0) +vicious.register(downgraph, vicious.widgets.net, "${eth0 down_kb}") + +-- Down speed +downwidget = widget({ type = "textbox" }) +downwidget.width = netwidth +vicious.register(downwidget, vicious.widgets.net, "${eth0 down_kb}k/s", 2) +-- }}} + +-- {{{ WEATHER +weather = widget({ type = "textbox" }) +vicious.register(weather, vicious.widgets.weather, + "${sky} @ ${tempf}°F on", + 1501, "XXXX") +weather:buttons(awful.util.table.join(awful.button({ }, 1, + function() vicious.force({ weather }) end))) +-- }}} + +-- {{{ PACMAN +-- Icon +pacicon = widget({ type = "imagebox" }) +pacicon.image = image(beautiful.widget_pac) + +-- Upgrades +pacwidget = widget({ type = "textbox" }) +vicious.register(pacwidget, vicious.widgets.pkg, +function(widget, args) + if args[1] > 0 then + pacicon.image = image(beautiful.widget_pacnew) + else + pacicon.image = image(beautiful.widget_pac) + end + + return args[1] +end, 1801, "Arch") + +-- Buttons +function popup_pac() + local pac_updates = "" + local f = io.popen("pacman -Qu --dbpath /tmp/pacsync") + if f then + pac_updates = f:read("*a"):match("(.*)\n$") + end + f:close() + + if not pac_updates then + pac_updates = "System is up to date" + end + + naughty.notify { text = pac_updates, timeout = 5, hover_timeout = 0.5 } +end +pacwidget:buttons(awful.util.table.join(awful.button({ }, 1, popup_pac))) +pacicon:buttons(pacwidget:buttons()) +-- }}} + +-- {{{ MPD +-- Icon +mpdicon = widget({ type = "imagebox" }) +mpdicon.image = image(beautiful.widget_mpd) + +-- Song info +mpdwidget = widget({ type = "textbox" }) +vicious.register(mpdwidget, vicious.widgets.mpd, function(widget, args) + info = "" + if args["{state}"] == "N/A" or args["{state}"] == "Stop" then + mpdicon.image = image(beautiful.widget_mpd) + info = "..." + else + if args["{state}"] == "Play" then + mpdicon.image = image(beautiful.widget_play) + elseif args["{state}"] == "Pause" then + mpdicon.image = image(beautiful.widget_pause) + end + info = args["{Artist}"] .. " - " .. args["{Title}"] + end + + return info +end, 3) + +-- Buttons +mpdwidget:buttons(awful.util.table.join( + awful.button({ }, 1, function() awful.util.spawn("mpc -q toggle", false) end), + awful.button({ }, 3, function() awful.util.spawn("mpc -q stop", false) end), + awful.button({ }, 4, function() awful.util.spawn("mpc -q next", false) end), + awful.button({ }, 5, function() awful.util.spawn("mpc -q prev", false) end) +)) +mpdicon:buttons(mpdwidget:buttons()) +-- }}} + +-- {{{ VOLUME +-- Cache +vicious.cache(vicious.widgets.volume) + +-- Icon +volicon = widget({ type = "imagebox" }) +volicon.image = image(beautiful.widget_vol) + +-- Level bar +volbar = awful.widget.progressbar() +volbar:set_vertical(true):set_width(4):set_height(24) +volbar:set_ticks(false):set_ticks_size(1) +volbar:set_background_color(beautiful.bg_normal) +volbar:set_border_color(nil) +volbar:set_gradient_colors({ + beautiful.fg_center_widget, + beautiful.fg_end_widget +}) +vicious.register(volbar, vicious.widgets.volume, function(widget, args) + if args[1] == 0 or args[2] == "♩" then + volicon.image = image(beautiful.widget_mute) + else + volicon.image = image(beautiful.widget_vol) + end + return args[1] +end, 2, "Master") + +-- Buttons +volbar.widget:buttons(awful.util.table.join( + awful.button({ }, 1, + function() awful.util.spawn("amixer -q set Master toggle", false) end), + awful.button({ }, 4, + function() awful.util.spawn("amixer -q set Master 3+% unmute", false) end), + awful.button({ }, 5, + function() awful.util.spawn("amixer -q set Master 3-% unmute", false) end) +)) +volicon:buttons(volbar.widget:buttons()) +volspacer:buttons(volbar.widget:buttons()) +-- }}} + +-- {{{ BATTERY +-- Battery attributes +bat_state = "" +bat_charge = 0 +bat_time = 0 +blink = true + +-- Icon +baticon = widget({ type = "imagebox" }) +baticon.image = image(beautiful.widget_batfull) + +-- Charge bar +batbar = awful.widget.progressbar() +batbar:set_vertical(true):set_width(4):set_height(24) +batbar:set_ticks(false):set_ticks_size(1) +batbar:set_background_color(beautiful.bg_normal) +batbar:set_border_color(nil) +batbar:set_gradient_colors({ + beautiful.fg_center_widget, + beautiful.fg_end_widget +}) +vicious.register(batbar, vicious.widgets.bat, function(widget, args) + bat_state = args[1] + bat_charge = args[2] + bat_time = args[3] + + if args[1] == "-" then + if bat_charge > 80 then + baticon.image = image(beautiful.widget_batfull) + elseif bat_charge > 30 then + baticon.image = image(beautiful.widget_batmed) + elseif bat_charge > 10 then + baticon.image = image(beautiful.widget_batlow) + else + baticon.image = image(beautiful.widget_batempty) + end + else + baticon.image = image(beautiful.widget_ac) + if args[1] == "+" then + blink = not blink + if blink then + baticon.image = image(beautiful.widget_acblink) + end + end + end + + return bat_charge +end, nil, "BAT0") + +-- Buttons +function popup_bat() + local state = "" + if bat_state == "=" then + state = "Full" + elseif bat_state == "=" then + state = "Charged" + elseif bat_state == "+" then + state = "Charging" + elseif bat_state == "-" then + state = "Discharging" + else + state = "Unknown" + end + + naughty.notify { text = "Charge : " .. bat_charge .. "%\nState : " .. state .. " (" .. bat_time .. ")", timeout = 5, hover_timeout = 0.5 } +end +batbar.widget:buttons(awful.util.table.join(awful.button({ }, 1, popup_bat))) +baticon:buttons(batbar.widget:buttons()) +-- }}} diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ + diff --git a/screenshots/awesome_20121011.png b/screenshots/awesome_20121011.png new file mode 100644 index 0000000..ca77636 Binary files /dev/null and b/screenshots/awesome_20121011.png differ