Use the same window, if possible.

This commit is contained in:
Glenn Y. Rolland 2015-07-14 23:29:19 +02:00
parent 06c00e545c
commit a707be5c63

View file

@ -33,9 +33,12 @@ module Kook
def fire
target = ENV['KONSOLE_DBUS_SERVICE'] || 'org.kde.konsole'
window = ENV['KONSOLE_DBUS_WINDOW'] || '/Konsole'
# FIXME: use runCommand instead of sendText ?
@views.each do |view,view_data|
session=`qdbus #{target} /Konsole newSession`.strip
session=`qdbus #{target} #{window} newSession`.strip
system "qdbus org.kde.konsole /Sessions/#{session} sendText \"cd #{@path}\n\""
system "qdbus org.kde.konsole /Sessions/#{session} sendText \"cd #{view_data.path}\n\""
system "qdbus org.kde.konsole /Sessions/#{session} sendText \"clear\n\""