docs/src/basic_usage.md

v0.7.1
youtube-tui/docs/src/basic_usage.md rendered · source · history · blame · raw

85 lines · 2874 bytes

 1# Basic usage
 2
 3Here is a basic how-to guide on the TUI.
 4
 5## Cursor
 6
 7The *cursor* can be moved using arrow keys, or Vim keybindings (hjkl).
 8
 9![](./images/cursor-showcasae.png)
10
11The item with the cursor hovering will have a <u>red outline</u>.
12
13> Everything here refers to the *latest default config*, including the keybindings.
14
15|Function|Key(s)|
16|---|---|
17|Select|Enter|
18|Deselect|Esc|
19|Cursor up|Up arrow / `k`|
20|Cursor down|Down arrow / `j`|
21|Cursor left|Left arrow / `h`|
22|Cursor right|Right arrow / `l`|
23|Previous page|Backspace / Alt + Left arrow|
24|First page history|Home|
25|Clear page history|End|
26|Paste from clipboard|`Ctrl` + `V`|
27|Enter command mode|`:`|
28|Quit|`q`|
29
30## Selection
31
32Selecting an item allows you to move the cursor within that item, to select an item, press `Enter`.
33
34When nothing is selected, you can move the cursor between items, to deselect from an item, hit `Esc`.
35
36## Searching
37
38Type the search query when the search bar and press `Enter`, use arrow keys to move the cursor around.
39
40To apply search filters, select the button with 3 dots (`...`) to the right of the search bar, hit enter to start modifying and enter again to save. Pressing `Esc` should reload the current search page to apply the filters.
41
42![](./images/search-filters-showcase.png)
43
44## Playing videos and playlists
45
46> This part assumes that you use `mpv` as your video player, `konsole` as your terminal emulator, `yt-dlp` as your YouTube video downloader, and `firefox` as your browser.
47> 
48> If that is not the case, you can learn how to change that in the *custom commands* section.
49
50Press `Enter` to select a video or playlist from any lists, then move the cursor to the *bottom item* where you can play, download and open the webpage in browser.
51
52## Command mode
53
54Command mode is like that of Vim, it can be started by pressing `:` when nothing is selected.
55
56More about commands in the [next chapter](commands.md).
57
58## Command bindings
59
60Keys can be bind to a command, more about it in the next chapter.
61
62For example `Ctrl + F` launches your web browser.
63
64## Buttons
65
66Buttons are similar to hyperlinks, it allows you to navigate between pages.
67
68## Mouse click control
69
70![](./images/mouse-showcase.png)
71
72Mouse click controls has been added, you can now use your mouse to navigate around the TUI. Here are the general rules:
73
741. Clicking an item *moves the cursor* to that item, clicking again *selects* the item
752. Clicking on buttons, or items on a list has the same effect as pressing `Enter` on them
763. Clicking outside a popup closes the popup
77
78However, there are some downsides to not using your keyboard.
79
801. Cannot move up or down to items not on screen in a list (you can do that with `Up` or `Down arrow`)
812. Cannot access function keys like `Backspace` or `Q`
82
83## Library
84
85Items can be bookmarked and saved to library, they can also be saved to be viewed offline.