making awesome more awesome
This commit is contained in:
parent
0a7fe89729
commit
3643ba277e
361 changed files with 41182 additions and 26 deletions
62
awesome/layout/right-panel/right-panel-opener.lua
Normal file
62
awesome/layout/right-panel/right-panel-opener.lua
Normal file
|
@ -0,0 +1,62 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
|
||||
local config_dir = gears.filesystem.get_configuration_dir()
|
||||
local widget_icon_dir = config_dir .. 'layout/right-panel/icons/'
|
||||
|
||||
|
||||
-- ▄▄▄▄▄ ▄ ▄
|
||||
-- █ █ ▄ ▄ ▄▄█▄▄ ▄▄█▄▄ ▄▄▄ ▄ ▄▄
|
||||
-- █▄▄▄▄▀ █ █ █ █ █▀ ▀█ █▀ █
|
||||
-- █ █ █ █ █ █ █ █ █ █
|
||||
-- █▄▄▄▄▀ ▀▄▄▀█ ▀▄▄ ▀▄▄ ▀█▄█▀ █ █
|
||||
|
||||
|
||||
-- The button in top panel
|
||||
|
||||
local return_button = function()
|
||||
|
||||
local widget =
|
||||
wibox.widget {
|
||||
{
|
||||
id = 'icon',
|
||||
image = widget_icon_dir .. 'notification' .. '.svg',
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = true
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
local widget_button = wibox.widget {
|
||||
{
|
||||
widget,
|
||||
margins = dpi(7),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
|
||||
widget_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.screen.focused().right_panel:toggle()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return widget_button
|
||||
|
||||
end
|
||||
|
||||
|
||||
return return_button
|
Loading…
Add table
Add a link
Reference in a new issue