Skip to content

swaymsg exec nvim corrupts Linux VT #4214

@neon64

Description

@neon64

If I run

$ swaymsg exec nvim

in a terminal emulator inside sway, then exit sway, I get some really weird results. It is as if neovim has started up inside the linux terminal (e.g.: /dev/tty1) while sway is still running, and then when I exit sway I can simultaneously see neovim UI as well as my shell prompt, and I can't reliably exit either of them because they're somehow both in control of the tty.

Expected behaviour would be that neovim doesn't start, similar to when I run nvim& in a terminal. I would imagine this has something to do with neovim thinking it is running in 'interactive mode' inside /dev/tty1, when it really shouldn't be because /dev/tty1 is currently hidden and sway is running on top and capturing all user input.

I should mention - I know I need to start an editor like neovim inside a terminal emulator e.g.: swaymsg exec alacritty -e nvim if I want to actually be able to use it. However it still feels like a bug that running the 'wrong sort of executable' with swaymsg exec (i.e.: not a GUI app) produces such a corrupted state in my linux VT. The same thing happens with vi, and I assume vim (though I haven't tried vim because I don't have it installed)

sway version

sway --version gives

sway version 1.0

however pacman reports 1.1.1-1. I'm pretty sure I'm running the latest version since I needed to install swaybg before my background showed again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions