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

Nucleo, Ratatui, Modifiers V1 #24

Merged
merged 1 commit into from
May 30, 2024
Merged

Nucleo, Ratatui, Modifiers V1 #24

merged 1 commit into from
May 30, 2024

Conversation

vinnymeller
Copy link
Owner

  • Use Nucleo/Ratatui for better customization
  • Immediately open picker and stream workspace matches into the picker
    • This feels snappier + allows you to make a selection before the list is done loading
  • Allow to open a workspace in a group from the main workspace finder
    • Currently we have implemented a tmm -g flag that opens a finder showing existing sessions which, when selected, opens a new session in a group with the selected session.
    • Something this change adds experimental support for is clicking Ctrl/Shift/Alt + Enter from the main workspace finder to attempt to open the selected workspace as a new group session. twm will search for a twm-generated session with TWM_ROOT set to the path of the selected workspace and if found, open your new session in a group with it. Otherwise, it behaves normally.
    • This hasn't really been tested much yet, and it seems(?) crossterm doesn't support Ctrl/Shift + Enter on Linux (or is it just some terminals?), but Alt + Enter is working for me. I've left all 3 options in currently to try testing on more systems/terminals.

- Use Nucleo/Ratatui for better customization
- Immediately open picker and stream workspace matches into the picker
  - This feels snappier + allows you to make a selection before the list
    is done loading
- Allow to open a workspace in a group from the main workspace finder
  - Currently we have implemented a `tmm -g` flag that opens a finder
    showing existing sessions which, when selected, opens a new session
    in a group with the selected session.
  - Something this change adds experimental support for is clicking
    `Ctrl/Shift/Alt` + Enter from the main workspace finder to *attempt*
    to open the selected workspace as a new group  session. twm will
    search for a twm-generated session with `TWM_ROOT` set to the path
    of the selected workspace and if found, open your new  session in a
    group with it. Otherwise, it behaves normally.
  - This hasn't really been tested much yet, and it seems(?) crossterm
    doesn't support `Ctrl/Shift` + `Enter` on Linux (or is it just some
    terminals?), but `Alt` + `Enter` is working for me. I've left all 3
    options in currently to try testing on more systems/terminals.
@vinnymeller vinnymeller merged commit 488a64d into development May 30, 2024
@vinnymeller vinnymeller deleted the use-nucleo branch May 30, 2024 06:02
vinnymeller added a commit that referenced this pull request Jun 1, 2024
* dont use any more maps

* remove SafePath; just skip invalid utf-8 paths

* rename workspace_conditions to workspace

* clean up cli parsing

* remove unnecessary clone

* add comment in workspace match

* remove unnecessary ref

* Nucleo, Ratatui, Modifiers V1 (#24)

- Use Nucleo/Ratatui for better customization
- Immediately open picker and stream workspace matches into the picker
  - This feels snappier + allows you to make a selection before the list
    is done loading
- Allow to open a workspace in a group from the main workspace finder
  - Currently we have implemented a `tmm -g` flag that opens a finder
    showing existing sessions which, when selected, opens a new session
    in a group with the selected session.
  - Something this change adds experimental support for is clicking
    `Ctrl/Shift/Alt` + Enter from the main workspace finder to *attempt*
    to open the selected workspace as a new group  session. twm will
    search for a twm-generated session with `TWM_ROOT` set to the path
    of the selected workspace and if found, open your new  session in a
    group with it. Otherwise, it behaves normally.
  - This hasn't really been tested much yet, and it seems(?) crossterm
    doesn't support `Ctrl/Shift` + `Enter` on Linux (or is it just some
    terminals?), but `Alt` + `Enter` is working for me. I've left all 3
    options in currently to try testing on more systems/terminals.

* update flake

* update cargo

* Add CLI options for printing schema & writing a default config file (#25)

* Add CLI flags to print configuration schemas

- Adds a `--schema` and `--layout-schema` flag that print the
  configuration file specifications for the `twm.yaml` configuration and
  `.twm.yaml` layout files respectively

* add option to write a default config file with the schema defined

* Add config file path override

Adds the option to override the search path(s) for the `twm.yaml` config
file by setting the environment variable `TWM_CONFIG_FILE`. This should
simply be the path to the desired configuration.

* Shell completions & Man page (#26)

* Add flags to print shell completions

* Add flag to print man page

* Update some cli args & make the flake install comppletions & man page

* Bump Cargo.toml version to 0.10.0-dev

* Update readme

* Update similar projects list

* Add multithreading (#30)

- Replaces WalkDir with jwalk
- Uses rayon for multithreading when checking if directories match our
  workspace definitions

My current setup on current development branch `twm` takes about ~0.15
seconds to load all workspace matches into the picker.
With this change it is nearly instant & I can't even see the number
climb

The difference this makes on my old slow laptop is huge.

For low depth searches, it's about the same in my tests so far.

* Leave 1 thread out

* Change color

* update readme & change print-*-schema option names (#31)

* Add  cli option (#32)
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

Successfully merging this pull request may close these issues.

1 participant