I found a workaround to solve this issue
As already stated, there is indeed a command that does the job

`qdbus :1.16
/global_key_shortcuts/panel/mainmenu/show_hideorg.lxqt.global_key_shortcuts.client.activated`

where :1.16 is unique service id automatically assigned to lxqt-panel.

So I found a method that seems to find the id everytime: launching the
command `qdbus` without any argument lists all the services in a particular
order, and the id we need seems to always be two lines before
"org.kde.StatusNotifierWatcher"

So, to extract the id every time

`qdbus "$(qdbus | grep -B 2 org.kde.StatusNotifierWatcher | grep ":1." |
cut -c 1-6)" /global_key_shortcuts/panel/mainmenu/show_hide
org.lxqt.global_key_shortcuts.client.activated`

If we don't want to repeat the process, we could create a blank file called
~/.userviceid and set up our system to launch this script

`
#!/bin/sh
qid=""
while [ -z "$userviceid" ]
do
qid=$(qdbus | grep -B 2 org.kde.StatusNotifierWatcher | grep ":1." | cut -c
1-6)
sleep 5
done
echo "$userviceid" > .userviceid
`

(had to use a while loop because running the command just once seemed to
often return a null string)

so

`qdbus $(cat .userviceid) /global_key_shortcuts/panel/mainmenu/show_hide
org.lxqt.global_key_shortcuts.client.activated`

Will be our command
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to