Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--current option #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

talwrii
Copy link

@talwrii talwrii commented Feb 6, 2018

Switch to windows in the current workspace

Switch to windows in the current workspace
@talwrii talwrii force-pushed the talwrii--2018-02-06--switch-in-current-workspace branch from e0b3780 to 5bf3a26 Compare February 6, 2018 18:35
@OliverUv
Copy link
Owner

OliverUv commented Feb 7, 2018

Looks nice! Can you get back to me after using this for a week or two? (To make sure we find any obvious bugs before merging.)

Also, make sure you test it while using windows with UTF-8 in their titles. The code doesn't look like it should have any problems with that, but it's something I always test now.

@talwrii
Copy link
Author

talwrii commented Feb 7, 2018

Can you get back to me after using this for a week or two?

Sure.

Also, make sure you test it while using windows with UTF-8 in their titles. The code doesn't look like it should have any problems with that, but it's something I always test now.

Hmm, so I tried this and I got errors within i3.py itself :/.

$ xterm -e 'echo -ne "\033]0;hë☺llo\007"; read' &
[1] 17496

$ quickswitch.py
Traceback (most recent call last):
  File "/home/user/.extraconfig/bins/quickswitch-for-i3/quickswitch.py", line 598, in <module>
    main()
  File "/home/user/.extraconfig/bins/quickswitch-for-i3/quickswitch.py", line 576, in main
    lookup = lookup_func()
  File "/home/user/.extraconfig/bins/quickswitch-for-i3/quickswitch.py", line 67, in get_windows
    windows = parse_for_windows(i3.get_tree(), [])
  File "/home/user/.local/lib/python3.6/site-packages/i3.py", line 409, in function
    response = msg(type, msg_full)
  File "/home/user/.local/lib/python3.6/site-packages/i3.py", line 392, in msg
    response = default_socket().get(type, message)
  File "/home/user/.local/lib/python3.6/site-packages/i3.py", line 182, in get
    return self.receive()
  File "/home/user/.local/lib/python3.6/site-packages/i3.py", line 218, in receive
    return self.unpack(data)
  File "/home/user/.local/lib/python3.6/site-packages/i3.py", line 248, in unpack
    payload = data[self.struct_header_size:msg_size].decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 11628: invalid continuation byte

@talwrii
Copy link
Author

talwrii commented Feb 7, 2018

I'm not sure if this is the correct place to discuss this issue:
I've reproduced the above UTF-8 title name bug against master and included some debug information here: #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants