bugfix and keys
bugfix: playing failed with tracks of unknown length keys: added yank keys
This commit is contained in:
@@ -638,6 +638,8 @@ open \"https://musicbrainz.org/\$t/{r3}\"" \
|
|||||||
--bind="$KEYS_OPEN:execute-silent:
|
--bind="$KEYS_OPEN:execute-silent:
|
||||||
[ {4} ] || exit 0
|
[ {4} ] || exit 0
|
||||||
open \"\$(dirname {4})\"" \
|
open \"\$(dirname {4})\"" \
|
||||||
|
--bind="$KEYS_N_YANK:transform:$IN_NORMAL_MODE && echo \"execute-silent(printf {3} | $CLIP)\" || $PUT_FZF_KEY_LOGIC" \
|
||||||
|
--bind="$KEYS_YANK_CURRENT:execute-silent:printf {2} | $CLIP" \
|
||||||
--bind="$KEYS_SHOW_PLAYLIST:transform:echo \"print($VIEW_PLAYLIST)+print()+print($FZF_CURRENT_VIEW)+print({2})+accept\"" \
|
--bind="$KEYS_SHOW_PLAYLIST:transform:echo \"print($VIEW_PLAYLIST)+print()+print($FZF_CURRENT_VIEW)+print({2})+accept\"" \
|
||||||
--bind="$KEYS_QUIT:print($VIEW_QUIT)+accept" \
|
--bind="$KEYS_QUIT:print($VIEW_QUIT)+accept" \
|
||||||
--bind="$KEYS_N_QUIT:transform:$IN_NORMAL_MODE && ($IN_LIST_ARTISTS_VIEW && echo \"print($VIEW_QUIT)+accept\" || $0 --action-draw $MODE_NORMAL $VIEW_LIST_ARTISTS) || $PUT_FZF_KEY_LOGIC" \
|
--bind="$KEYS_N_QUIT:transform:$IN_NORMAL_MODE && ($IN_LIST_ARTISTS_VIEW && echo \"print($VIEW_QUIT)+accept\" || $0 --action-draw $MODE_NORMAL $VIEW_LIST_ARTISTS) || $PUT_FZF_KEY_LOGIC" \
|
||||||
|
@@ -48,6 +48,8 @@
|
|||||||
# Specials:
|
# Specials:
|
||||||
# - KEYS_BROWSE: Open MusicBrainz webpage of the selected item
|
# - KEYS_BROWSE: Open MusicBrainz webpage of the selected item
|
||||||
# - KEYS_OPEN: Open file manager in the directory of the selected item
|
# - KEYS_OPEN: Open file manager in the directory of the selected item
|
||||||
|
# - KEYS_N_YANK: Copy MusicBrainz ID of selected item to clipboard
|
||||||
|
# - KEYS_YANK_CURRENT: Copy MusicBrainz ID of current item to clipboard
|
||||||
# - KEYS_SHOW_PLAYLIST: Switch to playlist view
|
# - KEYS_SHOW_PLAYLIST: Switch to playlist view
|
||||||
# - KEYS_QUIT: Quit application
|
# - KEYS_QUIT: Quit application
|
||||||
# - KEYS_N_QUIT: Quit application if we are in VIEW_LIST_ARTISTS, else go to
|
# - KEYS_N_QUIT: Quit application if we are in VIEW_LIST_ARTISTS, else go to
|
||||||
@@ -133,10 +135,13 @@ export KEYS_FILTER_LOCAL KEYS_FILTER_1 KEYS_FILTER_2 KEYS_FILTER_3 \
|
|||||||
# Specials:
|
# Specials:
|
||||||
KEYS_BROWSE="${KEYS_BROWSE:-"alt-b"}"
|
KEYS_BROWSE="${KEYS_BROWSE:-"alt-b"}"
|
||||||
KEYS_OPEN="${KEYS_OPEN:-"alt-o"}"
|
KEYS_OPEN="${KEYS_OPEN:-"alt-o"}"
|
||||||
|
KEYS_N_YANK="${KEYS_N_YANK:-"y"}"
|
||||||
|
KEYS_YANK_CURRENT="${KEYS_YANK_CURRENT:-"ctrl-y"}"
|
||||||
KEYS_SHOW_PLAYLIST="${KEYS_SHOW_PLAYLIST:-"ctrl-p"}"
|
KEYS_SHOW_PLAYLIST="${KEYS_SHOW_PLAYLIST:-"ctrl-p"}"
|
||||||
KEYS_QUIT="${KEYS_QUIT:-"ctrl-c"}"
|
KEYS_QUIT="${KEYS_QUIT:-"ctrl-c"}"
|
||||||
KEYS_N_QUIT="${KEYS_N_QUIT:-"q"}"
|
KEYS_N_QUIT="${KEYS_N_QUIT:-"q"}"
|
||||||
export KEYS_BROWSE KEYS_OPEN KEYS_SHOW_PLAYLIST KEYS_QUIT KEYS_N_QUIT
|
export KEYS_BROWSE KEYS_OPEN KEYS_N_YANK KEYS_YANK_CURRENT KEYS_SHOW_PLAYLIST \
|
||||||
|
KEYS_QUIT KEYS_N_QUIT
|
||||||
|
|
||||||
# Playback:
|
# Playback:
|
||||||
KEYS_PLAY="${KEYS_PLAY:-"enter"}"
|
KEYS_PLAY="${KEYS_PLAY:-"enter"}"
|
||||||
|
@@ -73,7 +73,7 @@ __generate_playlist() {
|
|||||||
(."artist-credit" | map([.name, .joinphrase] | join("")) | join("")),
|
(."artist-credit" | map([.name, .joinphrase] | join("")) | join("")),
|
||||||
$deco
|
$deco
|
||||||
] | join("\t"),
|
] | join("\t"),
|
||||||
length: (.length / 1000 | round | tostring),
|
length: (.length // 0 / 1000 | round | tostring),
|
||||||
$pos,
|
$pos,
|
||||||
number: .number,
|
number: .number,
|
||||||
file: $filenames[.id]
|
file: $filenames[.id]
|
||||||
|
@@ -39,5 +39,8 @@ if [ ! "${TOOLS_LOADED:-}" ]; then
|
|||||||
fi
|
fi
|
||||||
export SOCAT
|
export SOCAT
|
||||||
|
|
||||||
|
command -v "xsel" >/dev/null && CLIP="xsel" || CLIP="true"
|
||||||
|
export CLIP
|
||||||
|
|
||||||
export TOOLS_LOADED=1
|
export TOOLS_LOADED=1
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user