Commit Graph

102 Commits

Author SHA1 Message Date
Jeevitha Kannan K S
a0752ae35f
Remove accidentally commited config file 2024-11-16 01:28:45 +05:30
Jeevitha Kannan K S
78b7c3faa1
Merge branch 'config-updates' into optimization
Revert handling find_command_name in state.rs
Add options for skip_confirmation, size_bypass
2024-11-15 21:54:50 +05:30
Jeevitha Kannan K S
42a7836b11
Merge branch 'main' into optimization 2024-11-15 18:50:12 +05:30
Jeevitha Kannan K S
ed01e1302f
Add fields to config files
Skip Confirmation, Bypass Size
2024-11-15 18:38:29 +05:30
Adam Perkowski
2dabb934f7
fix: crate cache & versions (#949) 2024-11-14 17:30:48 -06:00
Jeevitha Kannan K S
1044517d8e
Merge remote-tracking branch 'origin/min-tui' into optimization 2024-11-14 19:50:06 +05:30
Jeevitha Kannan K S
85719251d3
Update deps, remove unused temp-dir 2024-11-13 03:09:38 +05:30
Jeevitha Kannan K S
06f13dc5f9
Cleanup
Use prelude for ratatui imports. Use const for theme functions, add
missing hints
2024-11-13 02:30:16 +05:30
Jeevitha Kannan K S
79aae9eb24
Rendering optimizations and function refactors
Handle `find_command` inside state itself -> `get_command_by_name`. Move tips to a seperate file for modularity. Pass the whole args to state instead of seperate args. Use const for float and confirmation prompt float sizes. Add the `longest_tab_length` to appstate struct so that it will not be calculated for each frame render use static str instead String for tips. Use function for spawning confirmprompt. Merge command list and task items list rendering a single widget instead of two. Remove redundant keys in handle_key. Optimize scrolling logic. Rename `toggle_task_list_guide` -> `enable_task_list_guide`
2024-11-13 00:59:46 +05:30
Jeevitha Kannan K S
df81642c9e
Update tui/src/filter.rs
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2024-11-12 21:07:43 +05:30
Jeevitha Kannan K S
02b06129e1
Reference instead of borrowing commands, refact mut variables
Reference instead of borrowing commands from state, Refactor draw function variables to immutable, calculate innersize from block instead of manual definition
2024-11-12 00:27:59 +05:30
Jeevitha Kannan K S
2f1f5fd543
Fix conflicts 2024-11-11 22:23:28 +05:30
Jeevitha Kannan K S
0be3a44eb5
Merge branch 'main' into optimization 2024-11-11 22:20:36 +05:30
nyx
7147ed93e9
implement a root check menu (#927)
* implement a root check menu

* code needs to be readable

* rephrase it a lil bit

* disregard escalation tool variable if found as root

* refactor: Call root check from within AppState constructor (#7)

* remove duplicate check

* add comment back

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2024-11-11 10:27:30 -06:00
zdiff
16dd91ca29
Reduce the size of the linutil binary by removing unused features from tui/Cargo.toml (#922)
Co-authored-by: zdiff <zdiff@localhost>
2024-11-11 10:23:54 -06:00
Jeevitha Kannan K S
432d6b3b0c
feat: Mouse scroll (#913)
* feat: add mouse scrolling

* revert: bluetooth-manager.sh

* feat: mouse hori scrolls

* Update tui/src/main.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* Update tui/src/confirmation.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* feat: implemetation of mouse position

Suggested by Liam (<33645555+lj3954@users.noreply.github.com>)

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2024-11-11 10:22:21 -06:00
Jeevitha Kannan K S
10352c6254
Replace ansi and text wrapping code with ratatui
Replaced ansi related code for tree sitter highlight with direct ratatui::text. Cache the processed text in appstate to remove processing of text for every frame render.Create paragraph instead of list so that scroll and wrapping can be done without external crates. Add caps keys for handle_key_event.
2024-11-11 20:29:55 +05:30
Jeevitha Kannan K S
2d1f5dbc80
Revert regex and String implementation
Use Vec<char> for search_input to prevent panics when using multi-byte characters, use lowercase conversion instead of regex, Added comments for clarity
2024-11-11 13:23:36 +05:30
Jeevitha Kannan K S
35159b8393
Reference instead of passing the vector 2024-11-11 08:00:03 +05:30
Jeevitha Kannan K S
7e96651bbe
Revert "Remove redundant code in themes"
This reverts commit 3b7e859af8.
2024-11-11 07:20:59 +05:30
Jeevitha Kannan K S
0b4f33c761
Implement case insensitive, fix word disappearing bug
Use regex for case insesitive finding, implement String instead of char<Vec>, fix word disappearing by recalculating the render x for preview text
2024-11-10 21:48:05 +05:30
Jeevitha Kannan K S
190c26cd76
Fix scroll beyond list, color bleeding and refact in confirmation.rs
Remove unnecessary usage of pub in ConfirmPropmt struct fields, simplify numbering, prevent scrolling beyond list, fix color bleeding
2024-11-10 21:47:55 +05:30
Jeevitha Kannan K S
3b7e859af8
Remove redundant code in themes
Removed redundant match statement with a function
2024-11-10 16:34:16 +05:30
Jeevitha Kannan K S
1aa1dfe382
Use success and fail colors and reorder imports
Use theme color instead of using ratatui::Color for running_command success and fail + search preview text color + min tui warning color, add colors for confirmation prompt, fix inverted success and fail colors
2024-11-10 16:29:14 +05:30
Jeevitha Kannan K S
8639da3855
feat: Command execution log (#898)
* feat: option to save logs

* refact: use time crate

* fix: panics

* hints

* update roadmap
2024-11-08 09:10:31 -06:00
Jeevitha Kannan K S
9f0863729f
feat: Add automation based on config file (#836)
* feat: Add automation based on config file

* docs: add configuration to the manpage & README

* update roadmap

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Chris Titus <contact@christitus.com>
2024-11-07 13:21:37 -06:00
Jeevitha Kannan K S
d033b0f36d
feat: Add --skip-confirmation flag (#834)
* feat: Add --skip-confirmation flag

* add `--skip-confirmation` to the manpage

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-11-07 13:09:18 -06:00
Jeevitha Kannan K S
472c85eb79
Increase scroll length (#830) 2024-11-07 13:08:20 -06:00
Liam
980365f7c9
refactor: Re-export ego-tree dependency from linutil core (#811)
* refactor: Export ego-tree from linutil core, rather than workspace

* refactor: Improve code formatting

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2024-11-07 13:00:34 -06:00
nyx
421044f43e
fix reversion (#923) 2024-11-07 12:58:18 -06:00
Jeevitha Kannan K S
176b19d692
Use ratatui bundled crossterm (#805) 2024-11-06 16:29:52 -06:00
Adam Perkowski
9d1dc35f43
📃 feat: Linux Neptune (Valve's kernel for SteamDeck) installation (#683)
* Linux Neptune installation script

* fixed some stuff that's not supposed to be here

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>

* fix repo check

* added audio patches

https://github.com/ChrisTitusTech/linutil/issues/269#issuecomment-2380379049

* add linux neptune to docs (userguide)

* steamdeck precondition

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* precondition fix

* another precondition fix

---------

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
2024-11-06 16:20:16 -06:00
Liam
6728e7ee9b
refact: Handle temporary directories entirely within core (#754)
* refactor: Handle temporary directories entirely within core

* fix (xtask): Handle modified tablist struct

* refactor (xtask): Apply Clippy suggested changes

* Fix size_bypass

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2024-11-06 15:28:17 -06:00
nyx
c36879e22f
Implement Rounded corners (#918)
* add rounded corners

* more

* apply rounded corners to script boxes as well
2024-11-06 14:01:19 -06:00
Jeevitha Kannan K S
4a9d726fdb
Merge remote-tracking branch 'upstream/main' into min-tui 2024-11-06 21:36:22 +05:30
Adam Perkowski
f0734f361c
🦀 feat(ux): add a minimum size bypass cli flag (#920)
* 🦀 feat(ux): add a minimum size bypass cli flag

* oopsie
2024-11-06 09:49:26 -06:00
nyx
565f507190
implement word wrapping functionality (#755)
* implement dynamic auto updating word wrapping functionality

* run fmt

* remove dupe space

* run fmt

* add remove comments back

* fix compilation errors

* run fmt

* run docgen

* run docgen

* fix conflicts

* run cargo xtask docgen

* use boolean rather than enum

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
2024-11-06 09:40:55 -06:00
Jeevitha Kannan K S
1ff69c7846
fix: getting locked out when running script 2024-11-06 20:23:12 +05:30
Jeevitha Kannan K S
67b749942c
refact: multi-selection to per cmd (#719)
* Add per cmd multi-selection

* Add colors for nm cmds

* fix: conflicts
2024-11-05 13:59:57 -06:00
nyx
5878f4dbf0
implement fish like tab completion (#767)
* implement fish like tab completion

* grey the pv out and convert to lowercase

* run fmt

* do not tabcomplete if the user hits enter

* fix

* fix lints

* run docgen

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-11-01 16:01:01 -05:00
dependabot[bot]
4c3cc75997
Bump clap from 4.5.19 to 4.5.20 (#825)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.19 to 4.5.20.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.19...clap_complete-v4.5.20)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 15:20:21 -05:00
dependabot[bot]
1730d9da21
Bump tree-sitter-highlight from 0.24.2 to 0.24.3 (#826)
Bumps [tree-sitter-highlight](https://github.com/tree-sitter/tree-sitter) from 0.24.2 to 0.24.3.
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Changelog](https://github.com/tree-sitter/tree-sitter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.24.2...v0.24.3)

---
updated-dependencies:
- dependency-name: tree-sitter-highlight
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 15:20:01 -05:00
JEEVITHA KANNAN K S
afa2afc0e8
chore: bump ratatui -> 0.29.0 (#865)
* chore: bump ratatui -> 0.29.0

* chore: bump ansi-to-tui -> 7.0.0

* chore: bump tui-term -> 0.2.0
2024-10-31 15:19:24 -05:00
JEEVITHA KANNAN K S
11336cf9f1
chore: Add spacing before and after for tui titles (#706)
* Add spacing

* Use string instead of box::leak

* Update tui/src/state.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
2024-10-31 14:14:17 -05:00
nyx
fc2d731754
do not exit linutil in confirmation prompt when q is pressed (#758)
* do not exit linutil in confirmation prompt when q is pressed

* remove cap support

* add ``ctrl + c`` exiting

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-10-31 13:49:08 -05:00
nyx
72dfb29969
dont allow the user to bring up the command desc if there is none (#753)
* dont allow the user to bring up the command desc if there is none

* obey our god lints

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
2024-10-31 13:42:06 -05:00
nyx
52565e5ea1
clear the search bar if the user changes categories (#752)
Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
2024-10-31 13:41:03 -05:00
nyx
38138334b7
dont allow scrolling when last line is visible (#729)
* dont allow scrolling when last line is visible

* apply changes proposed by adam

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-10-31 13:37:01 -05:00
nyx
1dcc3f3c99
allow scrolling past last entry / first entry (#727)
* allow scrolling past last entry

* Update tui/src/state.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* Update tui/src/state.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* apply changes proposed by adam

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* apply changes proposed by adam round 2

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* undo changes proposed by adam in scroll up and down funcs

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-10-31 13:35:53 -05:00
nyx
2d14a0a7b6
return user to their previous position if they exit a subdir (#725)
* return user to their previous position if they enter a subdir

* fix lint

* implement changes proposed by adam

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* add newline back

* coalesce `visit_stack` and `position_stack` (#6)

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: cartercanedy <99052281+cartercanedy@users.noreply.github.com>
2024-10-31 13:30:22 -05:00