swaydots

my dotfiles
git clone https://git.awy.one/swaydots.git
Log | Files | Refs | README | LICENSE

commit 6c953fbc8927bf567ac26a55b858d83d46030c31
parent 1e4d89b7269864934c24e9ffbdb7f7c10abbe70e
Author: awy <awy@awy.one>
Date:   Tue, 27 May 2025 14:40:11 +0300

rmpc

Diffstat:
D.config/ncmpcpp/bindings | 479-------------------------------------------------------------------------------
D.config/ncmpcpp/config | 34----------------------------------
A.config/rmpc/config.ron | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/rmpc/themes/nord.ron | 192+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.config/shell/bm-files | 3+--
M.config/sway/config | 2+-
M.local/bin/statusbar/sb-music | 4++--
Mdependencies.txt | 2+-
8 files changed, 357 insertions(+), 519 deletions(-)

diff --git a/.config/ncmpcpp/bindings b/.config/ncmpcpp/bindings @@ -1,479 +0,0 @@ -############################################################## -## This is the example bindings file. Copy it to ## -## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ## -## and set up your preferences ## -############################################################## -# -#def_key "mouse" -# mouse_event -# -#def_key "up" -# scroll_up -# -#def_key "shift-up" -# select_item -# scroll_up -# -#def_key "down" -# scroll_down -# -#def_key "shift-down" -# select_item -# scroll_down -# -#def_key "[" -# scroll_up_album -# -#def_key "]" -# scroll_down_album -# -#def_key "{" -# scroll_up_artist -# -#def_key "}" -# scroll_down_artist -# -#def_key "page_up" -# page_up -# -#def_key "page_down" -# page_down -# -#def_key "home" -# move_home -# -#def_key "end" -# move_end -# -#def_key "insert" -# select_item -# -#def_key "enter" -# enter_directory -# -#def_key "enter" -# toggle_output -# -#def_key "enter" -# run_action -# -#def_key "enter" -# play_item -# -#def_key "space" -# add_item_to_playlist -# -#def_key "space" -# toggle_lyrics_update_on_song_change -# -#def_key "space" -# toggle_visualization_type -# -#def_key "delete" -# delete_playlist_items -# -#def_key "delete" -# delete_browser_items -# -#def_key "delete" -# delete_stored_playlist -# -#def_key "right" -# next_column -# -#def_key "right" -# slave_screen -# -#def_key "right" -# volume_up -# -#def_key "+" -# volume_up -# -#def_key "left" -# previous_column -# -#def_key "left" -# master_screen -# -#def_key "left" -# volume_down -# -#def_key "-" -# volume_down -# -#def_key ":" -# execute_command -# -#def_key "tab" -# next_screen -# -#def_key "shift-tab" -# previous_screen -# -#def_key "f1" -# show_help -# -#def_key "1" -# show_playlist -# -#def_key "2" -# show_browser -# -#def_key "2" -# change_browse_mode -# -#def_key "3" -# show_search_engine -# -#def_key "3" -# reset_search_engine -# -#def_key "4" -# show_media_library -# -#def_key "4" -# toggle_media_library_columns_mode -# -#def_key "5" -# show_playlist_editor -# -#def_key "6" -# show_tag_editor -# -#def_key "7" -# show_outputs -# -#def_key "8" -# show_visualizer -# -#def_key "=" -# show_clock -# -#def_key "@" -# show_server_info -# -#def_key "s" -# stop -# -#def_key "p" -# pause -# -#def_key ">" -# next -# -#def_key "<" -# previous -# -#def_key "ctrl-h" -# jump_to_parent_directory -# -#def_key "ctrl-h" -# replay_song -# -#def_key "backspace" -# jump_to_parent_directory -# -#def_key "backspace" -# replay_song -# -#def_key "f" -# seek_forward -# -#def_key "b" -# seek_backward -# -#def_key "r" -# toggle_repeat -# -#def_key "z" -# toggle_random -# -#def_key "y" -# save_tag_changes -# -#def_key "y" -# start_searching -# -#def_key "y" -# toggle_single -# -#def_key "R" -# toggle_consume -# -#def_key "Y" -# toggle_replay_gain_mode -# -#def_key "T" -# toggle_add_mode -# -#def_key "|" -# toggle_mouse -# -#def_key "#" -# toggle_bitrate_visibility -# -#def_key "Z" -# shuffle -# -#def_key "x" -# toggle_crossfade -# -#def_key "X" -# set_crossfade -# -#def_key "u" -# update_database -# -#def_key "ctrl-s" -# sort_playlist -# -#def_key "ctrl-s" -# toggle_browser_sort_mode -# -#def_key "ctrl-s" -# toggle_media_library_sort_mode -# -#def_key "ctrl-r" -# reverse_playlist -# -#def_key "ctrl-f" -# apply_filter -# -#def_key "ctrl-_" -# select_found_items -# -#def_key "/" -# find -# -#def_key "/" -# find_item_forward -# -#def_key "?" -# find -# -#def_key "?" -# find_item_backward -# -#def_key "." -# next_found_item -# -#def_key "," -# previous_found_item -# -#def_key "w" -# toggle_find_mode -# -#def_key "e" -# edit_song -# -#def_key "e" -# edit_library_tag -# -#def_key "e" -# edit_library_album -# -#def_key "e" -# edit_directory_name -# -#def_key "e" -# edit_playlist_name -# -#def_key "e" -# edit_lyrics -# -#def_key "i" -# show_song_info -# -#def_key "I" -# show_artist_info -# -#def_key "g" -# jump_to_position_in_song -# -#def_key "l" -# show_lyrics -# -#def_key "ctrl-v" -# select_range -# -#def_key "v" -# reverse_selection -# -#def_key "V" -# remove_selection -# -#def_key "B" -# select_album -# -#def_key "a" -# add_selected_items -# -#def_key "c" -# clear_playlist -# -#def_key "c" -# clear_main_playlist -# -#def_key "C" -# crop_playlist -# -#def_key "C" -# crop_main_playlist -# -#def_key "m" -# move_sort_order_up -# -#def_key "m" -# move_selected_items_up -# -#def_key "n" -# move_sort_order_down -# -#def_key "n" -# move_selected_items_down -# -#def_key "M" -# move_selected_items_to -# -#def_key "A" -# add -# -#def_key "S" -# save_playlist -# -#def_key "o" -# jump_to_playing_song -# -#def_key "G" -# jump_to_browser -# -#def_key "G" -# jump_to_playlist_editor -# -#def_key "~" -# jump_to_media_library -# -#def_key "E" -# jump_to_tag_editor -# -#def_key "U" -# toggle_playing_song_centering -# -#def_key "P" -# toggle_display_mode -# -#def_key "\\" -# toggle_interface -# -#def_key "!" -# toggle_separators_between_albums -# -#def_key "L" -# toggle_lyrics_fetcher -# -#def_key "F" -# fetch_lyrics_in_background -# -#def_key "alt-l" -# toggle_fetching_lyrics_in_background -# -#def_key "ctrl-l" -# toggle_screen_lock -# -#def_key "`" -# toggle_library_tag_type -# -#def_key "`" -# refetch_lyrics -# -#def_key "`" -# add_random_items -# -#def_key "ctrl-p" -# set_selected_items_priority -# -#def_key "q" -# quit -# -# -#def_key "f" -# find -#def_key "f" -# find_item_forward - -def_key "+" - show_clock -def_key "=" - volume_up - -def_key "j" - scroll_down -def_key "k" - scroll_up - -def_key "ctrl-u" - page_up -#push_characters "kkkkkkkkkkkkkkk" -def_key "ctrl-d" - page_down -#push_characters "jjjjjjjjjjjjjjj" -def_key "u" - page_up -#push_characters "kkkkkkkkkkkkkkk" -def_key "d" - page_down -#push_characters "jjjjjjjjjjjjjjj" -def_key "h" - previous_column -def_key "l" - next_column - -def_key "." - show_lyrics - -def_key "n" - next_found_item -def_key "N" - previous_found_item - -# not used but bound -def_key "J" - move_sort_order_down -def_key "K" - move_sort_order_up -def_key "h" - jump_to_parent_directory -def_key "l" - enter_directory -def_key "l" - run_action -def_key "l" - play_item -def_key "m" - show_media_library -def_key "m" - toggle_media_library_columns_mode -def_key "t" - show_tag_editor -def_key "v" - show_visualizer -def_key "G" - move_end -def_key "g" - move_home -#jump_to_position_in_song -def_key "U" - update_database -def_key "s" - reset_search_engine -def_key "s" - show_search_engine -def_key "f" - show_browser -def_key "f" - change_browse_mode -def_key "x" - delete_playlist_items -def_key "P" - show_playlist diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config @@ -1,34 +0,0 @@ -# vim: filetype=conf - -ncmpcpp_directory = "~/.config/ncmpcpp" -lyrics_directory = "~/.local/share/lyrics" -mpd_music_dir = "/mnt/ssd/music" -message_delay_time = "1" -visualizer_type = "spectrum" -song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} -song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f} -song_library_format = {%n - }{%t}|{%f} -alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b -alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} -current_item_prefix = $(cyan)$r$b -current_item_suffix = $/r$(end)$/b -current_item_inactive_column_prefix = $(magenta)$r -current_item_inactive_column_suffix = $/r$(end) -playlist_display_mode = columns -browser_display_mode = columns -progressbar_look = -> -media_library_primary_tag = album_artist -media_library_albums_split_by_date = no -startup_screen = "media_library" -display_volume_level = no -ignore_leading_the = yes -external_editor = nvim -use_console_editor = yes -empty_tag_color = magenta -main_window_color = white -progressbar_color = black:b -progressbar_elapsed_color = blue:b -statusbar_color = red -statusbar_time_color = cyan:b -execute_on_song_change="pkill -RTMIN+11 i3blocks" -execute_on_player_state_change="pkill -RTMIN+11 i3blocks" diff --git a/.config/rmpc/config.ron b/.config/rmpc/config.ron @@ -0,0 +1,160 @@ +#![enable(implicit_some)] +#![enable(unwrap_newtypes)] +#![enable(unwrap_variant_newtypes)] +( + address: "127.0.0.1:6600", + password: None, + theme: "nord", + cache_dir: None, + on_song_change: None, + volume_step: 5, + max_fps: 30, + scrolloff: 0, + lyrics_dir: "/mnt/ssd/music", + 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: 1200, height: 1200), + disabled_protocols: ["http://", "https://"], + vertical_align: Center, + horizontal_align: Center, + ), + keybinds: ( + global: { + ":": CommandMode, + ",": VolumeDown, + "s": Stop, + ".": VolumeUp, + "<Tab>": NextTab, + "<S-Tab>": PreviousTab, + "1": SwitchToTab("Queue"), + "2": SwitchToTab("Directories"), + "3": SwitchToTab("Artists"), + "4": SwitchToTab("Album Artists"), + "5": SwitchToTab("Albums"), + "6": SwitchToTab("Playlists"), + "7": SwitchToTab("Search"), + "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, + }, + 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: "artist", label: "Artist"), + (value: "album", label: "Album"), + (value: "albumartist", label: "Album Artist"), + (value: "title", label: "Title"), + (value: "filename", label: "Filename"), + (value: "genre", label: "Genre"), + ], + ), + artists: ( + album_display_mode: SplitByDate, + album_sort_by: Date, + ), + tabs: [ + ( + name: "Queue", + pane: Split( + direction: Vertical, + panes: [ + (size: "60%", pane: Split( + direction: Horizontal, + panes: [ + (size: "40%", pane: Split( + direction: Vertical, + panes: [(size: "70%", pane: Pane(AlbumArt)),(size: "30%", pane: Pane(Lyrics))] + )), + (size: "60%", pane: Pane(Queue)), + ], + )), + ], + ), + ), + ( + name: "Directories", + pane: Pane(Directories), + ), + ( + name: "Artists", + pane: Pane(Artists), + ), + ( + name: "Album Artists", + pane: Pane(AlbumArtists), + ), + ( + name: "Albums", + pane: Pane(Albums), + ), + ( + name: "Playlists", + pane: Pane(Playlists), + ), + ( + name: "Search", + pane: Pane(Search), + ), + ], +) + diff --git a/.config/rmpc/themes/nord.ron b/.config/rmpc/themes/nord.ron @@ -0,0 +1,192 @@ +#![enable(implicit_some)] +#![enable(unwrap_newtypes)] +#![enable(unwrap_variant_newtypes)] +( + default_album_art_path: None, + show_song_table_header: true, + draw_borders: true, + browser_column_widths: [20, 38, 42], + background_color: "#2e3440", + modal_backdrop: true, + text_color: "#d8dee9", + header_background_color: "#2e3440", + modal_background_color: "#2e3440", + preview_label_style: (fg: "#b48ead"), + preview_metadata_group_style: (fg: "#88c0d0"), + tab_bar: ( + enabled: true, + active_style: (fg: "#2e3440", bg: "#81A1C1", modifiers: "Bold"), + inactive_style: (fg: "#d8dee9", bg: "#2e3440", modifiers: ""), + ), + highlighted_item_style: (fg: "#a3be8c", modifiers: "Bold"), + current_item_style: (fg: "#2e3440", bg: "#81a1c1", modifiers: "Bold"), + borders_style: (fg: "#81a1c1", modifiers: "Bold"), + highlight_border_style: (fg: "#81a1c1"), + symbols: (song: "󰝚 ", dir: " ", marker: "* ", ellipsis: "..."), + progress_bar: ( + symbols: ["█", "█", "█"], + track_style: (fg: "#3b4252"), + elapsed_style: (fg: "#81a1c1"), + thumb_style: (fg: "#81a1c1"), + ), + scrollbar: ( + symbols: ["│", "█", "▲", "▼"], + track_style: (fg: "#81a1c1"), + ends_style: (fg: "#81a1c1"), + thumb_style: (fg: "#81a1c1"), + ), + song_table_format: [ + ( + prop: (kind: Property(Artist), style: (fg: "#81a1c1"), + default: (kind: Text("Unknown"), style: (fg: "#b48ead")) + ), + width: "20%", + ), + ( + prop: (kind: Property(Title), style: (fg: "#88c0d0"), + highlighted_item_style: (fg: "#d8dee9", modifiers: "Bold"), + default: (kind: Property(Filename), style: (fg: "#d8dee9"),) + ), + width: "35%", + ), + ( + prop: (kind: Property(Album), style: (fg: "#81a1c1"), + default: (kind: Text("Unknown Album"), style: (fg: "#b48ead")) + ), + width: "30%", + ), + ( + prop: (kind: Property(Duration), style: (fg: "#88c0d0"), + default: (kind: Text("-")) + ), + width: "15%", + alignment: Right, + ), + ], + 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: Text(""), style: (fg: "#81a1c1", modifiers: "Bold")), + (kind: Property(Status(StateV2(playing_label: "  ", paused_label: "  ", stopped_label: "  ")))), + (kind: Text(" "), style: (fg: "#81a1c1", modifiers: "Bold")), + //(kind: Property(Widget(ScanStatus))) + ], + center: [ + (kind: Property(Song(Title)), style: (fg: "#d8dee9",modifiers: "Bold"), + default: (kind: Property(Song(Filename)), style: (fg: "#d8dee9",modifiers: "Bold")) + ) + ], + right: [ + (kind: Text("󱡬"), style: (fg: "#81a1c1", modifiers: "Bold")), + (kind: Property(Status(Volume)), style: (fg: "#d8dee9", modifiers: "Bold")), + (kind: Text("%"), style: (fg: "#81a1c1", modifiers: "Bold")) + ] + ), + ( + left: [ + (kind: Text("[ "),style: (fg: "#81a1c1", modifiers: "Bold")), + (kind: Property(Status(Elapsed)),style: (fg: "#d8dee9")), + (kind: Text(" / "),style: (fg: "#81a1c1", modifiers: "Bold")), + (kind: Property(Status(Duration)),style: (fg: "#d8dee9")), + (kind: Text(" | "),style: (fg: "#81a1c1")), + (kind: Property(Status(Bitrate)),style: (fg: "#d8dee9")), + (kind: Text(" kbps"),style: (fg: "#81a1c1")), + (kind: Text("]"),style: (fg: "#81a1c1", modifiers: "Bold")) + ], + center: [ + (kind: Property(Song(Artist)), style: (fg: "#88c0d0", modifiers: "Bold"), + default: (kind: Text("Unknown Artist"), style: (fg: "#88c0d0", modifiers: "Bold")) + ), + (kind: Text(" - ")), + (kind: Property(Song(Album)),style: (fg: "#81a1c1" ), + default: (kind: Text("Unknown Album"), style: (fg: "#81a1c1", modifiers: "Bold")) + ) + ], + right: [ + (kind: Text("[ "),style: (fg: "#81a1c1")), + (kind: Property(Status(RepeatV2( + on_label: "", off_label: "", + on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), + (kind: Text(" | "),style: (fg: "#81a1c1")), + (kind: Property(Status(RandomV2( + on_label: "", off_label: "", + on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), + (kind: Text(" | "),style: (fg: "#81a1c1")), + (kind: Property(Status(ConsumeV2( + on_label: "󰮯", off_label: "󰮯", oneshot_label: "󰮯󰇊", + on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), + (kind: Text(" | "),style: (fg: "#81a1c1")), + (kind: Property(Status(SingleV2( + on_label: "󰎤", off_label: "󰎦", oneshot_label: "󰇊", off_oneshot_label: "󱅊", + on_style: (fg: "#d8dee9", modifiers: "Bold"), off_style: (fg: "#4c566a", modifiers: "Bold"))))), + (kind: Text(" ]"),style: (fg: "#81a1c1")), + ] + ), + ], + ), + browser_song_format: [ + ( + kind: Group([ + (kind: Property(Track)), + (kind: Text(" ")), + ]) + ), + ( + kind: Group([ + (kind: Property(Artist)), + (kind: Text(" - ")), + (kind: Property(Title)), + ]), + default: (kind: Property(Filename)) + ), + ], +) diff --git a/.config/shell/bm-files b/.config/shell/bm-files @@ -13,5 +13,4 @@ cfp ${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile # profile file for login se cfm ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc # mutt (email client) config cfn ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config # newsboat (RSS reader) cfu ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls # RSS urls for newsboat -cfmb ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings # ncmpcpp (music player) keybinds file -cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config # ncmpcpp (music player) config +cfmc ${XDG_CONFIG_HOME:-$HOME/.config}/rmpc/config.ron # rmpc (music player) config diff --git a/.config/sway/config b/.config/sway/config @@ -92,7 +92,7 @@ bindsym $mod+d exec $menu bindsym $mod+Shift+d exec tessen bindsym $mod+Return exec $term bindsym $mod+Shift+n exec 'sh -c "$term -e newsboat; pkill -RTMIN+6 i3blocks"' -bindsym $mod+m exec $term -e ncmpcpp +bindsym $mod+m exec $term -e rmpc bindsym $mod+Shift+m exec 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof i3blocks)' bindsym $mod+f1 exec singboxwrap menu bindsym $mod+f4 exec '$term -e pulsemixer; kill -44 $(pidof i3blocks)' diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music @@ -5,11 +5,11 @@ filter() { sed "/^volume:/d;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & case $BLOCK_BUTTON in - 1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause + 1) mpc status | filter ; setsid -f "$TERMINAL" -e rmpc;; # right click, pause/unpause 2) mpc toggle | filter ;; # right click, pause/unpause 3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing. - ⏸ when paused. -- Left click opens ncmpcpp. +- Left click opens rmpc. - Middle click pauses. - Scroll changes track.";; # right click, pause/unpause 4) mpc prev | filter ;; # scroll up, previous diff --git a/dependencies.txt b/dependencies.txt @@ -49,7 +49,7 @@ imv newsboat mpd mpc -ncmpcpp +rmpc zathura zathura-pdf-mupdf