Compare commits
4 Commits
7d60e5625f
...
99ceb01113
Author | SHA1 | Date |
---|---|---|
Yessiest | 99ceb01113 | |
Yessiest | 64051ede9b | |
Yessiest | 0d3131a8f9 | |
Yessiest | 379b838751 |
|
@ -3,3 +3,4 @@
|
|||
/links
|
||||
/libs/pam
|
||||
/libs/pam.so
|
||||
/doc
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
file = {"libs","modules","widgets"}
|
||||
format = "markdown"
|
||||
title = "Reno Desktop documentation"
|
||||
description = "Reno Desktop is an AwesomeWM config that harnesses the power of AwesomeWM to bring the essential functionality of a desktop environment."
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"diagnostics": {
|
||||
"enable": true,
|
||||
"globals": [
|
||||
"awesome",
|
||||
"button",
|
||||
"dbus",
|
||||
"client",
|
||||
"mouse",
|
||||
"screen",
|
||||
"root"
|
||||
]
|
||||
},
|
||||
"runtime": {
|
||||
"version": "Lua 5.3",
|
||||
"path": [
|
||||
"/usr/share/awesome/lib/?/?.lua"
|
||||
],
|
||||
"pathStrict": true
|
||||
},
|
||||
"workspace": {
|
||||
"library": [
|
||||
"runtime/lua",
|
||||
"/usr/share/awesome/lib"
|
||||
],
|
||||
"checkThirdParty": false,
|
||||
"maxPreload": 2000,
|
||||
"preloadFileSize": 1000
|
||||
},
|
||||
"telemetry.enable": true
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
task default: [:install]
|
||||
ConfigPath = (ENV["XDG_DATA_HOME"] or ENV["HOME"]+'/.config')
|
||||
|
||||
desc "Install (copy) config files"
|
||||
task "install-files" do
|
||||
base = ["libs","modules","themes","widgets","rc.lua","desktop.conf"]
|
||||
sh "mkdir -p #{ConfigPath}/awesome"
|
||||
base.each { |f|
|
||||
cp_r "./#{f}", "#{ConfigPath}/awesome"
|
||||
}
|
||||
end
|
||||
|
||||
desc "Install LuaPAM"
|
||||
task "install-luapam" do
|
||||
unless File.exist? "#{ConfigPath}/awesome/libs/pam.so"
|
||||
sh "sh ./extra/install_luapam.sh"
|
||||
cp "./pam.so","#{ConfigPath}/awesome/libs/"
|
||||
cp_r "./pam","#{ConfigPath}/awesome/libs/"
|
||||
rm "./pam.so"
|
||||
rm_rf "./pam"
|
||||
rm_rf "./lua-pam"
|
||||
else
|
||||
puts "LuaPAM already installed - skipping"
|
||||
end
|
||||
end
|
||||
|
||||
desc "Force install config"
|
||||
task "install-force" => ["install-files","install-luapam"]
|
||||
|
||||
desc "Install config"
|
||||
task :install do
|
||||
installed = true
|
||||
base = ["libs","modules","themes","widgets","rc.lua","desktop.conf"]
|
||||
(base+["libs/pam.so"]).each { |f|
|
||||
installed &= File.exist? "#{ConfigPath}/awesome/#{f}"
|
||||
}
|
||||
if installed
|
||||
puts "Baseline files already installed - skipping"
|
||||
else
|
||||
Rake::Task["install-force"].invoke
|
||||
end
|
||||
end
|
||||
|
||||
desc "Build documentation"
|
||||
task :doc do
|
||||
sh "ldoc ./.ldoc.lua"
|
||||
end
|
||||
|
||||
desc "Install extras"
|
||||
task "install-extra" do
|
||||
cp "./extra/udev/backlight.rules", "/etc/udev/rules.d"
|
||||
mkdir "#{ConfigPath}/autostart"
|
||||
begin
|
||||
sh "sudo cp /usr/share/applications/picom.desktop #{ConfigPath}/autostart/"
|
||||
rescue
|
||||
puts "picom not installed - ignoring"
|
||||
else
|
||||
cp "./extra/picom.conf", "#{ConfigPath}"
|
||||
end
|
||||
puts "Done! Reload awesome to complete installation"
|
||||
end
|
||||
|
||||
desc "Uninstall from .config"
|
||||
task :clean do
|
||||
rm_rf "#{ConfigPath}/awesome"
|
||||
end
|
||||
|
||||
desc "Wipe configuration and reinstall from scratch"
|
||||
task reinstall: [:clean,:install]
|
||||
|
|
@ -17,6 +17,7 @@ modkey+Control+Down = ":root.screen_previous"
|
|||
modkey+Tab = ":root.client_swap"
|
||||
modkey+Return = ":root.spawn_terminal"
|
||||
modkey+Shift+Return = ":root.spawn_browser"
|
||||
modkey+Shift+y = ":root.toggle_titlebars"
|
||||
|
||||
# Client keys only work if a focused client exists
|
||||
modkey+Shift+c = ":client.kill"
|
||||
|
@ -40,6 +41,7 @@ XF86MonBrightnessDown = ":battery.brightness_down"
|
|||
XF86AudioPlay = ":mpc.play"
|
||||
XF86AudioPrev = ":mpc.prev"
|
||||
XF86AudioNext = ":mpc.next"
|
||||
|
||||
# Custom keys
|
||||
Print = "flameshot gui"
|
||||
Shift+Print = "flameshot launcher"
|
||||
|
|
|
@ -16,12 +16,11 @@ if [ "$LUA_VERSION" == "" ]; then
|
|||
exit 1
|
||||
fi
|
||||
echo "Target version: $LUA_VERSION"
|
||||
git clone --recursive https://github.com/devurandom/lua-pam ~/.config/awesome/lua-pam
|
||||
cd ~/.config/awesome/lua-pam
|
||||
git clone --recursive https://github.com/devurandom/lua-pam lua-pam
|
||||
cd lua-pam
|
||||
make LUA_VERSION="$LUA_VERSION"
|
||||
mkdir -p ~/.config/awesome/libs/pam/
|
||||
cp LICENSE ~/.config/awesome/libs/pam/
|
||||
echo "https://github.com/devurandom/lua-pam" > ~/.config/awesome/libs/pam/README
|
||||
cp pam.so ~/.config/awesome/libs/
|
||||
rm -rf ~/.config/awesome/lua-pam
|
||||
mkdir -p ../pam/
|
||||
cp LICENSE ../pam/
|
||||
echo "https://github.com/devurandom/lua-pam" > ../pam/README
|
||||
cp pam.so ../
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
backend = "xrender";
|
||||
vsync = true;
|
||||
|
||||
# Shadow
|
||||
shadow = true; # Enabled client-side shadows on windows.
|
||||
shadow-radius = 12; # The blur radius for shadows. (default 12)
|
||||
|
@ -31,7 +30,8 @@ shadow-exclude = [
|
|||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
|
||||
# Fading
|
||||
fading = true# Fade windows during opacity changes.
|
||||
fading = true;
|
||||
# Fade windows during opacity changes.
|
||||
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
|
||||
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
|
||||
|
|
207
libs/awmtk2.lua
|
@ -1,11 +1,11 @@
|
|||
-- This file is part of Reno desktop.
|
||||
-- this file is part of reno desktop.
|
||||
--
|
||||
-- Reno desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
-- reno desktop is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
|
||||
--
|
||||
-- Reno desktop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
-- reno desktop is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. see the gnu general public license for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License along with Reno desktop. If not, see <https://www.gnu.org/licenses/>.
|
||||
-- RenoTK (formerly AWMTK2) - Template/Granular styling library for Reno
|
||||
-- you should have received a copy of the gnu general public license along with reno desktop. if not, see <https://www.gnu.org/licenses/>.
|
||||
-- renotk (formerly awmtk2) - template/granular styling library for reno
|
||||
local wibox = require("wibox")
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
|
@ -15,23 +15,22 @@ beautiful.templates = beautiful.templates or {}
|
|||
|
||||
local awmtk = {}
|
||||
|
||||
-- {{{ Utils
|
||||
-- {{{ utils
|
||||
awmtk.create_delta = function(name,instance_delta,class_delta,parent_delta)
|
||||
-- To save memory, we create proxies for lower layers called "deltas"
|
||||
-- This function creates that proxy layer using metatables
|
||||
|
||||
-- Fun story - i used instance_delta instead of {} at first.
|
||||
-- The results were horrifying and confusing.
|
||||
-- to save memory, we create proxies for lower layers called "deltas"
|
||||
-- this function creates that proxy layer using metatables
|
||||
-- fun story - i used instance_delta instead of {} at first.
|
||||
-- the results were horrifying and confusing.
|
||||
return setmetatable({},{
|
||||
__index = function(self,k)
|
||||
-- Per-instance overrides are top priority
|
||||
-- per-instance overrides are top priority
|
||||
if rawget(instance_delta,k) then
|
||||
return rawget(instance_delta,k)
|
||||
-- Class-wide overrides are second in priority
|
||||
elseif type(class_delta[name]) == "table"
|
||||
-- class-wide overrides are second in priority
|
||||
elseif type(class_delta[name]) == "table"
|
||||
and rawget(class_delta[name],k) then
|
||||
return rawget(class_delta[name],k)
|
||||
-- Parent is fallback
|
||||
-- parent is fallback
|
||||
elseif parent_delta[k] then
|
||||
return parent_delta[k]
|
||||
end
|
||||
|
@ -40,11 +39,11 @@ awmtk.create_delta = function(name,instance_delta,class_delta,parent_delta)
|
|||
end
|
||||
|
||||
awmtk.create_style = function(name,parent,overrides)
|
||||
-- A style is essentially a layer of deltas upon the previous (parent) style
|
||||
-- a style is essentially a layer of deltas upon the previous (parent) style
|
||||
local new_style = {}
|
||||
local odelta = (overrides and overrides[name]) or {}
|
||||
local cdelta = beautiful.widgets[name] or {}
|
||||
for name,parent_class in pairs(parent) do
|
||||
for name,parent_class in pairs(parent) do
|
||||
new_style[name] = awmtk.create_delta(
|
||||
name,
|
||||
odelta,
|
||||
|
@ -53,7 +52,7 @@ awmtk.create_style = function(name,parent,overrides)
|
|||
)
|
||||
end
|
||||
return new_style
|
||||
end
|
||||
end
|
||||
|
||||
awmtk.create_template_lib = function(name,parent,overrides)
|
||||
-- same thing but beautiful.templates
|
||||
|
@ -65,43 +64,84 @@ awmtk.create_template_lib = function(name,parent,overrides)
|
|||
)
|
||||
end
|
||||
|
||||
awmtk.build_templates = function(templates,style)
|
||||
awmtk.build_templates = function(templates,style,vertical)
|
||||
local new_templates = {}
|
||||
for name,template in pairs(awmtk.proto_templates) do
|
||||
new_templates[name] = templates[name](style)
|
||||
new_templates[name] = templates[name](style,vertical)
|
||||
end
|
||||
return new_templates
|
||||
end
|
||||
|
||||
awmtk.mask_object_call = function(obj,call)
|
||||
local new = {}
|
||||
for k,v in pairs(obj) do
|
||||
new[k] = v
|
||||
end
|
||||
return setmetatable(new,{
|
||||
__index = obj,
|
||||
__call = call
|
||||
})
|
||||
end
|
||||
|
||||
awmtk.wrap_hooks = function(w,callbacks)
|
||||
-- attach hooks to function
|
||||
local mcall = (getmetatable(w) and getmetatable(w).__call) or w
|
||||
local call_wrapper = function(...)
|
||||
if callbacks and callbacks.on_create_pre then
|
||||
callbacks.on_create_pre(...)
|
||||
end
|
||||
local widget = mcall(...)
|
||||
if callbacks and callbacks.on_create then
|
||||
callbacks.on_create(widget,...)
|
||||
end
|
||||
if callbacks and callbacks.on_ready then
|
||||
callbacks._on_ready_called = false
|
||||
local func = function()
|
||||
if not callbacks._on_ready_called then
|
||||
callbacks.on_ready(widget)
|
||||
callbacks._on_ready_called = true
|
||||
end
|
||||
end
|
||||
widget:connect_signal("widget::layout_changed",func)
|
||||
widget:connect_signal("widget::layout_changed",function()
|
||||
widget:disconnect_signal("widget::layout_changed",func)
|
||||
end)
|
||||
end
|
||||
return widget
|
||||
end
|
||||
return (getmetatable(w) and awmtk.mask_object_call(w,call_wrapper)) or
|
||||
call_wrapper
|
||||
end
|
||||
|
||||
awmtk.merge = gears.table.join
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ Default style
|
||||
-- {{{ default style
|
||||
|
||||
-- Prototype style
|
||||
-- Notice that it's not awmtk.default style - it's used as a base for default.
|
||||
-- prototype style
|
||||
-- notice that it's not awmtk.default style - it's used as a base for default.
|
||||
awmtk.proto_style = {
|
||||
base = setmetatable({
|
||||
-- { Backgrounds
|
||||
-- { backgrounds
|
||||
-- custom background color for highlighting elements
|
||||
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
|
||||
-- allow more complex themes to define background images
|
||||
bgimage_focus = beautiful.bgimage_focus,
|
||||
bgimage_normal = beautiful.bgimage_normal,
|
||||
-- }
|
||||
-- { Borders
|
||||
-- Borders for popups
|
||||
-- { borders
|
||||
-- borders for popups
|
||||
shape_border_width = beautiful.shape_border_width or 0,
|
||||
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
|
||||
-- }
|
||||
-- { Callbacks
|
||||
-- { callbacks
|
||||
-- a tiny bit more complex thing to account for more extensibility
|
||||
-- the stub functions do nothing - you should implement functionality inside theme
|
||||
onpress = function() end,
|
||||
onrelease = function() end,
|
||||
-- }
|
||||
-- { Shapes
|
||||
-- { shapes
|
||||
margins = 5,
|
||||
spacing = 5,
|
||||
shape = function(cr, width, height)
|
||||
|
@ -111,7 +151,7 @@ awmtk.proto_style = {
|
|||
},{__index = beautiful})
|
||||
}
|
||||
|
||||
-- Subclasses
|
||||
-- subclasses
|
||||
awmtk.proto_style.container = awmtk.create_delta("container",{
|
||||
},awmtk.proto_style,awmtk.proto_style.base)
|
||||
|
||||
|
@ -167,13 +207,13 @@ awmtk.proto_style.checkbox = awmtk.create_delta("checkbox", {
|
|||
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Generic templates
|
||||
-- {{{ generic templates
|
||||
awmtk.proto_templates = {
|
||||
-- Templates are built first using the given style, then applied to contents
|
||||
-- templates are built first using the given style, then applied to contents
|
||||
-- through returned function
|
||||
container = function(style)
|
||||
-- Container is practically any "box" that contains buttons, textboxes,
|
||||
-- and anything you want to put into the container. Do not confuse with
|
||||
-- container is practically any "box" that contains buttons, textboxes,
|
||||
-- and anything you want to put into the container. do not confuse with
|
||||
-- popup - containers are designed to separate contents within a popup.
|
||||
return function(layout,options)
|
||||
return awmtk.merge({
|
||||
|
@ -188,14 +228,14 @@ awmtk.proto_templates = {
|
|||
shape = style.container.shape,
|
||||
shape_border_color = style.container.shape_border_color,
|
||||
shape_border_width = style.container.shape_border_width,
|
||||
widget = wibox.container.background
|
||||
widget = awmtk.wrap_hooks(wibox.container.background,options)
|
||||
},options or {})
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
button = function(style)
|
||||
-- Self explanatory. Notice that this does not bear any function -
|
||||
-- only the visual part of the button. By design, onpress and onrelease
|
||||
-- self explanatory. notice that this does not bear any function -
|
||||
-- only the visual part of the button. by design, onpress and onrelease
|
||||
-- callbacks should be connected to button events for animations
|
||||
return function(layout,options)
|
||||
return awmtk.merge({
|
||||
|
@ -210,26 +250,26 @@ awmtk.proto_templates = {
|
|||
shape = style.button.shape,
|
||||
shape_border_color = style.button.shape_border_color,
|
||||
shape_border_width = style.button.shape_border_width,
|
||||
widget = wibox.container.background
|
||||
widget = awmtk.wrap_hooks(wibox.container.background,options)
|
||||
},options or {})
|
||||
end
|
||||
end,
|
||||
|
||||
textbox = function(style)
|
||||
-- Nothing fancy here, but you can set per-widget fonts using beautiful.
|
||||
-- nothing fancy here, but you can set per-widget fonts using beautiful.
|
||||
return function(options)
|
||||
return awmtk.merge({
|
||||
font = style.textbox.font,
|
||||
widget = wibox.widget.textbox,
|
||||
widget = awmtk.wrap_hooks(wibox.widget.textbox,options)
|
||||
},options or {})
|
||||
end
|
||||
end,
|
||||
|
||||
hseparator = function(style)
|
||||
-- Wow, i guess?
|
||||
-- wow, i guess?
|
||||
return function(options)
|
||||
return awmtk.merge({
|
||||
widget = wibox.widget.separator,
|
||||
widget = awmtk.wrap_hooks(wibox.widget.separator,options),
|
||||
orientation = "horizontal",
|
||||
thickness = style.separator.thickness,
|
||||
color = style.separator.color,
|
||||
|
@ -237,12 +277,12 @@ awmtk.proto_templates = {
|
|||
},options or {})
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
vseparator = function(style)
|
||||
-- I'm running out of comments
|
||||
-- i'm running out of comments
|
||||
return function(options)
|
||||
return awmtk.merge({
|
||||
widget = wibox.widget.separator,
|
||||
widget = awmtk.wrap_hooks(wibox.widget.separator,options),
|
||||
orientation = "vertical",
|
||||
thickness = style.separator.thickness,
|
||||
color = style.separator.color,
|
||||
|
@ -252,8 +292,8 @@ awmtk.proto_templates = {
|
|||
end,
|
||||
|
||||
article = function(style)
|
||||
-- Article is a template that combines 3 common pieces of a full item:
|
||||
-- Icon, name and description. Designed to be placed within a container
|
||||
-- article is a template that combines 3 common pieces of a full item:
|
||||
-- icon, name and description. designed to be placed within a container
|
||||
-- or a button.
|
||||
return function(options)
|
||||
return awmtk.merge({
|
||||
|
@ -268,9 +308,9 @@ awmtk.proto_templates = {
|
|||
strategy = "exact",
|
||||
height = options.icon_size or
|
||||
style.article.icon_size,
|
||||
width = options.icon_size or
|
||||
width = options.icon_size or
|
||||
style.article.icon_size,
|
||||
widget = wibox.container.constraint
|
||||
widget = wibox.container.constraint
|
||||
},
|
||||
widget = wibox.container.place,
|
||||
valign = "center",
|
||||
|
@ -297,7 +337,10 @@ awmtk.proto_templates = {
|
|||
layout = wibox.layout.flex.vertical
|
||||
},
|
||||
spacing = style.article.spacing,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
layout = awmtk.wrap_hooks(
|
||||
wibox.layout.fixed.horizontal,
|
||||
options
|
||||
)
|
||||
}, options or {})
|
||||
end
|
||||
end,
|
||||
|
@ -311,11 +354,14 @@ awmtk.proto_templates = {
|
|||
strategy = "exact",
|
||||
height = options.height or
|
||||
style.center.height,
|
||||
width = options.width or
|
||||
width = options.width or
|
||||
style.center.width,
|
||||
widget = wibox.container.constraint
|
||||
widget = wibox.container.constraint
|
||||
},
|
||||
widget = wibox.container.place,
|
||||
widget = awmtk.wrap_hooks(
|
||||
wibox.container.place,
|
||||
options
|
||||
),
|
||||
valign = "center",
|
||||
halign = "center"
|
||||
},options or {})
|
||||
|
@ -323,14 +369,14 @@ awmtk.proto_templates = {
|
|||
end,
|
||||
|
||||
popup = function(style)
|
||||
-- Popup is a distinct template designed to accomodate the "root" of
|
||||
-- popup is a distinct template designed to accomodate the "root" of
|
||||
-- a popup, allowing one to add titlebars to popups, for example.
|
||||
return function(widget,options)
|
||||
return awmtk.merge({
|
||||
widget = {
|
||||
widget,
|
||||
margins = style.popup.margins,
|
||||
layout = wibox.container.margin
|
||||
layout = awmtk.wrap_hooks(wibox.container.margin,options)
|
||||
},
|
||||
bgimage = style.popup.bgimage_normal,
|
||||
shape = style.popup.shape,
|
||||
|
@ -341,24 +387,24 @@ awmtk.proto_templates = {
|
|||
end,
|
||||
|
||||
titlebar = function(style)
|
||||
-- Titlebar is a separate class specifically for window and popup
|
||||
-- titlebars. The decision to make it a separate class was due to
|
||||
-- titlebar is a separate class specifically for window and popup
|
||||
-- titlebars. the decision to make it a separate class was due to
|
||||
-- the fact that much customization is done through default theme table
|
||||
return function(layout,options)
|
||||
-- If there's one thing that fascinates me, it's how much weird
|
||||
-- if there's one thing that fascinates me, it's how much weird
|
||||
-- bugs i manage to uncover by some sort of miraculous accident.
|
||||
-- This one fixes a race condition in margins+(left/right/bottom/top) configuration scenario
|
||||
-- this one fixes a race condition in margins+(left/right/bottom/top) configuration scenario
|
||||
local margins = style.titlebar.margins
|
||||
if (style.titlebar.left or
|
||||
style.titlebar.right or
|
||||
style.titlebar.bottom or
|
||||
if (style.titlebar.left or
|
||||
style.titlebar.right or
|
||||
style.titlebar.bottom or
|
||||
style.titlebar.top) then
|
||||
margins = nil
|
||||
end
|
||||
return awmtk.merge({
|
||||
layout,
|
||||
margins = margins,
|
||||
layout = wibox.container.margin,
|
||||
layout = awmtk.wrap_hooks(wibox.container.margin,options),
|
||||
left = style.titlebar.left,
|
||||
right = style.titlebar.right,
|
||||
bottom = style.titlebar.bottom,
|
||||
|
@ -368,19 +414,19 @@ awmtk.proto_templates = {
|
|||
end,
|
||||
|
||||
wibar = function(style)
|
||||
-- Just you regular old wibar, but as a style template.
|
||||
-- just you regular old wibar, but as a style template.
|
||||
return function(layout,options)
|
||||
local margins = style.wibar.margins
|
||||
if (style.wibar.left or
|
||||
style.wibar.right or
|
||||
style.wibar.bottom or
|
||||
if (style.wibar.left or
|
||||
style.wibar.right or
|
||||
style.wibar.bottom or
|
||||
style.wibar.top) then
|
||||
margins = nil
|
||||
end
|
||||
return awmtk.merge({
|
||||
layout,
|
||||
margins = margins,
|
||||
layout = wibox.container.margin,
|
||||
layout = awmtk.wrap_hooks(wibox.container.margin,options),
|
||||
left = style.wibar.left,
|
||||
right = style.wibar.right,
|
||||
bottom = style.wibar.bottom,
|
||||
|
@ -390,7 +436,7 @@ awmtk.proto_templates = {
|
|||
end,
|
||||
|
||||
slider = function(style)
|
||||
-- Slider widget but wired to work with the AWMTK2 namespace system
|
||||
-- slider widget but wired to work with the awmtk2 namespace system
|
||||
return function(args)
|
||||
return awmtk.merge({
|
||||
handle_shape = style.slider.handle_shape or style.slider.shape,
|
||||
|
@ -407,7 +453,7 @@ awmtk.proto_templates = {
|
|||
bar_border_color = style.slider.bar_border_color,
|
||||
forced_width = style.slider.width,
|
||||
forced_height = style.slider.height,
|
||||
widget = wibox.widget.slider
|
||||
widget = awmtk.wrap_hooks(wibox.widget.slider,args)
|
||||
},args or {})
|
||||
end
|
||||
end,
|
||||
|
@ -415,23 +461,26 @@ awmtk.proto_templates = {
|
|||
checkbox = function(style)
|
||||
return function(args)
|
||||
return awmtk.merge({
|
||||
color = style.checkbox.bg_focus,
|
||||
padding = 2,
|
||||
color = style.checkbox.color or style.checkbox.bg_normal,
|
||||
paddings = style.checkbox.paddings,
|
||||
shape = style.checkbox.shape,
|
||||
border_width = style.checkbox.shape_border_width,
|
||||
bg = style.checkbox.shape_border_color,
|
||||
widget = wibox.widget.checkbox
|
||||
},args or {})
|
||||
border_width = style.checkbox.border_width,
|
||||
border_color = style.checkbox.border_color or style.checkbox.bg_normal,
|
||||
bg = style.checkbox.bg or style.checkbox.bg_focus,
|
||||
check_color = style.checkbox.check_color or style.checkbox.bg_normal,
|
||||
check_shape = style.checkbox.check_shape,
|
||||
widget = awmtk.wrap_hooks(wibox.widget.checkbox,args)
|
||||
},args)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
-- Last but not least - we export a default template lib and default style.
|
||||
-- This is done in order to allow overriding default style behaviour from theme
|
||||
-- last but not least - we export a default template lib and default style.
|
||||
-- this is done in order to allow overriding default style behaviour from theme
|
||||
awmtk.default = awmtk.create_style("default",awmtk.proto_style,{})
|
||||
awmtk.templates = awmtk.create_template_lib("templates",awmtk.proto_templates,{})
|
||||
|
||||
-- Generic styles for widgets that need them
|
||||
-- generic styles for widgets that need them
|
||||
awmtk.generic = {}
|
||||
awmtk.generic.menu = awmtk.create_style("generic_menu",awmtk.default,{})
|
||||
awmtk.generic.button_list = awmtk.create_style("generic_button_list",awmtk.default,{})
|
||||
|
|
|
@ -45,16 +45,16 @@ return function(description,opts)
|
|||
local buttons = opts.buttons
|
||||
-- Build a layout given a JSON description, a style and client
|
||||
-- (if applicable)
|
||||
local layout = {}
|
||||
local test,err = json.decode(description)
|
||||
if not test then
|
||||
error("Builder failure: "..err)
|
||||
end
|
||||
local function inner_builder(struct)
|
||||
local function inner_builder(struct,vertical)
|
||||
if struct.widget then -- External widget descriptions
|
||||
return require(struct.widget)(gears.table.join({
|
||||
layout = (struct.layout and inner_builder(struct.layout)), client = (struct.client and c),
|
||||
screen = (struct.screen and s)
|
||||
screen = (struct.screen and s),
|
||||
vertical = vertical
|
||||
},struct.options or {},opts.passthrough or {}))
|
||||
elseif struct.list then -- List descriptions
|
||||
local list = {
|
||||
|
@ -64,11 +64,11 @@ return function(description,opts)
|
|||
)],
|
||||
spacing = style.spacing
|
||||
}
|
||||
for k,v in pairs(struct.list) do
|
||||
for _,v in pairs(struct.list) do
|
||||
if v.draggable then
|
||||
list.buttons = buttons
|
||||
else
|
||||
local new_obj = inner_builder(v)
|
||||
local new_obj = inner_builder(v,struct.vertical)
|
||||
if new_obj then
|
||||
table.insert(list,new_obj)
|
||||
end
|
||||
|
@ -101,7 +101,7 @@ return function(description,opts)
|
|||
if obj.draggable then
|
||||
list[k].buttons = buttons
|
||||
else
|
||||
local new_obj = inner_builder(obj)
|
||||
local new_obj = inner_builder(obj,struct.vertical)
|
||||
if new_obj then
|
||||
table.insert(list[k],new_obj)
|
||||
end
|
||||
|
@ -120,12 +120,12 @@ return function(description,opts)
|
|||
return builtins[struct.builtin](gears.table.join({
|
||||
client = (struct.client and c)
|
||||
},struct.options or {}))
|
||||
end
|
||||
end
|
||||
-- If this gets interpreted it's safe to say none of the constructions
|
||||
-- above got matched.
|
||||
print("Object where the error occured: ")
|
||||
gears.debug.dump(struct)
|
||||
gears.debug.dump(struct)
|
||||
error("Builder error: invalid object description")
|
||||
end
|
||||
return inner_builder(test,layout),test.context_options
|
||||
return inner_builder(test),test.context_options
|
||||
end
|
||||
|
|
|
@ -14,6 +14,7 @@ global.modkey = global.modkey or "Mod4"
|
|||
ask.set_keymap(config.keys)
|
||||
local custom_keys = ask.custom_binds()
|
||||
local k = ask.k
|
||||
local titlebar_states = {}
|
||||
|
||||
local keys = gears.table.join(
|
||||
k(':root.client_next',
|
||||
|
@ -54,6 +55,11 @@ local keys = gears.table.join(
|
|||
awful.spawn(global.browser)
|
||||
end,
|
||||
{description = "open browser", group = "launcher"}),
|
||||
k(":root.toggle_titlebars",
|
||||
function (c)
|
||||
awesome.emit_signal("titlebar::toggle")
|
||||
end ,
|
||||
{description = "(un)hide all titlebars", group = "client"}),
|
||||
table.unpack(custom_keys))
|
||||
root.keys(keys)
|
||||
|
||||
|
@ -109,14 +115,9 @@ local clientkeys = gears.table.join(
|
|||
{description = "(un)pin", group = "client"}),
|
||||
k(":client.toggle_titlebars",
|
||||
function (c)
|
||||
if (not c.titlebar_top.visible) then
|
||||
c:emit_signal("titlebar::unhide")
|
||||
else
|
||||
c:emit_signal("titlebar::hide")
|
||||
end
|
||||
c:emit_signal("titlebar::toggle")
|
||||
end ,
|
||||
{description = "(un)hide titlebars", group = "client"}))
|
||||
|
||||
awful.rules.rules[1].properties.keys = clientkeys
|
||||
|
||||
local clientbuttons = gears.table.join(
|
||||
|
|
|
@ -116,15 +116,47 @@ table.insert(awful.rules.rules,
|
|||
}
|
||||
)
|
||||
|
||||
local window_shape_hide = function(cr, width, height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
false,false,false,false,0)
|
||||
end
|
||||
|
||||
local window_shape = beautiful.window_shape or function(cr, width, height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
true,true,false,false,beautiful.window_rounding)
|
||||
end
|
||||
|
||||
client.connect_signal("manage", function(c)
|
||||
local shape = beautiful.window_shape or function(cr, width, height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
true,true,false,false,beautiful.window_rounding)
|
||||
end
|
||||
c.shape = shape
|
||||
c.shape = window_shape
|
||||
end)
|
||||
|
||||
client.connect_signal("request::titlebars",function(c)
|
||||
local titlebars_on = true
|
||||
awesome.connect_signal("titlebar::toggle",function()
|
||||
titlebars_on = not titlebars_on
|
||||
for _,c in ipairs(client.get()) do
|
||||
if titlebars_on then
|
||||
for _, pos in ipairs({"top","bottom","left","right"}) do
|
||||
awful.titlebar.show(c,pos)
|
||||
end
|
||||
c.shape = window_shape
|
||||
c:emit_signal("titlebar::perform_action",function(titlebar)
|
||||
titlebar.widget.visible = true
|
||||
end)
|
||||
else
|
||||
for _, pos in ipairs({"top","bottom","left","right"}) do
|
||||
awful.titlebar.hide(c,pos)
|
||||
end
|
||||
c.shape = window_shape_hide
|
||||
c:emit_signal("titlebar::perform_action",function(titlebar)
|
||||
titlebar.widget.visible = false
|
||||
end)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Second manage call to create hidden titlebars
|
||||
client.connect_signal("manage",function(c)
|
||||
-- Drag and resize buttons
|
||||
local buttons = gears.table.join(
|
||||
awful.button({}, 1, function()
|
||||
c:emit_signal("request::activate","titlebar",{raise=true})
|
||||
|
@ -135,8 +167,10 @@ client.connect_signal("request::titlebars",function(c)
|
|||
awful.mouse.client.resize(c)
|
||||
end)
|
||||
)
|
||||
-- Building the titlebars
|
||||
for k,v in pairs({"titlebar_top","titlebar_bottom","titlebar_left","titlebar_right"}) do
|
||||
local contents = { widget = wibox.container.background }
|
||||
-- Build content of the titlebar
|
||||
local contents = { widget = wibox.widget.textbox, text = "" }
|
||||
if titlebar_config[v] then
|
||||
contents = builder(titlebar_config[v],{
|
||||
client = c,
|
||||
|
@ -145,6 +179,7 @@ client.connect_signal("request::titlebars",function(c)
|
|||
buttons = buttons
|
||||
})
|
||||
end
|
||||
-- Create the base
|
||||
local titlebar = awful.titlebar(c,{
|
||||
size = style[v].size or 0,
|
||||
position = v:gsub("titlebar_",""),
|
||||
|
@ -156,8 +191,14 @@ client.connect_signal("request::titlebars",function(c)
|
|||
fg_focus = style[v].fg_focus,
|
||||
font = style[v].font
|
||||
})
|
||||
c[v] = titlebar:setup(t.titlebar(contents))
|
||||
-- Compile and build titlebar
|
||||
titlebar:setup(t.titlebar({
|
||||
contents,
|
||||
widget = wibox.container.background
|
||||
}))
|
||||
-- Since new clients will be placed without titlebars, we need to apply placement rules again
|
||||
awful.rules.rules[1].properties.placement(c)
|
||||
-- Callbacks for focus/unfocus of titlebars
|
||||
if style[v].onfocus then
|
||||
c:connect_signal("focus",function()
|
||||
style[v].onfocus(titlebar)
|
||||
|
@ -168,12 +209,32 @@ client.connect_signal("request::titlebars",function(c)
|
|||
style[v].onunfocus(titlebar)
|
||||
end)
|
||||
end
|
||||
c:connect_signal("titlebar::hide",function(c)
|
||||
c[v].visible = false
|
||||
-- Activate focus callback if our client is focused
|
||||
if (c == client.focus) and (style[v].onfocus) then
|
||||
style[v].onfocus(titlebar)
|
||||
end
|
||||
-- Add a titlebar toggle signal
|
||||
c:connect_signal("titlebar::toggle",function(c)
|
||||
titlebar.widget.visible = not titlebar.widget.visible
|
||||
if titlebar.widget.visible then
|
||||
awful.titlebar.show(c,v:gsub("titlebar_",""))
|
||||
c.shape = window_shape
|
||||
else
|
||||
awful.titlebar.hide(c,v:gsub("titlebar_",""))
|
||||
c.shape = window_shape_hide
|
||||
end
|
||||
end)
|
||||
c:connect_signal("titlebar::unhide",function(c)
|
||||
c[v].visible = true
|
||||
c:connect_signal("titlebar::perform_action",function(c,f)
|
||||
f(titlebar)
|
||||
end)
|
||||
-- Add rules for hiding titlebars on creation
|
||||
if (not titlebars_on) or
|
||||
(c.titlebars_enabled == false) or
|
||||
(c.requests_no_titlebar == true) then
|
||||
titlebar.widget.visible = false
|
||||
c.shape = window_shape_hide
|
||||
awful.titlebar.hide(c,v:gsub("titlebar_",""))
|
||||
end
|
||||
end
|
||||
end)
|
||||
end --}}}
|
||||
|
|
|
@ -6,29 +6,30 @@
|
|||
--
|
||||
-- You should have received a copy of the GNU General Public License along with Reno desktop. If not, see <https://www.gnu.org/licenses/>.
|
||||
-- Asynchronous XDG data aggregator
|
||||
local start_human = os.time()
|
||||
local start_computer = os.clock()
|
||||
local menu_utils = require("menubar.utils")
|
||||
local menu_gen = require("menubar.menu_gen")
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local json = require("dkjson")
|
||||
menu_utils.wm_name = ""
|
||||
|
||||
-- Directories to scan for .desktop files
|
||||
local desktop_dirs = {}
|
||||
local desktop_dirs_complete = 0
|
||||
local icon_dirs = {}
|
||||
((table.concat(gears.filesystem.get_xdg_data_dirs(),":") or
|
||||
"/usr/share:/usr/local/share")..":"..os.getenv("HOME").."/.local/share"):gsub("[^:]*",function(path)
|
||||
local _ = ((table.concat(gears.filesystem.get_xdg_data_dirs(),":") or
|
||||
"/usr/share:/usr/local/share")..":"..os.getenv("HOME").."/.local/share"):gsub("[^:]*",function(path)
|
||||
if gears.filesystem.dir_readable(path.."/applications") then
|
||||
table.insert(desktop_dirs, path.."/applications")
|
||||
end
|
||||
if gears.filesystem.dir_readable(path.."/icons") then
|
||||
table.insert(icon_dirs, path.."/icons")
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
-- Global xdg data cache
|
||||
xdg = {
|
||||
-- Global xdg data struct
|
||||
_G.xdg = {
|
||||
directory_integrity = {},
|
||||
directory_listings = {},
|
||||
apps = {},
|
||||
categories = {
|
||||
Other = {
|
||||
|
@ -42,7 +43,16 @@ xdg = {
|
|||
}
|
||||
}
|
||||
|
||||
for k,v in pairs(menu_gen.all_categories) do
|
||||
-- Load cached applications
|
||||
local cache_file = io.open(gears.filesystem.get_xdg_cache_home()..".reno_xdg_cache.json","r")
|
||||
local cache
|
||||
if cache_file then
|
||||
cache = json.decode(cache_file:read("*a"))
|
||||
cache_file:close()
|
||||
end
|
||||
|
||||
-- Add missing category entries as defined by awesome
|
||||
for _,v in pairs(menu_gen.all_categories) do
|
||||
xdg.categories[v.app_type] = {
|
||||
name = v.name,
|
||||
icon = v.icon_name,
|
||||
|
@ -51,58 +61,83 @@ for k,v in pairs(menu_gen.all_categories) do
|
|||
end
|
||||
|
||||
-- Asynchronous scanning process
|
||||
for k,v in pairs(desktop_dirs) do
|
||||
awful.spawn.with_line_callback("find "..tostring(v).." -name *.desktop",{
|
||||
stdout = function(line)
|
||||
local data = menu_utils.parse_desktop_file(line)
|
||||
if data.NoDisplay then
|
||||
return
|
||||
end
|
||||
local appdata = {
|
||||
name = data.Name,
|
||||
category = "Other",
|
||||
exec = data.Exec,
|
||||
icon = (data.Icon and menu_utils.lookup_icon(data.Icon)),
|
||||
description = data.Comment
|
||||
}
|
||||
-- Match first available cateogry for sorting
|
||||
for k,v in pairs(data.Categories or {"Other"}) do
|
||||
if xdg.categories[v] then
|
||||
appdata.category = v
|
||||
break
|
||||
for _,v in pairs(desktop_dirs) do
|
||||
xdg.directory_listings[v] = {}
|
||||
awful.spawn.with_line_callback("find "..tostring(v).." -maxdepth 1 -name *.desktop",{
|
||||
stdout = function(line)
|
||||
-- Assume the cache is valid for a listed file
|
||||
if cache and cache.directory_listings[v][line] then
|
||||
xdg.directory_listings[v][line] = true
|
||||
xdg.apps[line] = cache.apps[line]
|
||||
xdg.categories[cache.apps[line].category].apps[line] = cache.apps[line]
|
||||
return
|
||||
end
|
||||
-- Oh how do I love those Wine applications and their categories
|
||||
if v:match("^Wine") then
|
||||
local data = menu_utils.parse_desktop_file(line)
|
||||
if data.NoDisplay then
|
||||
return
|
||||
end
|
||||
local appdata = {
|
||||
name = data.Name,
|
||||
category = "Other",
|
||||
exec = data.Exec,
|
||||
icon = (data.Icon and menu_utils.lookup_icon(data.Icon)),
|
||||
description = data.Comment
|
||||
}
|
||||
-- Match first available cateogry for sorting
|
||||
for _,vv in pairs(data.Categories or {"Other"}) do
|
||||
if xdg.categories[vv] then
|
||||
appdata.category = vv
|
||||
break
|
||||
end
|
||||
-- Oh how do I love those Wine applications and their categories
|
||||
if vv:match("^Wine") then
|
||||
appdata.category = "Wine"
|
||||
break
|
||||
end
|
||||
end
|
||||
-- Open terminal apps in the terminal (duh)
|
||||
if data.Terminal then
|
||||
appdata.exec = global.terminal.." -e "..appdata.exec
|
||||
end
|
||||
-- Just for you, Wine - special case because you're being a shit
|
||||
if (appdata.exec and appdata.exec:find("%W?wine ")) then
|
||||
appdata.category = "Wine"
|
||||
break
|
||||
end
|
||||
xdg.apps[line] = appdata
|
||||
xdg.categories[appdata.category].apps[line] = appdata
|
||||
-- Add the file to the listing of cached ones
|
||||
xdg.directory_listings[v][line] = true
|
||||
end,
|
||||
output_done = function()
|
||||
-- Save directory listing hash
|
||||
desktop_dirs_complete = desktop_dirs_complete + 1
|
||||
-- Call a global signal
|
||||
awesome.emit_signal("xdg::dir_finished",v)
|
||||
end
|
||||
-- Open terminal apps in the terminal (duh)
|
||||
if data.Terminal then
|
||||
appdata.exec = global.terminal.." -e "..appdata.exec
|
||||
end
|
||||
-- Just for you, Wine - special case because you're being a shit
|
||||
if (exec and exec:find("%W?wine ")) then
|
||||
appdata.category = "Wine"
|
||||
end
|
||||
table.insert(xdg.apps,appdata)
|
||||
table.insert(xdg.categories[appdata.category].apps,appdata)
|
||||
end,
|
||||
output_done = function()
|
||||
-- Call a global signal
|
||||
desktop_dirs_complete = desktop_dirs_complete + 1
|
||||
awesome.emit_signal("xdg::dir_finished",v)
|
||||
end
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
local count = function(t)
|
||||
local n = 0
|
||||
for _,_ in pairs(t) do
|
||||
n = n + 1
|
||||
end
|
||||
return n
|
||||
end
|
||||
|
||||
awesome.connect_signal("xdg::dir_finished",function(dir)
|
||||
-- We only send the all_finished signal when all directories finished processing
|
||||
if desktop_dirs_complete == #desktop_dirs then
|
||||
awesome.emit_signal("xdg::all_finished")
|
||||
-- Clean up empty categories
|
||||
for k,v in pairs(xdg.categories) do
|
||||
if #v.apps == 0 then
|
||||
if count(v.apps) == 0 then
|
||||
xdg.categories[k] = nil
|
||||
end
|
||||
end
|
||||
-- Save the cache if it doesn't exist yet
|
||||
io.open(gears.filesystem.get_xdg_cache_home()..".reno_xdg_cache.json","w"):write(json.encode(xdg)):close()
|
||||
require("naughty").notify({title = "Human time: "..tostring(os.time()-start_human),text = "Computer time: "..tostring(os.clock()-start_computer)})
|
||||
-- Finally, call the all_finished signal
|
||||
awesome.emit_signal("xdg::all_finished")
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -374,6 +374,7 @@ theme.widgets = {
|
|||
end,
|
||||
},
|
||||
titlebar = {
|
||||
hidden_size = 2,
|
||||
bgimage_normal = theme.bgimage_outset,
|
||||
--margins = 5,
|
||||
left = 4,
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
A compositor (like compton) is ***required*** for this theme to work as intended.
|
||||
This is in part due to the fact that it makes the top bar look less bland, and in part due to the fact that your titlebar corners will look weird otherwise.
|
||||
This is in part due to the fact that it makes the top bar look less bland, and in part due to the fact that your titlebar corners will look weird otherwise (the corners won't be properly cut).
|
||||
You may, of course, dismiss using a compositor, but don't tell me about not exactly round corners being a "bug" in this theme afterwards - it's the best you can get with Awesome.
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"list": [
|
||||
{
|
||||
"list": [
|
||||
{"widget": "widgets.base.popuptitle",
|
||||
"options":{
|
||||
"title":"Reno Unity"
|
||||
}
|
||||
},
|
||||
{"widget": "widgets.rootcontrols"},
|
||||
{"widget": "widgets.xdgmenu",
|
||||
"options": {
|
||||
"exclude_category": [
|
||||
"Other"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"vertical": true
|
||||
},
|
||||
{
|
||||
"list":[
|
||||
{"widget": "widgets.base.tagswitcher",
|
||||
"screen":true
|
||||
},
|
||||
{"widget": "widgets.rootbuttons"}
|
||||
],
|
||||
"vertical":true
|
||||
}
|
||||
],
|
||||
"vertical":false
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
],
|
||||
"right": [
|
||||
{ "widget":"widgets.volume" },
|
||||
{ "widget": "widgets.notifications",
|
||||
"screen": true
|
||||
},
|
||||
|
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 819 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 959 B |
After Width: | Height: | Size: 1.1 KiB |
|
@ -12,8 +12,6 @@ local theme_assets = require("beautiful.theme_assets")
|
|||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
|
||||
local gfs = require("gears.filesystem")
|
||||
local themes_path = root_path.."/themes/"
|
||||
|
||||
local theme = {}
|
||||
|
@ -22,8 +20,8 @@ theme.font = "Ubuntu 8"
|
|||
|
||||
theme.bg_normal = "#19191D"
|
||||
theme.bg_focus = "#3E3E3E"
|
||||
theme.bg_urgent = "#2E2E2E"
|
||||
theme.bg_minimize = "#2E2E2E"
|
||||
theme.bg_urgent = "#2E2E2E"
|
||||
theme.bg_minimize = "#2E2E2E"
|
||||
theme.bg_highlight = "#45433D"
|
||||
theme.bg_systray = theme.bg_normal
|
||||
|
||||
|
@ -47,23 +45,23 @@ theme.button_bg_focus = {
|
|||
type = "radial",
|
||||
from = {bsize/2,-0.5*bsize,bsize/10},
|
||||
to = {bsize/2,-0.5*bsize,bsize*2},
|
||||
stops = {
|
||||
stops = {
|
||||
{ 0 , "#FFFFFFBB"},
|
||||
{ 0.45, "#DF744E99"},
|
||||
{ 0.55, "#DF744E99"},
|
||||
{ 1, "#FFFFFF44"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
theme.button_bg_normal = {
|
||||
type = "radial",
|
||||
from = {bsize/2,-0.5*bsize,bsize/10},
|
||||
to = {bsize/2,-0.2*bsize,bsize*1.5},
|
||||
stops = {
|
||||
stops = {
|
||||
{ 0 , "#FFFFFFFF"},
|
||||
{ 0.5, "#33333333"},
|
||||
{ 1, "#FFFFFF22"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
theme.button_shape = function(cr,width,height)
|
||||
|
@ -103,10 +101,10 @@ theme.bar_border_color = {
|
|||
type = "radial",
|
||||
from = {bsize/2,bsize/(-3),bsize/8},
|
||||
to = {bsize/2,bsize/(-5),bsize*1},
|
||||
stops = {
|
||||
stops = {
|
||||
{ 0 , "#FFFFFF66"},
|
||||
{ 1, "#43434366"},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
theme.titlebar_bg_focus = theme.bar_bg_focus
|
||||
|
@ -214,6 +212,12 @@ theme["mpc-next-symbolic"] = themes_path.."unity/icons/mpc-next-symbolic.png"
|
|||
theme["action-poweroff-symbolic"] = themes_path.."unity/icons/action-poweroff-symbolic.png"
|
||||
theme["action-lock-screen-symbolic"] = themes_path.."unity/icons/action-lock-screen-symbolic.png"
|
||||
theme["action-suspend-symbolic"] = themes_path.."unity/icons/action-suspend-symbolic.png"
|
||||
theme["volume-high-symbolic"] = themes_path.."unity/icons/volume-high-symbolic.png"
|
||||
theme["volume-medium-symbolic"] = themes_path.."unity/icons/volume-medium-symbolic.png"
|
||||
theme["volume-low-symbolic"] = themes_path.."unity/icons/volume-low-symbolic.png"
|
||||
theme["volume-muted-symbolic"] = themes_path.."unity/icons/volume-muted-symbolic.png"
|
||||
|
||||
|
||||
theme.wallpaper = themes_path.."unity/background.png"
|
||||
theme.wallpapers_icon = themes_path.."unity/icons/wallpapers.png"
|
||||
-- Default icon for clients
|
||||
|
@ -244,7 +248,11 @@ for k,v in pairs({
|
|||
"action-lock-screen-symbolic",
|
||||
"action-suspend-symbolic",
|
||||
"wallpapers_icon",
|
||||
"icon_default"}) do
|
||||
"icon_default",
|
||||
"volume-high-symbolic",
|
||||
"volume-medium-symbolic",
|
||||
"volume-low-symbolic",
|
||||
"volume-muted-symbolic"}) do
|
||||
if theme[v] and gears.filesystem.file_readable(theme[v]) then
|
||||
theme[v] = gears.color.recolor_image(theme[v],theme.fg_normal)
|
||||
end
|
||||
|
@ -281,6 +289,7 @@ theme.widgets = {
|
|||
end,
|
||||
},
|
||||
titlebar = {
|
||||
hidden_size = 2,
|
||||
root_shape = function(cr,width,height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
true,true,false,false,6) end,
|
||||
|
@ -316,9 +325,12 @@ theme.widgets = {
|
|||
bar_border_width = 2
|
||||
},
|
||||
checkbox = {
|
||||
width = 15,
|
||||
height = 15,
|
||||
shape = gears.shape.circle,
|
||||
shape_border_width = 3,
|
||||
shaoe_border_color = theme.bg_focus
|
||||
border_width = 3,
|
||||
border_color = theme.bg_normal,
|
||||
paddings = {2,2,2,2}
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
|
@ -528,7 +540,7 @@ theme.widgets = {
|
|||
end,
|
||||
shape_border_color = theme.bg_normal,
|
||||
shape_border_width = dpi(2)
|
||||
}
|
||||
}
|
||||
},
|
||||
lock_clock = {
|
||||
textbox = {
|
||||
|
@ -541,15 +553,16 @@ theme.widgets = {
|
|||
local root = titlebar:get_children_by_id("titlebar_root")[1]
|
||||
root:set_bg(theme.titlebar_bg_focus)
|
||||
root:set_shape(function(cr,width,height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
return gears.shape.partially_rounded_rect(
|
||||
cr,width,height,
|
||||
true,true,false,false,6) end)
|
||||
|
||||
end,
|
||||
onunfocus = function(titlebar)
|
||||
local root = titlebar:get_children_by_id("titlebar_root")[1]
|
||||
root:set_bg(theme.titlebar_bg_normal)
|
||||
root:set_shape(function(cr,width,height)
|
||||
return gears.shape.partially_rounded_rect(cr,width,height,
|
||||
return gears.shape.partially_rounded_rect(
|
||||
cr,width,height,
|
||||
true,true,false,false,6) end)
|
||||
end,
|
||||
bg_focus = "#00000000",
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
|
@ -0,0 +1,3 @@
|
|||
A compositor (like compton) is ***required*** for this theme to work as intended.
|
||||
This is in part due to the fact that it makes the top bar look less bland, and in part due to the fact that your titlebar corners will look weird otherwise (the corners won't be properly cut).
|
||||
You may, of course, dismiss using a compositor, but don't tell me about not exactly round corners being a "bug" in this theme afterwards - it's the best you can get with Awesome.
|
After Width: | Height: | Size: 524 KiB |
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"list": [
|
||||
{"widget": "widgets.clientvolume"},
|
||||
{"widget": "widgets.clientcontrols"},
|
||||
{"widget": "widgets.clientbuttons"}
|
||||
],
|
||||
"vertical":true
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"widgets.dismal":{
|
||||
"x":0,
|
||||
"y":26
|
||||
},
|
||||
"widgets.rootmenu":{},
|
||||
"widgets.lockscreen":{},
|
||||
"widgets.base.keypopup":{}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"widgets.lock.clock":{
|
||||
"format": "%a %b %d\n %H: %M"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"list": [
|
||||
{"widget": "widgets.base.popuptitle",
|
||||
"options":{
|
||||
"title":"Reno Unity"
|
||||
}
|
||||
},
|
||||
{"widget": "widgets.base.tagswitcher",
|
||||
"screen":true
|
||||
},
|
||||
{"widget": "widgets.rootcontrols"},
|
||||
{"widget": "widgets.xdgmenu",
|
||||
"options": {
|
||||
"exclude_category": [
|
||||
"Other"
|
||||
]
|
||||
}
|
||||
},
|
||||
{"widget": "widgets.rootbuttons"}
|
||||
],
|
||||
"vertical": true
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"list": [
|
||||
{
|
||||
"list": [
|
||||
{"widget": "widgets.base.popuptitle",
|
||||
"options":{
|
||||
"title":"Reno Unity"
|
||||
}
|
||||
},
|
||||
{"widget": "widgets.rootcontrols"},
|
||||
{"widget": "widgets.xdgmenu",
|
||||
"options": {
|
||||
"exclude_category": [
|
||||
"Other"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"vertical": true
|
||||
},
|
||||
{
|
||||
"list":[
|
||||
{"widget": "widgets.base.tagswitcher",
|
||||
"screen":true
|
||||
},
|
||||
{"widget": "widgets.rootbuttons"}
|
||||
],
|
||||
"vertical":true
|
||||
}
|
||||
],
|
||||
"vertical":false
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"align": {
|
||||
"left": [
|
||||
{
|
||||
"widget":"widgets.clientmenu",
|
||||
"client":true
|
||||
}
|
||||
],
|
||||
"center": [
|
||||
{
|
||||
"draggable": true
|
||||
},
|
||||
{
|
||||
"builtin": "titlewidget",
|
||||
"client" : true,
|
||||
"options": {
|
||||
"align": "left"
|
||||
}
|
||||
}
|
||||
],
|
||||
"right": [
|
||||
{ "widget": "widgets.base.subpanel",
|
||||
"layout": {
|
||||
"list": [
|
||||
{
|
||||
"builtin": "minimizebutton",
|
||||
"client": true
|
||||
},
|
||||
{
|
||||
"builtin": "maximizedbutton",
|
||||
"client": true
|
||||
},
|
||||
{
|
||||
"builtin": "closebutton",
|
||||
"client": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"align": {
|
||||
"left": [
|
||||
{
|
||||
"widget": "widgets.tasklist",
|
||||
"screen": true
|
||||
}
|
||||
],
|
||||
"center": [
|
||||
|
||||
],
|
||||
"right": [
|
||||
{
|
||||
"widget": "widgets.launcher"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"align": {
|
||||
"left": [
|
||||
{
|
||||
"widget": "widgets.tasklist",
|
||||
"screen": true
|
||||
}
|
||||
],
|
||||
"center": [
|
||||
|
||||
],
|
||||
"right": [
|
||||
{
|
||||
"widget": "widgets.launcher"
|
||||
}
|
||||
]
|
||||
},
|
||||
"vertical": true
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"align": {
|
||||
"left": [
|
||||
{ "widget": "widgets.soundclown" }
|
||||
],
|
||||
"center": [
|
||||
|
||||
],
|
||||
"right": [
|
||||
{ "widget":"widgets.volume" },
|
||||
{ "widget": "widgets.notifications",
|
||||
"screen": true
|
||||
},
|
||||
{ "widget": "widgets.wallpapers",
|
||||
"screen": true,
|
||||
"options": {
|
||||
"path": "$HOME/Pictures/Wallpapers"
|
||||
}
|
||||
},
|
||||
{ "widget": "widgets.battery" },
|
||||
{ "widget": "widgets.base.systray" },
|
||||
{ "widget": "widgets.base.clock" }
|
||||
]
|
||||
},
|
||||
"vertical":true
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"align": {
|
||||
"left": [
|
||||
{ "widget": "widgets.soundclown" }
|
||||
],
|
||||
"center": [
|
||||
|
||||
],
|
||||
"right": [
|
||||
{ "widget":"widgets.volume" },
|
||||
{ "widget": "widgets.notifications",
|
||||
"screen": true
|
||||
},
|
||||
{ "widget": "widgets.wallpapers",
|
||||
"screen": true,
|
||||
"options": {
|
||||
"path": "$HOME/Pictures/Wallpapers"
|
||||
}
|
||||
},
|
||||
{ "widget": "widgets.battery" },
|
||||
{ "widget": "widgets.base.systray" },
|
||||
{ "widget": "widgets.base.clock" }
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
Licensed under conditions of CC0 (https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt)
|
||||
|
||||
To the extent possible under law, Yessiest (yessiest@memeware.net) has waived all copyright and related or neighboring rights to Reno98 icons
|
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 510 B |
After Width: | Height: | Size: 787 B |
After Width: | Height: | Size: 721 B |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 651 B |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 661 B |
After Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 657 B |
After Width: | Height: | Size: 395 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 819 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 959 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 866 B |
After Width: | Height: | Size: 865 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 581 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 265 B |