# Display the commands on wofi selection="$(cat ~/.histfile)" $selection | wofi -p "Commands history" --show dmenu -i | cliphist decode | wl-copy # Then copy the selection to the clipboard # wl-copy "$selection"