Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tools:linux:misc-tools [2024/01/28 12:23] – [Userfull list] crunchyslimeen:tools:linux:misc-tools [2024/01/28 12:44] (current) – [Download youtube vidéo from clipboard] crunchyslime
Line 145: Line 145:
  
 //⚠️ this script was written for i3 under X, using Wayland you will need to replace ''xdotool type'' with ''wtype'' and ''xclip -o'' by a command base on [[https://github.com/bugaevc/wl-clipboard|wl-clipboard]]// //⚠️ this script was written for i3 under X, using Wayland you will need to replace ''xdotool type'' with ''wtype'' and ''xclip -o'' by a command base on [[https://github.com/bugaevc/wl-clipboard|wl-clipboard]]//
 +
 +====Download youtube vidéo from clipboard====
 +Using X with [[man>xsel]] : ''yt-dlp --write-sub -f bestvideo+bestaudio `xsel -ob`''\\
 +Using wayland with [[man>wl-paste]] (seems that wl-type can't fully replace xsel in this situation, using a temp file as buffer) : 
 +<code bash>
 +#!/bin/bash
 +cd "/path/to/download/folder"
 +wl-paste > /tmp/youtube-paste-to-dl
 +#launching in a detached terminal to make it work with shortcuts
 +xfce4-terminal -e 'yt-dlp --write-sub -f bestvideo+bestaudio -a /tmp/youtube-paste-to-dl'
 +rm /tmp/youtube-paste-to-dl
 +</code>
 +
 ====bash tools==== ====bash tools====
  
  • en/tools/linux/misc-tools.1706441001.txt.gz
  • Last modified: 2024/01/28 12:23
  • by crunchyslime