Skip to content

Instantly share code, notes, and snippets.

@amstan
Created June 28, 2019 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amstan/58b4539db46e1bd293c504bdcd276e4a to your computer and use it in GitHub Desktop.
Save amstan/58b4539db46e1bd293c504bdcd276e4a to your computer and use it in GitHub Desktop.
kdevelop
#!/bin/bash
export KDEV_DBUS_ID=$(qdbus|grep kdevplatform)
absfile=$1
qdbus $KDEV_DBUS_ID /org/kdevelop/DocumentController org.kdevelop.DocumentController.openDocumentSimple $absfile
echo "Waiting for kdevelop to close all tabs with $absfile."
while true ; do
kdevelop_absfiles=$(qdbus $KDEV_DBUS_ID /org/kdevelop/DocumentController org.kdevelop.DocumentController.activeDocumentPaths)
result=$(echo $kdevelop_absfiles|grep $absfile)
if [ -z "$result" ] ; then
echo "$absfile closed in kdevelop!"
break
fi
sleep 0.1
done
....
export EDITOR=kdevelop_blocking_editor.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment