diff options
author | Skiz <skiznet@aol.com> | 2024-11-15 16:58:45 -0500 |
---|---|---|
committer | Skiz <skiznet@aol.com> | 2024-11-15 16:58:45 -0500 |
commit | 41861f704c87d9589b6e0a10fb5f99f164382f9d (patch) | |
tree | 3bd6bb831cc8edb5e4fcebe6cb7ebb0e929cee97 | |
parent | 4f47cd0c93cd8bb967524b53d4a0c634f08afe44 (diff) |
Setup basic YT-FZF working and program checking
-rwxr-xr-x | mediachad | 32 |
1 files changed, 13 insertions, 19 deletions
@@ -1,6 +1,10 @@ #!/bin/bash # Nov 15 2024 +# User's input: + +input=$1 + # Functions # Program_Check, checks if you have a program or not. @@ -11,30 +15,20 @@ program_check(){ if type "$1" > /dev/null 2>&1; then echo "You have $1" > /dev/null else - echo "You don't have $1" - echo "Please install $1, to make this program work" + echo "You don't have $1;" + echo "Please install "$1" to make this program work." exit 1 fi } -#Yes or no function: -yes_or_no() { -read -r -p "Are you sure? [y/N] " response -case "$response" in - [yY][eE][sS]|[yY]) - #do_something - echo "Test 1"; - - ;; - *) - #do_something_else - - echo "Test 2"; - ;; -esac -} - # Main() { +# Check if needed programs are installed: +program_check "ytfzf" +program_check "mpv" + +# yt-fzf +ytfzf --loop --pages=3 --force-youtube "$input" > /dev/null 2>&1 + # } |