Created
June 28, 2019 00:05
-
-
Save amstan/58b4539db46e1bd293c504bdcd276e4a to your computer and use it in GitHub Desktop.
kdevelop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
export EDITOR=kdevelop_blocking_editor.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment