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
74
awes2/layout/left-panel/action-bar.lua
Executable file
74
awes2/layout/left-panel/action-bar.lua
Executable file
|
@ -0,0 +1,74 @@
|
|||
local awful = require('awful')
|
||||
local beautiful = require('beautiful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
local icons = require('theme.icons')
|
||||
|
||||
local tag_list = require('widget.tag-list')
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
|
||||
return function(s, panel, action_bar_width)
|
||||
|
||||
local menu_icon = wibox.widget {
|
||||
{
|
||||
id = 'menu_btn',
|
||||
image = icons.menu,
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
local home_button = wibox.widget {
|
||||
{
|
||||
menu_icon,
|
||||
widget = clickable_container
|
||||
},
|
||||
bg = beautiful.background .. '66',
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
home_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
panel:toggle()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
panel:connect_signal(
|
||||
'opened',
|
||||
function()
|
||||
menu_icon.menu_btn:set_image(gears.surface(icons.close_small))
|
||||
end
|
||||
)
|
||||
|
||||
panel:connect_signal(
|
||||
'closed',
|
||||
function()
|
||||
menu_icon.menu_btn:set_image(gears.surface(icons.menu))
|
||||
end
|
||||
)
|
||||
|
||||
return wibox.widget {
|
||||
id = 'action_bar',
|
||||
layout = wibox.layout.align.vertical,
|
||||
forced_width = action_bar_width,
|
||||
{
|
||||
require('widget.search-apps')(),
|
||||
tag_list(s),
|
||||
require("widget.xdg-folders"),
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
},
|
||||
nil,
|
||||
home_button
|
||||
}
|
||||
end
|
72
awes2/layout/left-panel/dashboard/hardware-monitor.lua
Normal file
72
awes2/layout/left-panel/dashboard/hardware-monitor.lua
Normal file
|
@ -0,0 +1,72 @@
|
|||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local hardware_header = wibox.widget
|
||||
{
|
||||
|
||||
text = 'Hardware Monitor',
|
||||
font = 'SF Pro Text Regular 12',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
|
||||
}
|
||||
|
||||
return wibox.widget {
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
{
|
||||
hardware_header,
|
||||
left = dpi(24),
|
||||
right = dpi(24),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.groups_title_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, true, true, false, false, beautiful.groups_radius)
|
||||
end,
|
||||
forced_height = dpi(35),
|
||||
widget = wibox.container.background
|
||||
|
||||
},
|
||||
{
|
||||
require('widget.cpu.cpu-meter'),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius)
|
||||
end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
{
|
||||
require('widget.ram.ram-meter'),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius)
|
||||
end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
{
|
||||
require('widget.temperature.temperature-meter'),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius)
|
||||
end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
|
||||
},
|
||||
{
|
||||
require('widget.harddrive.harddrive-meter'),
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, true, true, beautiful.groups_radius)
|
||||
end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
}
|
137
awes2/layout/left-panel/dashboard/init.lua
Normal file
137
awes2/layout/left-panel/dashboard/init.lua
Normal file
|
@ -0,0 +1,137 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
|
||||
local clickable_container = require('widget.clickable-container')
|
||||
local icons = require('theme.icons')
|
||||
|
||||
return function(_, panel)
|
||||
local search_widget = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
image = icons.search,
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
top = dpi(12),
|
||||
bottom = dpi(12),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
text = 'Global Search',
|
||||
font = 'SF Pro Text Regular 12',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
spacing = dpi(24),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
left = dpi(24),
|
||||
right = dpi(24),
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
search_button = wibox.widget {
|
||||
{
|
||||
search_widget,
|
||||
widget = clickable_container
|
||||
},
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
search_button:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function()
|
||||
panel:run_rofi()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
local exit_widget = {
|
||||
{
|
||||
{
|
||||
{
|
||||
image = icons.logout,
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
top = dpi(12),
|
||||
bottom = dpi(12),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
text = 'End work session',
|
||||
font = 'SF Pro Text Regular 12',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
spacing = dpi(24),
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
left = dpi(24),
|
||||
right = dpi(24),
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
|
||||
exit_button = wibox.widget {
|
||||
{
|
||||
exit_widget,
|
||||
widget = clickable_container
|
||||
|
||||
},
|
||||
bg = beautiful.groups_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
|
||||
exit_button:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function()
|
||||
panel:toggle()
|
||||
awesome.emit_signal("module::exit_screen_show")
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
spacing = dpi(7),
|
||||
search_button,
|
||||
require('layout.left-panel.dashboard.hardware-monitor'),
|
||||
require('layout.left-panel.dashboard.quick-settings'),
|
||||
|
||||
},
|
||||
nil,
|
||||
exit_button,
|
||||
layout = wibox.layout.align.vertical
|
||||
},
|
||||
margins = dpi(16),
|
||||
widget = wibox.container.margin
|
||||
|
||||
}
|
||||
end
|
105
awes2/layout/left-panel/dashboard/quick-settings.lua
Normal file
105
awes2/layout/left-panel/dashboard/quick-settings.lua
Normal file
|
@ -0,0 +1,105 @@
|
|||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local bar_color = beautiful.groups_bg
|
||||
|
||||
local quick_header = wibox.widget
|
||||
{
|
||||
|
||||
text = 'Quick Settings',
|
||||
font = 'SF Pro Text Regular 12',
|
||||
align = 'left',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
|
||||
}
|
||||
|
||||
return wibox.widget {
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
spacing = dpi(7),
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
{
|
||||
quick_header,
|
||||
left = dpi(24),
|
||||
right = dpi(24),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = dpi(35),
|
||||
bg = beautiful.groups_title_bg,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, true, true, false, false, beautiful.groups_radius)
|
||||
end,
|
||||
widget = wibox.container.background
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
require('widget.brightness.brightness-slider'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
|
||||
},
|
||||
{
|
||||
require('widget.volume.volume-slider'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
require('widget.network.network-toggle'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
|
||||
{
|
||||
require('widget.bluetooth.bluetooth-toggle'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, false, false, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
{
|
||||
require('widget.blue-light'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, true, true, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
}
|
||||
},
|
||||
{
|
||||
layout = wibox.layout.fixed.vertical,
|
||||
{
|
||||
require('widget.window-effects.blur-toggle'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, true, true, false, false, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
},
|
||||
{
|
||||
require('widget.window-effects.blur-strength-slider'),
|
||||
bg = bar_color,
|
||||
shape = function(cr, width, height)
|
||||
gears.shape.partially_rounded_rect(cr, width, height, false, false, true, true, beautiful.groups_radius) end,
|
||||
forced_height = dpi(48),
|
||||
widget = wibox.container.background
|
||||
}
|
||||
}
|
||||
}
|
124
awes2/layout/left-panel/init.lua
Normal file
124
awes2/layout/left-panel/init.lua
Normal file
|
@ -0,0 +1,124 @@
|
|||
local awful = require('awful')
|
||||
local beautiful = require('beautiful')
|
||||
local wibox = require('wibox')
|
||||
local apps = require('configuration.apps')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local left_panel = function(screen)
|
||||
|
||||
local action_bar_width = dpi(45)
|
||||
local panel_content_width = dpi(350)
|
||||
|
||||
local panel =
|
||||
wibox {
|
||||
screen = screen,
|
||||
width = action_bar_width,
|
||||
type = 'dock',
|
||||
height = screen.geometry.height - 500,
|
||||
x = screen.geometry.x,
|
||||
y = screen.geometry.y + 250,
|
||||
ontop = false,
|
||||
bg = beautiful.background,
|
||||
fg = beautiful.fg_normal
|
||||
}
|
||||
|
||||
panel.opened = false
|
||||
|
||||
panel:struts(
|
||||
{
|
||||
left = action_bar_width
|
||||
}
|
||||
)
|
||||
|
||||
local backdrop = wibox {
|
||||
ontop = true,
|
||||
screen = screen,
|
||||
bg = beautiful.transparent,
|
||||
type = 'utility',
|
||||
x = screen.geometry.x,
|
||||
y = screen.geometry.y,
|
||||
width = screen.geometry.width,
|
||||
height = screen.geometry.height
|
||||
}
|
||||
|
||||
function panel:run_rofi()
|
||||
_G.awesome.spawn(
|
||||
apps.default.rofiglobal,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
function()
|
||||
panel:toggle()
|
||||
end
|
||||
)
|
||||
|
||||
-- Hide panel content if rofi global search is opened
|
||||
panel:get_children_by_id('panel_content')[1].visible = false
|
||||
end
|
||||
|
||||
local openPanel = function(should_run_rofi)
|
||||
panel.width = action_bar_width + panel_content_width
|
||||
backdrop.visible = true
|
||||
panel.visible = false
|
||||
panel.visible = true
|
||||
panel:get_children_by_id('panel_content')[1].visible = true
|
||||
if should_run_rofi then
|
||||
panel:run_rofi()
|
||||
end
|
||||
panel:emit_signal('opened')
|
||||
end
|
||||
|
||||
local closePanel = function()
|
||||
panel.width = action_bar_width
|
||||
panel:get_children_by_id('panel_content')[1].visible = false
|
||||
backdrop.visible = false
|
||||
panel:emit_signal('closed')
|
||||
end
|
||||
|
||||
-- Hide this panel when app dashboard is called.
|
||||
function panel:HideDashboard()
|
||||
closePanel()
|
||||
end
|
||||
|
||||
function panel:toggle(should_run_rofi)
|
||||
self.opened = not self.opened
|
||||
if self.opened then
|
||||
openPanel(should_run_rofi)
|
||||
else
|
||||
closePanel()
|
||||
end
|
||||
end
|
||||
|
||||
backdrop:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function()
|
||||
panel:toggle()
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
panel:setup {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
nil,
|
||||
{
|
||||
id = 'panel_content',
|
||||
bg = beautiful.transparent,
|
||||
widget = wibox.container.background,
|
||||
visible = false,
|
||||
forced_width = panel_content_width,
|
||||
{
|
||||
require('layout.left-panel.dashboard')(screen, panel),
|
||||
layout = wibox.layout.stack
|
||||
}
|
||||
},
|
||||
require('layout.left-panel.action-bar')(screen, panel, action_bar_width)
|
||||
}
|
||||
return panel
|
||||
end
|
||||
|
||||
return left_panel
|
Loading…
Add table
Add a link
Reference in a new issue