Search notes:

Script: wsl-screenshot-to-clipboard

wsl-screenshot-to-clipboard is used in a Windows Subsystem for Linux (WSL) environment to copy a screenshot made with SnippingTool.exe into the clipboard using xclip.
#!/bin/sh

# /mnt/c/Users/Rene/AppData/Local/Microsoft/WindowsApps/SnippingTool.exe

most_recent_file=$( ls -tr1 /mnt/c/Users/Rene/Pictures/Screenshots/*.png | tail -1)

echo most_recent_file = $most_recent_file
xclip -i -selection clipboard -t image/png "$most_recent_file"
rm "$most_recent_file"
Github repository scripts-and-utilities, path: /wsl-screenshot-to-clipboard

See also

Scripts

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759390688, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/tools/scripts/personal/wsl-screenshot-to-clipboard(49): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78