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

feat: Profile option to open new terms in last focused term's CWD [rebased 2024-10-06] #257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 6, 2024

  1. feat: Open new terms in focused term's CWD

    Closes: pop-os#251
    
    This patch implements an optional (but enabled by default) feature for
    opening new terminals using the focused terminal's working directory.
    The code to retrieve the CWD is largely based on Alacritty's
    implementation of the same feature.
    
    I added Rustix as a new direct dependency for the working directory
    logic. Both libc and Rustix are transitive dependencies of COSMIC Term.
    I opted for Rustix over libc to avoid an `unsafe` block as well as for
    its stronger type guarantees.
    
    References:
    * https://github.com/alacritty/alacritty/blob/6bd1674bd80e73df0d41e4342ad4e34bb7d04f84/alacritty/src/daemon.rs#L85-L108
    joshuamegnauth54 committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    dc000a2 View commit details
    Browse the repository at this point in the history
  2. Add option to toggle open in CWD to Profiles

    The option is enabled by default on Unix but settable per profile.
    
    Windows is currently unsupported and defaults to the old behavior.
    joshuamegnauth54 committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    6082f3b View commit details
    Browse the repository at this point in the history