Remove tags UI

This commit is contained in:
Alice Gaudon 2020-12-27 08:21:18 +01:00
parent b5f391f3b8
commit a6b0a8b02a

View File

@ -196,20 +196,20 @@ main_clock = wibox.widget.textclock(" %F · %R ")
utc_clock = wibox.widget.textclock(" %F · %T UTC ¤ ", 1, "Z") utc_clock = wibox.widget.textclock(" %F · %T UTC ¤ ", 1, "Z")
-- Create a wibox for each screen and add it -- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(awful.button({}, 1, function(t) t:view_only() end), -- local taglist_buttons = gears.table.join(awful.button({}, 1, function(t) t:view_only() end),
awful.button({ config.keys.modkey }, 1, function(t) -- awful.button({ config.keys.modkey }, 1, function(t)
if client.focus then -- if client.focus then
client.focus:move_to_tag(t) -- client.focus:move_to_tag(t)
end -- end
end), -- end),
awful.button({}, 3, awful.tag.viewtoggle), -- awful.button({}, 3, awful.tag.viewtoggle),
awful.button({ config.keys.modkey }, 3, function(t) -- awful.button({ config.keys.modkey }, 3, function(t)
if client.focus then -- if client.focus then
client.focus:toggle_tag(t) -- client.focus:toggle_tag(t)
end -- end
end), -- end),
awful.button({}, 4, function(t) awful.tag.viewnext(t.screen) end), -- awful.button({}, 4, function(t) awful.tag.viewnext(t.screen) end),
awful.button({}, 5, function(t) awful.tag.viewprev(t.screen) end)) -- awful.button({}, 5, function(t) awful.tag.viewprev(t.screen) end))
local tasklist_buttons = gears.table.join(awful.button({}, 1, function(c) local tasklist_buttons = gears.table.join(awful.button({}, 1, function(c)
if c == client.focus then if c == client.focus then
@ -262,11 +262,11 @@ awful.screen.connect_for_each_screen(function(s)
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)))
-- Create a taglist widget -- Create a taglist widget
s.mytaglist = awful.widget.taglist { -- s.mytaglist = awful.widget.taglist {
screen = s, -- screen = s,
filter = awful.widget.taglist.filter.all, -- filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons -- buttons = taglist_buttons
} -- }
-- Create a tasklist widget -- Create a tasklist widget
s.mytasklist = awful.widget.tasklist { s.mytasklist = awful.widget.tasklist {
@ -326,7 +326,7 @@ awful.screen.connect_for_each_screen(function(s)
-- Left widgets -- Left widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
launcher, launcher,
s.mytaglist, -- s.mytaglist,
s.mypromptbox, s.mypromptbox,
}, },
s.mytasklist, -- Middle widget s.mytasklist, -- Middle widget
@ -534,50 +534,50 @@ clientkeys = gears.table.join(-- tiling
-- Bind all key numbers to tags. -- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout. -- Be careful: we use keycodes to make it work 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, 9 do -- for i = 1, 9 do
hotkey.registerKeys(-- View tag only. -- hotkey.registerKeys(-- View tag only.
awful.key({ config.keys.modkey }, "#" .. i + 9, -- awful.key({ config.keys.modkey }, "#" .. i + 9,
function() -- function()
local screen = awful.screen.focused() -- local screen = awful.screen.focused()
local tag = screen.tags[i] -- local tag = screen.tags[i]
if tag then -- if tag then
tag:view_only() -- tag:view_only()
end -- end
end, -- end,
{ description = "view tag #" .. i, group = "tag" }), -- { description = "view tag #" .. i, group = "tag" }),
-- Toggle tag display. -- -- Toggle tag display.
awful.key({ config.keys.modkey, "Control" }, "#" .. i + 9, -- awful.key({ config.keys.modkey, "Control" }, "#" .. i + 9,
function() -- function()
local screen = awful.screen.focused() -- local screen = awful.screen.focused()
local tag = screen.tags[i] -- local tag = screen.tags[i]
if tag then -- if tag then
awful.tag.viewtoggle(tag) -- awful.tag.viewtoggle(tag)
end -- end
end, -- end,
{ description = "toggle tag #" .. i, group = "tag" }), -- { description = "toggle tag #" .. i, group = "tag" }),
-- Move client to tag. -- -- Move client to tag.
awful.key({ config.keys.modkey, "Shift" }, "#" .. i + 9, -- awful.key({ config.keys.modkey, "Shift" }, "#" .. i + 9,
function() -- function()
if client.focus then -- if client.focus then
local tag = client.focus.screen.tags[i] -- local tag = client.focus.screen.tags[i]
if tag then -- if tag then
client.focus:move_to_tag(tag) -- client.focus:move_to_tag(tag)
end -- end
end -- end
end, -- end,
{ description = "move focused client to tag #" .. i, group = "tag" }), -- { description = "move focused client to tag #" .. i, group = "tag" }),
-- Toggle tag on focused client. -- -- Toggle tag on focused client.
awful.key({ config.keys.modkey, "Control", "Shift" }, "#" .. i + 9, -- awful.key({ config.keys.modkey, "Control", "Shift" }, "#" .. i + 9,
function() -- function()
if client.focus then -- if client.focus then
local tag = client.focus.screen.tags[i] -- local tag = client.focus.screen.tags[i]
if tag then -- if tag then
client.focus:toggle_tag(tag) -- client.focus:toggle_tag(tag)
end -- end
end -- end
end, -- end,
{ description = "toggle focused client on tag #" .. i, group = "tag" })) -- { description = "toggle focused client on tag #" .. i, group = "tag" }))
end -- end
clientbuttons = gears.table.join(awful.button({}, 1, function(c) clientbuttons = gears.table.join(awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true }) c:emit_signal("request::activate", "mouse_click", { raise = true })