Skip to content

Instantly share code, notes, and snippets.

@cold-logic
Created February 22, 2026 19:04
Show Gist options
  • Select an option

  • Save cold-logic/ccebf05929d85cd39fe2b988d69d30b2 to your computer and use it in GitHub Desktop.

Select an option

Save cold-logic/ccebf05929d85cd39fe2b988d69d30b2 to your computer and use it in GitHub Desktop.
Sets up everything needed for copy/paste between Windows 11 (host) and CachyOS running Sway inside VMware Workstation
#!/usr/bin/env bash
set -euo pipefail
echo "=== Updating system ==="
sudo pacman -Syu --noconfirm
echo "=== Installing open-vm-tools ==="
sudo pacman -S --noconfirm open-vm-tools
echo "=== Enabling VMware services ==="
sudo systemctl enable --now vmtoolsd.service
sudo systemctl enable --now vmware-vmblock-fuse.service
echo "=== Installing Wayland clipboard helpers (wl-clipboard) ==="
sudo pacman -S --noconfirm wl-clipboard
echo "=== Creating vmblock mountpoint (if missing) ==="
sudo mkdir -p /run/vmblock-fuse
echo "=== Restarting VMware Tools ==="
sudo systemctl restart vmtoolsd.service
echo "=== Sanity checks ==="
echo
echo "vmtoolsd.service:"
systemctl is-active vmtoolsd.service && echo " ✔ running" || echo " ✘ NOT running"
echo "vmware-vmblock-fuse.service:"
systemctl is-active vmware-vmblock-fuse.service && echo " ✔ running" || echo " ✘ NOT running"
echo
echo "=== Testing Wayland clipboard ==="
echo "test-from-sway" | wl-copy
echo "Clipboard now contains: $(wl-paste)"
echo
echo "=== Setup complete ==="
echo "Make sure VMware Workstation has Guest Isolation enabled:"
echo " VM → Settings → Options → Guest Isolation → ✔ Copy/Paste, ✔ Drag/Drop"
echo
echo "Reboot recommended."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment