Initial Commit

This commit is contained in:
2021-04-26 11:20:41 +03:00
commit 5a99cb9e82
125 changed files with 6148 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local gears = require('gears')
local mat_icon = require('widget.material.icon')
local dpi = require('beautiful').xresources.apply_dpi
local icons = require('theme.icons')
local clickable_container = require('widget.material.clickable-container')
return function(screen, panel, action_bar_width)
local menu_icon = wibox.widget {
icon = icons.menu,
size = dpi(16),
widget = mat_icon
}
local home_button = wibox.widget {
wibox.widget {menu_icon, widget = clickable_container},
visible = true,
bg = beautiful.primary.hue_700,
widget = wibox.container.background
}
home_button:buttons(gears.table.join(
awful.button({}, 1, nil,
function() _G.dashboard_show() end)))
return wibox.widget {
id = 'action_bar',
layout = wibox.layout.align.horizontal,
forced_width = action_bar_width,
{layout = wibox.layout.fixed.horizontal, home_button}
}
end

View File

@@ -0,0 +1,18 @@
local wibox = require('wibox')
local mat_list_item = require('widget.material.list-item')
return wibox.widget {
-- wibox.widget {
-- wibox.widget {
-- text = 'Hardware monitor',
-- font = 'Roboto medium 12',
-- widget = wibox.widget.textbox
-- },
-- widget = mat_list_item
-- },
require('widget.cpu.cpu-meter'),
require('widget.ram.ram-meter'),
require('widget.temperature.temperature-meter'),
require('widget.harddrive.harddrive-meter'),
layout = wibox.layout.fixed.vertical
}

View File

@@ -0,0 +1,71 @@
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local mat_list_item = require('widget.material.list-item')
local mat_icon = require('widget.material.icon')
local dpi = require('beautiful').xresources.apply_dpi
local icons = require('theme.icons')
return function(_, panel)
local search_button = wibox.widget {
wibox.widget {icon = icons.search, size = dpi(24), widget = mat_icon},
wibox.widget {
text = 'Search Applications',
font = 'Roboto medium 13',
widget = wibox.widget.textbox
},
clickable = true,
widget = mat_list_item
}
search_button:buttons(awful.util.table.join(
awful.button({}, 1,
function() panel:run_rofi() end)))
local exit_button = wibox.widget {
wibox.widget {icon = icons.logout, size = dpi(24), widget = mat_icon},
wibox.widget {
text = 'End work session',
font = 'Roboto medium 13',
widget = wibox.widget.textbox
},
clickable = true,
divider = true,
widget = mat_list_item
}
exit_button:buttons(awful.util.table.join(
awful.button({}, 1, function()
panel:toggle()
_G.exit_screen_show()
end)))
return wibox.widget {
layout = wibox.layout.align.vertical,
{
layout = wibox.layout.fixed.vertical,
{
search_button,
bg = beautiful.primary.hue_800,
widget = wibox.container.background
},
wibox.widget {
orientation = 'horizontal',
forced_height = 0.8,
opacity = 0.3,
widget = wibox.widget.separator
},
require('layout.left-panel.dashboard.quick-settings'),
require('layout.left-panel.dashboard.hardware-monitor')
},
nil,
{
layout = wibox.layout.fixed.vertical,
{
exit_button,
bg = beautiful.primary.hue_800,
widget = wibox.container.background
}
}
}
end

View File

@@ -0,0 +1,16 @@
local wibox = require('wibox')
local mat_list_item = require('widget.material.list-item')
return wibox.widget {
-- wibox.widget {
-- wibox.widget {
-- text = 'Quick settings',
-- font = 'Roboto medium 12',
-- widget = wibox.widget.textbox
-- },
-- widget = mat_list_item
-- },
require('widget.volume.volume-slider'),
require('widget.brightness.brightness-slider'),
layout = wibox.layout.fixed.vertical
}

View File

@@ -0,0 +1,98 @@
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(32)
local panel_content_width = dpi(400)
local offsety = dpi(12)
local panel = wibox {
screen = screen,
width = dpi(32),
height = dpi(32),
x = screen.geometry.x + 12,
y = screen.geometry.y + offsety,
ontop = false,
bg = beautiful.primary.hue_900,
fg = beautiful.fg_normal
}
panel.opened = false
panel:struts({left = dpi(0), top = dpi(48)})
local backdrop = wibox {
ontop = true,
screen = screen,
bg = '#00000000',
type = 'dock',
x = screen.geometry.x,
y = screen.geometry.y + offsety,
width = screen.geometry.width,
height = screen.geometry.height
}
function panel:run_rofi()
_G.awesome.spawn(apps.default.rofi, false, false, false, false,
function() panel:toggle() end)
end
local openPanel = function(should_run_rofi)
panel.width = panel_content_width
panel.height = screen.geometry.height
backdrop.visible = true
panel.visible = false
panel.visible = true
panel.x = screen.geometry.x
panel.y = screen.geometry.y
panel.ontop = 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.height = dpi(32)
panel:get_children_by_id('panel_content')[1].visible = false
backdrop.visible = false
panel.ontop = false
panel.x = screen.geometry.x + 12
panel.y = screen.geometry.y + offsety
panel:emit_signal('closed')
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{
require('layout.left-panel.action-bar')(screen, panel, action_bar_width),
layout = wibox.layout.align.vertical,
{
id = 'panel_content',
bg = beautiful.primary.hue_900,
widget = wibox.container.background,
visible = false,
forced_width = panel_content_width,
{
require('layout.left-panel.dashboard')(screen, panel),
layout = wibox.layout.stack
}
}
}
return panel
end
return left_panel