Skip to content

Instantly share code, notes, and snippets.

@naranyala
Created January 20, 2024 14:22
Show Gist options
  • Save naranyala/7406b0fb192984e46f032fa4ea1b0d23 to your computer and use it in GitHub Desktop.
Save naranyala/7406b0fb192984e46f032fa4ea1b0d23 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Rofi prompt for website URL
website_url=$(rofi -dmenu -p "Enter the website URL:")
# Extract the website name
website_name=$(echo "$website_url" | awk -F[/:] '{print $4}')
# Rofi prompt for folder name
folder_name=$(rofi -dmenu -p "Enter folder name for $website_name:")
# Create a new Kitty terminal and execute HTTrack, showing output
kitty --hold bash -c "mkdir -p \"$HOME/Downloads/$folder_name\" && cd \"$HOME/Downloads/$folder_name\" && httrack \"$website_url\" -r2 > \"$HOME/Downloads/$folder_name.log\" 2>&1 && notify-send 'Website Download Completed' 'The download of $website_url is complete. Check the folder $HOME/Downloads/$folder_name.'" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment