ikamp reference

synopsis

[permalink]

ikamp [options] file

description

[permalink]

ikamp is a simple music player for mp3 and flac files with embedded metadata and embedded/external album art support. the ui can be fully customized with ui definition files.

plaintext playlists are supported. if playlist is not supplied, the files in the same directory as the file argument are added to the list.

control

[permalink]

q - quit

s - set play mode to single

r - set play mode to repeat

f - set play mode to shuffle

n - set play mode to normal

9 - decrease volume

0 - increase volume

left - seek backwards 10 s

right - seek forwards 10 s

home - seek to start

up - previous file

down - next file

space - play/pause

mouse right button - play/pause

mouse scroll wheel - increase/decrease volume

mouse scroll wheel (seek region) - seek forwards/backwards 10 s

mouse left button (seek region) - seek

options

[permalink]

-scale [factor]

the scale factor, with 1 being 100%. if unset, the scale factor automatically determined by the system scaling setting.

-playlist [playlist file]

the playlist to load. must be encoded with utf-8 and use unix (lf) line ending. each line in the playlist should contain the full path to a file.

-ui [ui file]

the ui file to use. must be encoded with utf-8. if unset, ui.txt is used.

-font [font file]

the font file to use if the ui file does not specify a font. if unset, font.ttf is used.

-volume [0-20]

the startup volume.

ui file format

[permalink]

the ui file contains multiple entries. each entry has the following format:

[type] [string] [num1] [num2] [num3] [num4] [flags]

type and string are strings without whitespace, and are limited to 31 bytes.

ui elements and are drawn in sequence in the order of the entries.

it is recommended to draw static elements (elements which do not depend on playback progress or state) first to minimize resource usage, since these elements are cached per file.

unless noted otherwise, [num1]-[num4] are the x, y, width, height values, and [string] is the color name.

the following entry types are supported:

window

the window perperty. [num3] and [num4] are used as the windows width and height. this entry is required.

font

the font to use. [string] is the filename of the font in the config directory.

color

specify a color and name it as [string]. it must be placed before ui elements types. [num1]-[num4] are the red, green, blue, and alpha values.

offset

switch the current drawing context to refer to the file relative to the current file in position. [num1] is the offset.

regionseek, regionplay, regionprev, regionnext, regionquit

the region where the left mouse click is used to seek/play/pause/previous/next/quit. [num1]-[num4] are the x, y, width, height values.

image

draw an image. [string] is the filename of the image in the config directory, or can be the special value <albumart> for the current album art.

background

clear the window with the specified color.

rect

draw a filled rectangle.

blur

apply blur to a rectangular region.

line

draw a line. [num1] and [num2] are the x and y of the start point, [num3] and [num4] are the x and y of the end point.

border

draw a rectangular border.

title, artist, album, track

draw the text of the specified metadata of the current file.

curtime, remtime, totaltime

draw the text of the current/remaining/total time of the current file.

volume

draw the text of the current volume in db.

fft

draw a spectrum. note that including this element increases the refresh rate, so it is recommended to place this element at a later stage to minimize resource usage.

ui file flags

[permalink]

[flags] is used to specify the behavior of drawing elements. the value is a number of some of the following values added:

1 - align text elements to center, wrap to 2 lines if text size is too small. for album arts, use fill instead of stretch for fitting.

2 - the width is multiplied by the ratio of current playback progress.

4 - use alpha blending for drawing images.

8 - draw the element only when the music is playing.

16 - draw the element only when the music is paused.

32 - use a larger radius for blurring.

64 - reserved.

128 - draw the element with rounded corner. only applied for image, blur, rect, and fft elements.

256 - create a borderless and transparent window. transparency requires compositor active. only applied for window property.