hum-0.2.0.0: A TUI MPD client, inspired by ncmpcpp
Copyright(c) Itai Y. Efrat 2020-2021
LicenseGPLv2-or-later (see LICENSE)
MaintainerItai Y. Efrat <itai3397@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Hum.Views.Common

Description

Functions for the Help view.

Synopsis

Documentation

drawNowPlaying :: HumState -> Widget Name Source #

Draw Now Playing box.

drawProgressBar :: HumState -> Widget Name Source #

Draw progress bar for song time.

data PerCol Source #

Either a number or a percent. To be used for widget horizontal size.

Constructors

Per Int

percent size

Col Int

column number size

column Source #

Arguments

:: Maybe PerCol

Maximum width, greedy if Nothing.

-> Padding

Left padding

-> Padding

Right padding

-> Widget n 
-> Widget n 

Helper function for drawing column rows.

songSearch :: Text -> [Metadata] -> Song -> Bool Source #

Returns True if text is substring of one of the given tags of the given song.

stringySearch :: ToString a => Text -> a -> Bool Source #

Returns True if text is substring of the given strings.

drawPrompt :: HumState -> Widget Name Source #

Draws a prompt.

drawPlSelectRow :: Int -> Bool -> Maybe PlaylistName -> Widget n Source #

Draw row in playlist select prompt.