tyrannical icon indicating copy to clipboard operation
tyrannical copied to clipboard

Match client when send to screen

Open getzze opened this issue 9 years ago • 4 comments

I use two screens, and I have to switch clients from one screen to the other. However, when the client is sent to the other screen, it goes to the opened tag there. I would like the client to go tha tag matched by tyrannical. This can be done by making the match_client function of tyrannical part of the API. In init.lua:

module.match_client = match_client

Then for my shortcut (Win+F5 in my case) I set:

awful.key({ modkey,           }, "F5",     function (c) c.maximized=false awful.client.movetoscreen(c) tyrannical.match_client(c) c.maximized=true end,  "Move to other screen")

getzze avatar Jun 16 '15 13:06 getzze

+1

slavaGanzin avatar Jun 17 '15 15:06 slavaGanzin

I can't get this to work, is anything more needed in awesome/tyrannical config ?

igwan avatar Dec 01 '15 15:12 igwan

+1 for a native integration of this into Tyrannical

Wonskcalb avatar Sep 17 '16 16:09 Wonskcalb

Update on this.The next branch for the soon to be released Awesome 4.0 has an "if" to keep the old behavior of letting clients be dragged between screen without causing an explosion. If some of you are willing to have the feature proposed here, add a new variable to skip that if, remove the client old tags (c:tags{}) and it should work.

local function match_client(c, forced_tags, hints)
    -- Don't prevent tags from being drag and dropped between screens
    if hints and hints.reason == "screen" then -- <=== THIS
        c:tags {c.screen.selected_tag}
        return true
    end

I added an API in Awesome itself to support this, but I forgot to tell you. I don't have time to test this. Releasing Awesome4 and all my modules for it is already more work than I have time for.

Elv13 avatar Dec 12 '16 04:12 Elv13