gpmdp and other stuff

This commit is contained in:
Harri Lahtinen 2018-12-26 16:38:18 +02:00
parent b6171234c2
commit 2ef21ebe4b
5 changed files with 43 additions and 7 deletions

View File

@ -53,7 +53,7 @@ gpmdp_status () {
gpmdp_info () { gpmdp_info () {
if [ "$(gpmdp_status)" == "Playing" ]; then if [ "$(gpmdp_status)" == "Playing" ]; then
printf "%s\n" "Now Playing: $(title) by $(artist)" printf "%s\n" "$(title) by $(artist)"
elif [ "$(gpmdp_status)" == "Paused" ]; then elif [ "$(gpmdp_status)" == "Paused" ]; then
printf "%s\n" "Paused: $(title) by $(artist)" printf "%s\n" "Paused: $(title) by $(artist)"
fi fi
@ -64,7 +64,9 @@ current () {
} }
usage () { cat << EOF usage () { cat << EOF
usage: gpmdp-remote <option> usage: gpmdp-remote <option>
info Print info about now playing song info Print info about now playing song
title Print current song title title Print current song title
artist Print current song artist artist Print current song artist
@ -75,6 +77,7 @@ usage () { cat << EOF
status Print whether GPMDP is paused or playing status Print whether GPMDP is paused or playing
current Print now playing song in "artist - album - song" format current Print now playing song in "artist - album - song" format
help Print this help message help Print this help message
EOF EOF
exit 1 exit 1
} }
@ -92,3 +95,4 @@ case $1 in
current) current ;; current) current ;;
*) usage ;; *) usage ;;
esac esac

View File

@ -66,6 +66,8 @@ client.urgent $darkred $darkred $black $darkred $darkred
client.background $black client.background $black
###---Starting External Scripts---### ###---Starting External Scripts---###
#Start bluealsa
exec --no-startup-id sudo bluealsa &
#Twmn #Twmn
exec --no-startup-id twmnd & exec --no-startup-id twmnd &
#Album art for mpd/mopidy #Album art for mpd/mopidy

View File

@ -30,7 +30,7 @@ debug_file = mopidy.log
#config_file = #config_file =
[audio] [audio]
output = tee name=t t. ! queue ! autoaudiosink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo output = tee name=t t. ! queue ! pulsesink t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo
#mixer = software #mixer = software
#mixer_volume = #mixer_volume =
#output = autoaudiosink #output = autoaudiosink

View File

@ -13,10 +13,16 @@ sticker_file "~/.config/mpd/sticker.sql"
max_output_buffer_size "16384" max_output_buffer_size "16384"
#audio_output {
# type "alsa"
# name "mpd alsamixer-output"
# mixer_type "software"
#}
audio_output { audio_output {
type "alsa" type "pulse"
name "mpd alsamixer-output" name "My PULSE Device"
mixer_type "software" server "localhost"
} }
audio_output { audio_output {

View File

@ -23,9 +23,9 @@ alert = #bd2c40
[bar/top] [bar/top]
monitor = ${env:MONITOR:eDP-1} monitor = ${env:MONITOR:eDP-1}
include-file = ~/.config/polybar/top-bar include-file = ~/.config/polybar/top-bar
modules-left = i3 modules-left = i3 gpmdp
modules-center = term chrome editor fm music vpn modules-center = term chrome editor fm music vpn
modules-right = pkg alsa battery backlight wlan networkmanager date clock powermenu modules-right = pkg pulseaudio battery backlight wlan networkmanager date clock powermenu
;tray-position = right ;tray-position = right
;tray-padding = 2 ;tray-padding = 2
@ -39,6 +39,30 @@ modules-left = hostname vpncheck
modules-center = cpu memory temperature modules-center = cpu memory temperature
modules-right = openweather modules-right = openweather
[module/pulseaudio]
type = internal/pulseaudio
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
;sink = alsa_output.pci-0000_00_0e.0.analog-stereo
sink = bluez_sink.E8_07_BF_33_4D_F2.headset_head_unit
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = true
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
label-volume-foreground = ${root.foreground}
format-muted = <label-muted>
format-muted-foreground = ${colors.foreground-alt}
label-muted =  muted
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-foreground = ${colors.foreground-alt}
ramp-headphones-0 = 
ramp-headphones-1 = 
[module/nm-launcher] [module/nm-launcher]
type = custom/script type = custom/script
exec = ~/.config/Scripts/nm-applet/applet.sh exec = ~/.config/Scripts/nm-applet/applet.sh