From 9e3a13863de97e6b9e0efb96d7e96028585f2878 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 11 May 2024 21:06:32 +0530 Subject: [PATCH] add ueberzugpp for ytfzf thumbnailing --- packages/scripts/default.nix | 3 ++- packages/scripts/youtube.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/scripts/default.nix b/packages/scripts/default.nix index ae78912..9d7ea25 100644 --- a/packages/scripts/default.nix +++ b/packages/scripts/default.nix @@ -12,6 +12,7 @@ , curl , ytfzf , libsecret +, ueberzugpp , }: stdenvNoCC.mkDerivation { @@ -49,6 +50,6 @@ stdenvNoCC.mkDerivation { wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]} wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick swww]} wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [jq curl libsecret]} - wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty ytfzf rofi-wayland]} + wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty ytfzf rofi-wayland ueberzugpp]} ''; } diff --git a/packages/scripts/youtube.sh b/packages/scripts/youtube.sh index 26262cd..272f1bc 100755 --- a/packages/scripts/youtube.sh +++ b/packages/scripts/youtube.sh @@ -10,7 +10,7 @@ fi if [ ! -e "$HISTORY_FILE" ] ; then touch "$HISTORY_FILE" fi -HISTORY="$(awk -F' ' '{$1="";$2="";$3="";print $0}' $HISTORY_FILE | sed 's/^\s*//g' | uniq)" +HISTORY="$(awk -F' ' '{$1="";$2="";$3="";print $0}' "$HISTORY_FILE" | sed 's/^\s*//g' | uniq)" SEARCH_TERM="$(echo "$HISTORY" | rofi -dmenu -p "Search Youtube:")" kitty --class=ytfzf --title "YouTube Search: ${SEARCH_TERM}" -- ytfzf -f -tT kitty --async-thumbnails "${SEARCH_TERM}"