! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Feature request] Add option to select quicklaunch item from command line
Status:
RESOLVED: WONTFIX
Product:
Xfdashboard
Component:
General

Comments

Description damlys 2019-01-20 11:43:16 CET
First of all thank you for Your effort. Moved from: https://forum.xfce.org/viewtopic.php?pid=51375

# Overview

Add option to select quicklaunch item from command line.

This feature should allow users to configure keyboards shortcuts that runs or focus specified quicklaunch item. Current workaround is e.g. add a "Super+1" shourtcut that executes `wmctrl -xa firefox || firefox` command. That workaround requires much effort during reorganizing quicklaunch items.

# Actual Results

Xfdashboard has no option to run quicklaunch item from command line.

# Expected Results

Xfdashboard allows to select quicklaunch item with `xfdashboard --quicklaunch=NUMBER` CLI command, e.g.:

```
$ xfdashboard --quicklaunch=1 # runs or focus first application on the quicklaunch list
$ xfdashboard --quicklaunch=2 # runs or focus second application on the quicklaunch list etc.
```

Additional requirements:

* Command should works well on dashboard view as well as outside of it.
* Do nothing if item is not exists, e.g. `xfdashboard --quicklaunch=9999` does nothing.
* Throw error if argument is not a number, e.g. `xfdashboard --quicklaunch=xyz` throws error.
* For multiple application instances:
  * run new instance if "always-launch-new-instance" is true,
  * select recently focused instance if "always-launch-new-instance" is false.
Comment 1 Stephan Haller editbugs 2019-01-22 15:00:29 CET
Hi,

thanks for your suggestion to improve xfdashboard. I think I understand your requirement but I don't think that is reasonable to implement it into xfdashboard. In my opinion it is an option only used by a very limited user group so the effort to implement and to support it is too much. On the other side this enhancement could be easily done with a shell script. A simple shell script could be:

----
#!/bin/bash

IDX=$(expr $1 + 2)
DESKTOP_ID=$(xfconf-query -c xfdashboard -p /favourites | head -n "${IDX}" | tail -n 1)
gtk-launch "${DESKTOP_ID}"
----

It does not do any error handling but it could be easily installed in your home directory, e.g. $HOME/.local/bin (needs to be created if not available), and could be bind via "xfce4-keyboard-settings". For example, if you install this script at /home/<myusername>/.local/bin/launch_xfdashboard_quicklaunch.sh you could bind "Super+1" to " /home/<myusername>/.local/bin/launch_xfdashboard_quicklaunch.sh 1" to launch the first quicklaunch item.

As said this script is very simple, limited and without error-handling but it can be easily done.

I hope this helps at least a little bit.

Regards,
Stephan
Comment 2 damlys 2019-01-25 09:47:47 CET
Ok, thanks for your response. I'm going to stay with my current approach (`wmctrl -xa firefox || firefox`). I think it is simpler for now.

Bug #15067

Reported by:
damlys
Reported on: 2019-01-20
Last modified on: 2019-01-25

People

Assignee:
Stephan Haller
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information