]> git.madduck.net Git - etc/awesome.git/blobdiff - .config/awesome/rc.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add rw autorandr screens
[etc/awesome.git] / .config / awesome / rc.lua
index badbbade2d7ca84f8ba7de37a2e8362ce90b42ca..5da16de277ba581db3d478519fdcc309475d820e 100644 (file)
@@ -541,6 +541,7 @@ default_tags = gears.table.join(default_tags, {
                        "krafftwerk/DP-?1-1-5",
                        "krafftwerk/DisplayPort-2",
                        "cafe/eDP-?1",
+                       "rw-[lr]/DisplayPort-[01]",
                },
        },
        {
@@ -558,6 +559,7 @@ default_tags = gears.table.join(default_tags, {
                        "krafftwerk/DP-?1-1-5",
                        "krafftwerk/DisplayPort-2",
                        "cafe/eDP-?1",
+                       "rw-[lr]/DisplayPort-[01]",
                },
        },
        {
@@ -582,6 +584,7 @@ default_tags = gears.table.join(default_tags, {
                        "krafftwerk/DP-?1-1-6",
                        "krafftwerk/DisplayPort-0",
                        "cafe/eDP-?1",
+                       "rw-[lr]/DisplayPort-[01]",
                },
        },
        {
@@ -599,6 +602,8 @@ default_tags = gears.table.join(default_tags, {
                        "krafftwerk/DisplayPort-0",
                        "present/HDMI.*",
                        "cafe/eDP-?1",
+                       "rw-[lr]/DisplayPort-[01]",
+                       "tournament/HDMI.*",
                },
        },
        {
@@ -616,6 +621,7 @@ default_tags = gears.table.join(default_tags, {
                        "krafftwerk/DisplayPort-0",
                        "present/HDMI.*",
                        "cafe/eDP-?1",
+                       "rw-[lr]/DisplayPort-[01]",
                },
        },
 })
@@ -697,9 +703,14 @@ end
 
 local function move_tags_to_screen_relative(direction)
        local s = awful.screen.focused()
+       local ts = screen:count() - (s.index + direction) % screen:count()
        for _, tag in ipairs(s.selected_tags) do
-               print("index: " .. s.index .. " count: " .. screen:count())
-               tag.screen = screen[(s.index + screen:count() + direction) % screen.count()]
+               print("index: " .. s.index .. " count: " .. screen:count() .. " target: " .. ts)
+               tag.screen = screen[ts]
+
+               for _, t in ipairs(tag.screen.tags) do
+                       t.selected = (tag == t)
+               end
        end
 end
 
@@ -1273,7 +1284,7 @@ awful.rules.rules = {
                        placement = awful.placement.centered,
                },
        },
-       { rule_any = { class = { "URxvt" }, properties = { size_hints_honor = false } },
+       { rule_any = { class = { "URxvt", "kitty" } }, properties = { size_hints_honor = false } },
        { rule = { instance = "irc" }, callback = move_to_tag_by_name(nil, "irc") },
        { rule = { class = "scrcpy" }, callback = move_to_tag_by_name(nil, "[]") },
        { rule_any = { class = { "Firefox", "firefox" } }, callback = move_to_tag_by_name(nil, "ffx") },