skynet/tmux/paste-cmd

10 lines
196 B
Text
Raw Normal View History

2024-04-05 12:24:01 -05:00
#!/usr/bin/env bash
session="$(loginctl show-session "$(loginctl | grep "$(whoami)" | awk '{print $1}')" -p Type)"
if [ "$session" = "Type=x11" ]; then
exec xsel -b -o
else
exec wl-paste
fi