Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-02-05 11:36:26

almahdi
Member
Registered: 2020-07-04
Posts: 125

Can context-menu on a panel bar icon have user defined menu?

it comes from seeing some app icon on panel bar have some extra menu on top of it after (disabled) 'Launcher', so wondering:
Can context-menu on a panel bar icon have be customized having some user defined menu

need arose as need menu:

Launch and put it in another workspace

Please help accomplish by clearly showing the step by step solution !

Offline

#2 2023-02-05 16:53:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Can context-menu on a panel bar icon have user defined menu?

almahdi wrote:

Can context-menu on a panel bar icon have be customized having some user defined menu

No, it is hard coded

need arose as need menu:

Launch and put it in another workspace

Assuming you want to launch mousepad and move it to the second workspace, change the launcher command to run:

sh -c "mousepad & sleep 1 && wmctrl -r Mousepad -t 1"

Some notes:
- if app takes long time to start up and display, increase the sleep value
- make sure the app name is recognized by wmctrl (run "wmctrl" with the app running to see how its identified)
- the workspaces are numbered starting at 0 - so therefore "-t 1" refers to the second workspace.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-02-05 18:44:12

almahdi
Member
Registered: 2020-07-04
Posts: 125

Re: Can context-menu on a panel bar icon have user defined menu?

not work,
though work just enter a workspace  -s

Offline

#4 2023-02-05 19:13:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Can context-menu on a panel bar icon have user defined menu?

almahdi wrote:

not work,
though work just enter a workspace  -s

I'm sorry I don't understand.

Did you try with Mousepad?
Did you increase the sleep amount?
Can you copy/paste the launcher's command string back here?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-02-06 01:33:23

almahdi
Member
Registered: 2020-07-04
Posts: 125

Re: Can context-menu on a panel bar icon have user defined menu?

why at first start Xfce desktop immediately get into workspace 2 ???

THE POINT MAKES EXTREMELY PAINFUL CONFUSION

Offline

#6 2023-02-06 11:38:14

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,006

Re: Can context-menu on a panel bar icon have user defined menu?

@almahdi, you are all over the place and you don't answer questions that are asked of you. This makes it difficult to offer assistance.

If Xfce is jumping to another workspace, it is probably because you have something in your saved sessions or application autostart that is auto-starting, and also Settings Manager  > Window Manager Tweaks > Focus > Switch to Window's Workspace enabled.

We need to focus on one thing at a time.  Can you answer my questions from post #2 and repeated in post #4?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2023-06-14 00:09:01

almahdi
Member
Registered: 2020-07-04
Posts: 125

Re: Can context-menu on a panel bar icon have user defined menu?

SOLVED

1. find the title name/string
$  {executable/app filename} & { sleep 3; wmctrl -l ;}

2. CLI to move
$ {executable/app filename}  & { sleep 3; wmctrl -r {that title name/string} -t 1 ;}

"that title name" could be the executable file name or the window title which it has put

Last edited by almahdi (2023-06-14 00:11:40)

Offline

Board footer

Powered by FluxBB