Skip to content

Commit

Permalink
Add demo
Browse files Browse the repository at this point in the history
  • Loading branch information
umlx5h committed Jan 8, 2024
1 parent 78e6d62 commit 02b53ca
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# gtrash


![demo](doc/image/demo.gif)

`gtrash` is a trash CLI manager that fully complies with the [FreeDesktop.org specification](https://specifications.freedesktop.org/trash-spec/trashspec-latest.html).
Unlike `rm`, `gtrash` moves files to the system trash can, enabling easy restoration of important files at any time.

Expand All @@ -9,6 +12,8 @@ This tool utilizes the system trash can on Linux, enabling seamless integration

Additionally, `gtrash` features a modern TUI interface, making it very intuitive to restore any file.

- Status: Not stable, interface may change in the future.

## Features

- Intuitive TUI interface for file restoration
Expand Down Expand Up @@ -124,7 +129,7 @@ To restore with an interactive TUI, use the `restore` subcommand.
$ gtrash restore
```

<!-- TODO: image -->
![restore-table](./doc/image/restore_table.jpg)

Within `restore`, multiple files can be selected for restoration.

Expand Down
Binary file added doc/image/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions doc/image/demo.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# VHS documentation
#
# Output:
# Output <path>.gif Create a GIF output at the given <path>
# Output <path>.mp4 Create an MP4 output at the given <path>
# Output <path>.webm Create a WebM output at the given <path>
#
# Require:
# Require <string> Ensure a program is on the $PATH to proceed
#
# Settings:
# Set FontSize <number> Set the font size of the terminal
# Set FontFamily <string> Set the font family of the terminal
# Set Height <number> Set the height of the terminal
# Set Width <number> Set the width of the terminal
# Set LetterSpacing <float> Set the font letter spacing (tracking)
# Set LineHeight <float> Set the font line height
# Set LoopOffset <float>% Set the starting frame offset for the GIF loop
# Set Theme <json|string> Set the theme of the terminal
# Set Padding <number> Set the padding of the terminal
# Set Framerate <number> Set the framerate of the recording
# Set PlaybackSpeed <float> Set the playback speed of the recording
# Set MarginFill <file|#000000> Set the file or color the margin will be filled with.
# Set Margin <number> Set the size of the margin. Has no effect if MarginFill isn't set.
# Set BorderRadius <number> Set terminal border radius, in pixels.
# Set WindowBar <string> Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight)
# Set WindowBarSize <number> Set window bar size, in pixels. Default is 40.
# Set TypingSpeed <time> Set the typing speed of the terminal. Default is 50ms.
#
# Sleep:
# Sleep <time> Sleep for a set amount of <time> in seconds
#
# Type:
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
# <time> delay between each character
#
# Keys:
# Escape[@<time>] [number] Press the Escape key
# Backspace[@<time>] [number] Press the Backspace key
# Delete[@<time>] [number] Press the Delete key
# Insert[@<time>] [number] Press the Insert key
# Down[@<time>] [number] Press the Down key
# Enter[@<time>] [number] Press the Enter key
# Space[@<time>] [number] Press the Space key
# Tab[@<time>] [number] Press the Tab key
# Left[@<time>] [number] Press the Left Arrow key
# Right[@<time>] [number] Press the Right Arrow key
# Up[@<time>] [number] Press the Up Arrow key
# Down[@<time>] [number] Press the Down Arrow key
# PageUp[@<time>] [number] Press the Page Up key
# PageDown[@<time>] [number] Press the Page Down key
# Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
#
# Display:
# Hide Hide the subsequent commands from the output
# Show Show the subsequent commands in the output

Output demo.gif

Require gtrash

Set Shell "zsh"
Set FontSize 18
Set Width 1200
Set Height 600
Set Theme "Snazzy"

Hide
Type "setopt interactivecomments" Enter
Type "clear" Enter
Show

Type "ls" Sleep 1000ms Enter
Type "gtrash put *" Sleep 500ms
Tab@100ms
Sleep 500ms Enter

Type "ls" Sleep 500ms Enter
Type "gtrash find" Enter
Sleep 1s

Type "# Lets restore files with TUI interface!" Sleep 80ms Enter
Type "gtrash restore" Sleep 200ms Enter

Sleep 2s

Type "j" Sleep 150ms
Type "l" Sleep 500ms
Type "j" Sleep 150ms
Type "/" Sleep 100ms
Type "main.go" Sleep 300ms Enter
Type "l" Sleep 800ms Enter
Sleep 1000ms Type "y"

Type "ls" Sleep 100ms Enter

Sleep 1s

Type "# Lets restore deleted files all at once!" Sleep 80ms Enter
Type "gtrash restore-group" Sleep 200ms Enter

Sleep 2s Enter Sleep 2s Type "y" Sleep 300ms
Type "ls" Enter
Sleep 1s

Type "# Now restored!" Enter
Sleep 2s
Binary file added doc/image/restore_table.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 02b53ca

Please sign in to comment.