-
Notifications
You must be signed in to change notification settings - Fork 109
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
sway: pango markup not fully supported (span rendered as plain text) #157
Comments
I wonder if it has something to do with how sway unescapes those quotes. You don't have quote escapes in the example that works and that probably makes a difference. |
well, you are right anyway, on i3 if I do >>> vars(i3.command('rename workspace i: work to <span foreground=\"blue\">blue</span>')[0])
{'ipc_data': {'success': False, 'parse_error': True, 'error': "Expected one of these tokens: 'to'", 'input': 'rename workspace i: work to <span foreground="blue">blue</span>', 'errorposition': ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'}, 'success': False, 'error': "Expected one of these tokens: 'to'"}
>>> vars(i3.command('rename workspace "i: work" to <span foreground=\"blue\">blue</span>')[0])
{'ipc_data': {'success': True}, 'success': True, 'error': None}
# worked
>>> vars(i3.command('rename workspace "i: work" to <span foreground="blue">blue</span>')[0])
{'ipc_data': {'success': True}, 'success': True, 'error': None}
# worked so i need to quote before >>> vars(i3.command('rename workspace <span foreground="blue">blue</span> to i: work')[0])
{'ipc_data': {'success': False, 'parse_error': True, 'error': "Expected one of these tokens: 'to'", 'input': 'rename workspace <span foreground="blue">blue</span> to i: work', 'errorposition': ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'}, 'success': False, 'error': "Expected one of these tokens: 'to'"}
>>> vars(i3.command('rename workspace <span foreground="blue">blue</span> to "i: work"')[0])
{'ipc_data': {'success': False, 'parse_error': True, 'error': "Expected one of these tokens: 'to'", 'input': 'rename workspace <span foreground="blue">blue</span> to "i: work"', 'errorposition': ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'}, 'success': False, 'error': "Expected one of these tokens: 'to'"}
>>> vars(i3.command('rename workspace "<span foreground="blue">blue</span>" to "i: work"')[0])
{'ipc_data': {'success': False, 'parse_error': True, 'error': "Expected one of these tokens: 'to'", 'input': 'rename workspace "<span foreground="blue">blue</span>" to "i: work"', 'errorposition': ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'}, 'success': False, 'error': "Expected one of these tokens: 'to'"}
>>> vars(i3.command('rename workspace "<span foreground=\"blue\">blue</span>" to "i: work"')[0])
{'ipc_data': {'success': False, 'parse_error': True, 'error': "Expected one of these tokens: 'to'", 'input': 'rename workspace "<span foreground="blue">blue</span>" to "i: work"', 'errorposition': ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'}, 'success': False, 'error': "Expected one of these tokens: 'to'"}
>>> vars(i3.command('rename workspace "<span foreground=\\"blue\\">blue</span>" to i: work')[0])
{'ipc_data': {'success': True}, 'success': True, 'error': None} if I do the same with sway, if I do so do you agree it should work with: vars(i3.command('rename workspace "i: work" to <span foreground=\\"blue\\">blue</span>')[0]) on i3 and with vars(i3.command('rename workspace i: work to <span foreground="blue">blue</span>')[0]) on sway, then there is that click issue with sway... (swaywm/sway#5652) |
Consider using raw strings to reduce confusion about the escapes. If there are any differences about escaped values in the parser, you can report it on sway because it's supposed to be compatible with the i3 config. |
this works flawless in i3.
with sway however, only
<b>
and<i>
seems to be supported, meanwhile span is rendered as text.tried also to put
bindsym $mod+Shift+i workspace <span foreground="blue">blue</span>
in .config/sway/config and the blue blue text is there, so this is ipc relatedThe text was updated successfully, but these errors were encountered: