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

Swaybg doesn't recognize the output name as given by swaymsg #44

Open
zsolt-donca opened this issue Jun 26, 2022 · 2 comments
Open

Swaybg doesn't recognize the output name as given by swaymsg #44

zsolt-donca opened this issue Jun 26, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@zsolt-donca
Copy link

zsolt-donca commented Jun 26, 2022

swaybg does not seem to recognize the output name exactly as its returned by swaymsg:

❯ swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation 0x1516 Unknown' (focused)
  Current mode: 3840x2400 @ 59.994 Hz
  Position: 0,0
  Scale factor: 2.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1:  
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3840x2400 @ 59.994 Hz

Now if I run swaybg with literally the same output name, it produces the below message and does not actually set the wallpaper:

❯ swaybg -o 'Sharp Corporation 0x1516 Unknown' -i "/home/zdonca/Pictures/wallpaper/swaying_tree_to_right.png" -m fill

2022-06-26 13:54:41 - [swaybg/main.c:256] Could not find config for output eDP-1 (Sharp Corporation 0x1516)

When omitting the word "Unknown" from the name, it actually works:

❯ swaybg -o 'Sharp Corporation 0x1516' -i "/home/zdonca/Pictures/wallpaper/swaying_tree_to_right.png" -m fill
2022-06-26 13:55:38 - [swaybg/main.c:260] Found config Sharp Corporation 0x1516 for output eDP-1 (Sharp Corporation 0x1516)

Using the id of the output (eDP-1) also works. Using the name of my external displays also work (not connected above), the issue seems to be only with my laptop's built-in display's full name.

My issue comes from azote, but I think the root cause is in swaybg.

I am using Arch Linux and the AUR package swaybg-git. At the moment of writing, my build is baesd on 69c03f6.

@emersion
Copy link
Member

swaybg uses a hack: it matches the output description. "Unknown" serial number has been removed from the output description in wlroots recently.

@gnull
Copy link

gnull commented Jan 9, 2023

It's worth noting that this bug creates an inconsistency between the output names the output command in Sway config expects depending on the options you use it with (I'm using @zsolt-donca's output names for the example):

# This works
output 'Sharp Corporation 0x1516 Unknown' scale 1.5
# But this doesn't
output 'Sharp Corporation 0x1516 Unknown' background picture.jpg
# So one has to do
output 'Sharp Corporation 0x1516' background picture.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants