Last active
May 24, 2019 15:10
-
-
Save frioux/32e522db49cc39b35ae7e007ef65119e to your computer and use it in GitHub Desktop.
debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sharetags = require("sharetags") | |
local function screen_tag_state(s) | |
for i, t in ipairs(s.selected_tags) do | |
local activated = "NOT" | |
if t.activated then | |
activated = "IS" | |
end | |
print("AC: screen " .. s.index .. " has tag " .. t.name) | |
end | |
end | |
print("AC: client swapping 1 and 2") | |
screen_tag_state(screen[1]) | |
screen_tag_state(screen[2]) | |
sharetags.swap_screen(screen[1], screen[2]) | |
print("AC: client swapping 1 and 2 again") | |
screen_tag_state(screen[1]) | |
screen_tag_state(screen[2]) | |
sharetags.swap_screen(screen[1], screen[2]) | |
print("AC: should be back where we started") | |
screen_tag_state(screen[1]) | |
screen_tag_state(screen[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen.connect_signal("tag::history::update", function(s) | |
for i, t in ipairs(s.selected_tags) do | |
print("screen " .. s.index .. " has tag " .. t.name) | |
end | |
end) | |
client.connect_signal("request::activate", function(c, ctx, hints) | |
print("client " .. c.window .. " requested " .. ctx) | |
end) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AC: client swapping 1 and 2 | |
AC: screen 1 has tag 1 | |
AC: screen 2 has tag 2 | |
moving tag 2 to screen 1 | |
screen 1 has tag 2 | |
moving tag 1 to screen 2 | |
screen 1 has tag 2 | |
screen 1 has tag 1 | |
screen 1 has tag 2 | |
AC: client swapping 1 and 2 again | |
AC: screen 1 has tag 1 | |
AC: screen 1 has tag 2 | |
moving tag 1 to screen 2 | |
screen 1 has tag 1 | |
moving tag 2 to screen 2 | |
screen 1 has tag 1 | |
screen 1 has tag 1 | |
screen 1 has tag 2 | |
AC: should be back where we started | |
AC: screen 1 has tag 1 | |
AC: screen 1 has tag 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment