[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: [Bug 125738] Add option for reusing instances only if in same
From: Nicolas Bigaouette <nbigaouette () gmail ! com>
Date: 2010-08-31 17:37:18
Message-ID: 20100831173718.86F2A63E3A () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=125738
Nicolas Bigaouette <nbigaouette@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nbigaouette@gmail.com
--- Comment #6 from Nicolas Bigaouette <nbigaouette gmail com> 2010-08-31 19:36:24 ---
I am highly interested in such a feature. I'm using KDE 4.4.5 for now. I have
many virtual desktops and open files mostly from the command line. I want to
open the files in the session on the actual desktop.
This is a wish I had for a long time (pre KDE4) and IIRC, at some point (maybe
4.3 or 4.2?) the behavior seemed to have been what I wanted and I though it was
fixed. I though people had worked on this and so I forgot about it. But now, if
I open a file from a terminal, it will always open it in the first session
reported by dbus. For example:
$ kate file.txt
org.kde.kate-17443running instance:Session 1
org.kde.kate-14557running instance:Session 2
will always open the file in "Session 1".
Now I have hacked something in bash to open a file in kate window of the active
desktop. Basically I find the PID of kate that runs on the current desktop and
launch kate using "--pid":
#!/bin/bash
current_desktop=`wmctrl -d | grep "*" | awk '{print $1}'`
echo "current_desktop = ${current_desktop}"
pid=`wmctrl -l -p | grep Kate | sed "s|.* ${current_desktop} \([0-9]*\)
.*|\1|g" | grep -v 0x`
echo "Kate on current desktop has PID ${pid}"
if [[ "x${pid}" == "x" ]]; then
kate ${@}
else
kate --pid ${pid} ${@}
fi
I now have a bash alias pointing to that script.
Couldn't something similar be included directly in kate? I tried to do the same
thing using qdbus but couldn't not find how (don't know much about dbus/qdbus).
But if it's possible to get that information from dbus, couldn't kate use that
information?
Bug #128193 should be merged here I think.
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic