The wibar of the awesome window manager is extremely flexible and can do many things that are hard to do with other panels at best, that ususally end up being janky anyway, and sometimes just are not possible outright. One of these things is to move the panel to the side of the screen and have everything behave correctly. In the following, I am going to show you how you can create a panel attactched to the right side of each of your connected screens.
#!/usr/bin/env lua5.3
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Create a new wibar on the left of the screen.
-- s = the scrren (from `screen.connect_signal...`)
local function sideways_wibar(s)
local swwb = {}
if mylauncher then
swwb.main_menu_button = mylauncher
else
swwb.main_menu_content = {
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end },
}
swwb.main_menu = awful.menu {
items = {
{ "awesome", swwb.main_menu, beautiful.awesome_icon },
{ "open terminal", terminal or "xterm" }
}
}
swwb.main_menu_launcher = awful.widget.launcher {
image = beautiful.awesome_icon,
menu = swwb.main_menu,
}
end
swwb.taglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
layout = {
layout = wibox.layout.fixed.vertical
},
widget_template = {
{
{
nil,
{
id = "text_role",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
},
nil,
layout = wibox.layout.align.horizontal,
},
margins = 5,
widget = wibox.container.margin,
},
id = "background_role",
widget = wibox.container.background,
},
buttons = {
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
}
}
swwb.layoutbox = awful.widget.layoutbox {
screen = s,
buttons = {
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc(-1) end),
awful.button({ }, 5, function () awful.layout.inc( 1) end),
}
}
swwb.tasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
layout = {
layout = wibox.layout.fixed.vertical
},
widget_template = {
{
id = "icon_role",
widget = wibox.widget.imagebox,
},
id = "background_role",
widget = wibox.container.background,
},
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),
}
}
swwb.clock = wibox.widget {
nil,
{
format = "<b>%H:%M</b>",
widget = wibox.widget.textclock,
},
nil,
expand = "outside",
layout = wibox.layout.align.horizontal,
}
swwb.systray = wibox.widget {
horizontal = false,
widget = wibox.widget.systray,
}
swwb.wibar = awful.wibar {
position = "left",
screen = s,
width = 42,
widget = {
{ -- Top
swwb.main_menu_launcher,
swwb.taglist,
layout = wibox.layout.fixed.vertical,
},
{ -- Center
swwb.tasklist,
layout = wibox.layout.fixed.vertical,
},
{ -- Bottom
swwb.systray,
swwb.clock,
swwb.layoutbox,
layout = wibox.layout.fixed.vertical,
},
--expand = "outside",
layout = wibox.layout.align.vertical,
}
}
return swwb.wibar
end
return sideways_wibar
This document is released into the public domain under the Creative Commons Zero (CC0 license) license, while the code snippets within it are licensed under the unlicense. Both licenses can be considered public domain, as-is licenses (this is not legal advice; read the licenses).
Just leave a comment, I'll try to help!
These are some tags so that people looking for a solution will find this, rather than a dozen disconnected Reddit posts :)
- awesome
- awesome wm
- awesome window manager
- awesome wm sidebar
- create sidebar awesome wm
- move panel to side awesome
- sideways panel awesome
- awesome rotate panel
Add y music best after yt vanced for me but ads comes in this that can be blocked via adblockers very good experimence with that app purpose both you can watch videos either listen song with blocking videos and saving data