diff --git a/.gitignore b/.gitignore index f5a752a..204da06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ rc.lua -wall.png diff --git a/menugen/init.lua b/menugen/init.lua new file mode 100644 index 0000000..4c57c81 --- /dev/null +++ b/menugen/init.lua @@ -0,0 +1,62 @@ +--------------------------------------------------------------------------- +-- @author Harvey Mittens +-- @copyright 2014 Harvey Mittens +-- @email teknocratdefunct@riseup.net +-- @release v3.5.5 +--------------------------------------------------------------------------- + +local menu_gen = require("menubar.menu_gen") +local menu_utils = require("menubar.utils") +local pairs = pairs +local ipairs = ipairs +local table = table +local string = string +local next = next + +module("menugen") + +--Built in menubar should be checking local applications directory +menu_gen.all_menu_dirs = { '/usr/share/applications/', '/usr/local/share/applications/', '~/.local/share/applications' } + +--Expecting an wm_name of awesome omits too many applications and tools +menu_utils.wm_name = "" + +-- Use MenuBar Parsing Utils to build StartMenu for Awesome +-- @return awful.menu compliant menu items tree +function build_menu() + local result = {} + local menulist = menu_gen.generate() + + for k,v in pairs(menu_gen.all_categories) do + table.insert(result, {k, {}, v["icon"] } ) + end + + for k, v in ipairs(menulist) do + for _, cat in ipairs(result) do + if cat[1] == v["category"] then + table.insert( cat[2] , { v["name"], v["cmdline"], v["icon"] } ) + break + end + end + end + + -- Cleanup Things a Bit + for k,v in ipairs(result) do + -- Remove Unused Categories + if not next(v[2]) then + table.remove(result, k) + else + --Sort entries Alphabetically (by Name) + table.sort(v[2], function (a,b) return string.byte(a[1]) < string.byte(b[1]) end) + -- Replace Catagory Name with nice name + v[1] = menu_gen.all_categories[v[1]].name + end + end + + --Sort Categories Alphabetically Also + table.sort(result, function(a,b) return string.byte(a[1]) < string.byte(b[1]) end) + + return result +end + + diff --git a/themes/blackburn/wall.png b/themes/blackburn/wall.png new file mode 100644 index 0000000..c3b0e2e Binary files /dev/null and b/themes/blackburn/wall.png differ diff --git a/themes/copland/wall.png b/themes/copland/wall.png new file mode 100644 index 0000000..ff3ffa4 Binary files /dev/null and b/themes/copland/wall.png differ diff --git a/themes/dremora/wall.png b/themes/dremora/wall.png new file mode 100755 index 0000000..b9e4c51 Binary files /dev/null and b/themes/dremora/wall.png differ diff --git a/themes/holo/wall.png b/themes/holo/wall.png new file mode 100644 index 0000000..511e095 Binary files /dev/null and b/themes/holo/wall.png differ diff --git a/themes/multicolor/wall.png b/themes/multicolor/wall.png new file mode 100644 index 0000000..6eac193 Binary files /dev/null and b/themes/multicolor/wall.png differ diff --git a/themes/powerarrow-darker/wall.png b/themes/powerarrow-darker/wall.png new file mode 100755 index 0000000..794eae2 Binary files /dev/null and b/themes/powerarrow-darker/wall.png differ diff --git a/themes/rainbow/wall.png b/themes/rainbow/wall.png new file mode 100755 index 0000000..3576ff2 Binary files /dev/null and b/themes/rainbow/wall.png differ diff --git a/themes/steamburn/wall.png b/themes/steamburn/wall.png new file mode 100644 index 0000000..21efa45 Binary files /dev/null and b/themes/steamburn/wall.png differ