Skip to content

[sway/workspaces] Weird behavior when using quotes in workspace names #4741

@Sayrus

Description

@Sayrus

Hello,

I'm having some strange behavior when using workspaces with quotes in them. For instance:

# Simple example
set $example 10:"Cal"
bindsym $mod+0 workspace $example

When switching through Sway, the Waybar module shows "Cal". When clicking the module switches to Cal.

# Adding a leading space
set $example 10:" Cal"
bindsym $mod+0 workspace $example

When switching through Sway, the modules shows " Cal". However when clicking this on Waybar, it uses the workspace Cal "". Clicking this once more redirects to Cal`.

This matches the behavior of swaymsg workspace "10:"Cal"" (manually templated from https://github.com/Alexays/Waybar/blob/master/include/modules/sway/workspaces.hpp#L26).

If the module works like swaymsg, quotes in the namespace name should be escaped swaymsg workspace "10:\"Cal\"".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions