Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-01-17 13:17:41

Rosnerv
Member
Registered: 2024-01-17
Posts: 2

Center the whisker menu like in Windows 11

Good day,

I would like some CSS code so that the Whisker menu appears in the center as in Windows 11, I would greatly appreciate it.

Sorry for the bad English, but I'm using a translator.

Thanks.

Offline

#2 2024-01-17 13:56:26

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 376

Re: Center the whisker menu like in Windows 11

I have no idea about Win 11. Do you mean the menu appears in the center of the screen?

xfce4-popup-whiskermenu -c

Siduction
Debian Sid
Xfce 4.18

Offline

#3 2024-01-17 17:52:13

mint4all
Member
From: off the map
Registered: 2018-08-21
Posts: 263

Re: Center the whisker menu like in Windows 11

Rosnerv wrote:

Good day,

I would like some CSS code so that the Whisker menu appears in the center as in Windows 11, I would greatly appreciate it.

Sorry for the bad English, but I'm using a translator.

Thanks.

Welcome to this forum! And do not worry about your English smile

eriefisher is correct: the "xdotool" app will work quote well for your request (I am not sure whisker's "-c" option is implemented at this time). Simply add/create a new keyboard shortcut (Settings > Keyboard > Application Shortcuts) with the following command

sh -c "xdotool mousemove 400 300 && xfce4-popup-whiskermenu -p"

and you'll be on the way. Note: you will have to experiment with the example x/y coordinates i used (400 300) to fit your screen dimensions (width / height) to fix whisker's top left corner on your screen.

Cheers, m4a


Linux Mint 21.2 -- xfce 4.18 ... Apple iMAC -- Dell & HP Desktops and Laptops -- Family & Community Support

Offline

#4 2024-01-17 20:55:45

Rosnerv
Member
Registered: 2024-01-17
Posts: 2

Re: Center the whisker menu like in Windows 11

Thank you so much

Unfortunately it only works if it is operated through the keyboard. What I need is for it to be centered when I press the icon on the panel. Will there be any CSS code for it?

With CSS I have removed borders, changed the size of the icons that did not accept the panel configuration, but centering the whisker is the only thing I have not been able to.

https://ibb.co/0ywdnLF

Offline

#5 2024-01-17 21:46:48

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 376

Re: Center the whisker menu like in Windows 11

CSS only effects the appearance and not the function.  By default the whisker menu opens at its icon. To change that you can create a new .desktop file with the command I mentioned earlier and replace the "stock" one in the panel.

Example:

[Desktop Entry]
Version=1.0
Name=Whisker Menu
Comment=Application Menu
GenericName=Application Menu
Exec=xfce4-popup-whiskermenu -c
Icon=/home/username/.local/share/icons/whiskermenu.png
NoDisplay=true
Terminal=false
Type=Application
#X-MultipleArgs=false
Categories=GTK;XFCE4;
StartupNotify=false

You will have to edit it to reflect your situation.


Siduction
Debian Sid
Xfce 4.18

Offline

#6 2024-01-17 21:55:05

mint4all
Member
From: off the map
Registered: 2018-08-21
Posts: 263

Re: Center the whisker menu like in Windows 11

Rosnerv wrote:

Thank you so much

Unfortunately it only works if it is operated through the keyboard. What I need is for it to be centered when I press the icon on the panel. Will there be any CSS code for it?

With CSS I have removed borders, changed the size of the icons that did not accept the panel configuration, but centering the whisker is the only thing I have not been able to.

https://ibb.co/0ywdnLF

With utmost respect for your CSS knowhow, your pop-up idea has nothing to do CSS (as far as I know), but deals with window managment, something Xfce is very good with. You can execute my proposed solution from the panel as well:
Step-1 ... Rightclick Panel > Panel > Add New Items > Launcher > +Add button
which added an empty launcher to the end of the panel
Step-2 ... Rightclick new button > Properties > + +(Add a new empty item) button > "Create Launcher" popup
which allows you to setup a new launcher using as its "Command" the sample solution (shell command) from above. For its title, tooltip and icon choose whatever you wish. Tried and tested it ok.
Step-3 ... move the new menu-popup button to where you like it.

Cheers, m4a

PS: with this technique (suggested by ToZ long ago) a lot of tasks can be setup with launcher buttons for those users that don't like to use the terminal/command line.


Linux Mint 21.2 -- xfce 4.18 ... Apple iMAC -- Dell & HP Desktops and Laptops -- Family & Community Support

Offline

Board footer

Powered by FluxBB