testing things
This commit is contained in:
parent
124159433c
commit
4c6cce6370
|
@ -3,6 +3,8 @@ local gears = require("gears")
|
|||
local beautiful = require("beautiful")
|
||||
-- {{{ Rules
|
||||
-- Rules to apply to new clients (through the "manage" signal).
|
||||
local dockapps = {}
|
||||
local dockapp_size = 64
|
||||
awful.rules.rules = {
|
||||
-- All clients will match this rule.
|
||||
{ rule = { },
|
||||
|
@ -54,6 +56,38 @@ awful.rules.rules = {
|
|||
}, properties = { titlebars_enabled = true }
|
||||
},
|
||||
|
||||
-- Rules for dockapps
|
||||
{ rule_any = { name = {
|
||||
"wmMand",
|
||||
"wmwork",
|
||||
"wmmisc",
|
||||
"wmmon"
|
||||
} },
|
||||
properties = {
|
||||
skip_taskbar = true,
|
||||
dockable = true,
|
||||
titlebars_enabled = false,
|
||||
sticky = true,
|
||||
below = true,
|
||||
placement = awful.placement.top_right+awful.placement.no_offscreen,
|
||||
callback = function(c)
|
||||
while (#dockapps > 0) and (not dockapps[#dockapps].valid) do
|
||||
table.remove(dockapps,#dockapps)
|
||||
end
|
||||
if #dockapps > 0 then
|
||||
awful.placement.next_to(c,{
|
||||
geometry = dockapps[#dockapps],
|
||||
preferred_positions = "bottom",
|
||||
preferred_anchors = "middle"
|
||||
})
|
||||
end
|
||||
c.width = dockapps_size
|
||||
c.height = dockapps_size
|
||||
table.insert(dockapps,c)
|
||||
end
|
||||
},
|
||||
},
|
||||
|
||||
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||
-- { rule = { class = "Firefox" },
|
||||
-- properties = { screen = 1, tag = "2" } },
|
||||
|
|
|
@ -2,6 +2,7 @@ local awful = require("awful")
|
|||
local gears = require("gears")
|
||||
-- {{{ Variable definitions
|
||||
global = {}
|
||||
global.debug = true
|
||||
global.awesome_dir = os.getenv("HOME").."/.config/awesome/"
|
||||
global.config_dir = os.getenv("HOME").."/.awesome/"
|
||||
global.themes_dir = os.getenv("HOME").."/.config/awesome/themes/"
|
||||
|
|
|
@ -23,15 +23,13 @@ awmtk.create_class = function(name,overrides,style,parent_class)
|
|||
})
|
||||
end
|
||||
|
||||
awmtk.create_style = function(name,parent,overrides)
|
||||
local new_style = setmetatable(beautiful[name] or {},{
|
||||
__index = parent
|
||||
})
|
||||
awmtk.create_style = function(style_name,parent,overrides)
|
||||
local new_style = {}
|
||||
for name,parent_class in pairs(parent) do
|
||||
new_style[name] = awmtk.create_class(
|
||||
name,
|
||||
(overrides and overrides[name]) or {},
|
||||
new_style,
|
||||
(beautiful[style_name] or {}),
|
||||
parent_class
|
||||
)
|
||||
end
|
||||
|
@ -76,5 +74,6 @@ awmtk.default.icon = awmtk.create_class("icon",{
|
|||
inner_margin = 1
|
||||
},awmtk.default,awmtk.default.base)
|
||||
|
||||
return awmtk
|
||||
-- }}}
|
||||
|
||||
return awmtk
|
||||
|
|
|
@ -236,6 +236,15 @@ theme = require("themes.icons")(theme)
|
|||
theme.awesome_icon = theme_assets.awesome_icon(
|
||||
theme.menu_height, theme.bg_focus, theme.fg_focus
|
||||
)
|
||||
|
||||
theme.dismal = {
|
||||
container = {
|
||||
bg_normal = "#202020",
|
||||
rounding = 5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-- Define the icon theme for application icons. If not set then the icons
|
||||
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
|
||||
theme.icon_theme = "Adwaita"
|
||||
|
|
|
@ -5,12 +5,72 @@ local awful = require("awful")
|
|||
|
||||
return function(args)
|
||||
local style = awmtk2.create_style("dismal",awmtk2.default,args.style)
|
||||
local rounded_shape = function(cr,width,height)
|
||||
return gears.shape.rounded_rect(cr,width,height,style.container.rounding)
|
||||
end
|
||||
local separator = wibox.widget({
|
||||
widget = wibox.widget.separator,
|
||||
forced_width = 220,
|
||||
orientation = "horizontal",
|
||||
forced_height = 10,
|
||||
thickness = 1,
|
||||
color = style.container.bg_focus,
|
||||
border_width = 0
|
||||
})
|
||||
local inputbox = wibox.widget {
|
||||
{
|
||||
markup = "",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
widget = wibox.container.margin,
|
||||
margins = style.container.inner_margin,
|
||||
id = "inputbox",
|
||||
bg = style.button.bg_focus
|
||||
}
|
||||
local launchpad = awful.popup({
|
||||
widget = {
|
||||
{
|
||||
{
|
||||
inputbox,
|
||||
{
|
||||
markup = "[b]Enter[/b] - run; [b]Ctrl+Enter[/b] - run in terminal",
|
||||
{
|
||||
{
|
||||
{
|
||||
markup = " ",
|
||||
widget = wibox.widget.textbox,
|
||||
id = "result1"
|
||||
},
|
||||
separator,
|
||||
{
|
||||
markup = " ",
|
||||
widget = wibox.widget.textbox,
|
||||
id = "result2"
|
||||
},
|
||||
separator,
|
||||
{
|
||||
markup = " ",
|
||||
widget = wibox.widget.textbox,
|
||||
id = "result3"
|
||||
},
|
||||
separator,
|
||||
{
|
||||
markup = " ",
|
||||
widget = wibox.widget.textbox,
|
||||
id = "result4"
|
||||
},
|
||||
layout = wibox.layout.fixed.vertical
|
||||
},
|
||||
widget = wibox.container.margin,
|
||||
margins = style.container.inner_margin
|
||||
},
|
||||
widget = wibox.container.background,
|
||||
bg = style.container.bg_normal,
|
||||
shape_border_width = 1,
|
||||
shape_border_color = style.container.bg_focus,
|
||||
shape = rounded_shape
|
||||
},
|
||||
{
|
||||
markup = "<b>Enter</b> - run; <b>Ctrl+Enter</b> - run in terminal",
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.vertical
|
||||
|
@ -21,21 +81,37 @@ return function(args)
|
|||
bg = style.container.bg_normal,
|
||||
widget = wibox.container.background
|
||||
},
|
||||
shape = gears.shape
|
||||
placement = awful.placement.no_overlap,
|
||||
shape = rounded_shape,
|
||||
visible = false,
|
||||
ontop = true
|
||||
})
|
||||
local modifiers = {}
|
||||
root.keys(gears.table.join(
|
||||
root.keys(),
|
||||
awful.key({ global.modkey }, "0", function()
|
||||
launchpad.visible = not launchpad.visible
|
||||
launchpad.visible = true
|
||||
if launchpad.visible then
|
||||
awful.prompt.run {
|
||||
prompt = "<b>Run: </b>",
|
||||
textbox = inputbox.children[1],
|
||||
hooks = {
|
||||
{ { "Control" }, "Return", function(cmd)
|
||||
awful.spawn({global.terminal, "-e", cmd})
|
||||
end},
|
||||
{ { }, "Return", function(cmd)
|
||||
awful.spawn(cmd)
|
||||
end},
|
||||
{ {}, 'Escape', function(cmd)
|
||||
textbox.markup = ""
|
||||
end}
|
||||
},
|
||||
done_callback = function()
|
||||
launchpad.visible = false
|
||||
end
|
||||
}
|
||||
end
|
||||
end)
|
||||
))
|
||||
io.open("/home/yessiest/.debug2","w"):write(
|
||||
tostring(style.container.bg_normal).."\n"..
|
||||
tostring(style.container.inner_margin).."\n"..
|
||||
tostring(style.icon.inner_margin).."\n"..
|
||||
tostring(style.base.bg_normal)
|
||||
):close()
|
||||
return launchpad
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue