feat: Adding config files

This commit is contained in:
kar
2025-11-11 22:54:23 -06:00
commit f13132def6
2 changed files with 285 additions and 0 deletions
+134
View File
@@ -0,0 +1,134 @@
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
address: "127.0.0.1:6600",
password: None,
theme: "pywal16",
enable_config_hot_reload: true,
cache_dir: None,
on_song_change: None,
volume_step: 5,
max_fps: 30,
scrolloff: 0,
wrap_navigation: false,
enable_mouse: true,
status_update_interval_ms: 1000,
select_current_song_on_change: false,
album_art: (
method: Auto,
max_size_px: (width: 500, height: 500),
disabled_protocols: ["http://", "https://"],
vertical_align: Center,
horizontal_align: Center,
),
keybinds: (
global: {
":": CommandMode,
",": VolumeDown,
"s": Stop,
".": VolumeUp,
"<Tab>": NextTab,
"<S-Tab>": PreviousTab,
"1": SwitchToTab("Playing"),
"3": SwitchToTab("Dir"),
"2": SwitchToTab("Find"),
"4": SwitchToTab("Artists"),
"q": Quit,
">": NextTrack,
"p": TogglePause,
"<": PreviousTrack,
"f": SeekForward,
"z": ToggleRepeat,
"x": ToggleRandom,
"c": ToggleConsume,
"v": ToggleSingle,
"b": SeekBack,
"~": ShowHelp,
"I": ShowCurrentSongInfo,
"O": ShowOutputs,
"P": ShowDecoders,
"u": Update,
},
navigation: {
"k": Up,
"j": Down,
"h": Left,
"l": Right,
"<Up>": Up,
"<Down>": Down,
"<Left>": Left,
"<Right>": Right,
"<C-k>": PaneUp,
"<C-j>": PaneDown,
"<C-h>": PaneLeft,
"<C-l>": PaneRight,
"<C-u>": UpHalf,
"N": PreviousResult,
"a": Add,
"A": AddAll,
"r": Rename,
"n": NextResult,
"g": Top,
"<Space>": Select,
"<C-Space>": InvertSelection,
"G": Bottom,
"<CR>": Confirm,
"i": FocusInput,
"J": MoveDown,
"<C-d>": DownHalf,
"/": EnterSearch,
"<C-c>": Close,
"<Esc>": Close,
"K": MoveUp,
"D": Delete,
},
queue: {
"D": DeleteAll,
"<CR>": Play,
"<C-s>": Save,
"a": AddToPlaylist,
"d": Delete,
"i": ShowInfo,
"C": JumpToCurrent,
},
),
search: (
case_sensitive: false,
mode: Contains,
tags: [
(value: "any", label: "Any Tag"),
(value: "title", label: "Title"),
(value: "album", label: "Album"),
(value: "artist", label: "Artist"),
(value: "filename", label: "Filename"),
(value: "genre", label: "Genre"),
],
),
artists: (
album_display_mode: SplitByDate,
album_sort_by: Date,
),
tabs: [
(
name: "Playing",
pane: Split(
direction: Horizontal,
panes: [(size: "65%", pane: Pane(Queue)), (size: "35%", pane: Pane(AlbumArt))],
),
),
(
name: "Find",
pane: Pane(Search),
),
(
name: "Dir",
pane: Pane(Directories),
),
(
name: "Artists",
pane: Pane(Artists),
),
],
)
+151
View File
@@ -0,0 +1,151 @@
#![enable(implicit_some)]
#![enable(unwrap_newtypes)]
#![enable(unwrap_variant_newtypes)]
(
default_album_art_path: None,
show_song_table_header: false,
draw_borders: true,
browser_column_widths: [20, 38, 42],
text_color: "#16ff43",
tab_bar: (
enabled: true,
active_style: (fg: "#16ff43", modifiers: "Bold"),
inactive_style: (fg: "#16ff43", modifiers: ""),
),
highlighted_item_style: (fg: "#11cc35", modifiers: "Bold"),
current_item_style: (fg: "#11cc35", bg: "#08661a", modifiers: "Bold"),
borders_style: (fg: "#11cc35", modifiers: "Bold"),
highlight_border_style: (fg: "#11cc35"),
symbols: (song: "󰝚 ", dir: " ", marker: "* ", ellipsis: "..."),
progress_bar: (
symbols: ["█", "█", "█"],
track_style: (fg: "#000000"),
elapsed_style: (fg: "#11cc35"),
thumb_style: (fg: "#08661a"),
),
scrollbar: (
symbols: ["", "", "", ""],
track_style: (fg: "#04330d"),
ends_style: (fg: "#08661a"),
thumb_style: (fg: "#08661a"),
),
song_table_format: [
(
prop: (kind: Property(Title), style: (fg: "#11cc35"),
highlighted_item_style: (fg: "#0fb22e", modifiers: "Bold"),
default: (kind: Property(Filename), style: (fg: "gray"),)
),
width: "70%",
),
(
prop: (kind: Property(Album), style: (fg: "#08661a"),
default: (kind: Text("Unknown Album"), style: (fg: "#13e53c"))
),
width: "30%",
),
],
layout: Split(
direction: Vertical,
panes: [
(
size: "3",
pane: Pane(Tabs),
),
(
size: "4",
pane: Split(
direction: Horizontal,
panes: [
(
size: "100%",
pane: Split(
direction: Vertical,
panes: [
(
size: "4",
borders: "ALL",
pane: Pane(Header),
),
]
)
),
]
),
),
(
size: "100%",
pane: Split(
direction: Horizontal,
panes: [
(
size: "100%",
borders: "NONE",
pane: Pane(TabContent),
),
]
),
),
(
size: "3",
borders: "TOP | BOTTOM",
pane: Pane(ProgressBar),
),
],
),
header: (
rows: [
(
left: [
(kind: Property(Status(StateV2(playing_label: " ", paused_label: "❚❚", stopped_label: "❚❚"))), style: (fg: "#11cc35", modifiers: "Bold")),
],
center: [
(kind: Property(Song(Title)), style: (fg: "#11cc35",modifiers: "Bold"),
default: (kind: Property(Song(Filename)), style: (fg: "#064c14",modifiers: "Bold"))
)
],
right: [
(kind: Text("Vol: "), style: (fg: "#11cc35", modifiers: "Bold")),
(kind: Property(Status(Volume)), style: (fg: "#11cc35", modifiers: "Bold")),
(kind: Text("% "), style: (fg: "#11cc35", modifiers: "Bold"))
]
),
(
left: [
(kind: Property(Status(Elapsed)),style: (fg: "#11cc35")),
(kind: Text("/"),style: (fg: "#0fb22e")),
(kind: Property(Status(Duration)),style: (fg: "#11cc35")),
],
center: [
(kind: Property(Song(Artist)), style: (fg: "#11cc35", modifiers: "Bold"),
default: (kind: Text("Unknown Artist"), style: (fg: "#ffffff", modifiers: "Bold"))
),
],
right: [
(
kind: Property(Widget(States(
active_style: (fg: "#11cc35", modifiers: "Bold"),
separator_style: (fg: "#11cc35")))
),
style: (fg: "#11cc35")
),
]
),
],
),
browser_song_format: [
(
kind: Group([
(kind: Property(Track)),
(kind: Text(" ")),
])
),
(
kind: Group([
(kind: Property(Artist)),
(kind: Text(" - ")),
(kind: Property(Title)),
]),
default: (kind: Property(Filename))
),
],
)