diff --git a/core/layout.lua b/core/layout.lua
index f5e782c..9cc1de1 100644
--- a/core/layout.lua
+++ b/core/layout.lua
@@ -55,6 +55,7 @@ awful.screen.connect_for_each_screen(function(s)
bg = beautiful.topbar_bg
})
-- Add screen lock
+ require("widgets.lock")({screen = s, obscure = true})
require("widgets.unitybar")(s,{
top_widgets = {
require("widgets.polytasklist")({
diff --git a/core/vars.lua b/core/vars.lua
index 7f2cb9f..d7bc1cb 100644
--- a/core/vars.lua
+++ b/core/vars.lua
@@ -4,6 +4,7 @@ local gears = require("gears")
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/unity2/theme.lua"
global.terminal = "xterm"
global.editor = os.getenv("EDITOR") or "vim"
diff --git a/libs/thumbnail.lua b/libs/thumbnail.lua
new file mode 100644
index 0000000..fdc792c
--- /dev/null
+++ b/libs/thumbnail.lua
@@ -0,0 +1,21 @@
+-- A small utility function to generate thumbnails for images
+local spawn = require("awful.spawn")
+local thumbnailer = {}
+thumbnailer.generate = function(path,thumb_path,height)
+ assert(type(path) == "string", "argumenr #1 (path) is not a string")
+ assert(type(thumb_path) == "string", "argument #2 (thumbnail path) is not a string")
+ assert(type(height) == "number","argument #3 (height) is not a number")
+ if os.execute("ls "..path) ~= 0 then
+ return false, "unable to access image directory"
+ end
+ if os.execute("ls "..thumb_path) == 0 then
+ return true
+ end
+ if os.execute("mkdir "..thumb_path) ~= 0 then
+ return false, "unable to create thumbnail directory"
+ end
+ spawn("mogrify -thumbnail x"..tostring(height).." -path '"..thumb_path.."' '"..path.."'/*.{jpg,png}")
+ return true
+end
+
+return thumbnailer
diff --git a/rc.lua b/rc.lua
index 3604f35..ca08770 100644
--- a/rc.lua
+++ b/rc.lua
@@ -28,6 +28,7 @@ require("awful.hotkeys_popup.keys")
require("core.error")
require("core.vars")
require("core.style")
+require("themes.icons")
require("core.binds")
require("core.layout")
require("core.rules")
@@ -41,4 +42,4 @@ end)
require("custom_binds")
require("awesomerc")
-require("powerman")
+--require("powerman")
diff --git a/themes/icons.lua b/themes/icons.lua
new file mode 100644
index 0000000..e1b1a74
--- /dev/null
+++ b/themes/icons.lua
@@ -0,0 +1,55 @@
+-- Icons definitions for custom widgets
+local beautiful = require("beautiful")
+local beautiful_assets = require("beautiful").theme_assets
+local gears = require("gears")
+function beautiful.recolor_icon_group(tbl,regex,color)
+ for k,v in pairs(tbl) do
+ if k:match(regex) then
+ beautiful[k] = gears.color.recolor_image(v,color)
+ end
+ end
+end
+-- Define dir to icons
+global.themes_dir = global.themes_dir or (os.getenv("HOME").."/.config/awesome/themes/")
+beautiful.name = beautiful.name or "default"
+beautiful.icon_dir = beautiful.icon_dir or global.themes_dir..beautiful.name.."/icons/"
+print(beautiful.icon_dir)
+-- Recolor icons
+beautiful_assets.recolor_titlebar(beautiful,beautiful.fg_normal,"normal")
+beautiful_assets.recolor_titlebar(beautiful,beautiful.fg_focus,"focus")
+beautiful_assets.recolor_layout(beautiful,beautiful.fg_normal)
+local temp = {}
+-- Powermenu icons
+temp.powercontrol_icon_shutdown = beautiful.icon_dir.."shutdown.svg"
+temp.powercontrol_icon_suspend = beautiful.icon_dir.."suspend.svg"
+temp.powercontrol_icon_lock = beautiful.icon_dir.."lock.svg"
+beautiful.recolor_icon_group(temp,"^powercontrol_.+",beautiful.fg_normal)
+
+
+-- Volume icons
+temp.volume_icon_high = beautiful.icon_dir.."volume-high.svg"
+temp.volume_icon_medium = beautiful.icon_dir.."volume-medium.svg"
+temp.volume_icon_low = beautiful.icon_dir.."volume-low.svg"
+temp.volume_icon_muted = beautiful.icon_dir.."volume-muted.svg"
+beautiful.recolor_icon_group(temp,"^volume_.+",beautiful.fg_normal)
+
+-- Battery icons
+temp.battery_caution_charging_symbolic = beautiful.icon_dir.."battery-caution-charging-symbolic.svg"
+temp.battery_caution_symbolic = beautiful.icon_dir.."battery-caution-symbolic.svg"
+temp.battery_empty_charging_symbolic = beautiful.icon_dir.."battery-empty-charging-symbolic.svg"
+temp.battery_empty_symbolic = beautiful.icon_dir.."battery-empty-symbolic.svg"
+temp.battery_full_charged_symbolic = beautiful.icon_dir.."battery-full-charged-symbolic.svg"
+temp.battery_full_charging_symbolic = beautiful.icon_dir.."battery-full-charging-symbolic.svg"
+temp.battery_full_symbolic = beautiful.icon_dir.."battery-full-symbolic.svg"
+temp.battery_good_charging_symbolic = beautiful.icon_dir.."battery-good-charging-symbolic.svg"
+temp.battery_good_symbolic = beautiful.icon_dir.."battery-good-symbolic.svg"
+temp.battery_low_charging_symbolic = beautiful.icon_dir.."battery-low-charging-symbolic.svg"
+temp.battery_low_symbolic = beautiful.icon_dir.."battery-low-symbolic.svg"
+temp.battery_missing_symbolic = beautiful.icon_dir.."battery-missing-symbolic.svg"
+beautiful.recolor_icon_group(temp,"^battery_.+",beautiful.fg_normal)
+
+-- Widget icons
+beautiful.wallpapers_icon = gears.color.recolor_image(beautiful.icon_dir.."wallpaper.svg",beautiful.fg_normal)
+beautiful.mailbox_icon = gears.color.recolor_image(beautiful.icon_dir.."mail.svg",beautiful.fg_normal)
+
+
diff --git a/themes/redmond98/assets/redmond98borders.svg b/themes/redmond98/assets/redmond98borders.svg
deleted file mode 100644
index 0d8530d..0000000
--- a/themes/redmond98/assets/redmond98borders.svg
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
diff --git a/themes/redmond98/assets/win98bordersv1.svg b/themes/redmond98/assets/win98bordersv1.svg
deleted file mode 100644
index 57d674b..0000000
--- a/themes/redmond98/assets/win98bordersv1.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
diff --git a/themes/redmond98/assets/win98bordersv1layer2.svg b/themes/redmond98/assets/win98bordersv1layer2.svg
deleted file mode 100644
index 315b4a1..0000000
--- a/themes/redmond98/assets/win98bordersv1layer2.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
diff --git a/themes/redmond98/icons/battery-caution-charging-symbolic.svg b/themes/redmond98/icons/battery-caution-charging-symbolic.svg
deleted file mode 100644
index 56fe444..0000000
--- a/themes/redmond98/icons/battery-caution-charging-symbolic.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/themes/redmond98/icons/battery-caution-symbolic.svg b/themes/redmond98/icons/battery-caution-symbolic.svg
deleted file mode 100644
index 3fb7d4a..0000000
--- a/themes/redmond98/icons/battery-caution-symbolic.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/themes/redmond98/icons/battery-empty-charging-symbolic.svg b/themes/redmond98/icons/battery-empty-charging-symbolic.svg
deleted file mode 100644
index e3e8620..0000000
--- a/themes/redmond98/icons/battery-empty-charging-symbolic.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/themes/redmond98/icons/battery-empty-symbolic.svg b/themes/redmond98/icons/battery-empty-symbolic.svg
deleted file mode 100644
index 710c02b..0000000
--- a/themes/redmond98/icons/battery-empty-symbolic.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-
diff --git a/themes/redmond98/icons/battery-full-charged-symbolic.svg b/themes/redmond98/icons/battery-full-charged-symbolic.svg
deleted file mode 100644
index ae88a8c..0000000
--- a/themes/redmond98/icons/battery-full-charged-symbolic.svg
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-full-charging-symbolic.svg b/themes/redmond98/icons/battery-full-charging-symbolic.svg
deleted file mode 100644
index 2db325e..0000000
--- a/themes/redmond98/icons/battery-full-charging-symbolic.svg
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-full-symbolic.svg b/themes/redmond98/icons/battery-full-symbolic.svg
deleted file mode 100644
index 7daa418..0000000
--- a/themes/redmond98/icons/battery-full-symbolic.svg
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-good-charging-symbolic.svg b/themes/redmond98/icons/battery-good-charging-symbolic.svg
deleted file mode 100644
index 0b54f56..0000000
--- a/themes/redmond98/icons/battery-good-charging-symbolic.svg
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-good-symbolic.svg b/themes/redmond98/icons/battery-good-symbolic.svg
deleted file mode 100644
index b55a8e0..0000000
--- a/themes/redmond98/icons/battery-good-symbolic.svg
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-low-charging-symbolic.svg b/themes/redmond98/icons/battery-low-charging-symbolic.svg
deleted file mode 100644
index 56fb9cc..0000000
--- a/themes/redmond98/icons/battery-low-charging-symbolic.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-low-symbolic.svg b/themes/redmond98/icons/battery-low-symbolic.svg
deleted file mode 100644
index ab50fc2..0000000
--- a/themes/redmond98/icons/battery-low-symbolic.svg
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/battery-missing-symbolic.svg b/themes/redmond98/icons/battery-missing-symbolic.svg
deleted file mode 100644
index f96c4b2..0000000
--- a/themes/redmond98/icons/battery-missing-symbolic.svg
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
diff --git a/themes/redmond98/icons/lock.svg b/themes/redmond98/icons/lock.svg
deleted file mode 100644
index 974b65c..0000000
--- a/themes/redmond98/icons/lock.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/themes/redmond98/icons/shutdown.svg b/themes/redmond98/icons/shutdown.svg
deleted file mode 100644
index affd2a5..0000000
--- a/themes/redmond98/icons/shutdown.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/themes/redmond98/icons/suspend.svg b/themes/redmond98/icons/suspend.svg
deleted file mode 100644
index d64205d..0000000
--- a/themes/redmond98/icons/suspend.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/themes/redmond98/icons/volume-high.svg b/themes/redmond98/icons/volume-high.svg
deleted file mode 100644
index 486ec0b..0000000
--- a/themes/redmond98/icons/volume-high.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/themes/redmond98/icons/volume-low.svg b/themes/redmond98/icons/volume-low.svg
deleted file mode 100644
index 824a3f6..0000000
--- a/themes/redmond98/icons/volume-low.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
diff --git a/themes/redmond98/icons/volume-medium.svg b/themes/redmond98/icons/volume-medium.svg
deleted file mode 100644
index 5e6dd1f..0000000
--- a/themes/redmond98/icons/volume-medium.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
diff --git a/themes/redmond98/icons/volume-muted.svg b/themes/redmond98/icons/volume-muted.svg
deleted file mode 100644
index bf8f17a..0000000
--- a/themes/redmond98/icons/volume-muted.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-
diff --git a/themes/redmond98/layouts/cornerne.png b/themes/redmond98/layouts/cornerne.png
deleted file mode 100644
index c85bd56..0000000
Binary files a/themes/redmond98/layouts/cornerne.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornernew.png b/themes/redmond98/layouts/cornernew.png
deleted file mode 100644
index c3fd986..0000000
Binary files a/themes/redmond98/layouts/cornernew.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornernw.png b/themes/redmond98/layouts/cornernw.png
deleted file mode 100644
index dfe78b3..0000000
Binary files a/themes/redmond98/layouts/cornernw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornernww.png b/themes/redmond98/layouts/cornernww.png
deleted file mode 100644
index f489010..0000000
Binary files a/themes/redmond98/layouts/cornernww.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornerse.png b/themes/redmond98/layouts/cornerse.png
deleted file mode 100644
index 023ae79..0000000
Binary files a/themes/redmond98/layouts/cornerse.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornersew.png b/themes/redmond98/layouts/cornersew.png
deleted file mode 100644
index f7cfa1c..0000000
Binary files a/themes/redmond98/layouts/cornersew.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornersw.png b/themes/redmond98/layouts/cornersw.png
deleted file mode 100644
index c1453c9..0000000
Binary files a/themes/redmond98/layouts/cornersw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/cornersww.png b/themes/redmond98/layouts/cornersww.png
deleted file mode 100644
index a65a043..0000000
Binary files a/themes/redmond98/layouts/cornersww.png and /dev/null differ
diff --git a/themes/redmond98/layouts/dwindle.png b/themes/redmond98/layouts/dwindle.png
deleted file mode 100644
index 9902d22..0000000
Binary files a/themes/redmond98/layouts/dwindle.png and /dev/null differ
diff --git a/themes/redmond98/layouts/dwindlew.png b/themes/redmond98/layouts/dwindlew.png
deleted file mode 100644
index 9199049..0000000
Binary files a/themes/redmond98/layouts/dwindlew.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fairh.png b/themes/redmond98/layouts/fairh.png
deleted file mode 100644
index d41deea..0000000
Binary files a/themes/redmond98/layouts/fairh.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fairhw.png b/themes/redmond98/layouts/fairhw.png
deleted file mode 100644
index bb50e3a..0000000
Binary files a/themes/redmond98/layouts/fairhw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fairv.png b/themes/redmond98/layouts/fairv.png
deleted file mode 100644
index f5f0288..0000000
Binary files a/themes/redmond98/layouts/fairv.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fairvw.png b/themes/redmond98/layouts/fairvw.png
deleted file mode 100644
index 4f4ed52..0000000
Binary files a/themes/redmond98/layouts/fairvw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/floating.png b/themes/redmond98/layouts/floating.png
deleted file mode 100644
index b8061a0..0000000
Binary files a/themes/redmond98/layouts/floating.png and /dev/null differ
diff --git a/themes/redmond98/layouts/floatingw.png b/themes/redmond98/layouts/floatingw.png
deleted file mode 100644
index 4815894..0000000
Binary files a/themes/redmond98/layouts/floatingw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fullscreen.png b/themes/redmond98/layouts/fullscreen.png
deleted file mode 100644
index d02f6fc..0000000
Binary files a/themes/redmond98/layouts/fullscreen.png and /dev/null differ
diff --git a/themes/redmond98/layouts/fullscreenw.png b/themes/redmond98/layouts/fullscreenw.png
deleted file mode 100644
index 5c35bfa..0000000
Binary files a/themes/redmond98/layouts/fullscreenw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/magnifier.png b/themes/redmond98/layouts/magnifier.png
deleted file mode 100644
index 2925414..0000000
Binary files a/themes/redmond98/layouts/magnifier.png and /dev/null differ
diff --git a/themes/redmond98/layouts/magnifierw.png b/themes/redmond98/layouts/magnifierw.png
deleted file mode 100644
index 6209556..0000000
Binary files a/themes/redmond98/layouts/magnifierw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/max.png b/themes/redmond98/layouts/max.png
deleted file mode 100644
index 8d20844..0000000
Binary files a/themes/redmond98/layouts/max.png and /dev/null differ
diff --git a/themes/redmond98/layouts/maxw.png b/themes/redmond98/layouts/maxw.png
deleted file mode 100644
index 85f5ce3..0000000
Binary files a/themes/redmond98/layouts/maxw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/spiral.png b/themes/redmond98/layouts/spiral.png
deleted file mode 100644
index d9434be..0000000
Binary files a/themes/redmond98/layouts/spiral.png and /dev/null differ
diff --git a/themes/redmond98/layouts/spiralw.png b/themes/redmond98/layouts/spiralw.png
deleted file mode 100644
index b78dd86..0000000
Binary files a/themes/redmond98/layouts/spiralw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tile.png b/themes/redmond98/layouts/tile.png
deleted file mode 100644
index 3ede21e..0000000
Binary files a/themes/redmond98/layouts/tile.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tilebottom.png b/themes/redmond98/layouts/tilebottom.png
deleted file mode 100644
index 6f8c257..0000000
Binary files a/themes/redmond98/layouts/tilebottom.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tilebottomw.png b/themes/redmond98/layouts/tilebottomw.png
deleted file mode 100644
index a1de7b2..0000000
Binary files a/themes/redmond98/layouts/tilebottomw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tileleft.png b/themes/redmond98/layouts/tileleft.png
deleted file mode 100644
index 31d6870..0000000
Binary files a/themes/redmond98/layouts/tileleft.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tileleftw.png b/themes/redmond98/layouts/tileleftw.png
deleted file mode 100644
index cf14c25..0000000
Binary files a/themes/redmond98/layouts/tileleftw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tiletop.png b/themes/redmond98/layouts/tiletop.png
deleted file mode 100644
index 98cade2..0000000
Binary files a/themes/redmond98/layouts/tiletop.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tiletopw.png b/themes/redmond98/layouts/tiletopw.png
deleted file mode 100644
index d1d0872..0000000
Binary files a/themes/redmond98/layouts/tiletopw.png and /dev/null differ
diff --git a/themes/redmond98/layouts/tilew.png b/themes/redmond98/layouts/tilew.png
deleted file mode 100644
index fde2ca4..0000000
Binary files a/themes/redmond98/layouts/tilew.png and /dev/null differ
diff --git a/themes/redmond98/submenu.png b/themes/redmond98/submenu.png
deleted file mode 100644
index b2778e2..0000000
Binary files a/themes/redmond98/submenu.png and /dev/null differ
diff --git a/themes/redmond98/taglist/squarefw.png b/themes/redmond98/taglist/squarefw.png
deleted file mode 100644
index 2a86430..0000000
Binary files a/themes/redmond98/taglist/squarefw.png and /dev/null differ
diff --git a/themes/redmond98/taglist/squarew.png b/themes/redmond98/taglist/squarew.png
deleted file mode 100644
index 913f2ca..0000000
Binary files a/themes/redmond98/taglist/squarew.png and /dev/null differ
diff --git a/themes/redmond98/theme.lua b/themes/redmond98/theme.lua
deleted file mode 100644
index fcbb7d2..0000000
--- a/themes/redmond98/theme.lua
+++ /dev/null
@@ -1,264 +0,0 @@
-local theme_assets = require("beautiful.theme_assets")
-local xresources = require("beautiful.xresources")
-local dpi = xresources.apply_dpi
-
-local gears = require("gears")
-local wibox = require("wibox")
-local gfs = require("gears.filesystem")
-local themes_path = os.getenv("HOME").."/.config/awesome/themes/"
-local theme_name = "redmond98"
-
-local theme = {}
-
-theme.font = "Ubuntu Regular 9"
-theme.unitybar_width = dpi(55)
-
-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_height = 45
-theme.menu_button_inner_margin = 2
-theme.bg_normal = "#c2c3c3"
-theme.bg_focus = "#e2e3e3"
-theme.bg_urgent = "#e2e3e3"
-theme.bg_minimize = "#d2d3d3"
-theme.bg_systray = theme.bg_normal
-
-theme.fg_normal = "#121212"
-theme.fg_focus = "#121212"
-theme.fg_urgent = "#121212"
-theme.fg_minimize = "#121212"
-
-theme.useless_gap = dpi(10)
-theme.border_width = dpi(1)
-theme.border_normal = theme.bg_normal
-theme.border_focus = theme.bg_focus
-theme.border_marked = theme.bg_marked
-
--- There are other variable sets
--- overriding the default one when
--- defined, the sets are:
--- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
--- tasklist_[bg|fg]_[focus|urgent]
--- titlebar_[bg|fg]_[normal|focus]
--- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
--- 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"
-theme.hotkeys_border_color = "#262626"
-theme.hotkeys_opacity = 0.2
-theme.bgimage = function(context, cr, width, height)
- local surface = gears.surface(
- themes_path..theme_name.."/assets/redmond98borders.svg"
- )
- local bg_width,bg_height = gears.surface.get_size(surface)
- cr:scale(width / bg_width, height / bg_height)
- cr:set_source_surface(surface)
- cr:paint()
-end
-theme.button_widget = function(style)
- return {
- {
- id = "widget_container",
- widget = wibox.container.margin,
- margins = style.button_inner_margin,
- },
- bgimage = theme.bgimage,
- id = "widget_background",
- widget = wibox.container.background,
- shape = style.button_shape,
- shape_border_width = style.button_shape_border_width,
- shape_border_color = style.button_shape_border_color,
- fg = style.button_fg_normal
- }
-end
-theme.icon_widget = function(style)
- return {
- {
- id = "widget_container",
- widget = wibox.container.margin,
- margins = style.icon_inner_margin,
- },
- bgimage = theme.bgimage,
- id = "widget_background",
- widget = wibox.container.background,
- shape = style.icon_shape,
- shape_border_width = style.icon_shape_border_width,
- shape_border_color = style.icon_shape_border_color,
- fg = style.icon_fg_normal
- }
-end
-theme.container_widget = function(style)
- return {
- {
- id = "widget_container",
- widget = wibox.container.margin,
- margins = style.container_inner_margin,
- },
- bgimage = theme.bgimage,
- 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
-theme.inputbox_widget = function(style,prompt)
- return {
- {
- {
- id = "widget_prompt",
- markup = prompt or "",
- widget = wibox.widget.textbox,
- fg = style.inputbox_fg_normal
- },
- id = "widget_container",
- widget = wibox.container.margin,
- margins = style.inputbox_inner_margin,
- },
- bgimage = theme.bgimage,
- id = "widget_background",
- widget = wibox.container.background,
- shape = style.inputbox_shape,
- shape_border_width = style.inputbox_shape_border_width,
- shape_border_color = style.inputbox_shape_border_color
- }
-end
-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
-
--- Generate taglist squares:
-local taglist_square_size = dpi(4)
-theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
- taglist_square_size, theme.fg_normal
-)
-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]
-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 = themes_path..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"
-
--- Define the image to load
-theme.titlebar_close_button_normal = themes_path..theme_name.."/titlebar/close_normal.png"
-theme.titlebar_close_button_focus = themes_path..theme_name.."/titlebar/close_focus.png"
-
-theme.titlebar_minimize_button_normal = themes_path..theme_name.."/titlebar/minimize_normal.png"
-theme.titlebar_minimize_button_focus = themes_path..theme_name.."/titlebar/minimize_focus.png"
-
-theme.titlebar_ontop_button_normal_inactive = themes_path..theme_name.."/titlebar/ontop_normal_inactive.png"
-theme.titlebar_ontop_button_focus_inactive = themes_path..theme_name.."/titlebar/ontop_focus_inactive.png"
-theme.titlebar_ontop_button_normal_active = themes_path..theme_name.."/titlebar/ontop_normal_active.png"
-theme.titlebar_ontop_button_focus_active = themes_path..theme_name.."/titlebar/ontop_focus_active.png"
-
-theme.titlebar_sticky_button_normal_inactive = themes_path..theme_name.."/titlebar/sticky_normal_inactive.png"
-theme.titlebar_sticky_button_focus_inactive = themes_path..theme_name.."/titlebar/sticky_focus_inactive.png"
-theme.titlebar_sticky_button_normal_active = themes_path..theme_name.."/titlebar/sticky_normal_active.png"
-theme.titlebar_sticky_button_focus_active = themes_path..theme_name.."/titlebar/sticky_focus_active.png"
-
-theme.titlebar_floating_button_normal_inactive = themes_path..theme_name.."/titlebar/floating_normal_inactive.png"
-theme.titlebar_floating_button_focus_inactive = themes_path..theme_name.."/titlebar/floating_focus_inactive.png"
-theme.titlebar_floating_button_normal_active = themes_path..theme_name.."/titlebar/floating_normal_active.png"
-theme.titlebar_floating_button_focus_active = themes_path..theme_name.."/titlebar/floating_focus_active.png"
-
-theme.titlebar_maximized_button_normal_inactive = themes_path..theme_name.."/titlebar/maximized_normal_inactive.png"
-theme.titlebar_maximized_button_focus_inactive = themes_path..theme_name.."/titlebar/maximized_focus_inactive.png"
-theme.titlebar_maximized_button_normal_active = themes_path..theme_name.."/titlebar/maximized_normal_active.png"
-theme.titlebar_maximized_button_focus_active = themes_path..theme_name.."/titlebar/maximized_focus_active.png"
-
-theme.wallpaper = themes_path..theme_name.."/background.png"
-
--- You can use your own layout icons like this:
-theme.layout_fairh = themes_path..theme_name.."/layouts/fairhw.png"
-theme.layout_fairv = themes_path..theme_name.."/layouts/fairvw.png"
-theme.layout_floating = themes_path..theme_name.."/layouts/floatingw.png"
-theme.layout_magnifier = themes_path..theme_name.."/layouts/magnifierw.png"
-theme.layout_max = themes_path..theme_name.."/layouts/maxw.png"
-theme.layout_fullscreen = themes_path..theme_name.."/layouts/fullscreenw.png"
-theme.layout_tilebottom = themes_path..theme_name.."/layouts/tilebottomw.png"
-theme.layout_tileleft = themes_path..theme_name.."/layouts/tileleftw.png"
-theme.layout_tile = themes_path..theme_name.."/layouts/tilew.png"
-theme.layout_tiletop = themes_path..theme_name.."/layouts/tiletopw.png"
-theme.layout_spiral = themes_path..theme_name.."/layouts/spiralw.png"
-theme.layout_dwindle = themes_path..theme_name.."/layouts/dwindlew.png"
-theme.layout_cornernw = themes_path..theme_name.."/layouts/cornernww.png"
-theme.layout_cornerne = themes_path..theme_name.."/layouts/cornernew.png"
-theme.layout_cornersw = themes_path..theme_name.."/layouts/cornersww.png"
-theme.layout_cornerse = themes_path..theme_name.."/layouts/cornersew.png"
-
--- 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"
-
--- Recolor icons
-theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
-theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
-theme_assets.recolor_layout(theme,theme.fg_normal)
-
--- Powermenu icons
-theme.powercontrol_icon_shutdown = themes_path..theme_name.."/icons/shutdown.svg"
-theme.powercontrol_icon_suspend = themes_path..theme_name.."/icons/suspend.svg"
-theme.powercontrol_icon_lock = themes_path..theme_name.."/icons/lock.svg"
-
--- Volume icons
-theme.volume_icon_high = themes_path..theme_name.."/icons/volume-high.svg"
-theme.volume_icon_medium = themes_path..theme_name.."/icons/volume-medium.svg"
-theme.volume_icon_low = themes_path..theme_name.."/icons/volume-low.svg"
-theme.volume_icon_muted = themes_path..theme_name.."/icons/volume-muted.svg"
-
--- Battery icons
-theme.battery_caution_charging_symbolic = themes_path..theme_name.."/icons/battery-caution-charging-symbolic.svg"
-theme.battery_caution_symbolic = themes_path..theme_name.."/icons/battery-caution-symbolic.svg"
-theme.battery_empty_charging_symbolic = themes_path..theme_name.."/icons/battery-empty-charging-symbolic.svg"
-theme.battery_empty_symbolic = themes_path..theme_name.."/icons/battery-empty-symbolic.svg"
-theme.battery_full_charged_symbolic = themes_path..theme_name.."/icons/battery-full-charged-symbolic.svg"
-theme.battery_full_charging_symbolic = themes_path..theme_name.."/icons/battery-full-charging-symbolic.svg"
-theme.battery_full_symbolic = themes_path..theme_name.."/icons/battery-full-symbolic.svg"
-theme.battery_good_charging_symbolic = themes_path..theme_name.."/icons/battery-good-charging-symbolic.svg"
-theme.battery_good_symbolic = themes_path..theme_name.."/icons/battery-good-symbolic.svg"
-theme.battery_low_charging_symbolic = themes_path..theme_name.."/icons/battery-low-charging-symbolic.svg"
-theme.battery_low_symbolic = themes_path..theme_name.."/icons/battery-low-symbolic.svg"
-theme.battery_missing_symbolic = themes_path..theme_name.."/icons/battery-missing-symbolic.svg"
-return theme
-
--- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
diff --git a/themes/redmond98/titlebar/close_focus.png b/themes/redmond98/titlebar/close_focus.png
deleted file mode 100644
index 01ef825..0000000
Binary files a/themes/redmond98/titlebar/close_focus.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/close_normal.png b/themes/redmond98/titlebar/close_normal.png
deleted file mode 100644
index 5448ed8..0000000
Binary files a/themes/redmond98/titlebar/close_normal.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/floating_focus_active.png b/themes/redmond98/titlebar/floating_focus_active.png
deleted file mode 100644
index 82dcc7c..0000000
Binary files a/themes/redmond98/titlebar/floating_focus_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/floating_focus_inactive.png b/themes/redmond98/titlebar/floating_focus_inactive.png
deleted file mode 100644
index c19ba80..0000000
Binary files a/themes/redmond98/titlebar/floating_focus_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/floating_normal_active.png b/themes/redmond98/titlebar/floating_normal_active.png
deleted file mode 100644
index 62342d1..0000000
Binary files a/themes/redmond98/titlebar/floating_normal_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/floating_normal_inactive.png b/themes/redmond98/titlebar/floating_normal_inactive.png
deleted file mode 100644
index e2bbdfa..0000000
Binary files a/themes/redmond98/titlebar/floating_normal_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/maximized_focus_active.png b/themes/redmond98/titlebar/maximized_focus_active.png
deleted file mode 100644
index d7dffd7..0000000
Binary files a/themes/redmond98/titlebar/maximized_focus_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/maximized_focus_inactive.png b/themes/redmond98/titlebar/maximized_focus_inactive.png
deleted file mode 100644
index 844389f..0000000
Binary files a/themes/redmond98/titlebar/maximized_focus_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/maximized_normal_active.png b/themes/redmond98/titlebar/maximized_normal_active.png
deleted file mode 100644
index a705f81..0000000
Binary files a/themes/redmond98/titlebar/maximized_normal_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/maximized_normal_inactive.png b/themes/redmond98/titlebar/maximized_normal_inactive.png
deleted file mode 100644
index 4c1ab1f..0000000
Binary files a/themes/redmond98/titlebar/maximized_normal_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/minimize_focus.png b/themes/redmond98/titlebar/minimize_focus.png
deleted file mode 100644
index caaceb2..0000000
Binary files a/themes/redmond98/titlebar/minimize_focus.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/minimize_normal.png b/themes/redmond98/titlebar/minimize_normal.png
deleted file mode 100644
index 36621d0..0000000
Binary files a/themes/redmond98/titlebar/minimize_normal.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/ontop_focus_active.png b/themes/redmond98/titlebar/ontop_focus_active.png
deleted file mode 100644
index 312c00b..0000000
Binary files a/themes/redmond98/titlebar/ontop_focus_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/ontop_focus_inactive.png b/themes/redmond98/titlebar/ontop_focus_inactive.png
deleted file mode 100644
index a48e1c5..0000000
Binary files a/themes/redmond98/titlebar/ontop_focus_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/ontop_normal_active.png b/themes/redmond98/titlebar/ontop_normal_active.png
deleted file mode 100644
index 117a203..0000000
Binary files a/themes/redmond98/titlebar/ontop_normal_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/ontop_normal_inactive.png b/themes/redmond98/titlebar/ontop_normal_inactive.png
deleted file mode 100644
index d3a10c8..0000000
Binary files a/themes/redmond98/titlebar/ontop_normal_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/sticky_focus_active.png b/themes/redmond98/titlebar/sticky_focus_active.png
deleted file mode 100644
index 814499b..0000000
Binary files a/themes/redmond98/titlebar/sticky_focus_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/sticky_focus_inactive.png b/themes/redmond98/titlebar/sticky_focus_inactive.png
deleted file mode 100644
index 21b000d..0000000
Binary files a/themes/redmond98/titlebar/sticky_focus_inactive.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/sticky_normal_active.png b/themes/redmond98/titlebar/sticky_normal_active.png
deleted file mode 100644
index bdb5595..0000000
Binary files a/themes/redmond98/titlebar/sticky_normal_active.png and /dev/null differ
diff --git a/themes/redmond98/titlebar/sticky_normal_inactive.png b/themes/redmond98/titlebar/sticky_normal_inactive.png
deleted file mode 100644
index a96b9b1..0000000
Binary files a/themes/redmond98/titlebar/sticky_normal_inactive.png and /dev/null differ
diff --git a/themes/unity2/icons/README.md b/themes/unity2/icons/README.md
new file mode 100644
index 0000000..b43f74a
--- /dev/null
+++ b/themes/unity2/icons/README.md
@@ -0,0 +1,5 @@
+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)
+
+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/unity2/icons/mail.svg b/themes/unity2/icons/mail.svg
new file mode 100644
index 0000000..59d2196
--- /dev/null
+++ b/themes/unity2/icons/mail.svg
@@ -0,0 +1,167 @@
+
+
+
+
diff --git a/themes/unity2/icons/wallpaper.svg b/themes/unity2/icons/wallpaper.svg
new file mode 100644
index 0000000..67ede24
--- /dev/null
+++ b/themes/unity2/icons/wallpaper.svg
@@ -0,0 +1,127 @@
+
+
+
+
diff --git a/themes/unity2/theme.lua b/themes/unity2/theme.lua
index cfb63ef..fc21716 100644
--- a/themes/unity2/theme.lua
+++ b/themes/unity2/theme.lua
@@ -2,15 +2,12 @@ local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
-local gfs = require("gears.filesystem")
-local themes_path = os.getenv("HOME").."/.config/awesome/themes/"
-local theme_name = "unity2"
-
local theme = {}
+theme.name = "unity2"
+
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"
@@ -91,7 +88,7 @@ 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 = themes_path..theme_name.."/submenu.png"
+theme.menu_submenu_icon = global.themes_dir..theme.name.."/submenu.png"
theme.menu_height = dpi(18)
theme.menu_width = dpi(140)
@@ -101,51 +98,51 @@ theme.menu_width = dpi(140)
--theme.bg_widget = "#cc0000"
-- Define the image to load
-theme.titlebar_close_button_normal = themes_path..theme_name.."/titlebar/close_normal.png"
-theme.titlebar_close_button_focus = themes_path..theme_name.."/titlebar/close_focus.png"
+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"
-theme.titlebar_minimize_button_normal = themes_path..theme_name.."/titlebar/minimize_normal.png"
-theme.titlebar_minimize_button_focus = themes_path..theme_name.."/titlebar/minimize_focus.png"
+theme.titlebar_minimize_button_normal = global.themes_dir..theme.name.."/titlebar/minimize_normal.png"
+theme.titlebar_minimize_button_focus = global.themes_dir..theme.name.."/titlebar/minimize_focus.png"
-theme.titlebar_ontop_button_normal_inactive = themes_path..theme_name.."/titlebar/ontop_normal_inactive.png"
-theme.titlebar_ontop_button_focus_inactive = themes_path..theme_name.."/titlebar/ontop_focus_inactive.png"
-theme.titlebar_ontop_button_normal_active = themes_path..theme_name.."/titlebar/ontop_normal_active.png"
-theme.titlebar_ontop_button_focus_active = themes_path..theme_name.."/titlebar/ontop_focus_active.png"
+theme.titlebar_ontop_button_normal_inactive = global.themes_dir..theme.name.."/titlebar/ontop_normal_inactive.png"
+theme.titlebar_ontop_button_focus_inactive = global.themes_dir..theme.name.."/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_active = global.themes_dir..theme.name.."/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_active = global.themes_dir..theme.name.."/titlebar/ontop_focus_active.png"
-theme.titlebar_sticky_button_normal_inactive = themes_path..theme_name.."/titlebar/sticky_normal_inactive.png"
-theme.titlebar_sticky_button_focus_inactive = themes_path..theme_name.."/titlebar/sticky_focus_inactive.png"
-theme.titlebar_sticky_button_normal_active = themes_path..theme_name.."/titlebar/sticky_normal_active.png"
-theme.titlebar_sticky_button_focus_active = themes_path..theme_name.."/titlebar/sticky_focus_active.png"
+theme.titlebar_sticky_button_normal_inactive = global.themes_dir..theme.name.."/titlebar/sticky_normal_inactive.png"
+theme.titlebar_sticky_button_focus_inactive = global.themes_dir..theme.name.."/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_active = global.themes_dir..theme.name.."/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_active = global.themes_dir..theme.name.."/titlebar/sticky_focus_active.png"
-theme.titlebar_floating_button_normal_inactive = themes_path..theme_name.."/titlebar/floating_normal_inactive.png"
-theme.titlebar_floating_button_focus_inactive = themes_path..theme_name.."/titlebar/floating_focus_inactive.png"
-theme.titlebar_floating_button_normal_active = themes_path..theme_name.."/titlebar/floating_normal_active.png"
-theme.titlebar_floating_button_focus_active = themes_path..theme_name.."/titlebar/floating_focus_active.png"
+theme.titlebar_floating_button_normal_inactive = global.themes_dir..theme.name.."/titlebar/floating_normal_inactive.png"
+theme.titlebar_floating_button_focus_inactive = global.themes_dir..theme.name.."/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_active = global.themes_dir..theme.name.."/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_active = global.themes_dir..theme.name.."/titlebar/floating_focus_active.png"
-theme.titlebar_maximized_button_normal_inactive = themes_path..theme_name.."/titlebar/maximized_normal_inactive.png"
-theme.titlebar_maximized_button_focus_inactive = themes_path..theme_name.."/titlebar/maximized_focus_inactive.png"
-theme.titlebar_maximized_button_normal_active = themes_path..theme_name.."/titlebar/maximized_normal_active.png"
-theme.titlebar_maximized_button_focus_active = themes_path..theme_name.."/titlebar/maximized_focus_active.png"
+theme.titlebar_maximized_button_normal_inactive = global.themes_dir..theme.name.."/titlebar/maximized_normal_inactive.png"
+theme.titlebar_maximized_button_focus_inactive = global.themes_dir..theme.name.."/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_active = global.themes_dir..theme.name.."/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_active = global.themes_dir..theme.name.."/titlebar/maximized_focus_active.png"
-theme.wallpaper = themes_path..theme_name.."/background.png"
+theme.wallpaper = global.themes_dir..theme.name.."/background.png"
-- You can use your own layout icons like this:
-theme.layout_fairh = themes_path..theme_name.."/layouts/fairhw.png"
-theme.layout_fairv = themes_path..theme_name.."/layouts/fairvw.png"
-theme.layout_floating = themes_path..theme_name.."/layouts/floatingw.png"
-theme.layout_magnifier = themes_path..theme_name.."/layouts/magnifierw.png"
-theme.layout_max = themes_path..theme_name.."/layouts/maxw.png"
-theme.layout_fullscreen = themes_path..theme_name.."/layouts/fullscreenw.png"
-theme.layout_tilebottom = themes_path..theme_name.."/layouts/tilebottomw.png"
-theme.layout_tileleft = themes_path..theme_name.."/layouts/tileleftw.png"
-theme.layout_tile = themes_path..theme_name.."/layouts/tilew.png"
-theme.layout_tiletop = themes_path..theme_name.."/layouts/tiletopw.png"
-theme.layout_spiral = themes_path..theme_name.."/layouts/spiralw.png"
-theme.layout_dwindle = themes_path..theme_name.."/layouts/dwindlew.png"
-theme.layout_cornernw = themes_path..theme_name.."/layouts/cornernww.png"
-theme.layout_cornerne = themes_path..theme_name.."/layouts/cornernew.png"
-theme.layout_cornersw = themes_path..theme_name.."/layouts/cornersww.png"
-theme.layout_cornerse = themes_path..theme_name.."/layouts/cornersew.png"
+theme.layout_fairh = global.themes_dir..theme.name.."/layouts/fairhw.png"
+theme.layout_fairv = global.themes_dir..theme.name.."/layouts/fairvw.png"
+theme.layout_floating = global.themes_dir..theme.name.."/layouts/floatingw.png"
+theme.layout_magnifier = global.themes_dir..theme.name.."/layouts/magnifierw.png"
+theme.layout_max = global.themes_dir..theme.name.."/layouts/maxw.png"
+theme.layout_fullscreen = global.themes_dir..theme.name.."/layouts/fullscreenw.png"
+theme.layout_tilebottom = global.themes_dir..theme.name.."/layouts/tilebottomw.png"
+theme.layout_tileleft = global.themes_dir..theme.name.."/layouts/tileleftw.png"
+theme.layout_tile = global.themes_dir..theme.name.."/layouts/tilew.png"
+theme.layout_tiletop = global.themes_dir..theme.name.."/layouts/tiletopw.png"
+theme.layout_spiral = global.themes_dir..theme.name.."/layouts/spiralw.png"
+theme.layout_dwindle = global.themes_dir..theme.name.."/layouts/dwindlew.png"
+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"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
@@ -156,35 +153,6 @@ theme.awesome_icon = theme_assets.awesome_icon(
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "Adwaita"
--- Recolor icons
-theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
-theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
-theme_assets.recolor_layout(theme,theme.fg_normal)
-
--- Powermenu icons
-theme.powercontrol_icon_shutdown = themes_path..theme_name.."/icons/shutdown.svg"
-theme.powercontrol_icon_suspend = themes_path..theme_name.."/icons/suspend.svg"
-theme.powercontrol_icon_lock = themes_path..theme_name.."/icons/lock.svg"
-
--- Volume icons
-theme.volume_icon_high = themes_path..theme_name.."/icons/volume-high.svg"
-theme.volume_icon_medium = themes_path..theme_name.."/icons/volume-medium.svg"
-theme.volume_icon_low = themes_path..theme_name.."/icons/volume-low.svg"
-theme.volume_icon_muted = themes_path..theme_name.."/icons/volume-muted.svg"
-
--- Battery icons
-theme.battery_caution_charging_symbolic = themes_path..theme_name.."/icons/battery-caution-charging-symbolic.svg"
-theme.battery_caution_symbolic = themes_path..theme_name.."/icons/battery-caution-symbolic.svg"
-theme.battery_empty_charging_symbolic = themes_path..theme_name.."/icons/battery-empty-charging-symbolic.svg"
-theme.battery_empty_symbolic = themes_path..theme_name.."/icons/battery-empty-symbolic.svg"
-theme.battery_full_charged_symbolic = themes_path..theme_name.."/icons/battery-full-charged-symbolic.svg"
-theme.battery_full_charging_symbolic = themes_path..theme_name.."/icons/battery-full-charging-symbolic.svg"
-theme.battery_full_symbolic = themes_path..theme_name.."/icons/battery-full-symbolic.svg"
-theme.battery_good_charging_symbolic = themes_path..theme_name.."/icons/battery-good-charging-symbolic.svg"
-theme.battery_good_symbolic = themes_path..theme_name.."/icons/battery-good-symbolic.svg"
-theme.battery_low_charging_symbolic = themes_path..theme_name.."/icons/battery-low-charging-symbolic.svg"
-theme.battery_low_symbolic = themes_path..theme_name.."/icons/battery-low-symbolic.svg"
-theme.battery_missing_symbolic = themes_path..theme_name.."/icons/battery-missing-symbolic.svg"
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
diff --git a/widgets/battery.lua b/widgets/battery.lua
index 891e133..6f22842 100644
--- a/widgets/battery.lua
+++ b/widgets/battery.lua
@@ -6,14 +6,11 @@ local awmtk = require("awmtk")
return function(args)
local style = awmtk.style(awmtk.defaults, args.style or {},"battery_")
local device = args.device or "default"
- local power_command = args.command or "upower -d"
- local function get_icon(name)
- return style[name]
- end
+ local power_command = args.command or {"upower", "-d"}
local icon = style.icon({
{
widget = wibox.widget.imagebox,
- image = get_icon("battery_missing_symbolic"),
+ image = style["battery_missing_symbolic"],
id = "widget_icon",
resize = true
},
@@ -30,12 +27,11 @@ return function(args)
timeout = 10,
call_now = true,
callback = function()
- awful.spawn.easy_async_with_shell(power_command, function(out)
+ awful.spawn.easy_async(power_command, function(out)
local icon_name = out:match("icon%-name:%s+'(battery%-[^']+)'")
local value = out:match("percentage:%s+(%d+%%)")
icon:get_children_by_id("widget_icon")[1].image =
- gears.color.recolor_image(get_icon(icon_name:gsub("%-","_")),
- style.battery_icon_fg_normal)
+ style[icon_name:gsub("%-","_")]
if args.percentage and value then
icon:get_children_by_id("widget_text")[1].markup = value
end
diff --git a/widgets/mailbox/init.lua b/widgets/mailbox.lua
similarity index 92%
rename from widgets/mailbox/init.lua
rename to widgets/mailbox.lua
index 0ef3bbb..66f1f3a 100644
--- a/widgets/mailbox/init.lua
+++ b/widgets/mailbox.lua
@@ -7,14 +7,10 @@ local naughty = require("naughty")
local awmtk_status,awmtk = pcall(require,"awmtk")
local dbus_config = require("naughty.dbus")
local widget = {}
-local path_to_icons = os.getenv("HOME").."/.config/awesome/widgets/mailbox/"
local function worker(args)
- local style = {}
local args = args or {}
-- Set up style variables
- if awmtk_status then
- style = awmtk.style(awmtk.defaults,args.style,"mailbox_")
- end
+ style = awmtk.style(awmtk.defaults,args.style,"mailbox_")
style.mailbox_container_width = style.mailbox_container_width or 260
style.mailbox_button_height = style.mailbox_button_heihgt or 40
args.mail_limit = args.mail_limit or 8
@@ -47,8 +43,7 @@ local function worker(args)
-- Create a mailbox button
args.screen.notify_widget = style.icon (
{
- image = gears.color.recolor_image(path_to_icons.."Mail.png",
- style.mailbox_icon_fg_normal),
+ image = style["mailbox_icon"],
widget = wibox.widget.imagebox
},{},{
function()
diff --git a/widgets/mailbox/Mail.png b/widgets/mailbox/Mail.png
deleted file mode 100644
index d5f0ed9..0000000
Binary files a/widgets/mailbox/Mail.png and /dev/null differ
diff --git a/widgets/volume.lua b/widgets/volume.lua
index b0185a3..b905fbd 100644
--- a/widgets/volume.lua
+++ b/widgets/volume.lua
@@ -16,10 +16,6 @@ return function(args)
"Master",
"Headphone"
}
- for k,v in pairs(icons) do
- icons[k] = gears.color.recolor_image(v,
- style.volume_icon_fg_normal)
- end
local function get_icon(percent)
if percent >= 66 then
return icons.high
diff --git a/widgets/wallpapers/init.lua b/widgets/wallpapers.lua
similarity index 78%
rename from widgets/wallpapers/init.lua
rename to widgets/wallpapers.lua
index 0dffe5a..175579b 100644
--- a/widgets/wallpapers/init.lua
+++ b/widgets/wallpapers.lua
@@ -3,10 +3,9 @@ local beautiful = require("beautiful")
local gears = require("gears")
local spawn = require("awful.spawn")
local wibox = require("wibox")
-local naughty = require("naughty")
local awmtk = require("awmtk")
+local thumbnailer = require("thumbnail")
local widget = {}
-local path_to_icons = os.getenv("HOME").."/.config/awesome/widgets/wallpapers/"
local function ls(path)
local ls_data = io.popen("ls -1 "..path)
local output = {}
@@ -21,20 +20,22 @@ end
local function worker(args)
local args = args or {}
- if not args["screen"] then error("Screen not specified") end
- if not args["path"] then error("Path to wallpapers folder not specified") end
- args["configdir"] = args["configdir"] or os.getenv("HOME")
+ assert(type(args["screen"]) ~= "nil","Screen not specified")
+ assert(type(args["path"]) ~= "nil","Path to wallpapers folder not specified")
+ --add an extra slash to path if there is none
+ if not args["path"]:match("/$") then
+ args["path"] = args["path"].."/"
+ end
--create local style
- local style = {}
- style = awmtk.style(awmtk.defaults,args.style or {},"wallpapers_")
+ local style = awmtk.style(awmtk.defaults,args.style or {},"wallpapers_")
--set wallpaper
- local handler = io.open(args["configdir"].."/.wallpaper","r")
+ local handler = io.open(global.config_dir.."/.wallpaper","r")
if handler then
local wallpaper_path = handler:read("*a")
gears.wallpaper.maximized(wallpaper_path,args["screen"])
end
local function update_last_wallpaper(s)
- local handler = io.open(args["configdir"].."/.wallpaper","w")
+ local handler = io.open(global.config_dir.."/.wallpaper","w")
handler:write(s)
handler:close()
end
@@ -44,12 +45,14 @@ local function worker(args)
if not (v:match("%.jpg$") or v:match("%.png$")) then
image_list[k] = nil
end
- end
+ end
+ --generate thumbnails to save up memory
+ thumbnailer.generate(args["path"],args["path"]..".thumbnails",60)
--style variables
local button_bg = style.wallpapers_button_bg_focus
local function new_wallpaper_button(image,s)
local new_widget = style.button({
- image = args["path"]..image,
+ image = args["path"]..".thumbnails/"..image,
resize = true,
widget = wibox.widget.imagebox
},{
@@ -84,8 +87,7 @@ local function worker(args)
}
))
local clip_widget = style.icon({
- image = gears.color.recolor_image(path_to_icons.."wallpaper-icon.png",
- style.wallpapers_icon_fg_normal),
+ image = style["wallpapers_icon"],
resize = true,
widget = wibox.widget.imagebox
},{},{
diff --git a/widgets/wallpapers/wallpaper-icon.png b/widgets/wallpapers/wallpaper-icon.png
deleted file mode 100644
index d7c6f9b..0000000
Binary files a/widgets/wallpapers/wallpaper-icon.png and /dev/null differ