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

Trim trailing whitespace from config file #3316

Open
mor3dr3ad opened this Issue Jun 27, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@mor3dr3ad

mor3dr3ad commented Jun 27, 2018

Hey all,

this problem has me stumped:

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

My i3 config has the following workspacewise:

    bindsym $mod+grave workspace h0me
    bindsym $mod+1 workspace term1nal
    bindsym $mod+2 workspace co2e
    bindsym $mod+3 workspace teleg3am
    bindsym $mod+4 workspace edi4or
   
    bindsym $mod+Shift+grave move container to workspace h0me
    bindsym $mod+Shift+1 move container to workspace term1nal
    bindsym $mod+Shift+2 move container to workspace co2e
    bindsym $mod+Shift+3 move container to workspace teleg3am
    bindsym $mod+Shift+4 move container to workspace edi4or

My polybar has the following:

    ws-icon-0 = h0me;a
    ws-icon-1 = term1nal;b
    ws-icon-2 = co2e;c
    ws-icon-3 = teleg3am;d
    ws-icon-4 = edi4or;e

Where a through e are icons.

I would expect polybar to display the items next to the name, both when I switch to a new workspace and when I move a container there (polybar is configured accordingly).

However, polybar does only display both icon and name, when I move a container to a new workspace. This workspace is then not mapped to $mod+1; I can only swtich to that workspace by searching or cycling through all workspaces.

When I switch to a workspace, I get a new workspace with the same name, but no icon.

This behaviour only holds for workspaces 1 through 3, all others work accordingly.

Environment

Output of i3 --moreversion 2>&-:

i3 version: 
I am running i3-gaps version 4.15.0.1 on Arch linux with polybar. 



Logfile URL: https://logs.i3wm.org/logs/5746196614217728.bz2
- Linux Distribution & Version: Arch Linux Kernel 4.17.2-1
- Are you using a compositor (e.g., xcompmgr or compton): compton

2018-06-27-144015_1920x1080_scrot

@orestisf1993

This comment has been minimized.

Member

orestisf1993 commented Jul 15, 2018

I think you have trailing whitespace in your config file. Delete the spaces in the end of these 3 lines:

bindsym $mod+1 workspace term1nal 
bindsym $mod+2 workspace co2e 
bindsym $mod+3 workspace teleg3am 

@Airblader: should we trim trailing whitespaces in workspace names?

@Airblader

This comment has been minimized.

Member

Airblader commented Jul 16, 2018

I don't think we should trim them from workspace names, but in the config – yes. If a user wants spaces (and there are users who do), they should quote the name.

# No trailing spaces → "foo"
workspace foo

# Trailing spaces, unquoted → "foo"
workspace foo   

# Trailing spaces, quoted → "foo   "
workspace "foo   "

@orestisf1993 orestisf1993 changed the title from Switching to workspaces and moving container to (same) workspace map to different workspaces to Trim trailing whitespace from config file Sep 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment