-
2libs/builder.lua
-
34libs/context_menu.lua
-
3libs/debug.lua
-
68modules/desktop.lua
-
2modules/xdg_data.lua
-
7themes/reno98/config/client_menu.json
-
7themes/reno98/config/global.json
-
22themes/reno98/config/root_menu.json
-
6themes/reno98/config/titlebar_top.json
-
1themes/reno98/config/wibar_top.json
-
BINthemes/reno98/icons/lock.png
-
BINthemes/reno98/icons/power.png
-
BINthemes/reno98/icons/reno98.png
-
BINthemes/reno98/icons/sleep.png
-
BINthemes/reno98/icons/unknown-app.png
-
45themes/reno98/icons/unknown-app.svg
-
63themes/reno98/theme.lua
-
17widgets/base/popuptitle.lua
-
16widgets/base/systray.lua
-
58widgets/base/tagswitcher.lua
-
85widgets/clientbuttons.lua
-
64widgets/clientcontrols.lua
-
69widgets/clientmenu.lua
-
85widgets/rootbuttons.lua
-
25widgets/rootcontrols.lua
-
80widgets/rootmenu.lua
-
99widgets/xdgmenu.lua
@ -0,0 +1,7 @@ |
|||
{ |
|||
"list": [ |
|||
{"widget": "widgets.clientcontrols"}, |
|||
{"widget": "widgets.clientbuttons"} |
|||
], |
|||
"vertical":true |
|||
} |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"widgets.dismal":{ |
|||
"x":0, |
|||
"y":26 |
|||
}, |
|||
"widgets.rootmenu":{} |
|||
} |
@ -0,0 +1,22 @@ |
|||
{ |
|||
"list": [ |
|||
{"widget": "widgets.base.popuptitle", |
|||
"options":{ |
|||
"icon":"icons/reno98.png", |
|||
"title":"Reno 98" |
|||
} |
|||
}, |
|||
{"widget": "widgets.base.tagswitcher", |
|||
"screen":true |
|||
}, |
|||
{"widget": "widgets.rootcontrols"}, |
|||
{"widget": "widgets.xdgmenu", |
|||
"options": { |
|||
"exclude_category": [ |
|||
"Other" |
|||
] |
|||
} |
|||
} |
|||
], |
|||
"vertical": true |
|||
} |
After Width: 32 | Height: 32 | Size: 510 B |
After Width: 31 | Height: 32 | Size: 787 B |
After Width: 48 | Height: 48 | Size: 718 B |
After Width: 32 | Height: 32 | Size: 721 B |
Before Width: 64 | Height: 53 | Size: 999 B After Width: 64 | Height: 64 | Size: 768 B |
@ -1,45 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<svg |
|||
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|||
xmlns:cc="http://creativecommons.org/ns#" |
|||
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" |
|||
id="svg3748" |
|||
width="960px" |
|||
version="1.1" |
|||
height="800px"> |
|||
<metadata |
|||
id="metadata3752"> |
|||
<rdf:RDF> |
|||
<cc:Work |
|||
rdf:about=""> |
|||
<dc:format>image/svg+xml</dc:format> |
|||
<dc:type |
|||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<defs |
|||
id="defs2" /> |
|||
<path |
|||
style="fill:#0000ff" |
|||
d="M 140 60 L 140 80 L 140 100 L 140 120 L 160 120 L 180 120 L 200 120 L 220 120 L 240 120 L 260 120 L 280 120 L 300 120 L 320 120 L 340 120 L 360 120 L 380 120 L 400 120 L 420 120 L 440 120 L 460 120 L 480 120 L 500 120 L 520 120 L 540 120 L 560 120 L 580 120 L 600 120 L 620 120 L 640 120 L 660 120 L 680 120 L 700 120 L 720 120 L 720 100 L 720 80 L 720 60 L 700 60 L 680 60 L 660 60 L 640 60 L 620 60 L 600 60 L 580 60 L 560 60 L 560 80 L 560 100 L 540 100 L 520 100 L 520 80 L 520 60 L 500 60 L 500 80 L 500 100 L 480 100 L 460 100 L 460 80 L 460 60 L 440 60 L 440 80 L 440 100 L 420 100 L 400 100 L 400 80 L 400 60 L 380 60 L 380 80 L 380 100 L 360 100 L 340 100 L 340 80 L 340 60 L 320 60 L 300 60 L 280 60 L 260 60 L 240 60 L 220 60 L 200 60 L 180 60 L 160 60 L 140 60 z " |
|||
id="rect554" /> |
|||
<path |
|||
style="fill:#ffffff" |
|||
d="M 340 60 L 340 80 L 340 100 L 360 100 L 380 100 L 380 80 L 380 60 L 360 60 L 340 60 z M 400 60 L 400 80 L 400 100 L 420 100 L 440 100 L 440 80 L 440 60 L 420 60 L 400 60 z M 460 60 L 460 80 L 460 100 L 480 100 L 500 100 L 500 80 L 500 60 L 480 60 L 460 60 z M 520 60 L 520 80 L 520 100 L 540 100 L 560 100 L 560 80 L 560 60 L 540 60 L 520 60 z M 180 260 L 180 280 L 200 280 L 220 280 L 240 280 L 260 280 L 260 260 L 240 260 L 220 260 L 200 260 L 180 260 z M 260 280 L 260 300 L 280 300 L 280 280 L 260 280 z M 180 280 L 160 280 L 160 300 L 160 320 L 160 340 L 160 360 L 160 380 L 160 400 L 180 400 L 180 380 L 180 360 L 180 340 L 180 320 L 180 300 L 180 280 z M 180 400 L 180 420 L 200 420 L 220 420 L 240 420 L 260 420 L 260 400 L 240 400 L 220 400 L 200 400 L 180 400 z M 260 400 L 280 400 L 280 380 L 260 380 L 260 400 z M 380 260 L 380 280 L 380 300 L 400 300 L 400 280 L 400 260 L 380 260 z M 400 300 L 400 320 L 400 340 L 420 340 L 420 320 L 420 300 L 400 300 z M 420 340 L 420 360 L 420 380 L 440 380 L 440 360 L 440 340 L 420 340 z M 440 380 L 440 400 L 440 420 L 460 420 L 460 400 L 460 380 L 440 380 z M 340 300 L 340 320 L 360 320 L 360 300 L 340 300 z M 340 400 L 340 420 L 360 420 L 360 400 L 340 400 z M 480 400 L 480 420 L 500 420 L 520 420 L 540 420 L 560 420 L 580 420 L 600 420 L 620 420 L 640 420 L 660 420 L 680 420 L 680 400 L 660 400 L 640 400 L 620 400 L 600 400 L 580 400 L 560 400 L 540 400 L 520 400 L 500 400 L 480 400 z " |
|||
id="rect1990" /> |
|||
<path |
|||
style="fill:#000000" |
|||
d="M 20 40 L 20 60 L 20 80 L 20 100 L 20 120 L 20 140 L 20 160 L 20 180 L 20 200 L 20 220 L 20 240 L 20 260 L 20 280 L 20 300 L 20 320 L 20 340 L 20 360 L 20 380 L 20 400 L 20 420 L 20 440 L 20 460 L 20 480 L 20 500 L 20 520 L 20 540 L 20 560 L 20 580 L 20 600 L 20 620 L 20 640 L 20 660 L 20 680 L 20 700 L 20 720 L 20 740 L 20 760 L 40 760 L 60 760 L 80 760 L 100 760 L 120 760 L 140 760 L 160 760 L 180 760 L 200 760 L 220 760 L 240 760 L 260 760 L 280 760 L 300 760 L 320 760 L 340 760 L 360 760 L 380 760 L 400 760 L 420 760 L 440 760 L 460 760 L 480 760 L 500 760 L 520 760 L 540 760 L 560 760 L 580 760 L 600 760 L 620 760 L 640 760 L 660 760 L 680 760 L 700 760 L 720 760 L 740 760 L 760 760 L 780 760 L 800 760 L 820 760 L 840 760 L 860 760 L 880 760 L 900 760 L 920 760 L 920 740 L 920 720 L 920 700 L 920 680 L 920 660 L 920 640 L 920 620 L 920 600 L 920 580 L 920 560 L 920 540 L 920 520 L 920 500 L 920 480 L 920 460 L 920 440 L 920 420 L 920 400 L 920 380 L 920 360 L 920 340 L 920 320 L 920 300 L 920 280 L 920 260 L 920 240 L 920 220 L 920 200 L 920 180 L 920 160 L 920 140 L 920 120 L 920 100 L 920 80 L 920 60 L 920 40 L 900 40 L 880 40 L 860 40 L 840 40 L 820 40 L 800 40 L 780 40 L 760 40 L 740 40 L 720 40 L 700 40 L 680 40 L 660 40 L 640 40 L 620 40 L 600 40 L 580 40 L 560 40 L 540 40 L 520 40 L 500 40 L 480 40 L 460 40 L 440 40 L 420 40 L 400 40 L 380 40 L 360 40 L 340 40 L 320 40 L 300 40 L 280 40 L 260 40 L 240 40 L 220 40 L 200 40 L 180 40 L 160 40 L 140 40 L 120 40 L 100 40 L 80 40 L 60 40 L 40 40 L 20 40 z M 60 60 L 80 60 L 100 60 L 120 60 L 120 80 L 120 100 L 120 120 L 100 120 L 80 120 L 60 120 L 60 100 L 60 80 L 60 60 z M 140 60 L 160 60 L 180 60 L 200 60 L 220 60 L 240 60 L 260 60 L 280 60 L 300 60 L 320 60 L 340 60 L 360 60 L 380 60 L 400 60 L 420 60 L 440 60 L 460 60 L 480 60 L 500 60 L 520 60 L 540 60 L 560 60 L 580 60 L 600 60 L 620 60 L 640 60 L 660 60 L 680 60 L 700 60 L 720 60 L 720 80 L 720 100 L 720 120 L 700 120 L 680 120 L 660 120 L 640 120 L 620 120 L 600 120 L 580 120 L 560 120 L 540 120 L 520 120 L 500 120 L 480 120 L 460 120 L 440 120 L 420 120 L 400 120 L 380 120 L 360 120 L 340 120 L 320 120 L 300 120 L 280 120 L 260 120 L 240 120 L 220 120 L 200 120 L 180 120 L 160 120 L 140 120 L 140 100 L 140 80 L 140 60 z M 740 60 L 760 60 L 780 60 L 800 60 L 800 80 L 800 100 L 800 120 L 780 120 L 760 120 L 740 120 L 740 100 L 740 80 L 740 60 z M 840 60 L 860 60 L 880 60 L 900 60 L 900 80 L 900 100 L 900 120 L 880 120 L 860 120 L 840 120 L 840 100 L 840 80 L 840 60 z M 180 260 L 200 260 L 220 260 L 240 260 L 260 260 L 260 280 L 280 280 L 280 300 L 260 300 L 260 280 L 240 280 L 220 280 L 200 280 L 180 280 L 180 300 L 180 320 L 180 340 L 180 360 L 180 380 L 180 400 L 200 400 L 220 400 L 240 400 L 260 400 L 260 380 L 280 380 L 280 400 L 260 400 L 260 420 L 240 420 L 220 420 L 200 420 L 180 420 L 180 400 L 160 400 L 160 380 L 160 360 L 160 340 L 160 320 L 160 300 L 160 280 L 180 280 L 180 260 z M 380 260 L 400 260 L 400 280 L 400 300 L 420 300 L 420 320 L 420 340 L 440 340 L 440 360 L 440 380 L 460 380 L 460 400 L 460 420 L 440 420 L 440 400 L 440 380 L 420 380 L 420 360 L 420 340 L 400 340 L 400 320 L 400 300 L 380 300 L 380 280 L 380 260 z M 340 300 L 360 300 L 360 320 L 340 320 L 340 300 z M 340 400 L 360 400 L 360 420 L 340 420 L 340 400 z M 480 400 L 500 400 L 520 400 L 540 400 L 560 400 L 580 400 L 600 400 L 620 400 L 640 400 L 660 400 L 680 400 L 680 420 L 660 420 L 640 420 L 620 420 L 600 420 L 580 420 L 560 420 L 540 420 L 520 420 L 500 420 L 480 420 L 480 400 z " |
|||
id="rect3646" /> |
|||
<path |
|||
style="fill:#cbcbcb" |
|||
d="M 0 0 L 0 20 L 0 40 L 0 60 L 0 80 L 0 100 L 0 120 L 0 140 L 0 160 L 0 180 L 0 200 L 0 220 L 0 240 L 0 260 L 0 280 L 0 300 L 0 320 L 0 340 L 0 360 L 0 380 L 0 400 L 0 420 L 0 440 L 0 460 L 0 480 L 0 500 L 0 520 L 0 540 L 0 560 L 0 580 L 0 600 L 0 620 L 0 640 L 0 660 L 0 680 L 0 700 L 0 720 L 0 740 L 0 760 L 0 780 L 20 780 L 20 760 L 20 740 L 20 720 L 20 700 L 20 680 L 20 660 L 20 640 L 20 620 L 20 600 L 20 580 L 20 560 L 20 540 L 20 520 L 20 500 L 20 480 L 20 460 L 20 440 L 20 420 L 20 400 L 20 380 L 20 360 L 20 340 L 20 320 L 20 300 L 20 280 L 20 260 L 20 240 L 20 220 L 20 200 L 20 180 L 20 160 L 20 140 L 20 120 L 20 100 L 20 80 L 20 60 L 20 40 L 40 40 L 60 40 L 80 40 L 100 40 L 120 40 L 140 40 L 160 40 L 180 40 L 200 40 L 220 40 L 240 40 L 260 40 L 280 40 L 300 40 L 320 40 L 340 40 L 360 40 L 380 40 L 400 40 L 420 40 L 440 40 L 460 40 L 480 40 L 500 40 L 520 40 L 540 40 L 560 40 L 580 40 L 600 40 L 620 40 L 640 40 L 660 40 L 680 40 L 700 40 L 720 40 L 740 40 L 760 40 L 780 40 L 800 40 L 820 40 L 840 40 L 860 40 L 880 40 L 900 40 L 920 40 L 940 40 L 960 40 L 960 20 L 960 0 L 940 0 L 920 0 L 900 0 L 880 0 L 860 0 L 840 0 L 820 0 L 800 0 L 780 0 L 760 0 L 740 0 L 720 0 L 700 0 L 680 0 L 660 0 L 640 0 L 620 0 L 600 0 L 580 0 L 560 0 L 540 0 L 520 0 L 500 0 L 480 0 L 460 0 L 440 0 L 420 0 L 400 0 L 380 0 L 360 0 L 340 0 L 320 0 L 300 0 L 280 0 L 260 0 L 240 0 L 220 0 L 200 0 L 180 0 L 160 0 L 140 0 L 120 0 L 100 0 L 80 0 L 60 0 L 40 0 L 20 0 L 0 0 z M 60 60 L 60 80 L 60 100 L 80 100 L 100 100 L 100 80 L 100 60 L 80 60 L 60 60 z M 740 60 L 740 80 L 740 100 L 760 100 L 780 100 L 780 80 L 780 60 L 760 60 L 740 60 z M 840 60 L 840 80 L 840 100 L 860 100 L 880 100 L 880 80 L 880 60 L 860 60 L 840 60 z " |
|||
id="rect3652" /> |
|||
<path |
|||
style="fill:#929292" |
|||
d="M 920 40 L 920 60 L 920 80 L 920 100 L 920 120 L 920 140 L 920 160 L 920 180 L 920 200 L 920 220 L 920 240 L 920 260 L 920 280 L 920 300 L 920 320 L 920 340 L 920 360 L 920 380 L 920 400 L 920 420 L 920 440 L 920 460 L 920 480 L 920 500 L 920 520 L 920 540 L 920 560 L 920 580 L 920 600 L 920 620 L 920 640 L 920 660 L 920 680 L 920 700 L 920 720 L 920 740 L 920 760 L 900 760 L 880 760 L 860 760 L 840 760 L 820 760 L 800 760 L 780 760 L 760 760 L 740 760 L 720 760 L 700 760 L 680 760 L 660 760 L 640 760 L 620 760 L 600 760 L 580 760 L 560 760 L 540 760 L 520 760 L 500 760 L 480 760 L 460 760 L 440 760 L 420 760 L 400 760 L 380 760 L 360 760 L 340 760 L 320 760 L 300 760 L 280 760 L 260 760 L 240 760 L 220 760 L 200 760 L 180 760 L 160 760 L 140 760 L 120 760 L 100 760 L 80 760 L 60 760 L 40 760 L 20 760 L 20 780 L 40 780 L 60 780 L 80 780 L 100 780 L 120 780 L 140 780 L 160 780 L 180 780 L 200 780 L 220 780 L 240 780 L 260 780 L 280 780 L 300 780 L 320 780 L 340 780 L 360 780 L 380 780 L 400 780 L 420 780 L 440 780 L 460 780 L 480 780 L 500 780 L 520 780 L 540 780 L 560 780 L 580 780 L 600 780 L 620 780 L 640 780 L 660 780 L 680 780 L 700 780 L 720 780 L 740 780 L 760 780 L 780 780 L 800 780 L 820 780 L 840 780 L 860 780 L 880 780 L 900 780 L 920 780 L 940 780 L 960 780 L 960 760 L 960 740 L 960 720 L 960 700 L 960 680 L 960 660 L 960 640 L 960 620 L 960 600 L 960 580 L 960 560 L 960 540 L 960 520 L 960 500 L 960 480 L 960 460 L 960 440 L 960 420 L 960 400 L 960 380 L 960 360 L 960 340 L 960 320 L 960 300 L 960 280 L 960 260 L 960 240 L 960 220 L 960 200 L 960 180 L 960 160 L 960 140 L 960 120 L 960 100 L 960 80 L 960 60 L 960 40 L 940 40 L 920 40 z M 100 60 L 100 80 L 100 100 L 80 100 L 60 100 L 60 120 L 80 120 L 100 120 L 120 120 L 120 100 L 120 80 L 120 60 L 100 60 z M 780 60 L 780 80 L 780 100 L 760 100 L 740 100 L 740 120 L 760 120 L 780 120 L 800 120 L 800 100 L 800 80 L 800 60 L 780 60 z M 880 60 L 880 80 L 880 100 L 860 100 L 840 100 L 840 120 L 860 120 L 880 120 L 900 120 L 900 100 L 900 80 L 900 60 L 880 60 z " |
|||
id="rect3746" /> |
|||
</svg> |
@ -0,0 +1,17 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("popuptitle",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("popuptitle",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local widget = wibox.widget(t.container(t.article({ |
|||
icon = root_path.."/themes/"..global.theme.."/"..args.icon, |
|||
title = args.title |
|||
}))) |
|||
return widget |
|||
end |
@ -0,0 +1,16 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("systray",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("systray",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local widget = wibox.widget(t.container({ |
|||
widget = wibox.widget.systray |
|||
})) |
|||
return widget |
|||
end |
@ -0,0 +1,58 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("taglist",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("taglist",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local widget = wibox.widget(t.container(awful.widget.taglist({ |
|||
screen = args.screen, |
|||
filter = awful.widget.taglist.filter.all, |
|||
style = { |
|||
shape = style.button.shape |
|||
}, |
|||
layout = { |
|||
spacing = style.base.spacing, |
|||
spacing_widget = style.base.spacing_widget, |
|||
layout = style.base.layout or wibox.layout.fixed.horizontal |
|||
}, |
|||
widget_template = t.button(t.article({ |
|||
icon_id = "icon_role", |
|||
title_id = "text_role" |
|||
}),{ |
|||
id = "background", |
|||
create_callback = function(self, tag, index, tags) |
|||
self:connect_signal("button::press",function(self,x,y,b) |
|||
if b == 1 then |
|||
awful.tag.viewmore({tag}) |
|||
elseif b == 3 then |
|||
awful.tag.viewtoggle(tag) |
|||
end |
|||
end) |
|||
local bg = self:get_children_by_id("background")[1] |
|||
if tag.selected then |
|||
bg.bgimage = style.button.bgimage_focus |
|||
bg.bg = style.button.bg_focus |
|||
else |
|||
bg.bgimage = style.button.bgimage_normal |
|||
bg.bg = style.button.bg_normal |
|||
end |
|||
end, |
|||
update_callback = function(self, tag, index, tags) |
|||
local bg = self:get_children_by_id("background")[1] |
|||
if tag.selected then |
|||
bg.bgimage = style.button.bgimage_focus |
|||
bg.bg = style.button.bg_focus |
|||
else |
|||
bg.bgimage = style.button.bgimage_normal |
|||
bg.bg = style.button.bg_normal |
|||
end |
|||
end |
|||
}) |
|||
}))) |
|||
return widget |
|||
end |
@ -0,0 +1,85 @@ |
|||
-- |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("client_buttons",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("client_buttons",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local floating_on = beautiful.titlebar_floating_button_normal_inactive |
|||
local floating_off = beautiful.titlebar_floating_button_normal_active |
|||
local ontop_on = beautiful.titlebar_ontop_button_normal_inactive |
|||
local ontop_off = beautiful.titlebar_ontop_button_normal_active |
|||
local sticky_on = beautiful.titlebar_sticky_button_normal_inactive |
|||
local sticky_off = beautiful.titlebar_sticky_button_normal_active |
|||
local floating = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.floating and floating_on) or floating_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
floating:connect_signal("button::press",style.button.onpress) |
|||
floating:connect_signal("button::release",style.button.onrelease) |
|||
floating:connect_signal("button::press",function(widget) |
|||
client.focus.floating = (not client.focus.floating) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
floating:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.floating and floating_on) or floating_off |
|||
end) |
|||
local ontop = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.ontop and ontop_on) or ontop_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
ontop:connect_signal("button::press",style.button.onpress) |
|||
ontop:connect_signal("button::release",style.button.onrelease) |
|||
ontop:connect_signal("button::press",function(widget) |
|||
client.focus.ontop = (not client.focus.ontop) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
ontop:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.ontop and ontop_on) or ontop_off |
|||
end) |
|||
local sticky = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.sticky and sticky_on) or sticky_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
sticky:connect_signal("button::press",style.button.onpress) |
|||
sticky:connect_signal("button::release",style.button.onrelease) |
|||
sticky:connect_signal("button::press",function(widget) |
|||
client.focus.sticky = (not client.focus.sticky) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
sticky:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.sticky and sticky_on) or sticky_off |
|||
end) |
|||
client.connect_signal("focus",function(c) |
|||
sticky:emit_signal("widget::update") |
|||
ontop:emit_signal("widget::update") |
|||
floating:emit_signal("widget::update") |
|||
end) |
|||
local widget = wibox.widget({ |
|||
floating, |
|||
ontop, |
|||
sticky, |
|||
layout = wibox.layout.fixed.horizontal, |
|||
spacing = style.base.spacing |
|||
}) |
|||
return widget |
|||
end |
@ -0,0 +1,64 @@ |
|||
-- Basic client control keys |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
local menugen = require("context_menu") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("client_controls",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("client_controls",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local move_to_tag = {} |
|||
local add_to_tag = {} |
|||
awful.screen.connect_for_each_screen(function(s) |
|||
table.insert(move_to_tag,{ |
|||
"Screen "..s.index, |
|||
(function() |
|||
local t = {} |
|||
for k,v in pairs(s.tags) do |
|||
table.insert(t,{v.name,function() |
|||
if client.focus then |
|||
client.focus:tags({v}) |
|||
end |
|||
end}) |
|||
end |
|||
return t |
|||
end)() |
|||
}) |
|||
table.insert(add_to_tag,{ |
|||
"Screen "..s.index, |
|||
(function() |
|||
local t = {} |
|||
for k,v in pairs(s.tags) do |
|||
table.insert(t,{v.name,function() |
|||
if client.focus then |
|||
local tags = client.focus:tags() |
|||
for k,tag in pairs(tags) do |
|||
if v == tag then |
|||
table.remove(tags,k) |
|||
client.focus:tags(tags) |
|||
return |
|||
end |
|||
end |
|||
table.insert(tags,v) |
|||
client.focus:tags(tags) |
|||
end |
|||
end}) |
|||
end |
|||
return t |
|||
end)() |
|||
}) |
|||
end) |
|||
local widget = menugen({ |
|||
items = { |
|||
{ "Kill client", function() client.focus:kill() end }, |
|||
{ "Raise client", function() client.focus:raise() end}, |
|||
{ "Lower client", function() client.focus:lower() end}, |
|||
{ "Move to tag", move_to_tag }, |
|||
{ "Switch on tag", add_to_tag } |
|||
}, |
|||
}) |
|||
return widget |
|||
end |
@ -0,0 +1,69 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
local menugen = require("context_menu") |
|||
local builder = require("builder") |
|||
local style = awmtk2.create_style("client_menu",awmtk2.default,{}) |
|||
local templates = awmtk2.create_template_lib("client_menu",awmtk2.templates,{}) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
|
|||
-- Create a global context menu for clients first |
|||
if not context_menu then |
|||
local config_file = io.open(root_path.."/themes/"..global.theme..'/config/client_menu.json',"r") |
|||
local config |
|||
if config_file then |
|||
config = config_file:read("*a") |
|||
config_file:close() |
|||
else |
|||
config = [[{"list":[{"widget":"widgets.clientcontrols"}]}]] |
|||
end |
|||
context_menu = awful.popup(t.popup(builder( |
|||
config, |
|||
{ |
|||
style = style.base, |
|||
} |
|||
))) |
|||
context_menu:connect_signal("button::press",function(self,x,y,b) |
|||
if b == 3 then |
|||
context_menu.visible = false |
|||
end |
|||
end) |
|||
context_menu:connect_signal("property::visible",function(self,x,y,b) |
|||
if not context_menu.visible then |
|||
local children = context_menu.widget:get_children_by_id("menu_root") |
|||
for k,v in pairs(children) do |
|||
for k2,v2 in pairs(v.children) do |
|||
v2:emit_signal("cascade::close") |
|||
end |
|||
end |
|||
end |
|||
end) |
|||
client.connect_signal("focus",function() |
|||
context_menu.visible = false |
|||
end) |
|||
for _,layout in pairs(context_menu.widget:get_children_by_id("menu_root")) do |
|||
for _,button in pairs(layout.children) do |
|||
button:connect_signal("cascade::kill",function() |
|||
context_menu.visible = false |
|||
end) |
|||
end |
|||
end |
|||
end |
|||
|
|||
return function(args) |
|||
local widget = wibox.widget({ |
|||
widget = awful.widget.clienticon, |
|||
client = args.client |
|||
}) |
|||
widget:connect_signal("button::press",function() |
|||
context_menu.visible = (not context_menu.visible) |
|||
if context_menu.visible then |
|||
context_menu.x = mouse.coords().x |
|||
context_menu.y = mouse.coords().y |
|||
end |
|||
end) |
|||
return widget |
|||
end |
@ -0,0 +1,85 @@ |
|||
-- |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("client_buttons",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("client_buttons",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local floating_on = beautiful.titlebar_floating_button_normal_inactive |
|||
local floating_off = beautiful.titlebar_floating_button_normal_active |
|||
local ontop_on = beautiful.titlebar_ontop_button_normal_inactive |
|||
local ontop_off = beautiful.titlebar_ontop_button_normal_active |
|||
local sticky_on = beautiful.titlebar_sticky_button_normal_inactive |
|||
local sticky_off = beautiful.titlebar_sticky_button_normal_active |
|||
local floating = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.floating and floating_on) or floating_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
floating:connect_signal("button::press",style.button.onpress) |
|||
floating:connect_signal("button::release",style.button.onrelease) |
|||
floating:connect_signal("button::press",function(widget) |
|||
client.focus.floating = (not client.focus.floating) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
floating:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.floating and floating_on) or floating_off |
|||
end) |
|||
local ontop = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.ontop and ontop_on) or ontop_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
ontop:connect_signal("button::press",style.button.onpress) |
|||
ontop:connect_signal("button::release",style.button.onrelease) |
|||
ontop:connect_signal("button::press",function(widget) |
|||
client.focus.ontop = (not client.focus.ontop) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
ontop:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.ontop and ontop_on) or ontop_off |
|||
end) |
|||
local sticky = wibox.widget(t.button({ |
|||
image = (client.focus and client.focus.sticky and sticky_on) or sticky_off, |
|||
widget = wibox.widget.imagebox, |
|||
id = "icon" |
|||
},{ |
|||
forced_height = style.button.forced_height, |
|||
forced_width = style.button.forced_width |
|||
})) |
|||
sticky:connect_signal("button::press",style.button.onpress) |
|||
sticky:connect_signal("button::release",style.button.onrelease) |
|||
sticky:connect_signal("button::press",function(widget) |
|||
client.focus.sticky = (not client.focus.sticky) |
|||
widget:emit_signal("widget::update",widget) |
|||
end) |
|||
sticky:connect_signal("widget::update",function(widget) |
|||
local icon = widget:get_children_by_id("icon")[1] |
|||
icon.image = (client.focus.sticky and sticky_on) or sticky_off |
|||
end) |
|||
client.connect_signal("focus",function(c) |
|||
sticky:emit_signal("widget::update") |
|||
ontop:emit_signal("widget::update") |
|||
floating:emit_signal("widget::update") |
|||
end) |
|||
local widget = wibox.widget({ |
|||
floating, |
|||
ontop, |
|||
sticky, |
|||
layout = wibox.layout.fixed.horizontal, |
|||
spacing = style.base.spacing |
|||
}) |
|||
return widget |
|||
end |
@ -0,0 +1,25 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
local menugen = require("context_menu") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("root_menu",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("root_menu",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local widget = menugen({ |
|||
items = { |
|||
{"Awesome", { |
|||
{"open config dir", "xdg-open "..root_path}, |
|||
{"open docs", "xdg-open https://awesomewm.org/doc/api/"}, |
|||
{"restart", function() awesome.restart() end}, |
|||
{"quit", function() awesome.quit() end} |
|||
}, beautiful.awesome_icon}, |
|||
{"open terminal", global.terminal} |
|||
}, |
|||
}) |
|||
return widget |
|||
end |
@ -1,25 +1,71 @@ |
|||
-- Base for widgets |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
local menugen = require("context_menu") |
|||
local builder = require("builder") |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("root_menu",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("root_menu",awmtk2.templates,args.templates) |
|||
local style = awmtk2.create_style("root_menu",awmtk2.default,{}) |
|||
local templates = awmtk2.create_template_lib("root_menu",awmtk2.templates,{}) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
local widget = menugen({ |
|||
items = { |
|||
{"Awesome", { |
|||
{"open config dir", "xdg-open "..root_path}, |
|||
{"open docs", "xdg-open https://awesomewm.org/doc/api/"}, |
|||
{"restart", function() awesome.restart() end}, |
|||
{"quit", function() awesome.quit() end} |
|||
}, beautiful.awesome_icon}, |
|||
{"open terminal", global.terminal} |
|||
} |
|||
}) |
|||
return widget |
|||
end |
|||
local config_file = io.open(root_path.."/themes/"..global.theme.."/config/root_menu.json","r") |
|||
local config |
|||
if config_file then |
|||
config = config_file:read("*a") |
|||
config_file:close() |
|||
else |
|||
config = [[{"list": [{"widget": "widgets.rootcontrols"}],"vertical": true}]] |
|||
end |
|||
-- TODO: Refactor this whole mess |
|||
root_menu = awful.popup(t.popup({ |
|||
markup = "brainhurt the game", |
|||
widget = wibox.widget.textbox |
|||
})) |
|||
root_menu:connect_signal("button::press",function(self,x,y,b) |
|||
if b == 3 then |
|||
root_menu.visible = false |
|||
end |
|||
end) |
|||
root_menu._menu_private = {} |
|||
root_menu.widget = wibox.widget(t.popup(builder( |
|||
config, |
|||
{ |
|||
style = style.base, |
|||
screen = mouse.screen, |
|||
passthrough = { |
|||
parent = root_menu, |
|||
_tracking_layer = root_menu._menu_private |
|||
} |
|||
} |
|||
)).widget) |
|||
for _,layout in pairs(root_menu.widget:get_children_by_id("menu_root")) do |
|||
print(layout) |
|||
for _,button in pairs(layout.children) do |
|||
button:connect_signal("cascade::kill",function() |
|||
root_menu.visible = false |
|||
end) |
|||
end |
|||
end |
|||
root_menu:connect_signal("property::visible",function() |
|||
local roots = root_menu.widget:get_children_by_id("menu_root") |
|||
for k,v in pairs(roots) do |
|||
for _,w in ipairs(v.children) do |
|||
w:emit_signal("cascade::close") |
|||
end |
|||
end |
|||
end) |
|||
local buttons = root.buttons() |
|||
root.buttons(gears.table.join(buttons, |
|||
awful.button({}, 3, function() |
|||
root_menu.visible = (not root_menu.visible) |
|||
if root_menu.visible then |
|||
root_menu:move_next_to(gears.table.join(mouse.coords(),{ |
|||
width = 0, |
|||
height = 0 |
|||
})) |
|||
end |
|||
end) |
|||
)) |
|||
return root_menu |
|||
end |
@ -0,0 +1,99 @@ |
|||
-- Generic application menu |
|||
local awmtk2 = require("awmtk2") |
|||
local wibox = require("wibox") |
|||
local gears = require("gears") |
|||
local awful = require("awful") |
|||
local beautiful = require("beautiful") |
|||
local menugen = require("context_menu") |
|||
local menuutils = require("menubar").utils |
|||
|
|||
return function(args) |
|||
local style = awmtk2.create_style("xdg_menu",awmtk2.default,args.style) |
|||
local templates = awmtk2.create_template_lib("xdg_menu",awmtk2.templates,args.templates) |
|||
local t = awmtk2.build_templates(templates,style) |
|||
-- Add a "loading" indicator while XDG is still parsing data |
|||
local widget = wibox.widget({ |
|||
t.container({ |
|||
markup = "Loading XDG menu...", |
|||
widget = wibox.widget.textbox |
|||
}), |
|||
layout = wibox.layout.fixed.vertical, |
|||
id = "xdg_menu_root" |
|||
}) |
|||
|
|||
local function exclude(name) |
|||
for k,v in pairs(args.exclude or {}) do |
|||
if name:match(v) then |
|||
return true |
|||
end |
|||
end |
|||
return false |
|||
end |
|||
|
|||
awesome.connect_signal("xdg::all_finished",function() |
|||
if not args.parent then return end |
|||
local items = {} |
|||
for k,v in pairs(xdg.categories) do |
|||
local noprocess = false |
|||
for k2,v2 in pairs(args.exclude_category or {}) do |
|||
if k == v2 then |
|||
noprocess = true |
|||
end |
|||
end |
|||
if (not noprocess) and (#v.apps > 0) then |
|||
local category = {k,{},menuutils.lookup_icon_uncached(v.icon)} |
|||
for _,item in pairs(v.apps) do |
|||
if not exclude(item.name) then |
|||
table.insert(category[2], { |
|||
item.name, |
|||
item.exec:gsub("%%%w","") or "", |
|||
gears.filesystem.file_readable(item.icon or "") and item.icon |
|||
}) |
|||
end |
|||
end |
|||
table.insert(items,category) |
|||
end |
|||
end |
|||
-- uhhh there's a lot of things about async, some of which i can't explain |
|||
local xdg_menu_root = widget:get_children_by_id("xdg_menu_root")[1] |
|||
xdg_menu_root:reset() |
|||
local menu = wibox.widget(menugen({ |
|||
items = items, |
|||
})) |
|||
local menu_root = menu:get_children_by_id("menu_root")[1] |
|||
for k,v in pairs(menu_root.children) do |
|||
v:connect_signal("cascade::kill",function() |
|||
args.parent.visible = false |
|||
end) |
|||
args.parent:connect_signal("property::visible",function() |
|||
if not args.parent.visible then |
|||
v:emit_signal("cascade::close") |
|||
end |
|||
end) |
|||
menu:connect_signal("widget::redraw_needed",function() |
|||
if not menu.visible then |
|||
v:emit_signal("cascade::close") |
|||
end |
|||
end) |
|||
end |
|||
local appswitch = wibox.widget(t.button(t.textbox({ |
|||
markup = "Applications", |
|||
id = "apptext" |
|||
}))) |
|||
appswitch:connect_signal("button::press",function(self) |
|||
menu.visible = (not menu.visible) |
|||
local textbox = appswitch:get_children_by_id("apptext")[1] |
|||
if menu.visible then |
|||
style.button.onpress(self) |
|||
textbox:set_markup("<b>Applications</b>") |
|||
else |
|||
style.button.onrelease(self) |
|||
textbox:set_markup("Applications") |
|||
end |
|||
end) |
|||
menu.visible = false |
|||
xdg_menu_root:add(appswitch) |
|||
xdg_menu_root:add(menu) |
|||
end) |
|||
return widget |
|||
end |