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

config: allow setting stdout/err for exec #8511

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MithicSpirit
Copy link

Introduces the exec_output command, which sets the file to use for
stdout and stderr in the exec and exec_always commands.

This change is currently undocumented as I am still polling interest (it was
originally just for personal use, but a friend encouraged me to submit it
upstream). If it seems like it might be merged, I can write up some
documentation.

Introduces the exec_output command, which sets the file to use for
stdout and stderr in the exec and exec_always commands.
@kennylevinsen
Copy link
Member

What does this do that exec "some_command >OUT 2>ERR" wouldn't already handle?

@MithicSpirit
Copy link
Author

What does this do that exec "some_command >OUT 2>ERR" wouldn't already handle?

Nothing, this is just for convenience so you don't have to specify that for every command.

@llyyr
Copy link
Contributor

llyyr commented Dec 26, 2024

Nothing, this is just for convenience so you don't have to specify that for every command.

I think you probably want to specify it for each command, otherwise mixing up stdout/stderr output from multiple different commands into a single file doesn't seem very useful.

@MithicSpirit
Copy link
Author

I mainly don't want Sway's logs (that are going to be piped into systemd-cat whenever I get around to it) to be cluttered with the logs from everything else. I can still manually override the output for specific commands if I want to, but that's very rare.

This does feel very niche, so I don't have high hopes for it being merged.

@emersion
Copy link
Member

You can achieve the same thing with the following:

set $exec exec >>sway-exec.log 2>&1

bindsym $mod+Return $exec $term

@MithicSpirit
Copy link
Author

Yeah, that's also an option. I think my command is more convenient though.

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

Successfully merging this pull request may close these issues.

4 participants