From a024db129a6d0f1c23c077b4d5c03ff3e671c7d3 Mon Sep 17 00:00:00 2001 From: Salim Zaidi <121177411+zedsalim@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:49:34 +0100 Subject: [PATCH] Update --- config/scripts/mpv-youtube.sh | 12 ++++++++++++ config/scripts/youtube-watcher.sh | 7 ------- config/sxhkd/sxhkdrc | 3 +++ run.sh | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100755 config/scripts/mpv-youtube.sh delete mode 100755 config/scripts/youtube-watcher.sh diff --git a/config/scripts/mpv-youtube.sh b/config/scripts/mpv-youtube.sh new file mode 100755 index 0000000..492b8e2 --- /dev/null +++ b/config/scripts/mpv-youtube.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +play_clipboard_url() { + # Capture the URL from the clipboard + url=$(xclip -o -selection clipboard) + + # Run mpv with the URL + mpv --ytdl-raw-options=format="best[height<=720]" "$url" +} + +play_clipboard_url + diff --git a/config/scripts/youtube-watcher.sh b/config/scripts/youtube-watcher.sh deleted file mode 100755 index 137d9e3..0000000 --- a/config/scripts/youtube-watcher.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -echo "Enter your URL: " - -read url - -mpv --ytdl-raw-options=format="best[height<=720]" $url diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc index ef75833..e34164d 100755 --- a/config/sxhkd/sxhkdrc +++ b/config/sxhkd/sxhkdrc @@ -16,6 +16,9 @@ alt + s alt + b source ~/.config/scripts/bookmarks.sh +alt + y + source ~/.config/scripts/mpv-youtube.sh + # BG Selector super + F1 diff --git a/run.sh b/run.sh index 8966f85..2c7e3e1 100644 --- a/run.sh +++ b/run.sh @@ -32,7 +32,7 @@ sudo nala install -y intel-microcode sudo nala install -y network-manager-gnome # Appearance and Customization -sudo nala install -y lxappearance arandr +sudo nala install -y lxappearance arandr xclip # System Utilities sudo nala install -y dialog mtools dosfstools avahi-daemon acpi acpid gvfs-backends @@ -48,7 +48,7 @@ sudo nala install -y exa # File Managers sudo nala install -y pcmanfm ranger -# XFCE Settings and Terminal +# XFCE Settings sudo nala install -y xfce4-settings xfce4-power-manager # Audio Control