Skip to content

Instantly share code, notes, and snippets.

@kenanpelit
Created November 24, 2024 21:33
Show Gist options
  • Save kenanpelit/193d80c97a5ccf2bdfe4105ed1142a61 to your computer and use it in GitHub Desktop.
Save kenanpelit/193d80c97a5ccf2bdfe4105ed1142a61 to your computer and use it in GitHub Desktop.
arch-mpd-ncmpcpp-setup.sh
#!/usr/bin/env bash
# Gerekli paketleri yükle
sudo pacman -S mpd ncmpcpp mpc
# Gerekli dizinleri oluştur
mkdir -p ~/.config/mpd/playlists
mkdir -p ~/.config/ncmpcpp
mkdir -p ~/.mpd/playlists
touch ~/.mpd/{database,log,state,sticker.sql}
# MPD yapılandırma dosyası
cat >~/.config/mpd/mpd.conf <<'EOL'
music_directory "~/Music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/database"
log_file "~/.mpd/log"
pid_file "~/.mpd/pid"
state_file "~/.mpd/state"
sticker_file "~/.mpd/sticker.sql"
bind_to_address "127.0.0.1"
port "6600"
auto_update "yes"
# PulseAudio çıkışı
audio_output {
type "pulse"
name "Pulse Audio"
mixer_type "software"
}
# Görselleştirici için
audio_output {
type "fifo"
name "Visualizer"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
# ReplayGain desteği
replaygain "auto"
replaygain_preamp "0"
replaygain_missing_preamp "0"
replaygain_limit "yes"
volume_normalization "yes"
EOL
# NCMPCPP yapılandırma dosyası - Catppuccin Mocha teması
cat >~/.config/ncmpcpp/config <<'EOL'
# Dizinler
ncmpcpp_directory = ~/.config/ncmpcpp
lyrics_directory = ~/.config/ncmpcpp/lyrics
# MPD Ayarları
mpd_host = "localhost"
mpd_port = "6600"
mpd_music_dir = "~/Music"
mpd_crossfade_time = 3
# Görselleştirici Ayarları
visualizer_data_source = "/tmp/mpd.fifo"
visualizer_output_name = "Visualizer"
visualizer_in_stereo = "yes"
visualizer_type = "spectrum"
visualizer_look = "●┃"
visualizer_color = "blue, cyan, green, yellow, magenta, red"
visualizer_spectrum_smooth_look = yes
# Genel Görünüm
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}
# Renk Şeması (Catppuccin Mocha)
colors_enabled = yes
empty_tag_color = magenta
header_window_color = cyan
volume_color = yellow
state_line_color = green
state_flags_color = red:b
main_window_color = white
color1 = white
color2 = green
progressbar_color = black:b
progressbar_elapsed_color = blue:b
statusbar_color = red
statusbar_time_color = cyan:b
player_state_color = cyan:b
current_item_prefix = $(cyan)$r
current_item_suffix = $/r$(end)
# Düzen
progressbar_look = "▃▃▃"
user_interface = alternative
startup_screen = playlist
display_bitrate = yes
enable_window_title = yes
follow_now_playing_lyrics = yes
fetch_lyrics_for_current_song_in_background = yes
# Davranış
cyclic_scrolling = yes
lines_scrolled = 2
mouse_support = yes
EOL
# Kısayol tuşları
cat >~/.config/ncmpcpp/bindings <<'EOL'
def_key "j"
scroll_down
def_key "k"
scroll_up
def_key "h"
previous_column
def_key "l"
next_column
def_key "g"
move_home
def_key "G"
move_end
def_key "d"
delete_playlist_items
def_key ";"
show_lyrics
def_key "space"
pause
def_key "n"
next
def_key "N"
previous
def_key "+"
volume_up
def_key "-"
volume_down
def_key "tab"
next_screen
def_key "shift-tab"
previous_screen
EOL
# MPD servisini başlat
systemctl --user enable mpd.service
systemctl --user start mpd.service
echo "Kurulum tamamlandı!"
echo "ncmpcpp komutunu kullanarak başlatabilirsiniz."
echo "Müzik dosyalarınızı ~/Music dizinine kopyalayın."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment