commit e452fb6dcd21447569d88b2edb73a1bd7d194134
parent 1fafd18793d3753e9e2acae2cdf3c9f8fe02f1ae
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Thu, 25 Jun 2026 19:10:20 +0200
Copy screenshot to clipboard
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.config/alpine-packages b/.config/alpine-packages
@@ -34,7 +34,7 @@ qemu qemu-img qemu-system-x86_64
# Xorg
xorg-server
xinit eudev mesa-dri-gallium xf86-video-intel xf86-input-libinput xf86-input-synaptics
-setxkbmap xsel xbanish xsetroot xwallpaper xev slock brightnessctl capitaine-cursors
+setxkbmap xclip xsel xbanish xsetroot xwallpaper xev slock brightnessctl capitaine-cursors
libx11-dev libxft-dev libxinerama-dev # For building dwm and st
dbus-x11
diff --git a/scripts/dmenu-screenshot b/scripts/dmenu-screenshot
@@ -1,7 +1,7 @@
#!/bin/sh
-# Screenshot utility
-# Requires: dmenu (or similar), imagemagick
+# Screenshot utility; if xclip is installed, it copies it to clipboard.
+# Requires: dmenu (or similar), imagemagick, xclip (optional)
# Usage: dmenu-screenshot [-m menu]
@@ -37,4 +37,6 @@ else
fi
[ -n "$t" ] && sleep 0.1 && import $op "$filepath"
-spawn xbanish # This can be removed if you don't use xbanish
+if command -v xclip >/dev/null 2>&1; then
+ xclip -selection clipboard -t image/png < "$filepath"
+fi