diff --git a/core/vars.lua b/core/vars.lua
index c8eac77..8d8c5e3 100644
--- a/core/vars.lua
+++ b/core/vars.lua
@@ -5,7 +5,7 @@ global = {}
global.awesome_dir = os.getenv("HOME").."/.config/awesome/"
global.config_dir = os.getenv("HOME").."/.awesome/"
global.themes_dir = os.getenv("HOME").."/.config/awesome/themes/"
-global.theme = global.awesome_dir .. "themes/unity_simplified/theme.lua"
+global.theme = global.awesome_dir .. "themes/carbon/theme.lua"
global.terminal = "xterm"
global.editor = os.getenv("EDITOR") or "vim"
global.editor_cmd = global.terminal .. " -e ".. global.editor
diff --git a/themes/carbon/icons/README.md b/themes/carbon/icons/README.md
index b43f74a..d9f2e1b 100644
--- a/themes/carbon/icons/README.md
+++ b/themes/carbon/icons/README.md
@@ -1,5 +1,7 @@
battery status icons, lock/shutdown/suspend icons, volume status icons were taken from the Breeze icons theme. (https://develop.kde.org/frameworks/breeze-icons/, copyright KDE and licensed under the GNU LGPL version 3 or later)
+logout icon is taken from the adwaita project
+
battery status icons in particular were modified to look somewhat less ugly when recolored to a single color. this was done because the config automatically recolors all icons to the color value of the foreground (text) color.
the author of this config does not claim copyright of any icons present in this folder unless stated otherwise in the icon's license metadata.
diff --git a/themes/carbon/icons/battery-caution-charging-symbolic.svg b/themes/carbon/icons/battery-caution-charging-symbolic.svg
index 56fe444..84410f5 100644
--- a/themes/carbon/icons/battery-caution-charging-symbolic.svg
+++ b/themes/carbon/icons/battery-caution-charging-symbolic.svg
@@ -1,12 +1,138 @@
-
+
+
+
+
diff --git a/themes/carbon/icons/battery-caution-symbolic.svg b/themes/carbon/icons/battery-caution-symbolic.svg
index 3fb7d4a..eb31e2a 100644
--- a/themes/carbon/icons/battery-caution-symbolic.svg
+++ b/themes/carbon/icons/battery-caution-symbolic.svg
@@ -1,9 +1,123 @@
-
+
+
+
+
diff --git a/themes/carbon/icons/battery-empty-charging-symbolic.svg b/themes/carbon/icons/battery-empty-charging-symbolic.svg
index e3e8620..6054506 100644
--- a/themes/carbon/icons/battery-empty-charging-symbolic.svg
+++ b/themes/carbon/icons/battery-empty-charging-symbolic.svg
@@ -1,12 +1,148 @@
-
+
+
+
+
diff --git a/themes/carbon/icons/battery-empty-symbolic.svg b/themes/carbon/icons/battery-empty-symbolic.svg
index 710c02b..cf392d7 100644
--- a/themes/carbon/icons/battery-empty-symbolic.svg
+++ b/themes/carbon/icons/battery-empty-symbolic.svg
@@ -1,9 +1,147 @@
-
+
+
+
+
diff --git a/themes/carbon/icons/battery-full-charged-symbolic.svg b/themes/carbon/icons/battery-full-charged-symbolic.svg
index ae88a8c..0652e7e 100644
--- a/themes/carbon/icons/battery-full-charged-symbolic.svg
+++ b/themes/carbon/icons/battery-full-charged-symbolic.svg
@@ -1,70 +1,165 @@
+
+
diff --git a/themes/carbon/icons/battery-full-charging-symbolic.svg b/themes/carbon/icons/battery-full-charging-symbolic.svg
index 2db325e..b11ab4c 100644
--- a/themes/carbon/icons/battery-full-charging-symbolic.svg
+++ b/themes/carbon/icons/battery-full-charging-symbolic.svg
@@ -1,69 +1,165 @@
+
+
diff --git a/themes/carbon/icons/battery-full-symbolic.svg b/themes/carbon/icons/battery-full-symbolic.svg
index 7daa418..3241dad 100644
--- a/themes/carbon/icons/battery-full-symbolic.svg
+++ b/themes/carbon/icons/battery-full-symbolic.svg
@@ -1,62 +1,109 @@
+
+
diff --git a/themes/carbon/icons/battery-good-charging-symbolic.svg b/themes/carbon/icons/battery-good-charging-symbolic.svg
index 0b54f56..c7ece05 100644
--- a/themes/carbon/icons/battery-good-charging-symbolic.svg
+++ b/themes/carbon/icons/battery-good-charging-symbolic.svg
@@ -1,69 +1,165 @@
+
+
diff --git a/themes/carbon/icons/battery-good-symbolic.svg b/themes/carbon/icons/battery-good-symbolic.svg
index b55a8e0..4d654b4 100644
--- a/themes/carbon/icons/battery-good-symbolic.svg
+++ b/themes/carbon/icons/battery-good-symbolic.svg
@@ -1,62 +1,140 @@
+
+
diff --git a/themes/carbon/icons/battery-low-charging-symbolic.svg b/themes/carbon/icons/battery-low-charging-symbolic.svg
index 56fb9cc..3f12fbe 100644
--- a/themes/carbon/icons/battery-low-charging-symbolic.svg
+++ b/themes/carbon/icons/battery-low-charging-symbolic.svg
@@ -1,71 +1,165 @@
+
+
diff --git a/themes/carbon/icons/battery-low-symbolic.svg b/themes/carbon/icons/battery-low-symbolic.svg
index ab50fc2..b209891 100644
--- a/themes/carbon/icons/battery-low-symbolic.svg
+++ b/themes/carbon/icons/battery-low-symbolic.svg
@@ -1,62 +1,141 @@
+
+
diff --git a/themes/carbon/icons/battery-missing-symbolic.svg b/themes/carbon/icons/battery-missing-symbolic.svg
index f96c4b2..83b380b 100644
--- a/themes/carbon/icons/battery-missing-symbolic.svg
+++ b/themes/carbon/icons/battery-missing-symbolic.svg
@@ -1,69 +1,186 @@
+
+
diff --git a/themes/carbon/icons/drawer-closed.svg b/themes/carbon/icons/drawer-closed.svg
new file mode 100644
index 0000000..f55095d
--- /dev/null
+++ b/themes/carbon/icons/drawer-closed.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/themes/carbon/icons/drawer-open.svg b/themes/carbon/icons/drawer-open.svg
new file mode 100644
index 0000000..02c1d88
--- /dev/null
+++ b/themes/carbon/icons/drawer-open.svg
@@ -0,0 +1,73 @@
+
+
+
+
diff --git a/themes/carbon/icons/mail.svg b/themes/carbon/icons/mail.svg
index 59d2196..adfd904 100644
--- a/themes/carbon/icons/mail.svg
+++ b/themes/carbon/icons/mail.svg
@@ -26,9 +26,9 @@
inkscape:document-units="mm"
showgrid="false"
units="px"
- inkscape:zoom="12.429181"
- inkscape:cx="20.636919"
- inkscape:cy="24.699939"
+ inkscape:zoom="16"
+ inkscape:cx="16.90625"
+ inkscape:cy="17.625"
inkscape:window-width="1861"
inkscape:window-height="1036"
inkscape:window-x="57"
@@ -37,6 +37,43 @@
inkscape:current-layer="layer1" />
+
+
+
+
-
@@ -63,24 +96,21 @@
width="3.4200001"
height="0.30000001"
x="8"
- y="3"
- d="m 8,3 h 3.42 V 3.3 H 8 Z" />
+ y="3" />
+ y="3.5" />
+ y="4" />
@@ -91,8 +121,7 @@
height="0.60000002"
x="0.12422053"
y="3.3848631"
- transform="rotate(22.288197)"
- d="M 0.12422053,3.3848631 H 8.1242205 V 3.9848632 H 0.12422053 Z" />
+ transform="rotate(22.288197)" />
+ transform="matrix(0.92528787,-0.37926556,-0.37926556,-0.92528787,0,0)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -128,26 +254,33 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- style="display:inline">
+ style="display:inline;opacity:1">
+ style="display:inline;fill:#000000;stroke-width:0.499999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:markers fill stroke"
+ id="rect1371"
+ width="10.087337"
+ height="7.0130129"
+ x="1.3083332"
+ y="3.2057128"
+ mask="url(#mask-powermask-path-effect1636)"
+ inkscape:path-effect="#path-effect1636"
+ d="M 1.3083332,3.2057128 H 11.39567 V 10.218726 H 1.3083332 Z"
+ sodipodi:type="rect"
+ transform="translate(-0.00200143,-0.36221924)" />
+ inkscape:label="Layer 2"
+ style="display:inline" />
+
+
+
-
-
-
diff --git a/themes/carbon/icons/system-log-out-symbolic.svg b/themes/carbon/icons/system-log-out-symbolic.svg
new file mode 100644
index 0000000..9f1676e
--- /dev/null
+++ b/themes/carbon/icons/system-log-out-symbolic.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/themes/carbon/icons/volume-high.svg b/themes/carbon/icons/volume-high.svg
index 486ec0b..99589c1 100644
--- a/themes/carbon/icons/volume-high.svg
+++ b/themes/carbon/icons/volume-high.svg
@@ -1,15 +1,94 @@
-
diff --git a/themes/carbon/icons/volume-low.svg b/themes/carbon/icons/volume-low.svg
index 824a3f6..82888ae 100644
--- a/themes/carbon/icons/volume-low.svg
+++ b/themes/carbon/icons/volume-low.svg
@@ -1,14 +1,94 @@
-
diff --git a/themes/carbon/icons/volume-medium.svg b/themes/carbon/icons/volume-medium.svg
index 5e6dd1f..099284c 100644
--- a/themes/carbon/icons/volume-medium.svg
+++ b/themes/carbon/icons/volume-medium.svg
@@ -1,15 +1,94 @@
-
diff --git a/themes/carbon/icons/volume-muted.svg b/themes/carbon/icons/volume-muted.svg
index bf8f17a..20ddd79 100644
--- a/themes/carbon/icons/volume-muted.svg
+++ b/themes/carbon/icons/volume-muted.svg
@@ -1,23 +1,94 @@
-
diff --git a/themes/carbon/menu.lua b/themes/carbon/menu.lua
deleted file mode 100644
index 34071bb..0000000
--- a/themes/carbon/menu.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-local temp = io.open(os.getenv("HOME").."/.config/awesome/file.lua","r")
-local filehelper = loadstring(temp:read("*a"))()
-temp:close()
---get a giant list of xdg data
-log = function(...)
- local params = {}
- for k,v in pairs({...}) do
- params[#params+1] = tostring(v)
- end
- local str = table.concat(params," ")
- filehelper.write("./awesome_log",filehelper.read("./awesome_log").."\n"..str)
-end
-local function parse_xdg()
- local output = {}
- local temp = io.popen("find /usr/share/applications","r")
- local file_table = temp:read("*a")
- temp:close()
- local temp = io.popen("find "..os.getenv("HOME").."/.local/share/applications","r")
- file_table = file_table.."\n"..temp:read("*a")
- temp:close()
- local lines = {}
- file_table:gsub("[^\n]+",function(capt) lines[#lines+1] = capt end)
- for k,v in pairs(lines) do
- local data = filehelper.read(v,"*a")
- --check if its an app, if it has a name, and if it's even readable.
- if data and data:match("Type=([^\n]+)") and data:match("Type=([^\n]+)") == "Application" and data:match("Name=([^\n]+)") then
- --get the tags
- local tags = data:match("Categories=([^\n]+)")
- local categories = {}
- if tags then
- tags:gsub("[^;]+",function(capt) categories[#categories+1] = capt:match("%w+") end)
- end
- --remove a bunch of useless category extensions
- while true do
- local occurences = 0
- local whitelist = {
- Network = true,
- Game = true,
- Education = true,
- Development = true,
- Graphics = true,
- Utility = true,
- System = true,
- AudioVideo = true,
- Office = true,
- Settings = true,
- }
- for k,v in pairs(categories) do
- if not whitelist[v] then
- table.remove(categories,k)
- occurences = occurences + 1
- end
- end
- if occurences == 0 then
- break
- end
- end
- --add this to the end so it'll be detected like a path.
- categories[#categories+1]=data:match("Name=([^\n]+)")
- output[#output+1] = {data:match("Exec=([^\n%%]+)"),categories = categories}
- end
- end
- return output
-end
-
---fuck
-local function sort_by_categories(input)
- local output = {}
- assert(type(input) == "table")
- for k,v in pairs(input) do
- local categories = v.categories
- local function sort(tab,list,value)
- local found = nil
- for k,v in pairs(tab) do
- if v[1] == list[1] then
- found = v
- end
- end
- if not found then
- if list[2] then
- tab[#tab+1] = {list[1],{}}
- found = tab[#tab]
- elseif list[1] then
- tab[#tab+1] = {list[1],value}
- found = tab[#tab]
- end
- end
- if list[2] then
- table.remove(list,1)
- found[2] = sort(found[2],list,value)
- end
- return tab
- end
- output = sort(output,categories,v[1])
- end
- return output
-end
-
-local function sort_untagged(input)
- local output = input
- local other = {}
- for k,v in pairs(input) do
- log(k,v[1],v[2])
- if type(v[2]) == "string" then
- other[#other+1] = {v[1],v[2]}
- output[k] = nil
- end
- end
- local new_output = {}
- for k,v in pairs(output) do
- new_output[#new_output+1] = v
- end
- new_output[#new_output+1] = {"Other",other}
- return new_output
-end
-
-return sort_untagged(sort_by_categories(parse_xdg()))
diff --git a/themes/carbon/theme.lua b/themes/carbon/theme.lua
index 94f3e28..35370f0 100644
--- a/themes/carbon/theme.lua
+++ b/themes/carbon/theme.lua
@@ -1,29 +1,39 @@
+-- Carbon: the reference theme
+-- This theme is designed as a reference for working with AWMTK.
+-- Comments will go into some detail about the features of AWMTK,
+-- such as contexts, elements, and element prototypes.
+
+--[[
+- Preface
+AWMTK is a library for building widget style contexts.
+Essentially, it's an easy way to separate styles for each individual
+widget by creating a "context" that contains variables for that
+specific widget, which are set to fall back to the broader
+definitions of these variables.
+
+Take as an example a specific variable definition:
+`theme.context_button_bg_normal`
+If this variable doesn't exist, it defaults to the broader variable
+`theme.button_bg_normal`
+which itself defaults to an even broader variable
+`theme.bg_normal`
+That way, a theme can be as specific as possible without requiring
+]]
+
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
+local wibox = require("wibox")
local dpi = xresources.apply_dpi
local theme = {}
-
+-- {{{ Color definitions
+-- These variables define a fallback state for all widgets to use.
theme.name = "carbon"
-theme.font = "Ubuntu Regular 9"
-theme.unitybar_width = dpi(55)
-theme.icon_rounding = 5
-theme.tasklist_button_shape_border_width = dpi(1)
-theme.tasklist_button_shape_border_color = "#262626AA"
-theme.launcher_button_shape_border_width = dpi(1)
-theme.launcher_button_shape_border_color = "#262626AA"
-theme.launcher_button_size = 44
-theme.tasklist_button_size = 44
-theme.macbar_rounding = 5
-theme.macbar_height = 45
-theme.menu_button_inner_margin = 2
-theme.container_rounding = 4
-theme.button_rounding = 4
-theme.bg_normal = "#181819"
+theme.bg_normal = "#19191D"
theme.bg_focus = "#3E3E3E"
-theme.bg_urgent = "#2E2E2E"
-theme.bg_minimize = "#2E2E2E"
+theme.bg_urgent = "#5E5E5E"
+theme.bg_minimize = "#5E5E5E"
theme.bg_systray = theme.bg_normal
theme.fg_normal = "#e1dec7"
@@ -34,12 +44,11 @@ theme.fg_minimize = "#e1dec7"
theme.useless_gap = dpi(10)
theme.border_width = dpi(1)
theme.border_normal = theme.bg_normal
-theme.border_focus = theme.bg_focus
+theme.border_focus = theme.bg_normal
theme.border_marked = theme.bg_marked
+-- }}}
--- There are other variable sets
--- overriding the default one when
--- defined, the sets are:
+-- All of the previous variables are still avaialable.
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
@@ -47,29 +56,202 @@ theme.border_marked = theme.bg_marked
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
--- Example:
---theme.taglist_bg_focus = "#ff0000"
+-- notification_font
+-- not1ification_[bg|fg]
+-- notification_[width|height|margin]
+-- notification_[border_color|border_width|shape|opacity]
+-- etc.
+
+
+-- {{{ Elements
+--[[
+All AWMTK widgets have various elements with their own variables.
+These elements are essentially primitive UI components.
+The following elements are defined:
+- container
+- button
+- inputbox
+- textbox
+- icon
+The variables for these elements can be accessed in the form
+theme.{context}_{broader definition}
+i.e.
+theme.button_bg_normal ("button" is context, "bg_normal" is a broader
+definition)
+]]
+theme.button_bg_normal = theme.bg_normal
+theme.button_bg_focus = theme.bg_focus
+theme.button_bg_urgent = theme.bg_urgent
+theme.button_bg_marked = theme.bg_marked
+--[[ ...etc
+In total, we can define the available primitive variables as such:
+[button|container|inputbox|textbox|icon]_...
+ ...[bg|fg|border]_[normal|focus|urgent|marked],
+ ...shape_border_[width|color],
+ ...inner_margin,
+ ...rounding
+These variables are pretty self descriptive,
+
+Additionally, we have some variables for the container element:
+ container_spacing
+ container_spacing_vertical
+ container_spacing_horizontal
+These variables control the spacing of widgets in various layouts.
+
+]]
+
+-- {{{ Bars
+-- Sometimes objects require additional variables that don't fall under the
+-- primitives model. For example, in this particular case, unitybar has a
+-- "unitybar_bg" variable, which does not belong to any of the primitives but to
+-- the bar itself. Ideally, all of the variables like these will be documented
+-- in the widgets documentation.
+-- All of the following variables do not belong to any primitive:
+theme.unitybar_bg = theme.bg_normal.."FF"
+theme.unitybar_border_color = theme.bg_normal
+theme.unitybar_width = dpi(50)
+theme.unitybar_inner_margin = 3
+
+-- }}}
+
+-- {{{ Widgets
+
+--[[
+All of the widgets written in this config have contexts.
+A context essentially contains values for primitves that are specific
+to the widget. Think of the context as of a namespace but for that
+particular widget's style variables.
+
+In practice, that means that defining
+`theme.menu_button_bg_normal`
+will NOT affect
+`theme.button_bg_normal`
+and therefore all of the other instances derived from it, i.e.
+`theme.drawer_button_bg_normal`
+
+Do note however that if `theme.menu_button_bg_normal` is not defined,
+defining `theme.button_bg_normal` WILL affect it, as it is derived
+from `theme.button_bg_normal`
+
+An additional note should be made about the fact that these variables
+affect every instance of the widget, i.e. if you have a battery
+widget in a wibar and another battery widget on the lock screen,
+both will be affected by the definiton of
+`theme.batter_container_bg_normal`. To affect a particular widget's
+style properties, use the `style` table in its arguments table.
+i.e. in .../awesome/core/layout.lua
+```
+require("widget.drawer")({ --This creates an instance of a widget
+ style = {
+ --This variable affects only this particular instance
+ button_bg_normal = "#FF00FF"
+ }
+})
+```
+]]
+
+--Example: defining menu properties
+theme.menu_submenu_icon = global.themes_dir..theme.name.."/submenu.png"
+theme.menu_height = dpi(18)
+theme.menu_width = dpi(140)
+--`button` is any clickable/hoverable element of the menu
+theme.menu_button_height = dpi(18)
+theme.menu_button_rounding = 4
+theme.menu_button_inner_margin = 2
+--`container` is the background of the menu
+theme.menu_container_spacing = 4
+theme.menu_container_rounding = 4
+--`icon` is any of the small power icons in the menu
+--because `menu` applies generally to all of the menus,
+--including the popup menus that appear when you click on an icon
+--of the window, these particular icons have their own namespace.
+--(to be completely honest i'm not exactly proud of how this works)
+theme.powercontrol_icon_rounding = 4
+
+
+--[[ Another thing that should be noted is that it's possible to
+override primitve templates on a per-widget basis. For example, it's
+possible to add some custom static elements to the buttons in
+launcher widget and tasklist widget. Although to do this safely, you
+might want to consider reading the original templates in
+.../awesome/libs/awmtk.lua ]]
+
+-- Calculate height/width of the button
+local button_size = theme.unitybar_width - theme.unitybar_inner_margin*2
+
+-- Launcher
+theme.launcher_button_rounding = 4
+-- Modifying the button template
+-- All templates are functions that receive a processed style
+-- so that it would be possible to overwrite template variables.
+
+-- There are two "special id's" that define the root of the template
+-- (the furthest outer element) and the container point
+-- (the innermost element). widget_background is used by some
+-- widgets to set the background value on event. widget_container is
+-- used as an anchor point which is populated by the contents of the
+-- widget after processing.
+
+-- Example: this templates overrides all menus in such a way
+-- that all of them will contain a gradient bar on top.
+theme.menu_container_widget = function(style)
+ return {
+ {
+ {
+ -- weirdly enough i can't just set forced_height
+ -- for the container itself.
+ {
+ widget = wibox.widget.textbox,
+ forced_height = 8
+ },
+ widget = wibox.container.background,
+ bg = {
+ type = "linear",
+ from = {0,0},
+ to = {0,8},
+ stops = {
+ {0, theme.bg_focus},
+ {1, theme.bg_normal},
+ }
+ }
+ },
+ {
+ id = "widget_container",
+ widget = wibox.container.margin,
+ margins = style.container_inner_margin,
+ },
+ layout = wibox.layout.fixed.vertical,
+ },
+ bg = style.container_bg_normal,
+ id = "widget_background",
+ widget = wibox.container.background,
+ shape = style.container_shape,
+ shape_border_width = style.container_shape_border_width,
+ shape_border_color = style.container_shape_border_color,
+ fg = style.container_fg_normal
+ }
+end
+
+-- Note that even after modifying the template, all of the variables
+-- are still usable
+theme.menu_container_shape_border_width = dpi(1)
+theme.menu_container_shape_border_color = {
+ type = "linear",
+ from = {0,0},
+ to = {0,50},
+ stops = {
+ {0, "#3E3E3E"},
+ {1, "#1E1E1E"}
+ }
+}
+-- Tasklist
+theme.tasklist_button_rounding = 4
+
+-- Hotkeys
theme.hotkeys_border_color = "#262626"
theme.hotkeys_opacity = 0.2
-theme.titlebar_bg_focus = {
- type = "linear",
- from = { 0, 15 },
- to = { 0, 0 },
- stops = { { 0, "#3C3C3C"} , { 1 , "#424242"} }
-}
-
-theme.titlebar_bg_normal = {
- type = "linear",
- from = { 0, 15 },
- to = { 0, 0 },
- stops = { { 0, "#161617"} , { 1 , "#222223"} }
-
-}
-theme.topbar_bg = theme.titlebar_bg_normal
-theme.titlebar_rounding = 6
-
--- Generate taglist squares:
+-- Taglist
local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
@@ -77,26 +259,13 @@ theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-
--- Variables set for theming notifications:
--- notification_font
--- not1ification_[bg|fg]
--- notification_[width|height|margin]
--- notification_[border_color|border_width|shape|opacity]
+-- Notifications
+-- (these are untouched as of now and don't fall under AWMTK configuration model. this might change in the future)
theme.notification_width = dpi(250)
theme.notification_height = dpi(80)
--- Variables set for theming the menu:
--- menu_[bg|fg]_[normal|focus]
--- menu_[border_color|border_width]
-theme.menu_submenu_icon = global.themes_dir..theme.name.."/submenu.png"
-theme.menu_height = dpi(18)
-theme.menu_width = dpi(140)
-
--- You can add as many variables as
--- you wish and access them by using
--- beautiful.variable in your rc.lua
---theme.bg_widget = "#cc0000"
+-- }}}
+-- {{{ Icons
-- Define the image to load
theme.titlebar_close_button_normal = global.themes_dir..theme.name.."/titlebar/close_normal.png"
theme.titlebar_close_button_focus = global.themes_dir..theme.name.."/titlebar/close_focus.png"
@@ -143,15 +312,16 @@ theme.layout_cornernw = global.themes_dir..theme.name.."/layouts/cornernww.png"
theme.layout_cornerne = global.themes_dir..theme.name.."/layouts/cornernew.png"
theme.layout_cornersw = global.themes_dir..theme.name.."/layouts/cornersww.png"
theme.layout_cornerse = global.themes_dir..theme.name.."/layouts/cornersew.png"
+theme_assets.recolor_layout(theme, theme.fg_normal)
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
-
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "Adwaita"
+-- }}}
return theme
diff --git a/themes/carbon/titlebar/close_focus.png b/themes/carbon/titlebar/close_focus.png
index 01ef825..51b1a80 100644
Binary files a/themes/carbon/titlebar/close_focus.png and b/themes/carbon/titlebar/close_focus.png differ
diff --git a/themes/carbon/titlebar/close_normal.png b/themes/carbon/titlebar/close_normal.png
index 5448ed8..f6b83d2 100644
Binary files a/themes/carbon/titlebar/close_normal.png and b/themes/carbon/titlebar/close_normal.png differ
diff --git a/themes/carbon/titlebar/maximized_focus_active.png b/themes/carbon/titlebar/maximized_focus_active.png
index d7dffd7..189d0f4 100644
Binary files a/themes/carbon/titlebar/maximized_focus_active.png and b/themes/carbon/titlebar/maximized_focus_active.png differ
diff --git a/themes/carbon/titlebar/maximized_focus_inactive.png b/themes/carbon/titlebar/maximized_focus_inactive.png
index 844389f..199b853 100644
Binary files a/themes/carbon/titlebar/maximized_focus_inactive.png and b/themes/carbon/titlebar/maximized_focus_inactive.png differ
diff --git a/themes/carbon/titlebar/maximized_normal_active.png b/themes/carbon/titlebar/maximized_normal_active.png
index a705f81..f3832ad 100644
Binary files a/themes/carbon/titlebar/maximized_normal_active.png and b/themes/carbon/titlebar/maximized_normal_active.png differ
diff --git a/themes/carbon/titlebar/maximized_normal_inactive.png b/themes/carbon/titlebar/maximized_normal_inactive.png
index 4c1ab1f..7af085e 100644
Binary files a/themes/carbon/titlebar/maximized_normal_inactive.png and b/themes/carbon/titlebar/maximized_normal_inactive.png differ
diff --git a/themes/carbon/titlebar/minimize_focus.png b/themes/carbon/titlebar/minimize_focus.png
index caaceb2..8ec8e4c 100644
Binary files a/themes/carbon/titlebar/minimize_focus.png and b/themes/carbon/titlebar/minimize_focus.png differ
diff --git a/themes/carbon/titlebar/minimize_normal.png b/themes/carbon/titlebar/minimize_normal.png
index 36621d0..9d46d90 100644
Binary files a/themes/carbon/titlebar/minimize_normal.png and b/themes/carbon/titlebar/minimize_normal.png differ
diff --git a/themes/unity/menu.lua b/themes/unity/menu.lua
deleted file mode 100644
index 34071bb..0000000
--- a/themes/unity/menu.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-local temp = io.open(os.getenv("HOME").."/.config/awesome/file.lua","r")
-local filehelper = loadstring(temp:read("*a"))()
-temp:close()
---get a giant list of xdg data
-log = function(...)
- local params = {}
- for k,v in pairs({...}) do
- params[#params+1] = tostring(v)
- end
- local str = table.concat(params," ")
- filehelper.write("./awesome_log",filehelper.read("./awesome_log").."\n"..str)
-end
-local function parse_xdg()
- local output = {}
- local temp = io.popen("find /usr/share/applications","r")
- local file_table = temp:read("*a")
- temp:close()
- local temp = io.popen("find "..os.getenv("HOME").."/.local/share/applications","r")
- file_table = file_table.."\n"..temp:read("*a")
- temp:close()
- local lines = {}
- file_table:gsub("[^\n]+",function(capt) lines[#lines+1] = capt end)
- for k,v in pairs(lines) do
- local data = filehelper.read(v,"*a")
- --check if its an app, if it has a name, and if it's even readable.
- if data and data:match("Type=([^\n]+)") and data:match("Type=([^\n]+)") == "Application" and data:match("Name=([^\n]+)") then
- --get the tags
- local tags = data:match("Categories=([^\n]+)")
- local categories = {}
- if tags then
- tags:gsub("[^;]+",function(capt) categories[#categories+1] = capt:match("%w+") end)
- end
- --remove a bunch of useless category extensions
- while true do
- local occurences = 0
- local whitelist = {
- Network = true,
- Game = true,
- Education = true,
- Development = true,
- Graphics = true,
- Utility = true,
- System = true,
- AudioVideo = true,
- Office = true,
- Settings = true,
- }
- for k,v in pairs(categories) do
- if not whitelist[v] then
- table.remove(categories,k)
- occurences = occurences + 1
- end
- end
- if occurences == 0 then
- break
- end
- end
- --add this to the end so it'll be detected like a path.
- categories[#categories+1]=data:match("Name=([^\n]+)")
- output[#output+1] = {data:match("Exec=([^\n%%]+)"),categories = categories}
- end
- end
- return output
-end
-
---fuck
-local function sort_by_categories(input)
- local output = {}
- assert(type(input) == "table")
- for k,v in pairs(input) do
- local categories = v.categories
- local function sort(tab,list,value)
- local found = nil
- for k,v in pairs(tab) do
- if v[1] == list[1] then
- found = v
- end
- end
- if not found then
- if list[2] then
- tab[#tab+1] = {list[1],{}}
- found = tab[#tab]
- elseif list[1] then
- tab[#tab+1] = {list[1],value}
- found = tab[#tab]
- end
- end
- if list[2] then
- table.remove(list,1)
- found[2] = sort(found[2],list,value)
- end
- return tab
- end
- output = sort(output,categories,v[1])
- end
- return output
-end
-
-local function sort_untagged(input)
- local output = input
- local other = {}
- for k,v in pairs(input) do
- log(k,v[1],v[2])
- if type(v[2]) == "string" then
- other[#other+1] = {v[1],v[2]}
- output[k] = nil
- end
- end
- local new_output = {}
- for k,v in pairs(output) do
- new_output[#new_output+1] = v
- end
- new_output[#new_output+1] = {"Other",other}
- return new_output
-end
-
-return sort_untagged(sort_by_categories(parse_xdg()))
diff --git a/themes/unity2/menu.lua b/themes/unity2/menu.lua
deleted file mode 100644
index 34071bb..0000000
--- a/themes/unity2/menu.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-local temp = io.open(os.getenv("HOME").."/.config/awesome/file.lua","r")
-local filehelper = loadstring(temp:read("*a"))()
-temp:close()
---get a giant list of xdg data
-log = function(...)
- local params = {}
- for k,v in pairs({...}) do
- params[#params+1] = tostring(v)
- end
- local str = table.concat(params," ")
- filehelper.write("./awesome_log",filehelper.read("./awesome_log").."\n"..str)
-end
-local function parse_xdg()
- local output = {}
- local temp = io.popen("find /usr/share/applications","r")
- local file_table = temp:read("*a")
- temp:close()
- local temp = io.popen("find "..os.getenv("HOME").."/.local/share/applications","r")
- file_table = file_table.."\n"..temp:read("*a")
- temp:close()
- local lines = {}
- file_table:gsub("[^\n]+",function(capt) lines[#lines+1] = capt end)
- for k,v in pairs(lines) do
- local data = filehelper.read(v,"*a")
- --check if its an app, if it has a name, and if it's even readable.
- if data and data:match("Type=([^\n]+)") and data:match("Type=([^\n]+)") == "Application" and data:match("Name=([^\n]+)") then
- --get the tags
- local tags = data:match("Categories=([^\n]+)")
- local categories = {}
- if tags then
- tags:gsub("[^;]+",function(capt) categories[#categories+1] = capt:match("%w+") end)
- end
- --remove a bunch of useless category extensions
- while true do
- local occurences = 0
- local whitelist = {
- Network = true,
- Game = true,
- Education = true,
- Development = true,
- Graphics = true,
- Utility = true,
- System = true,
- AudioVideo = true,
- Office = true,
- Settings = true,
- }
- for k,v in pairs(categories) do
- if not whitelist[v] then
- table.remove(categories,k)
- occurences = occurences + 1
- end
- end
- if occurences == 0 then
- break
- end
- end
- --add this to the end so it'll be detected like a path.
- categories[#categories+1]=data:match("Name=([^\n]+)")
- output[#output+1] = {data:match("Exec=([^\n%%]+)"),categories = categories}
- end
- end
- return output
-end
-
---fuck
-local function sort_by_categories(input)
- local output = {}
- assert(type(input) == "table")
- for k,v in pairs(input) do
- local categories = v.categories
- local function sort(tab,list,value)
- local found = nil
- for k,v in pairs(tab) do
- if v[1] == list[1] then
- found = v
- end
- end
- if not found then
- if list[2] then
- tab[#tab+1] = {list[1],{}}
- found = tab[#tab]
- elseif list[1] then
- tab[#tab+1] = {list[1],value}
- found = tab[#tab]
- end
- end
- if list[2] then
- table.remove(list,1)
- found[2] = sort(found[2],list,value)
- end
- return tab
- end
- output = sort(output,categories,v[1])
- end
- return output
-end
-
-local function sort_untagged(input)
- local output = input
- local other = {}
- for k,v in pairs(input) do
- log(k,v[1],v[2])
- if type(v[2]) == "string" then
- other[#other+1] = {v[1],v[2]}
- output[k] = nil
- end
- end
- local new_output = {}
- for k,v in pairs(output) do
- new_output[#new_output+1] = v
- end
- new_output[#new_output+1] = {"Other",other}
- return new_output
-end
-
-return sort_untagged(sort_by_categories(parse_xdg()))
diff --git a/themes/unity_simplified/menu.lua b/themes/unity_simplified/menu.lua
deleted file mode 100644
index 34071bb..0000000
--- a/themes/unity_simplified/menu.lua
+++ /dev/null
@@ -1,117 +0,0 @@
-local temp = io.open(os.getenv("HOME").."/.config/awesome/file.lua","r")
-local filehelper = loadstring(temp:read("*a"))()
-temp:close()
---get a giant list of xdg data
-log = function(...)
- local params = {}
- for k,v in pairs({...}) do
- params[#params+1] = tostring(v)
- end
- local str = table.concat(params," ")
- filehelper.write("./awesome_log",filehelper.read("./awesome_log").."\n"..str)
-end
-local function parse_xdg()
- local output = {}
- local temp = io.popen("find /usr/share/applications","r")
- local file_table = temp:read("*a")
- temp:close()
- local temp = io.popen("find "..os.getenv("HOME").."/.local/share/applications","r")
- file_table = file_table.."\n"..temp:read("*a")
- temp:close()
- local lines = {}
- file_table:gsub("[^\n]+",function(capt) lines[#lines+1] = capt end)
- for k,v in pairs(lines) do
- local data = filehelper.read(v,"*a")
- --check if its an app, if it has a name, and if it's even readable.
- if data and data:match("Type=([^\n]+)") and data:match("Type=([^\n]+)") == "Application" and data:match("Name=([^\n]+)") then
- --get the tags
- local tags = data:match("Categories=([^\n]+)")
- local categories = {}
- if tags then
- tags:gsub("[^;]+",function(capt) categories[#categories+1] = capt:match("%w+") end)
- end
- --remove a bunch of useless category extensions
- while true do
- local occurences = 0
- local whitelist = {
- Network = true,
- Game = true,
- Education = true,
- Development = true,
- Graphics = true,
- Utility = true,
- System = true,
- AudioVideo = true,
- Office = true,
- Settings = true,
- }
- for k,v in pairs(categories) do
- if not whitelist[v] then
- table.remove(categories,k)
- occurences = occurences + 1
- end
- end
- if occurences == 0 then
- break
- end
- end
- --add this to the end so it'll be detected like a path.
- categories[#categories+1]=data:match("Name=([^\n]+)")
- output[#output+1] = {data:match("Exec=([^\n%%]+)"),categories = categories}
- end
- end
- return output
-end
-
---fuck
-local function sort_by_categories(input)
- local output = {}
- assert(type(input) == "table")
- for k,v in pairs(input) do
- local categories = v.categories
- local function sort(tab,list,value)
- local found = nil
- for k,v in pairs(tab) do
- if v[1] == list[1] then
- found = v
- end
- end
- if not found then
- if list[2] then
- tab[#tab+1] = {list[1],{}}
- found = tab[#tab]
- elseif list[1] then
- tab[#tab+1] = {list[1],value}
- found = tab[#tab]
- end
- end
- if list[2] then
- table.remove(list,1)
- found[2] = sort(found[2],list,value)
- end
- return tab
- end
- output = sort(output,categories,v[1])
- end
- return output
-end
-
-local function sort_untagged(input)
- local output = input
- local other = {}
- for k,v in pairs(input) do
- log(k,v[1],v[2])
- if type(v[2]) == "string" then
- other[#other+1] = {v[1],v[2]}
- output[k] = nil
- end
- end
- local new_output = {}
- for k,v in pairs(output) do
- new_output[#new_output+1] = v
- end
- new_output[#new_output+1] = {"Other",other}
- return new_output
-end
-
-return sort_untagged(sort_by_categories(parse_xdg()))
diff --git a/widgets/polytasklist.lua b/widgets/polytasklist.lua
index c15c6e4..f947e2d 100644
--- a/widgets/polytasklist.lua
+++ b/widgets/polytasklist.lua
@@ -30,6 +30,8 @@ return function(options)
local style = awmtk.style(awmtk.defaults,options.style or {},"tasklist_")
-- Color definitions
local constraint = options.constraint or style.tasklist_constraint
+ --This one is a little bit awkward, considering that we just
+ --need the templates, not the widgets
local _style = awmtk._create_preprocess_style(style,"tasklist_")
_style.button_shape = awmtk.preprocess.button_shape(_style)
local container = style.tasklist_button_widget(_style)