Skip to content

Instantly share code, notes, and snippets.

@thingsiplay
Last active March 16, 2026 18:13
Show Gist options
  • Select an option

  • Save thingsiplay/5094021c1ffaa45cbc4002ac653e9dba to your computer and use it in GitHub Desktop.

Select an option

Save thingsiplay/5094021c1ffaa45cbc4002ac653e9dba to your computer and use it in GitHub Desktop.
Diffuse - Compare 2 Text Content
#!/usr/bin/env bash
title="Diff - Compare 2 Texts"
output_size="720x720"
file1="$(mktemp)"
file2="$(mktemp)"
file3="$(mktemp)"
kdialog --title "${title} (input)" --textinputbox "Input Text 1" >> "${file1}"
kdialog --title "${title} (input)" --textinputbox "Input Text 2" >> "${file2}"
diff -- "${file1}" "${file2}" >> "${file3}"
kdialog --title "${title} (diff)" --geometry "${output_size}" --textbox "${file3}"
rm -- "${file1}"
rm -- "${file2}"
rm -- "${file3}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment