mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-03 01:50:12 +00:00
feat(remote): distinguish cable channels with a separate icon (#94)
This commit is contained in:
parent
b6f12b372b
commit
ad3e52d340
@ -125,7 +125,7 @@ Default keybindings are as follows:
|
||||
|
||||
These keybindings are all configurable (see [Configuration](#configuration)).
|
||||
|
||||
## Built-in Channels
|
||||
## 📺 Built-in Channels
|
||||
The following built-in channels are currently available:
|
||||
- `Files`: search through files in a directory tree.
|
||||
- `Text`: search through textual content in a directory tree.
|
||||
@ -134,8 +134,9 @@ The following built-in channels are currently available:
|
||||
- `Alias`: search through shell aliases and their values.
|
||||
- `Stdin`: search through lines of text from stdin.
|
||||
|
||||
## Cable channels
|
||||
Tired of broadcast television? Want to watch your favorite shows on demand? `television` has you covered with cable channels. Cable channels are channels that are not built-in to `television` but are instead provided by the community.
|
||||
## 🍿 Cable channels
|
||||
*Tired of broadcast television? Want to watch your favorite shows on demand? `television` has you covered with cable channels. Cable channels are channels that are not built-in to `television` but are instead provided by the community.*
|
||||
|
||||
You can find a list of available cable channels [on the wiki](https://github.com/alexpasmantier/television/wiki/Cable-channels) and even contribute your own!
|
||||
|
||||
### Installing cable channels
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.8 MiB |
@ -113,6 +113,11 @@ const TV_ICON: FileIcon = FileIcon {
|
||||
color: "#000000",
|
||||
};
|
||||
|
||||
const CABLE_ICON: FileIcon = FileIcon {
|
||||
icon: '🍿',
|
||||
color: "#000000",
|
||||
};
|
||||
|
||||
impl OnAir for RemoteControl {
|
||||
fn find(&mut self, pattern: &str) {
|
||||
self.matcher.find(pattern);
|
||||
@ -127,7 +132,10 @@ impl OnAir for RemoteControl {
|
||||
let path = item.matched_string;
|
||||
Entry::new(path, PreviewType::Basic)
|
||||
.with_name_match_ranges(item.match_indices)
|
||||
.with_icon(TV_ICON)
|
||||
.with_icon(match item.inner {
|
||||
RCButton::Channel(_) => TV_ICON,
|
||||
RCButton::CableChannel(_) => CABLE_ICON,
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user