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

Suggest automatic screen in .zshrc etc. #16

Open
mgroth0 opened this issue Dec 19, 2024 · 0 comments
Open

Suggest automatic screen in .zshrc etc. #16

mgroth0 opened this issue Dec 19, 2024 · 0 comments

Comments

@mgroth0
Copy link

mgroth0 commented Dec 19, 2024

I just found a way to get this to work in a new terminal window right off the bat. It's not super ideal since you have to still be in screen, but at least it is automatic.

Basically just in .zshrc, do this:

if [[ -z $STY ]]; then
    autoload -Uz add-zsh-hook
    add-zsh-hook -U precmd () {
        if [[ -z $STY ]]; then
            screen
        fi
    }
fi

And then in ~/.screenrc:

startup_message off

No idea if there is a bash equivalent. But zsh is the standard shell for macs now.

I don't think this is a complete solution since it forces people to be in screen all the time, but it might be useful enough to some people that this could be a tip in the README for this?

vishwamartur added a commit to vishwamartur/wut that referenced this issue Dec 21, 2024
Related to shobrook#16

Add a tip for automatic `screen` startup in `.zshrc` to `README.md`.

* Add a new section under "Usage" for automatic `screen` startup in `.zshrc`.
* Include the suggested `.zshrc` configuration code snippet.
* Include the suggested `~/.screenrc` configuration code snippet to disable the startup message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant