Compare commits

..

13 Commits

12 changed files with 336 additions and 318 deletions

View File

@ -1,10 +1,13 @@
# awesome
(SUNSETTED) this config is outdated and most of the themes/layouts will be ported to https://512mb.org/git/Yessiest/reno
my slightly overcomplicated awesomewm config
more content coming soon
# the awmtk2 branch
This is a development branch for testing out various new ideas for a rewrite of the original awmtk theme system. This branch is primarily just a way for me to work on things without breaking the original desktop.
# wow look at these screenshots
(may or may not represent the real thing)

View File

@ -54,6 +54,7 @@ awful.screen.connect_for_each_screen(function(s)
})
-- Add screen lock
require("widgets.lock")({screen = s, obscure = true})
require("widgets.dismal")({})
require("widgets.unitybar")(s,{
top_widgets = {
require("widgets.polytasklist")({

View File

@ -3,6 +3,8 @@ local gears = require("gears")
local beautiful = require("beautiful")
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
local dockapps = {}
local dockapp_size = 64
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
@ -54,6 +56,38 @@ awful.rules.rules = {
}, properties = { titlebars_enabled = true }
},
-- Rules for dockapps
{ rule_any = { name = {
"wmMand",
"wmwork",
"wmmisc",
"wmmon"
} },
properties = {
skip_taskbar = true,
dockable = true,
titlebars_enabled = false,
sticky = true,
below = true,
placement = awful.placement.top_right+awful.placement.no_offscreen,
callback = function(c)
while (#dockapps > 0) and (not dockapps[#dockapps].valid) do
table.remove(dockapps,#dockapps)
end
if #dockapps > 0 then
awful.placement.next_to(c,{
geometry = dockapps[#dockapps],
preferred_positions = "bottom",
preferred_anchors = "middle"
})
end
c.width = dockapps_size
c.height = dockapps_size
table.insert(dockapps,c)
end
},
},
-- Set Firefox to always map on the tag named "2" on screen 1.
-- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } },

View File

@ -2,10 +2,11 @@ local awful = require("awful")
local gears = require("gears")
-- {{{ Variable definitions
global = {}
global.debug = true
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/theme.lua"
global.theme = global.awesome_dir .. "themes/unity_simplified/theme.lua"
global.terminal = "xterm"
global.editor = os.getenv("EDITOR") or "vim"
global.editor_cmd = global.terminal .. " -e ".. global.editor

79
libs/awmtk2.lua Normal file
View File

@ -0,0 +1,79 @@
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local awmtk = {}
-- {{{ Utils
awmtk.create_class = function(name,overrides,style,parent_class)
return setmetatable(overrides,{
__index = function(self,k)
-- Per-widget overrides are top priority
if rawget(self,k) then
return rawget(self,k)
-- Style overrides are second in priority
elseif type(style[name]) == "table" and rawget(style[name],k) then
return rawget(style[name],k)
-- Parent class is fallback
elseif parent_class[k] then
return parent_class[k]
end
end
})
end
awmtk.create_style = function(style_name,parent,overrides)
local new_style = {}
for name,parent_class in pairs(parent) do
new_style[name] = awmtk.create_class(
name,
(overrides and overrides[name]) or {},
(beautiful[style_name] or {}),
parent_class
)
end
return new_style
end
-- }}}
-- {{{ Default style
-- Default style
awmtk.default = {
base = setmetatable({
-- { Backgrounds
-- custom background color for highlighting elements
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
-- }
-- { Borders
-- Borders for popups
shape_border_width = beautiful.shape_border_width or 0,
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
-- }
-- { Shapes
inner_margin = beautiful.inner_margin or 5,
rounding = beautiful.rounding or 0,
-- }
},{__index = beautiful})
}
-- Container subclass
awmtk.default.container = awmtk.create_class("container",{
},awmtk.default,awmtk.default.base)
-- Button subclass
awmtk.default.button = awmtk.create_class("button",{
inner_margin = 1
},awmtk.default,awmtk.default.base)
-- Icon subclass
awmtk.default.icon = awmtk.create_class("icon",{
inner_margin = 1
},awmtk.default,awmtk.default.base)
-- }}}
return awmtk

View File

@ -1,78 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="48"
height="48"
version="1.1"
id="svg20"
sodipodi:docname="fallback-application.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview22"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="7.148952"
inkscape:cx="16.505916"
inkscape:cy="25.458277"
inkscape:window-width="1856"
inkscape:window-height="1030"
inkscape:window-x="62"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg20"
showguides="false" />
<style
type="text/css"
id="style2"><![CDATA[
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="431" height="345" version="1.1">
<style type="text/css"><![CDATA[
#P1 {fill:url(#LO)}
rect {opacity:.40740739;fill:#000cff;width:.50507629;height:0}
]]></style>
<defs
id="defs9">
<linearGradient
id="LO"
gradientUnits="userSpaceOnUse"
x1="319.20822"
y1="235.14877"
x2="657.65295"
y2="269.49396">
<stop
style="stop-color:#e54c18"
offset="0"
id="stop4" />
<stop
style="stop-color:#fec350"
offset="1"
id="stop6" />
<defs>
<linearGradient id="LO" gradientUnits="userSpaceOnUse" x1="319.20822" y1="235.14877" x2="657.65295" y2="269.49396">
<stop style="stop-color:#e54c18" offset="0"/>
<stop style="stop-color:#fec350" offset="1"/>
</linearGradient>
</defs>
<g
transform="matrix(0.12,0,0,0.12,15.214064,0.30035442)"
id="g18">
<g
transform="translate(-413.2102,-40.70387)"
id="g14">
<path
d="M 342.0739,390.70219 453.17118,245.44599 338.79445,85.733013 412.30881,85.794093 503.44682,211.37696 367.17669,390.70219 Z M 559.52169,390.8049 469.01289,265.00644 606.41773,85.596933 h 24.48173 L 519.34879,231.53848 633.03722,390.8049 Z"
id="path11" />
<path
id="P1"
d="m 486.41071,143.82651 c -8.85103,0 -18.30729,0.68536 -26.82011,1.50253 15.16593,19.77999 27.75007,36.52951 42.23287,55.55188 -8.12876,-17.49293 -24.83564,-34.26759 -19.05997,-42.89467 5.71717,-8.53969 16.25107,-7.10232 17.05346,-7.10232 16.88849,0 33.14525,1.90739 48.34375,5.4375 l 3.5625,-4.90625 c -20.27081,-5.21826 -42.28849,-7.58867 -65.3125,-7.58867 z m 91.46875,15.96367 -3.28125,4.6875 c 46.8258,18.33664 78.5,53.36029 78.5,93.49999 0,59.10603 -68.66485,107.0625 -153.28125,107.0625 -84.6164,-10e-6 -153.3125,-47.95648 -153.3125,-107.0625 1e-5,-32.18776 20.37158,-61.08002 52.59375,-80.71874 l -9.90625,-15.09375 c -50.54614,21.43183 -84.09374,59.04962 -84.09375,101.87499 0,66.63368 81.2225,120.6875 181.3125,120.6875 100.08999,0 181.34374,-54.05381 181.34375,-120.6875 0,-44.43292 -36.12255,-83.29245 -89.875,-104.24999 z"
style="fill:url(#LO)" />
<g transform="translate(142.2839,-24.99705)">
<g transform="translate(-413.2102,-40.70387)">
<path d="M342.0739,390.70219L 453.17118,245.44599L 338.79445,85.733013L 412.30881,85.794093L 503.44682,211.37696L 367.17669,390.70219L 342.0739,390.70219 z M559.52169,390.8049L 469.01289,265.00644L 606.41773,85.596933L 630.89946,85.596933L 519.34879,231.53848L 633.03722,390.8049L 559.52169,390.8049z"/>
<path id="P1" d="M486.41071,143.82651C 477.55968,143.82651 468.10342,144.51187 459.5906,145.32904C 474.75653,165.10903 487.34067,181.85855 501.82347,200.88092C 493.69471,183.38799 476.98783,166.61333 482.7635,157.98625C 488.48067,149.44656 499.01457,150.88393 499.81696,150.88393C 516.70545,150.88393 532.96221,152.79132 548.16071,156.32143L 551.72321,151.41518C 531.4524,146.19692 509.43472,143.82651 486.41071,143.82651 z M577.87946,159.79018L 574.59821,164.47768C 621.42401,182.81432 653.09821,217.83797 653.09821,257.97767C 653.09821,317.0837 584.43336,365.04017 499.81696,365.04017C 415.20056,365.04016 346.50446,317.08369 346.50446,257.97767C 346.50447,225.78991 366.87604,196.89765 399.09821,177.25893L 389.19196,162.16518C 338.64582,183.59701 305.09822,221.2148 305.09821,264.04017C 305.09821,330.67385 386.32071,384.72767 486.41071,384.72767C 586.5007,384.72767 667.75445,330.67386 667.75446,264.04017C 667.75446,219.60725 631.63191,180.74772 577.87946,159.79018z"/>
</g>
<rect
x="322.36493"
y="180.85307"
width="0.50507629"
height="0"
id="rect16" />
<rect x="322.36493" y="180.85307" width=".50507629" height="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,78 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="48"
height="48"
version="1.1"
id="svg20"
sodipodi:docname="fallback-application.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview22"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="7.148952"
inkscape:cx="16.505916"
inkscape:cy="25.458277"
inkscape:window-width="1856"
inkscape:window-height="1030"
inkscape:window-x="62"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg20"
showguides="false" />
<style
type="text/css"
id="style2"><![CDATA[
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="431" height="345" version="1.1">
<style type="text/css"><![CDATA[
#P1 {fill:url(#LO)}
rect {opacity:.40740739;fill:#000cff;width:.50507629;height:0}
]]></style>
<defs
id="defs9">
<linearGradient
id="LO"
gradientUnits="userSpaceOnUse"
x1="319.20822"
y1="235.14877"
x2="657.65295"
y2="269.49396">
<stop
style="stop-color:#e54c18"
offset="0"
id="stop4" />
<stop
style="stop-color:#fec350"
offset="1"
id="stop6" />
<defs>
<linearGradient id="LO" gradientUnits="userSpaceOnUse" x1="319.20822" y1="235.14877" x2="657.65295" y2="269.49396">
<stop style="stop-color:#e54c18" offset="0"/>
<stop style="stop-color:#fec350" offset="1"/>
</linearGradient>
</defs>
<g
transform="matrix(0.12,0,0,0.12,15.214064,0.30035442)"
id="g18">
<g
transform="translate(-413.2102,-40.70387)"
id="g14">
<path
d="M 342.0739,390.70219 453.17118,245.44599 338.79445,85.733013 412.30881,85.794093 503.44682,211.37696 367.17669,390.70219 Z M 559.52169,390.8049 469.01289,265.00644 606.41773,85.596933 h 24.48173 L 519.34879,231.53848 633.03722,390.8049 Z"
id="path11" />
<path
id="P1"
d="m 486.41071,143.82651 c -8.85103,0 -18.30729,0.68536 -26.82011,1.50253 15.16593,19.77999 27.75007,36.52951 42.23287,55.55188 -8.12876,-17.49293 -24.83564,-34.26759 -19.05997,-42.89467 5.71717,-8.53969 16.25107,-7.10232 17.05346,-7.10232 16.88849,0 33.14525,1.90739 48.34375,5.4375 l 3.5625,-4.90625 c -20.27081,-5.21826 -42.28849,-7.58867 -65.3125,-7.58867 z m 91.46875,15.96367 -3.28125,4.6875 c 46.8258,18.33664 78.5,53.36029 78.5,93.49999 0,59.10603 -68.66485,107.0625 -153.28125,107.0625 -84.6164,-10e-6 -153.3125,-47.95648 -153.3125,-107.0625 1e-5,-32.18776 20.37158,-61.08002 52.59375,-80.71874 l -9.90625,-15.09375 c -50.54614,21.43183 -84.09374,59.04962 -84.09375,101.87499 0,66.63368 81.2225,120.6875 181.3125,120.6875 100.08999,0 181.34374,-54.05381 181.34375,-120.6875 0,-44.43292 -36.12255,-83.29245 -89.875,-104.24999 z"
style="fill:url(#LO)" />
<g transform="translate(142.2839,-24.99705)">
<g transform="translate(-413.2102,-40.70387)">
<path d="M342.0739,390.70219L 453.17118,245.44599L 338.79445,85.733013L 412.30881,85.794093L 503.44682,211.37696L 367.17669,390.70219L 342.0739,390.70219 z M559.52169,390.8049L 469.01289,265.00644L 606.41773,85.596933L 630.89946,85.596933L 519.34879,231.53848L 633.03722,390.8049L 559.52169,390.8049z"/>
<path id="P1" d="M486.41071,143.82651C 477.55968,143.82651 468.10342,144.51187 459.5906,145.32904C 474.75653,165.10903 487.34067,181.85855 501.82347,200.88092C 493.69471,183.38799 476.98783,166.61333 482.7635,157.98625C 488.48067,149.44656 499.01457,150.88393 499.81696,150.88393C 516.70545,150.88393 532.96221,152.79132 548.16071,156.32143L 551.72321,151.41518C 531.4524,146.19692 509.43472,143.82651 486.41071,143.82651 z M577.87946,159.79018L 574.59821,164.47768C 621.42401,182.81432 653.09821,217.83797 653.09821,257.97767C 653.09821,317.0837 584.43336,365.04017 499.81696,365.04017C 415.20056,365.04016 346.50446,317.08369 346.50446,257.97767C 346.50447,225.78991 366.87604,196.89765 399.09821,177.25893L 389.19196,162.16518C 338.64582,183.59701 305.09822,221.2148 305.09821,264.04017C 305.09821,330.67385 386.32071,384.72767 486.41071,384.72767C 586.5007,384.72767 667.75445,330.67386 667.75446,264.04017C 667.75446,219.60725 631.63191,180.74772 577.87946,159.79018z"/>
</g>
<rect
x="322.36493"
y="180.85307"
width="0.50507629"
height="0"
id="rect16" />
<rect x="322.36493" y="180.85307" width=".50507629" height="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,78 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="48"
height="48"
version="1.1"
id="svg20"
sodipodi:docname="fallback-application.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview22"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="7.148952"
inkscape:cx="16.505916"
inkscape:cy="25.458277"
inkscape:window-width="1856"
inkscape:window-height="1030"
inkscape:window-x="62"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg20"
showguides="false" />
<style
type="text/css"
id="style2"><![CDATA[
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="431" height="345" version="1.1">
<style type="text/css"><![CDATA[
#P1 {fill:url(#LO)}
rect {opacity:.40740739;fill:#000cff;width:.50507629;height:0}
]]></style>
<defs
id="defs9">
<linearGradient
id="LO"
gradientUnits="userSpaceOnUse"
x1="319.20822"
y1="235.14877"
x2="657.65295"
y2="269.49396">
<stop
style="stop-color:#e54c18"
offset="0"
id="stop4" />
<stop
style="stop-color:#fec350"
offset="1"
id="stop6" />
<defs>
<linearGradient id="LO" gradientUnits="userSpaceOnUse" x1="319.20822" y1="235.14877" x2="657.65295" y2="269.49396">
<stop style="stop-color:#e54c18" offset="0"/>
<stop style="stop-color:#fec350" offset="1"/>
</linearGradient>
</defs>
<g
transform="matrix(0.12,0,0,0.12,15.214064,0.30035442)"
id="g18">
<g
transform="translate(-413.2102,-40.70387)"
id="g14">
<path
d="M 342.0739,390.70219 453.17118,245.44599 338.79445,85.733013 412.30881,85.794093 503.44682,211.37696 367.17669,390.70219 Z M 559.52169,390.8049 469.01289,265.00644 606.41773,85.596933 h 24.48173 L 519.34879,231.53848 633.03722,390.8049 Z"
id="path11" />
<path
id="P1"
d="m 486.41071,143.82651 c -8.85103,0 -18.30729,0.68536 -26.82011,1.50253 15.16593,19.77999 27.75007,36.52951 42.23287,55.55188 -8.12876,-17.49293 -24.83564,-34.26759 -19.05997,-42.89467 5.71717,-8.53969 16.25107,-7.10232 17.05346,-7.10232 16.88849,0 33.14525,1.90739 48.34375,5.4375 l 3.5625,-4.90625 c -20.27081,-5.21826 -42.28849,-7.58867 -65.3125,-7.58867 z m 91.46875,15.96367 -3.28125,4.6875 c 46.8258,18.33664 78.5,53.36029 78.5,93.49999 0,59.10603 -68.66485,107.0625 -153.28125,107.0625 -84.6164,-10e-6 -153.3125,-47.95648 -153.3125,-107.0625 1e-5,-32.18776 20.37158,-61.08002 52.59375,-80.71874 l -9.90625,-15.09375 c -50.54614,21.43183 -84.09374,59.04962 -84.09375,101.87499 0,66.63368 81.2225,120.6875 181.3125,120.6875 100.08999,0 181.34374,-54.05381 181.34375,-120.6875 0,-44.43292 -36.12255,-83.29245 -89.875,-104.24999 z"
style="fill:url(#LO)" />
<g transform="translate(142.2839,-24.99705)">
<g transform="translate(-413.2102,-40.70387)">
<path d="M342.0739,390.70219L 453.17118,245.44599L 338.79445,85.733013L 412.30881,85.794093L 503.44682,211.37696L 367.17669,390.70219L 342.0739,390.70219 z M559.52169,390.8049L 469.01289,265.00644L 606.41773,85.596933L 630.89946,85.596933L 519.34879,231.53848L 633.03722,390.8049L 559.52169,390.8049z"/>
<path id="P1" d="M486.41071,143.82651C 477.55968,143.82651 468.10342,144.51187 459.5906,145.32904C 474.75653,165.10903 487.34067,181.85855 501.82347,200.88092C 493.69471,183.38799 476.98783,166.61333 482.7635,157.98625C 488.48067,149.44656 499.01457,150.88393 499.81696,150.88393C 516.70545,150.88393 532.96221,152.79132 548.16071,156.32143L 551.72321,151.41518C 531.4524,146.19692 509.43472,143.82651 486.41071,143.82651 z M577.87946,159.79018L 574.59821,164.47768C 621.42401,182.81432 653.09821,217.83797 653.09821,257.97767C 653.09821,317.0837 584.43336,365.04017 499.81696,365.04017C 415.20056,365.04016 346.50446,317.08369 346.50446,257.97767C 346.50447,225.78991 366.87604,196.89765 399.09821,177.25893L 389.19196,162.16518C 338.64582,183.59701 305.09822,221.2148 305.09821,264.04017C 305.09821,330.67385 386.32071,384.72767 486.41071,384.72767C 586.5007,384.72767 667.75445,330.67386 667.75446,264.04017C 667.75446,219.60725 631.63191,180.74772 577.87946,159.79018z"/>
</g>
<rect
x="322.36493"
y="180.85307"
width="0.50507629"
height="0"
id="rect16" />
<rect x="322.36493" y="180.85307" width=".50507629" height="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,78 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="48"
height="48"
version="1.1"
id="svg20"
sodipodi:docname="fallback-application.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview22"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="7.148952"
inkscape:cx="16.505916"
inkscape:cy="25.458277"
inkscape:window-width="1856"
inkscape:window-height="1030"
inkscape:window-x="62"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg20"
showguides="false" />
<style
type="text/css"
id="style2"><![CDATA[
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="431" height="345" version="1.1">
<style type="text/css"><![CDATA[
#P1 {fill:url(#LO)}
rect {opacity:.40740739;fill:#000cff;width:.50507629;height:0}
]]></style>
<defs
id="defs9">
<linearGradient
id="LO"
gradientUnits="userSpaceOnUse"
x1="319.20822"
y1="235.14877"
x2="657.65295"
y2="269.49396">
<stop
style="stop-color:#e54c18"
offset="0"
id="stop4" />
<stop
style="stop-color:#fec350"
offset="1"
id="stop6" />
<defs>
<linearGradient id="LO" gradientUnits="userSpaceOnUse" x1="319.20822" y1="235.14877" x2="657.65295" y2="269.49396">
<stop style="stop-color:#e54c18" offset="0"/>
<stop style="stop-color:#fec350" offset="1"/>
</linearGradient>
</defs>
<g
transform="matrix(0.12,0,0,0.12,15.214064,0.30035442)"
id="g18">
<g
transform="translate(-413.2102,-40.70387)"
id="g14">
<path
d="M 342.0739,390.70219 453.17118,245.44599 338.79445,85.733013 412.30881,85.794093 503.44682,211.37696 367.17669,390.70219 Z M 559.52169,390.8049 469.01289,265.00644 606.41773,85.596933 h 24.48173 L 519.34879,231.53848 633.03722,390.8049 Z"
id="path11" />
<path
id="P1"
d="m 486.41071,143.82651 c -8.85103,0 -18.30729,0.68536 -26.82011,1.50253 15.16593,19.77999 27.75007,36.52951 42.23287,55.55188 -8.12876,-17.49293 -24.83564,-34.26759 -19.05997,-42.89467 5.71717,-8.53969 16.25107,-7.10232 17.05346,-7.10232 16.88849,0 33.14525,1.90739 48.34375,5.4375 l 3.5625,-4.90625 c -20.27081,-5.21826 -42.28849,-7.58867 -65.3125,-7.58867 z m 91.46875,15.96367 -3.28125,4.6875 c 46.8258,18.33664 78.5,53.36029 78.5,93.49999 0,59.10603 -68.66485,107.0625 -153.28125,107.0625 -84.6164,-10e-6 -153.3125,-47.95648 -153.3125,-107.0625 1e-5,-32.18776 20.37158,-61.08002 52.59375,-80.71874 l -9.90625,-15.09375 c -50.54614,21.43183 -84.09374,59.04962 -84.09375,101.87499 0,66.63368 81.2225,120.6875 181.3125,120.6875 100.08999,0 181.34374,-54.05381 181.34375,-120.6875 0,-44.43292 -36.12255,-83.29245 -89.875,-104.24999 z"
style="fill:url(#LO)" />
<g transform="translate(142.2839,-24.99705)">
<g transform="translate(-413.2102,-40.70387)">
<path d="M342.0739,390.70219L 453.17118,245.44599L 338.79445,85.733013L 412.30881,85.794093L 503.44682,211.37696L 367.17669,390.70219L 342.0739,390.70219 z M559.52169,390.8049L 469.01289,265.00644L 606.41773,85.596933L 630.89946,85.596933L 519.34879,231.53848L 633.03722,390.8049L 559.52169,390.8049z"/>
<path id="P1" d="M486.41071,143.82651C 477.55968,143.82651 468.10342,144.51187 459.5906,145.32904C 474.75653,165.10903 487.34067,181.85855 501.82347,200.88092C 493.69471,183.38799 476.98783,166.61333 482.7635,157.98625C 488.48067,149.44656 499.01457,150.88393 499.81696,150.88393C 516.70545,150.88393 532.96221,152.79132 548.16071,156.32143L 551.72321,151.41518C 531.4524,146.19692 509.43472,143.82651 486.41071,143.82651 z M577.87946,159.79018L 574.59821,164.47768C 621.42401,182.81432 653.09821,217.83797 653.09821,257.97767C 653.09821,317.0837 584.43336,365.04017 499.81696,365.04017C 415.20056,365.04016 346.50446,317.08369 346.50446,257.97767C 346.50447,225.78991 366.87604,196.89765 399.09821,177.25893L 389.19196,162.16518C 338.64582,183.59701 305.09822,221.2148 305.09821,264.04017C 305.09821,330.67385 386.32071,384.72767 486.41071,384.72767C 586.5007,384.72767 667.75445,330.67386 667.75446,264.04017C 667.75446,219.60725 631.63191,180.74772 577.87946,159.79018z"/>
</g>
<rect
x="322.36493"
y="180.85307"
width="0.50507629"
height="0"
id="rect16" />
<rect x="322.36493" y="180.85307" width=".50507629" height="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -236,6 +236,15 @@ theme = require("themes.icons")(theme)
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
theme.dismal = {
container = {
bg_normal = "#202020",
rounding = 5
}
}
-- 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"

View File

@ -31,11 +31,13 @@ return function(args)
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 =
style[(icon_name or ""):gsub("%-","_")] or
style["battery_missing_symbolic"]
if args.percentage and value then
style[(icon_name or ""):gsub("%-","_")]
if args.percentage and value and icon_name then
icon:get_children_by_id("widget_text")[1].markup = value
end
if not icon_name then
icon:get_children_by_id("widget_text")[1].markup = ""
end
end)
end
}

117
widgets/dismal.lua Normal file
View File

@ -0,0 +1,117 @@
local awmtk2 = require("awmtk2")
local wibox = require("wibox")
local gears = require("gears")
local awful = require("awful")
return function(args)
local style = awmtk2.create_style("dismal",awmtk2.default,args.style)
local rounded_shape = function(cr,width,height)
return gears.shape.rounded_rect(cr,width,height,style.container.rounding)
end
local separator = wibox.widget({
widget = wibox.widget.separator,
forced_width = 220,
orientation = "horizontal",
forced_height = 10,
thickness = 1,
color = style.container.bg_focus,
border_width = 0
})
local inputbox = wibox.widget {
{
markup = "",
widget = wibox.widget.textbox
},
widget = wibox.container.margin,
margins = style.container.inner_margin,
id = "inputbox",
bg = style.button.bg_focus
}
local launchpad = awful.popup({
widget = {
{
{
inputbox,
{
{
{
{
markup = " ",
widget = wibox.widget.textbox,
id = "result1"
},
separator,
{
markup = " ",
widget = wibox.widget.textbox,
id = "result2"
},
separator,
{
markup = " ",
widget = wibox.widget.textbox,
id = "result3"
},
separator,
{
markup = " ",
widget = wibox.widget.textbox,
id = "result4"
},
layout = wibox.layout.fixed.vertical
},
widget = wibox.container.margin,
margins = style.container.inner_margin
},
widget = wibox.container.background,
bg = style.container.bg_normal,
shape_border_width = 1,
shape_border_color = style.container.bg_focus,
shape = rounded_shape
},
{
markup = "<b>Enter</b> - run; <b>Ctrl+Enter</b> - run in terminal",
widget = wibox.widget.textbox
},
layout = wibox.layout.fixed.vertical
},
widget = wibox.container.margin,
margins = style.container.inner_margin
},
bg = style.container.bg_normal,
widget = wibox.container.background
},
placement = awful.placement.no_overlap,
shape = rounded_shape,
visible = false,
ontop = true
})
local modifiers = {}
root.keys(gears.table.join(
root.keys(),
awful.key({ global.modkey }, "0", function()
launchpad.visible = true
if launchpad.visible then
awful.prompt.run {
prompt = "<b>Run: </b>",
textbox = inputbox.children[1],
hooks = {
{ { "Control" }, "Return", function(cmd)
awful.spawn({global.terminal, "-e", cmd})
end},
{ { }, "Return", function(cmd)
awful.spawn(cmd)
end},
{ {}, 'Escape', function(cmd)
textbox.markup = ""
end}
},
done_callback = function()
launchpad.visible = false
end
}
end
end)
))
return launchpad
end