moved to personal fennel config for awesome and added qutebrowser
This commit is contained in:
parent
403cb92b7d
commit
688748f8a6
502 changed files with 8576 additions and 9597 deletions
111
awes2/layout/right-panel/icons/notification.svg
Normal file
111
awes2/layout/right-panel/icons/notification.svg
Normal file
|
@ -0,0 +1,111 @@
|
|||
<?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"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Capa_1"
|
||||
enable-background="new 0 0 374.706 374.706"
|
||||
height="240"
|
||||
viewBox="0 0 175.64344 175.64344"
|
||||
width="240"
|
||||
class=""
|
||||
version="1.1"
|
||||
sodipodi:docname="notification.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata16">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs14" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1321"
|
||||
inkscape:window-height="740"
|
||||
id="namedview12"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="45"
|
||||
inkscape:window-y="28"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g9"
|
||||
transform="matrix(0.38752239,0,0,0.38752239,14.249432,12.505775)">
|
||||
<path
|
||||
id="path-1_59_"
|
||||
d="m 80.294,53.529 h 294.412 v 53.529 H 80.294 Z"
|
||||
transform="translate(4,3)"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
d="m 80.294,160.588 h 267.647 v 53.529 H 80.294 Z"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
id="path3"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="path-1_58_"
|
||||
d="m 80.294,267.647 h 294.412 v 53.529 H 80.294 Z"
|
||||
transform="translate(4,11)"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="path-2_11_"
|
||||
d="m 0,53.529 h 53.529 v 53.529 H 0 Z"
|
||||
transform="translate(1,3)"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="path-2_10_"
|
||||
d="m 0,160.588 h 53.529 v 53.529 H 0 Z"
|
||||
transform="translate(1,7)"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
id="path-2_9_"
|
||||
d="m 0,267.647 h 53.529 v 53.529 H 0 Z"
|
||||
transform="translate(1,11)"
|
||||
data-original="#000000"
|
||||
class="active-path"
|
||||
data-old_color="#000000"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.3 KiB |
175
awes2/layout/right-panel/init.lua
Normal file
175
awes2/layout/right-panel/init.lua
Normal file
|
@ -0,0 +1,175 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
panel_visible = false
|
||||
|
||||
local right_panel = function(s)
|
||||
|
||||
-- Set right panel geometry
|
||||
local panel_width = dpi(350)
|
||||
local panel_x = s.geometry.x + s.geometry.width - panel_width
|
||||
|
||||
local panel = wibox {
|
||||
ontop = true,
|
||||
screen = s,
|
||||
type = 'dock',
|
||||
width = panel_width,
|
||||
height = s.geometry.height,
|
||||
x = panel_x,
|
||||
y = s.geometry.y,
|
||||
bg = beautiful.background,
|
||||
fg = beautiful.fg_normal
|
||||
}
|
||||
|
||||
panel.opened = false
|
||||
|
||||
s.backdrop_rdb = wibox
|
||||
{
|
||||
ontop = true,
|
||||
screen = s,
|
||||
bg = beautiful.transparent,
|
||||
type = 'utility',
|
||||
x = s.geometry.x,
|
||||
y = s.geometry.y,
|
||||
width = s.geometry.width,
|
||||
height = s.geometry.height
|
||||
}
|
||||
|
||||
panel:struts
|
||||
{
|
||||
right = 0
|
||||
}
|
||||
|
||||
open_panel = function()
|
||||
local focused = awful.screen.focused()
|
||||
panel_visible = true
|
||||
|
||||
focused.backdrop_rdb.visible = true
|
||||
focused.right_panel.visible = true
|
||||
|
||||
panel:emit_signal('opened')
|
||||
end
|
||||
|
||||
close_panel = function()
|
||||
local focused = awful.screen.focused()
|
||||
panel_visible = false
|
||||
|
||||
focused.right_panel.visible = false
|
||||
focused.backdrop_rdb.visible = false
|
||||
|
||||
panel:emit_signal('closed')
|
||||
end
|
||||
|
||||
-- Hide this panel when app dashboard is called.
|
||||
function panel:HideDashboard()
|
||||
close_panel()
|
||||
end
|
||||
|
||||
function panel:toggle()
|
||||
self.opened = not self.opened
|
||||
if self.opened then
|
||||
open_panel()
|
||||
else
|
||||
close_panel()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function panel:switch_pane(mode)
|
||||
if mode == 'notif_mode' then
|
||||
-- Update Content
|
||||
panel:get_children_by_id('notif_id')[1].visible = true
|
||||
panel:get_children_by_id('pane_id')[1].visible = false
|
||||
elseif mode == 'today_mode' then
|
||||
-- Update Content
|
||||
panel:get_children_by_id('notif_id')[1].visible = false
|
||||
panel:get_children_by_id('pane_id')[1].visible = true
|
||||
end
|
||||
end
|
||||
|
||||
s.backdrop_rdb:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function()
|
||||
panel:toggle()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
local separator = wibox.widget {
|
||||
orientation = 'horizontal',
|
||||
opacity = 0.0,
|
||||
forced_height = 15,
|
||||
widget = wibox.widget.separator,
|
||||
}
|
||||
|
||||
local line_separator = wibox.widget {
|
||||
orientation = 'horizontal',
|
||||
forced_height = dpi(1),
|
||||
span_ratio = 1.0,
|
||||
color = beautiful.groups_title_bg,
|
||||
widget = wibox.widget.separator
|
||||
}
|
||||
|
||||
panel : setup {
|
||||
{
|
||||
expand = 'none',
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = 'none',
|
||||
nil,
|
||||
require('layout.right-panel.panel-mode-switcher'),
|
||||
nil
|
||||
},
|
||||
separator,
|
||||
line_separator,
|
||||
separator,
|
||||
{
|
||||
layout = wibox.layout.stack,
|
||||
-- Today Pane
|
||||
{
|
||||
id = 'pane_id',
|
||||
visible = true,
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
spacing = dpi(7),
|
||||
require('widget.user-profile'),
|
||||
require('widget.weather'),
|
||||
require('widget.email'),
|
||||
require('widget.social-media'),
|
||||
require('widget.calculator')
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
-- Notification Center
|
||||
{
|
||||
id = 'notif_id',
|
||||
visible = false,
|
||||
require('widget.notif-center')(s),
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
|
||||
return panel
|
||||
end
|
||||
|
||||
|
||||
return right_panel
|
||||
|
||||
|
135
awes2/layout/right-panel/panel-mode-switcher.lua
Normal file
135
awes2/layout/right-panel/panel-mode-switcher.lua
Normal file
|
@ -0,0 +1,135 @@
|
|||
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')
|
||||
|
||||
-- Variable used for switching panel modes
|
||||
right_panel_mode = 'today_mode'
|
||||
|
||||
local active_button = beautiful.groups_title_bg
|
||||
local inactive_button = beautiful.transparent
|
||||
|
||||
local notif_text = wibox.widget
|
||||
{
|
||||
text = 'Notifications',
|
||||
font = 'SF Pro Text Bold 11',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
local notif_button = clickable_container(
|
||||
wibox.container.margin(
|
||||
notif_text, dpi(0), dpi(0), dpi(7), dpi(7)
|
||||
)
|
||||
)
|
||||
|
||||
local wrap_notif = wibox.widget {
|
||||
notif_button,
|
||||
forced_width = dpi(140),
|
||||
bg = inactive_button,
|
||||
border_width = dpi(1),
|
||||
border_color = beautiful.groups_title_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(
|
||||
cr, width, height, false, true, true, false, beautiful.groups_radius
|
||||
)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
|
||||
local today_text = wibox.widget
|
||||
{
|
||||
text = 'Today',
|
||||
font = 'SF Pro Text Bold 11',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
local today_button = clickable_container(
|
||||
wibox.container.margin(
|
||||
today_text, dpi(0), dpi(0), dpi(7), dpi(7)
|
||||
)
|
||||
)
|
||||
|
||||
local wrap_today = wibox.widget {
|
||||
today_button,
|
||||
forced_width = dpi(140),
|
||||
bg = active_button,
|
||||
border_width = dpi(1),
|
||||
border_color = beautiful.groups_title_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(
|
||||
cr, width, height, true, false, false, true, beautiful.groups_radius
|
||||
)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local switcher = wibox.widget {
|
||||
expand = 'none',
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
wrap_today,
|
||||
wrap_notif
|
||||
}
|
||||
|
||||
|
||||
function switch_rdb_pane(right_panel_mode)
|
||||
|
||||
local focused = awful.screen.focused()
|
||||
|
||||
if right_panel_mode == 'notif_mode' then
|
||||
|
||||
-- Update button color
|
||||
wrap_notif.bg = active_button
|
||||
wrap_today.bg = inactive_button
|
||||
|
||||
-- Change panel content of right-panel.lua
|
||||
focused.right_panel:switch_pane(right_panel_mode)
|
||||
|
||||
elseif right_panel_mode == 'today_mode' then
|
||||
|
||||
-- Update button color
|
||||
wrap_notif.bg = inactive_button
|
||||
wrap_today.bg = active_button
|
||||
|
||||
-- Change panel content of right-panel.lua
|
||||
focused.right_panel:switch_pane(right_panel_mode)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
notif_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
switch_rdb_pane('notif_mode')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
today_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
switch_rdb_pane('today_mode')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
return switcher
|
62
awes2/layout/right-panel/right-panel-opener.lua
Normal file
62
awes2/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