Layout config

The layout config determins the position of where each item is placed, mainly their order. The config file can be found in ~/.config/youtube-tui/pages.yml.

Example layout config

main_menu:
  layout:
  - type: NonCenteredRow
    items:
    - SearchBar
    - SearchFilters
  - type: CenteredRow
    items:
    - Popular
    - Trending
    - History
  - type: NonCenteredRow
    items:
    - ItemList
  - type: NonCenteredRow
    items:
    - MessageBar
  message: Loading main menu...
  command: key Esc 0 ;; key Up 0 ;; key Left 0 ;; key Enter 0 # this focuses on the search bar

# and much more ...

Items

Each item is an individual "thing", these things can be optionally selectable, or hoverable by the cursor.

Rows

A row is a horizontal row of items, it can be either centered (like the buttons) or non centered (which will align to the left).

Non centered rows are faster and less crash prone compared to centered rows.

Each item are ordered from left to right.

Message

The message to display when loading the page.

Command

Command to run when the page loads, you can use the key command to select an item on load.

Items reference

ItemCan be used in pageDescription
MessageBarAnyThe panel (default in the bottom of every page) that displays message and error messages
SearchBarAnyA text field that searches that entered query
SearchFiltersAnyA button that brings up a popup for modifying search filters
TrendingAnyLoads the trending page
PopularAnyLoads the popular page
HistoryAnyLoads the watch history page
ItemListMain menu/searchDisplay multiple videos, channels, or playlists in a list
SingleItemInfoSingle itemDisplay info of one single item (a single video or playlist)
ChannelDisplayChannel displayDisplay information of a channel, depending on the page
ChannelMainChannel displayLoads the main channel page
ChannelVideosChannel displayLoads the channel videos page
ChannelPlaylistsChannel displayLoads the channel playlists page
ChannelListFeedDisplays subscribed channels
VideoListFeedDisplays videos of subscribed channels