6 desktops, freedeskotp menu
This commit is contained in:
49
rc.lua
49
rc.lua
@@ -56,9 +56,7 @@ end
|
|||||||
beautiful.init(awful.util.getdir("config") .. "themes/default/theme.lua")
|
beautiful.init(awful.util.getdir("config") .. "themes/default/theme.lua")
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
--terminal = "x-terminal-emulator"
|
terminal = "x-terminal-emulator"
|
||||||
--terminal = "terminology"
|
|
||||||
terminal = "lxterminal"
|
|
||||||
editor = os.getenv("EDITOR") or "editor"
|
editor = os.getenv("EDITOR") or "editor"
|
||||||
editor_cmd = terminal .. " -e " .. editor
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
@@ -140,11 +138,15 @@ myawesomemenu = {
|
|||||||
{ "shutdown", function() awful.spawn.with_shell("systemctl poweroff") end}
|
{ "shutdown", function() awful.spawn.with_shell("systemctl poweroff") end}
|
||||||
}
|
}
|
||||||
|
|
||||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
local freedesktop = require("freedesktop")
|
||||||
{ "debian", debian.menu.Debian_menu.Debian },
|
mymainmenu = freedesktop.menu.build({
|
||||||
|
before = {
|
||||||
|
{ "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||||
|
},
|
||||||
|
after = {
|
||||||
{ "terminal", terminal }
|
{ "terminal", terminal }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||||
menu = mymainmenu })
|
menu = mymainmenu })
|
||||||
@@ -226,7 +228,7 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
set_wallpaper(s)
|
set_wallpaper(s)
|
||||||
|
|
||||||
-- Each screen has its own tag table.
|
-- 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
|
-- Create a promptbox for each screen
|
||||||
s.mypromptbox = awful.widget.prompt()
|
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 = awful.widget.layoutbox(s)
|
||||||
s.mylayoutbox:buttons(awful.util.table.join(
|
s.mylayoutbox:buttons(awful.util.table.join(
|
||||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
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({ }, 3, function () awful.layout.inc(-1) end),
|
||||||
awful.button({ }, 4, 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
|
-- Create a taglist widget
|
||||||
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
|
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,
|
--awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||||
-- {description = "quit awesome", group = "awesome"}),
|
-- {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,
|
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
|
local curTag = c.first_tag
|
||||||
print(curTag.index)
|
print(curTag.index)
|
||||||
local tagIdx = curTag.index + 1
|
local tagIdx = curTag.index + 1
|
||||||
if tagIdx > 5 then
|
if tagIdx > 6 then
|
||||||
tagIdx = 1
|
tagIdx = 1
|
||||||
end
|
end
|
||||||
local tag = curTag.screen.tags[tagIdx]
|
local tag = curTag.screen.tags[tagIdx]
|
||||||
@@ -472,7 +477,7 @@ clientkeys = awful.util.table.join(
|
|||||||
print(curTag.index)
|
print(curTag.index)
|
||||||
local tagIdx = curTag.index - 1
|
local tagIdx = curTag.index - 1
|
||||||
if tagIdx < 1 then
|
if tagIdx < 1 then
|
||||||
tagIdx = 5
|
tagIdx = 6
|
||||||
end
|
end
|
||||||
local tag = curTag.screen.tags[tagIdx]
|
local tag = curTag.screen.tags[tagIdx]
|
||||||
client.focus:move_to_tag(tag)
|
client.focus:move_to_tag(tag)
|
||||||
@@ -480,7 +485,25 @@ clientkeys = awful.util.table.join(
|
|||||||
end
|
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.
|
-- Alt-Tab: cycle through clients on the same screen.
|
||||||
-- This must be a clientkeys mapping to have source_c available in the callback.
|
-- 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.
|
-- Bind all key numbers to tags.
|
||||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
-- 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.
|
-- 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,
|
globalkeys = awful.util.table.join(globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
awful.key({ modkey }, "#" .. i + 9,
|
||||||
|
|||||||
Reference in New Issue
Block a user