diff --git a/bindings/keys.lua b/bindings/keys.lua index 4d1a59d..827025a 100644 --- a/bindings/keys.lua +++ b/bindings/keys.lua @@ -32,7 +32,10 @@ awful.keyboard.append_global_keybindings({ {description = "open a terminal", group = "launcher"}), awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, {description = "run prompt", group = "launcher"}), - awful.key({ modkey }, "p", function() menubar.show() end, + awful.key({ modkey }, "p", function() + menubar.show() + screen.emit_signal('appdrawer::open', awful.screen.focused()) + end, {description = "show the menubar", group = "launcher"}), }) diff --git a/modules/.sidepanel.lua.swp b/modules/.sidepanel.lua.swp new file mode 100644 index 0000000..308e029 Binary files /dev/null and b/modules/.sidepanel.lua.swp differ diff --git a/modules/appdrawer.lua b/modules/appdrawer.lua new file mode 100644 index 0000000..b33d8d1 --- /dev/null +++ b/modules/appdrawer.lua @@ -0,0 +1,25 @@ +local awful = require('awful') +local wibox = require('wibox') +local gears = require('gears') +local timer = require("gears.timer") +local beautiful = require('beautiful') +local dpi = beautiful.xresources.apply_dpi + +screen.connect_signal("appdrawer::open", function(s) + + local drawer = wibox({ + position = "left", + ontop = true, + stretch = false, + width = dpi(64), + height = s.workarea.height, + visible = true, + y = 48 + }) + + drawer:setup { + expand = "none", + layout = wibox.layout.align.vertical, + } + +end) diff --git a/modules/panel.lua b/modules/panel.lua index 749783b..34d2479 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -73,20 +73,6 @@ screen.connect_signal("request::desktop_decoration", function(s) } } - -- Create a tasklist widget - s.mytasklist = awful.widget.tasklist { - screen = s, - filter = awful.widget.tasklist.filter.currenttags, - buttons = { - awful.button({ }, 1, function (c) - c:activate { context = "tasklist", action = "toggle_minimization" } - end), - awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), - awful.button({ }, 4, function() awful.client.focus.byidx( 1) end), - awful.button({ }, 5, function() awful.client.focus.byidx(-1) end), - } - } - -- Create the wibox s.mywibox = awful.wibar({ position = "top", height = 48, screen = s }) @@ -97,8 +83,7 @@ screen.connect_signal("request::desktop_decoration", function(s) layout = wibox.layout.fixed.horizontal, mylauncher, s.mytaglist, - s.mypromptbox, - s.mytasklist + s.mypromptbox }, nil, -- s.mytasklist, -- Middle widget @@ -111,4 +96,4 @@ screen.connect_signal("request::desktop_decoration", function(s) date, }, } -end) \ No newline at end of file +end) diff --git a/modules/sidepanel.lua b/modules/sidepanel.lua index edc0789..d02327c 100644 --- a/modules/sidepanel.lua +++ b/modules/sidepanel.lua @@ -1,33 +1,91 @@ local awful = require('awful') local wibox = require('wibox') +local gears = require('gears') local timer = require("gears.timer") local beautiful = require('beautiful') local dpi = beautiful.xresources.apply_dpi screen.connect_signal("request::desktop_decoration", function(s) - local dock = awful.wibox({ - x = s.workarea.width, - y = 0, + + local dock = wibox({ + position = "left", ontop = true, stretch = false, width = dpi(64), height = s.workarea.height, - visible = false - }) - local dock_trigger = awful.wibox({ + visible = false, + y = 48 + }) + s.mytasklist = awful.widget.tasklist { + screen = s, + filter = awful.widget.tasklist.filter.allscreen, + buttons = { + awful.button({ }, 1, function (c) + c:activate { context = "tasklist", action = "toggle_minimization" } + local t = c.first_tag + t:view_only() + end), + awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), + awful.button({ }, 4, function() awful.client.focus.byidx( 1) end), + awful.button({ }, 5, function() awful.client.focus.byidx(-1) end), + }, + layout = { + layout = wibox.layout.fixed.vertical + }, + widget_template = { + { + wibox.widget.base.make_widget(), + forced_height = 5, + id = 'background_role', + widget = wibox.container.background, + }, + { + { + id = 'clienticon', + widget = awful.widget.clienticon, + }, + margins = 10, + widget = wibox.container.margin + }, + nil, + create_callback = function(self, c, index, objects) + self:get_children_by_id('clienticon')[1].client = c + local tooltip = awful.tooltip({ + objects = { self }, + timer_function = function() + return c.name + end, + }) + + -- Then you can set tooltip props if required (should work as is) + tooltip.align = "left" + tooltip.mode = "outside" + tooltip.preferred_positions = {"left"} + tooltip.preferred_alignments = {"middle"} + end, + layout = wibox.layout.align.vertical, + }, + } + + dock:setup { + expand = "none", + layout = wibox.layout.align.vertical, + s.mytasklist, + } + local dock_trigger = awful.wibox({ position = "left", width = 1, bg = "#00000000", opacity = 0, ontop = true, visible = true - }) - local dock_hide_timer = timer({ timeout = 1}) - - dock_trigger:geometry({ width = 5, height = s.workarea.height }) - dock_hide_timer:connect_signal("timeout", function() dock.visible = false; dock_hide_timer:stop() end ) - - dock_trigger:connect_signal("mouse::enter", function() dock.visible = true end) - dock:connect_signal("mouse::enter", function() if dock_hide_timer.started then dock_hide_timer:stop() end end) - dock:connect_signal("mouse::leave", function() dock_hide_timer:again() end) -end) \ No newline at end of file + }) + + local dock_hide_timer = timer({ timeout = 1}) + + dock_trigger:geometry({ width = 5, height = s.workarea.height }) + dock_hide_timer:connect_signal("timeout", function() dock.visible = false; dock_hide_timer:stop() end ) + dock_trigger:connect_signal("mouse::enter", function() dock.visible = true end) + dock:connect_signal("mouse::enter", function() if dock_hide_timer.started then dock_hide_timer:stop() end end) + dock:connect_signal("mouse::leave", function() dock_hide_timer:again() end) + end) diff --git a/preferences/apps.lua b/preferences/apps.lua index d2e152d..cddb16d 100644 --- a/preferences/apps.lua +++ b/preferences/apps.lua @@ -10,10 +10,7 @@ apps.default = { } local run_on_start_up = { - "picom", - "redshift", - "unclutter" - } +} function apps.autostart() for _, app in ipairs(run_on_start_up) do @@ -27,5 +24,3 @@ local run_on_start_up = { end apps.autostart() - - diff --git a/rc.lua b/rc.lua index c7c9f0e..6c5b145 100644 --- a/rc.lua +++ b/rc.lua @@ -14,7 +14,8 @@ require('preferences.layouts') require('modules.client') require('modules.titlebar') require('modules.panel') --- require('modules.sidepanel') +require('modules.sidepanel') +require('modules.appdrawer') require('bindings.keys') -- BELOW NEEDS CLEANUP -- diff --git a/themes/pixelos/init.lua b/themes/pixelos/init.lua index 22b895e..c13faf5 100644 --- a/themes/pixelos/init.lua +++ b/themes/pixelos/init.lua @@ -7,8 +7,13 @@ local assets = filesystem.get_configuration_dir() .. '/theme/assets/' local theme = {} +-- Icon +theme.icon_theme = 'Papirus-Dark' + -- Font -theme.font = 'ProggyCleanTTCE Nerd Font Mono 12' +-- theme.font = 'ProggyCleanTTCE Nerd Font Mono 12' +theme.font = 'VictorMono Nerd Font Mono 10' +-- theme.font = 'Iosevka Nerd Font Mono 10' -- Misc -- -- Wallpaper Image