lolcatt.ui package

Submodules

lolcatt.ui.caster_static module

lolcatt.ui.lolcatt_controls module

class lolcatt.ui.lolcatt_controls.ControlsConfig(ffwd_secs=30, rewind_secs=10, vol_step=0.1, fancy_icons=False)[source]

Bases: object

fancy_icons: bool = False
ffwd_secs: int = 30
rewind_secs: int = 10
vol_step: float = 0.1
class lolcatt.ui.lolcatt_controls.LolCattControls(*args, **kwargs)[source]

Bases: Static

CONTROLS = {'ffwd': '\uf04e', 'next': '\uf051', 'play_pause': '\uf04b\uf04c', 'previous': '\uf048', 'rewind': '\uf04a', 'stop': '\uf04d', 'vol_down': '\uf027', 'vol_up': '\uf028'}
CONTROLS_ASCII = {'ffwd': '>>', 'next': '>|', 'play_pause': 'Play/Pause', 'previous': '|<', 'rewind': '<<', 'stop': 'Stop', 'vol_down': 'Vol-', 'vol_up': 'Vol+'}
can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

ffwd()[source]
next()[source]
on_key(event)[source]
Return type:

None

prev()[source]
rewind()[source]
stop()[source]
toggle_play_pause()[source]
vol_down()[source]
vol_up()[source]

lolcatt.ui.lolcatt_device_info module

class lolcatt.ui.lolcatt_device_info.LolCattDeviceInfo(*args, **kwargs)[source]

Bases: Static

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

label_str

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

on_click(event)[source]
on_mount()[source]
on_resize(value)[source]
watch_label_str(value)[source]

lolcatt.ui.lolcatt_playback_info module

class lolcatt.ui.lolcatt_playback_info.LolCattPlaybackInfo(*args, **kwargs)[source]

Bases: Static

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

label_str

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

on_click(event)[source]
on_mount()[source]
on_resize(value)[source]
watch_label_str(value)[source]

lolcatt.ui.lolcatt_progress module

class lolcatt.ui.lolcatt_progress.LolCattProgress(*args, **kwargs)[source]

Bases: Static

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

current

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

duration

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

on_click(event)[source]
on_mount()[source]
percent_complete

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

queue_len

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value. bindings: Refresh bindings when the reactive changes.

update_progress()[source]
Return type:

int

lolcatt.ui.lolcatt_url_input module

class lolcatt.ui.lolcatt_url_input.InputField(value=None, placeholder='', highlighter=None, password=False, *, restrict=None, type='text', max_length=0, suggester=None, validators=None, validate_on=None, valid_empty=False, name=None, id=None, classes=None, disabled=False, tooltip=None)[source]

Bases: Input

BINDINGS: ClassVar[list[Binding | tuple[str, str] | tuple[str, str, str]]] = [Binding(key='left', action='cursor_left', description='cursor left', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+left', action='cursor_left_word', description='cursor left word', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='right', action='cursor_right', description='cursor right', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+right', action='cursor_right_word', description='cursor right word', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='backspace', action='delete_left', description='delete left', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='home,ctrl+a', action='home', description='home', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='end,ctrl+e', action='end', description='end', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='delete,ctrl+d', action='delete_right', description='delete right', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='enter', action='submit', description='submit', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+w', action='delete_left_word', description='delete left to start of word', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+u', action='delete_left_all', description='delete all to the left', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+f', action='delete_right_word', description='delete right to start of word', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+k', action='delete_right_all', description='delete all to the right', show=False, key_display=None, priority=False, tooltip='', id=None), Binding(key='ctrl+s', action='enqueue', description='submit to the playback queue', show=False, key_display=None, priority=False, tooltip='', id=None)]
Key(s) | Description |
:- | :- |
left | Move the cursor left. |
ctrl+left | Move the cursor one word to the left. |
right | Move the cursor right or accept the completion suggestion. |
ctrl+right | Move the cursor one word to the right. |
backspace | Delete the character to the left of the cursor. |
home,ctrl+a | Go to the beginning of the input. |
end,ctrl+e | Go to the end of the input. |
delete,ctrl+d | Delete the character to the right of the cursor. |
enter | Submit the current value of the input. |
ctrl+w | Delete the word to the left of the cursor. |
ctrl+u | Delete everything to the left of the cursor. |
ctrl+f | Delete the word to the right of the cursor. |
ctrl+k | Delete everything to the right of the cursor. |
class Enqueued(input, value, validation_result=None)[source]

Bases: Submitted

bubble: ClassVar[bool] = True
handler_name: ClassVar[str] = 'on_input_field_enqueued'

Name of the default message handler.

no_dispatch: ClassVar[bool] = False
time
verbose: ClassVar[bool] = False
async action_enqueue()[source]

Handle an enqueue action.

Normally triggered by the user pressing Ctrl+s. This will also run any validators.

Return type:

None

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

class lolcatt.ui.lolcatt_url_input.LolCattUrlInput(*args, **kwargs)[source]

Bases: Static

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

cast_url()[source]
compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Label(“Press the button below:”) yield Button() yield Footer()

```

enqueue_url()[source]
on_key(event)[source]
on_mount()[source]

Module contents