spotatui 0.36.1

A Spotify client for the terminal written in Rust, powered by Ratatui
1
2
3
4
5
6
7
8
9
10
use crate::{app::App, event::Key};

pub fn handler(key: Key, app: &mut App) {
  // Uppercase 'V' to cycle visualizer style (lowercase 'v' opens the analysis view)
  if key == Key::Char('V') {
    app.user_config.behavior.visualizer_style = app.user_config.behavior.visualizer_style.next();
    // Save the config so the preference persists
    let _ = app.user_config.save_config();
  }
}