made any leftover tags from 10 / screens:count() get given to the first screen

This commit is contained in:
Izaya 2021-10-28 19:38:28 +11:00
parent 6c93a03c66
commit 6d1748eb97

27
rc.lua
View File

@ -219,7 +219,11 @@ awful.screen.connect_for_each_screen(function(s)
-- Each screen has its own tag table. -- Each screen has its own tag table.
local tags = {} local tags = {}
for i = 1, math.floor(10 / screen:count()) do local extra = 0
if s.index == 1 then
extra = 10 % screen:count()
end
for i = 1, math.floor(10 / screen:count()) + extra do
tags[#tags+1] = tostring(workspaceCounter) tags[#tags+1] = tostring(workspaceCounter)
workspaceCounter = workspaceCounter + 1 workspaceCounter = workspaceCounter + 1
end end
@ -484,7 +488,7 @@ clientkeys = gears.table.join(
-- 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, 10 do for i = 1, #root.tags() do
globalkeys = gears.table.join(globalkeys, globalkeys = gears.table.join(globalkeys,
-- View tag only. -- View tag only.
awful.key({ modkey }, "#" .. i + 9, awful.key({ modkey }, "#" .. i + 9,
@ -621,7 +625,7 @@ awful.rules.rules = {
}, },
{ rule_any = { { rule_any = {
class = {"xfce4-terminal", "Xfce4-terminal"}, class = {"xfce4-terminal", "Xfce4-terminal", "mpv"},
}, },
properties = { size_hints_honor = false } properties = { size_hints_honor = false }
}, },
@ -629,13 +633,19 @@ awful.rules.rules = {
-- { rule = { class = "Firefox" }, -- { rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" } }, -- properties = { screen = 1, tag = "2" } },
{ rule = { class = "Steam", name = "Steam" }, { rule = { class = "Steam", name = "Steam" },
properties = {tag = "2", titlebars_enabled = false } }, properties = {tag = "3", titlebars_enabled = false } },
{ rule = { class = "Steam", name = "Friends List.*"}, { rule = { class = "Steam", name = "Friends List.*"},
properties = {tag = "5", titlebars_enabled = false } }, properties = {tag = "6", titlebars_enabled = false } },
{ rule = { class = "Pidgin"}, { rule = { class = "Pidgin"},
properties = {tag = "5"} }, properties = {tag = "6"} },
{ rule = { class = "Gajim", name = ".*File Transfer.*"}, { rule = { class = "Gajim", name = ".*File Transfer.*"},
properties = {tag = "4", floating = true } }, properties = {tag = "5", floating = true } },
{ rule_any = { class = {"RimWorldLinux", "Minecraft.*"} },
properties = {fullscreen = true, tag = "4" } },
{ rule = { class = "Waterfox-classic" },
properties = {tag = "8"} },
{ rule = { class = "QuiteRss" },
properties = {tag = "9"} },
} }
-- }}} -- }}}
@ -698,12 +708,13 @@ awful.spawn.with_shell(
'xrdb -merge <<< "awesome.started:true";' .. 'xrdb -merge <<< "awesome.started:true";' ..
'corectrl &' .. 'corectrl &' ..
'nextcloud &' .. 'nextcloud &' ..
'SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass ssh-add &' ..
'xinput set-prop "Logitech MX518 Gaming Mouse" "libinput Accel Profile Enabled" 0, 0;' .. 'xinput set-prop "Logitech MX518 Gaming Mouse" "libinput Accel Profile Enabled" 0, 0;' ..
'xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Accel Profile Enabled" 0, 0;' .. 'xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Accel Profile Enabled" 0, 0;' ..
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart";' -- https://github.com/jceb/dex 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart";' -- https://github.com/jceb/dex
) )
gears.wallpaper.set("#000000") gears.wallpaper.set("#000000")
awful.spawn.with_shell("SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass ssh-add") --awful.spawn.with_shell("SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass ssh-add")
--[[ --[[
awful.spawn.with_shell("corectrl") awful.spawn.with_shell("corectrl")
awful.spawn.with_shell("nextcloud") awful.spawn.with_shell("nextcloud")