1
0

6 desktops, freedeskotp menu

This commit is contained in:
Stephen Byrne
2021-10-07 19:26:23 -04:00
parent 73abe8a931
commit 9fac13f8d6

47
rc.lua
View File

@@ -56,9 +56,7 @@ end
beautiful.init(awful.util.getdir("config") .. "themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
--terminal = "x-terminal-emulator"
--terminal = "terminology"
terminal = "lxterminal"
terminal = "x-terminal-emulator"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor
@@ -140,8 +138,12 @@ myawesomemenu = {
{ "shutdown", function() awful.spawn.with_shell("systemctl poweroff") end}
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "debian", debian.menu.Debian_menu.Debian },
local freedesktop = require("freedesktop")
mymainmenu = freedesktop.menu.build({
before = {
{ "awesome", myawesomemenu, beautiful.awesome_icon },
},
after = {
{ "terminal", terminal }
}
})
@@ -226,7 +228,7 @@ awful.screen.connect_for_each_screen(function(s)
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "", "", "", "", "" }, s, awful.layout.layouts[1])
awful.tag({ "", "", "", "", "", "" }, s, awful.layout.layouts[1])
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
@@ -235,9 +237,12 @@ awful.screen.connect_for_each_screen(function(s)
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 2, 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)))
awful.button({ }, 5, function () awful.layout.inc(-1) end),
awful.button({ }, 6, function () awful.layout.inc(-1) end)
))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
@@ -341,7 +346,7 @@ globalkeys = awful.util.table.join(
--awful.key({ modkey, "Shift" }, "q", awesome.quit,
-- {description = "quit awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "l", function () awful.spawn("i3lock -c 000000") end, {description="lock", group="lock"}),
awful.key({ modkey, "Shift" }, "l", function () awful.spawn("xscreensaver-command -activate") end, {description="lock", group="lock"}),
--[[
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
@@ -457,7 +462,7 @@ clientkeys = awful.util.table.join(
local curTag = c.first_tag
print(curTag.index)
local tagIdx = curTag.index + 1
if tagIdx > 5 then
if tagIdx > 6 then
tagIdx = 1
end
local tag = curTag.screen.tags[tagIdx]
@@ -472,7 +477,7 @@ clientkeys = awful.util.table.join(
print(curTag.index)
local tagIdx = curTag.index - 1
if tagIdx < 1 then
tagIdx = 5
tagIdx = 6
end
local tag = curTag.screen.tags[tagIdx]
client.focus:move_to_tag(tag)
@@ -480,7 +485,25 @@ clientkeys = awful.util.table.join(
end
)
,awful.key({'Control','Mod1'}, "Tab", function (c) c:lower() end, {description="lower",group="client"})
-- mx master lower thumb button
,awful.key({'Control','Mod1'}, "Tab",
function (c)
local n = awful.client.next(1,c,true)
-- TODO walk through next down and check widow bounds against mouse position
--if n == nil then
--else
--end
c:lower()
-- mouse.coords {
-- x = top.x,
-- y = top.y
-- }
-- client.focus(top)
end,
{description="lower",group="client"})
-- Alt-Tab: cycle through clients on the same screen.
-- This must be a clientkeys mapping to have source_c available in the callback.
@@ -497,7 +520,7 @@ clientkeys = awful.util.table.join(
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 5 do
for i = 1, 6 do
globalkeys = awful.util.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,