stuff
This commit is contained in:
parent
decdd636d4
commit
a475f2caf3
2 changed files with 65 additions and 5 deletions
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Automatically generated by systemd-xdg-autostart-generator
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Documentation=man:systemd-xdg-autostart-generator(8)
|
||||||
|
SourcePath=/etc/xdg/autostart/polkit-mate-authentication-agent-1.desktop
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
Description=PolicyKit Authentication Agent
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExitType=cgroup
|
||||||
|
ExecStart=:/usr/libexec/polkit-mate-authentication-agent-1
|
||||||
|
Restart=no
|
||||||
|
TimeoutStopSec=5s
|
||||||
|
Slice=app.slice
|
||||||
|
; ExecCondition=/usr/lib/systemd/systemd-xdg-autostart-condition "MATE" ""
|
||||||
|
|
@ -47,14 +47,56 @@ function open_course
|
||||||
end
|
end
|
||||||
|
|
||||||
function select_song
|
function select_song
|
||||||
set artist (mpc list albumartist | fuzzel --dmenu || exit)
|
set state "artist"
|
||||||
set album (mpc list album albumartist $artist | fuzzel --dmenu || exit)
|
set song
|
||||||
set title (mpc list title album $album | fuzzel --dmenu || exit)
|
|
||||||
|
|
||||||
mpc findadd album $album
|
while true
|
||||||
mpc searchplay title $title
|
if test $state = "title"
|
||||||
|
set song[3] (echo -e "\t..\n $(mpc search --format "%track%\t%title%" album $song[2])" | fuzzel --dmenu --with-nth 2 --accept-nth 2 || exit)
|
||||||
|
|
||||||
|
if test $song[3] = ".."
|
||||||
|
set state "album"
|
||||||
|
else
|
||||||
|
set state ""
|
||||||
|
mpc findadd album $song[2]
|
||||||
|
mpc searchplay title $song[3]
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
else if test $state = "album"
|
||||||
|
set song[2] (echo -e "..\n$(mpc list album albumartist $song[1])" | fuzzel --dmenu || exit)
|
||||||
|
|
||||||
|
if test $song[2] = ".."
|
||||||
|
set state "artist"
|
||||||
|
else
|
||||||
|
set state "title"
|
||||||
|
end
|
||||||
|
|
||||||
|
else if test $state = "artist"
|
||||||
|
set song[1] (mpc list albumartist | fuzzel --dmenu || exit)
|
||||||
|
|
||||||
|
set state "album"
|
||||||
|
else
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# function select_song
|
||||||
|
# argparse artist=? album=? -- $argv
|
||||||
|
# or return
|
||||||
|
#
|
||||||
|
# if set -ql _flag_artist
|
||||||
|
# select_song --album (mpc list album albumartist $_flag_artist | fuzzel --dmenu || exit)
|
||||||
|
# else if set -ql _flag_album
|
||||||
|
# set title (mpc search --format "%track%\t%title%" album $_flag_album | fuzzel --dmenu || exit)
|
||||||
|
# mpc findadd album $_flag_album
|
||||||
|
# mpc searchplay title $title
|
||||||
|
# else
|
||||||
|
# select_song --artist (mpc list albumartist | fuzzel --dmenu || exit)
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
|
||||||
function select_song_from_queue
|
function select_song_from_queue
|
||||||
set title (mpc playlist --format "%artist%\t%title%" | fuzzel --dmenu --select=(mpc current --format "%artist%\t%title%") --accept-nth 2 || exit)
|
set title (mpc playlist --format "%artist%\t%title%" | fuzzel --dmenu --select=(mpc current --format "%artist%\t%title%") --accept-nth 2 || exit)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue