-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,037 additions
and
1,963 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
#!/bin/sh | ||
|
||
case "${XDG_SESSION_TYPE}" in | ||
wayland) | ||
if command_exists "swayimg"; then | ||
case "${XDG_CURRENT_DESKTOP}" in | ||
Hyprland) thumbnail_viewer=swayimg-hyprland ;; | ||
sway) thumbnail_viewer=swayimg ;; | ||
esac | ||
else | ||
thumbnail_viewer=chafa | ||
fi | ||
;; | ||
X11) | ||
if command_exists "ueberzug"; then | ||
thumbnail_viewer=ueberzug | ||
else | ||
thumbnail_viewer=chafa | ||
fi | ||
;; | ||
tty) thumbnail_viewer=chafa ;; | ||
*) | ||
print_warning "XDG_SESSION_TYPE is not set, defaulting to chafa\n" | ||
thumbnail_viewer=chafa ;; | ||
esac | ||
|
||
if [ "$XDG_SESSION_TYPE" = "X11" ]; then | ||
command_exists "ueberzug" && thumbnail_viewer=ueberzug | ||
elif command_exists "ueberzugpp"; then | ||
case "$TERM" in | ||
xterm-kitty) thumbnail_viewer=kitty ;; | ||
foot) thumbnail_viewer=sixel ;; | ||
wezterm|iterm2) thumbnail_viewer=iterm2 ;; | ||
esac | ||
else | ||
case "${XDG_SESSION_TYPE}" in | ||
wayland) | ||
if command_exists "swayimg"; then | ||
case "${XDG_CURRENT_DESKTOP}" in | ||
Hyprland) thumbnail_viewer=swayimg-hyprland ;; | ||
sway) thumbnail_viewer=swayimg ;; | ||
esac | ||
else | ||
thumbnail_viewer=chafa | ||
fi | ||
;; | ||
X11|tty) | ||
thumbnail_viewer=chafa ;; | ||
*) | ||
print_warning "XDG_SESSION_TYPE is not set, defaulting to chafa\n" | ||
thumbnail_viewer=chafa ;; | ||
esac | ||
fi | ||
|
||
|
||
print_info "Thumbnail viewer: $thumbnail_viewer\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
get_search_from_EXT_comments (){ | ||
_search="${selected_url}" | ||
} | ||
|
||
set +f | ||
instances=$(printf "%s\n" "${YTFZF_TEMP_DIR}"/*) | ||
set -f | ||
|
||
instance_count=$(echo "$instances" | wc -l) | ||
|
||
if [ "$instance_count" -gt 1 ]; then | ||
printf "%s\n" "More than 1 ytfzf instance is running, please select one" | ||
echo "$instances" | sed 's/.*\///' | nl | ||
read -r num | ||
|
||
instance="$(echo "$instances" | sed -n "${num}p")" | ||
else | ||
instance="$instances" | ||
fi | ||
|
||
read -r selected_url < "${instance}/ids" | ||
|
||
[ -z "$selected_url" ] && { | ||
printf "%s\n" "This instance is not playing a video" | ||
} | ||
|
||
scrape="comments" | ||
search_source="EXT_comments" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.