You are not logged in.

#1 2017-02-25 12:00:32

louic
Member
Registered: 2013-06-13
Posts: 15

Switching to Wayland + Sway: two issues

I am now using i3 on X, and have tried Sway on Wayland. I really like it except for two issues that prevent me from switching for daily work:

1. Automatic screen switching using my laptop Fn+F7. I am happy to write a script and bind a key (as I did for X with xrandr) but I do not know how to change the screen outputs and resolutions on-the-fly in Wayland / sway.

2. A nicely configured terminal (xterm, urxvt, st or equivalent, with my own fonts and colors), am familiar with .Xresources but that has an X in it. What is the equivalent for Wayland / i3?

Offline

#2 2017-02-25 12:48:31

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 137

Re: Switching to Wayland + Sway: two issues

louic wrote:

I am now using i3 on X, and have tried Sway on Wayland. I really like it except for two issues that prevent me from switching for daily work:

1. Automatic screen switching using my laptop Fn+F7. I am happy to write a script and bind a key (as I did for X with xrandr) but I do not know how to change the screen outputs and resolutions on-the-fly in Wayland / sway.

Use the "output" setting provided by sway. It's in sway's FAQ online and in the manpage.

louic wrote:

2. A nicely configured terminal (xterm, urxvt, st or equivalent, with my own fonts and colors), am familiar with .Xresources but that has an X in it. What is the equivalent for Wayland / i3?

Terminals that don't depend on X (like GNOME terminal) have their own settings for fonts and colors. If you use xterm in Wayland, it will use XWayland and read your .Xresources I believe. It would be best if you try changing settings with a terminal you like and then report back if that fails.

Offline

#3 2017-02-25 13:16:47

louic
Member
Registered: 2013-06-13
Posts: 15

Re: Switching to Wayland + Sway: two issues

Thank you for your answer.

rdeckard wrote:

Use the "output" setting provided by sway. It's in sway's FAQ online and in the manpage.

Well, not exactly unless I misunderstood something. I can set output in the config file, but I want to change it with a keypress.

rdeckard wrote:

Terminals that don't depend on X (like GNOME terminal) have their own settings for fonts and colors. If you use xterm in Wayland, it will use XWayland and read your .Xresources I believe. It would be best if you try changing settings with a terminal you like and then report back if that fails.

This did not work for me. Both xterm and urxvt do not use the font I chose in .Xresources and revert to a default. After manually executing xrdb ~/.Xresources everything is fine, so the question becomes how to do this without .xinitrc?

Last edited by louic (2017-02-25 14:51:21)

Offline

#4 2017-02-25 14:56:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: Switching to Wayland + Sway: two issues

For urxvt you can use ~/.Xdefaults instead as urxvt reads that file itself on startup.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-02-25 15:24:02

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 137

Re: Switching to Wayland + Sway: two issues

I just realized I had the following line in my sway configuration:

exec xrdb ~/.Xresources

and that seemed to apply to all X applications in sway.

Offline

#6 2017-02-25 20:47:12

louic
Member
Registered: 2013-06-13
Posts: 15

Re: Switching to Wayland + Sway: two issues

Yes, that helped. Thanks.

Offline

Board footer

Powered by FluxBB