117
118
qdbus org.kde.yakuake /yakuake/tabs setTabTitle "$id" "$1"
120
function yakuake_isvisible_by_dbus() {
121
qdbus org.kde.yakuake /yakuake/MainWindow_1 Introspect |
122
grep -F '<interface name="com.trolltech.Qt.QWidget">'
123
if [[ "$?" == 0 ]]; then
124
local interface="com.trolltech.Qt.QWidget"
126
local interface="org.qtproject.Qt.QWidget"
128
echo $(qdbus org.kde.yakuake /yakuake/MainWindow_1 Get "$interface" visible)
131
function yakuake_isvisible_by_xprop() {
133
local ids=$(xprop -root 32x ':$0+' _NET_CLIENT_LIST_STACKING |
134
cut -d ':' -f2 | tr ',' ' ')
136
local wm_class=$(xprop -id $id 8s ':$0+' WM_CLASS | cut -d ':' -f2)
137
if [[ "${wm_class,,}" == '"yakuake", "yakuake"' ]]; then
145
function yakuake_isvisible() {
146
qdbus org.kde.yakuake | grep -F '/yakuake/MainWindow_1' > /dev/null
147
if [[ "$?" == 0 ]]; then
148
yakuake_isvisible_by_dbus
150
yakuake_isvisible_by_xprop
154
function yakuake_showwindow() {
155
local ws=$(yakuake_isvisible)
156
if [[ "$ws" != true ]]; then
157
qdbus org.kde.yakuake /yakuake/window toggleWindowState > /dev/null
159
local ids=$(xprop -root 32x ':$0+' _NET_CLIENT_LIST_STACKING | cut -d ':' -f2 | tr ',' ' ')
161
local wm_class=$(xprop -id $id 8s ':$0+' WM_CLASS | cut -d ':' -f2)
121
# Check if we can handle the Yakuake main window using DBUS
122
qdbus org.kde.yakuake | grep -F '/yakuake/MainWindow_1' > /dev/null
123
if [[ "$?" == 0 ]]; then
125
function yakuake_showwindow() {
126
qdbus org.kde.yakuake /yakuake/MainWindow_1 Introspect |
127
grep -F '<interface name="com.trolltech.Qt.QWidget">' > /dev/null
128
if [[ "$?" == 0 ]]; then
129
local interface="com.trolltech.Qt.QWidget"
131
local interface="org.qtproject.Qt.QWidget"
133
local ws=$(qdbus org.kde.yakuake /yakuake/MainWindow_1 Get "$interface" visible)
134
if [[ "$ws" == true ]]; then
135
qdbus org.kde.yakuake /yakuake/MainWindow_1 setFocus > /dev/null
137
qdbus org.kde.yakuake /yakuake/window toggleWindowState > /dev/null
143
function yakuake_get_window_id() {
145
local wids=$(xprop -root 32x ':$0+' _NET_CLIENT_LIST_STACKING |
146
cut -d ':' -f2 | tr ',' ' ')
148
local wm_class=$(xprop -id $wid 8s ':$0+' WM_CLASS | cut -d ':' -f2)
162
149
if [[ "${wm_class,,}" == '"yakuake", "yakuake"' ]]; then
156
function yakuake_showwindow() {
157
local wid=$(yakuake_get_window_id)
158
if [[ -z "$wid" ]]; then
159
qdbus org.kde.yakuake /yakuake/window toggleWindowState > /dev/null
169
166
elif [[ "$comm" == dcop ]]; then
170
168
function yakuake_addsession() {
171
169
dcop yakuake DCOPInterface slotAddSession > /dev/null