mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-12 19:24:20 +02:00
layouts: display nmaster and ncol when changing them
On some layouts, it can help to have the values for nmaster and ncol. Use a notification to display them.
This commit is contained in:
parent
a47babf57e
commit
93f6bbc73d
1 changed files with 31 additions and 4 deletions
|
@ -154,6 +154,21 @@ end
|
|||
|
||||
local music = loadrc("spotify", "vbe/spotify")
|
||||
|
||||
local display_nmaster_ncol =
|
||||
(function()
|
||||
local nid = nil
|
||||
return function()
|
||||
local nmaster = awful.tag.getnmaster()
|
||||
local ncol = awful.tag.getncol()
|
||||
nid = naughty.notify(
|
||||
{ title = "Tag configuration",
|
||||
timeout = 5,
|
||||
text = "Number of masters: " .. nmaster ..
|
||||
"\nNumber of columns: " .. ncol,
|
||||
replaces_id = nid }).id
|
||||
end
|
||||
end)()
|
||||
|
||||
config.keys.global = awful.util.table.join(
|
||||
keydoc.group("Focus"),
|
||||
awful.key({ modkey, }, "j",
|
||||
|
@ -195,13 +210,25 @@ config.keys.global = awful.util.table.join(
|
|||
"Increase master-width factor"),
|
||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
|
||||
"Decrease master-width factor"),
|
||||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster( 1) end,
|
||||
awful.key({ modkey, "Shift" }, "l", function ()
|
||||
awful.tag.incnmaster(1)
|
||||
display_nmaster_ncol()
|
||||
end,
|
||||
"Increase number of masters"),
|
||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster(-1) end,
|
||||
awful.key({ modkey, "Shift" }, "h", function ()
|
||||
awful.tag.incnmaster(-1)
|
||||
display_nmaster_ncol()
|
||||
end,
|
||||
"Decrease number of masters"),
|
||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol( 1) end,
|
||||
awful.key({ modkey, "Control" }, "l", function ()
|
||||
awful.tag.incncol(1)
|
||||
display_nmaster_ncol()
|
||||
end,
|
||||
"Increase number of columns"),
|
||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol(-1) end,
|
||||
awful.key({ modkey, "Control" }, "h", function ()
|
||||
awful.tag.incncol(-1)
|
||||
display_nmaster_ncol()
|
||||
end,
|
||||
"Decrease number of columns"),
|
||||
awful.key({ modkey, }, "space", function () awful.layout.inc(config.layouts, 1) end,
|
||||
"Next layout"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue