Skip to content

How can i disable secondary and tertiary monitors in Sway with ReGreet? #56

@winteriscariot

Description

@winteriscariot

/etc/greetd/config.toml:

command = "sway --config /etc/greetd/sway-config"

/etc/greetd/sway-config:

exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway
exec systemctl --user import-environment DISPLAY \
                                         SWAYSOCK \
                                         WAYLAND_DISPLAY \
                                         XDG_CURRENT_DESKTOP

exec hash dbus-update-activation-environment 2>/dev/null && \
     dbus-update-activation-environment --systemd DISPLAY \
                                                  SWAYSOCK \
                                                  XDG_CURRENT_DESKTOP=sway \
                                                  WAYLAND_DISPLAY
output DisplayPort-0 mode 2560x1440
output HDMI-A-0 power off
output DisplayPort-1 power off
exec "regreet --config /etc/greetd/regreet.toml; swaymsg exit"

(note: i merged /etc/sway.config.d/* into my sway-config file just to make sure it wasn't an issue with includes)

basically, DisplayPort-0 is my middle monitor, with DP-1 and HDMI-A-0 being side monitors. The default behavior is that ReGreet is displayed on the center monitor, with background applied (good) but the side panels are just blank gray.

this is not the worst outcome ever, but I'd prefer to turn off the side panels when ReGreet is running. however, the output commands in my sway-config don't seem to do anything.

is there somewhere else I can do this? swaymsg doesn't seem to do anything (even when setting SWAYSOCK to /var/run/greetd-XXX.sock) due to failure to connect to IPC

# swaymsg -s /var/run/greetd-1366.sock swaymsg output HDMI-A-O power off
00:00:03.011 [common/ipc-client.c:87] Unable to receive IPC response

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions