Score:0

adding custom options to Super+Middle Mouse context menu

na flag

I'm using Ubuntu 22.10. When I do Super + click the middle mouse button I get a context menu that lists a bunch of useful stuff.

enter image description here

Let's say I want to add some stuff there. How would I do that, like a custom script or command? Maybe add a submenu with a list of snippets. I think it would be extremely useful, but I have no idea how to go about this and where this would be defined. Do you have any clever ideas?

pierrely avatar
cn flag
xdotool should let you run a script on mouse events. then look for a tool to do a popup to select scripts from that. https://duckduckgo.com/?t=ffab&q=linux+popup+menu+run+scripts&ia=web alternative us custom keyboard to trigger same. I am not sure if xdotool would overwrite the default mouse function in Ubuntu or programs.
vanadium avatar
cn flag
@pierrely xdotool won´t work on Wayland. You cannot add to this menu without editing source code. For snippets, there is a dedicated tool "espanso", or you can do some scripting. These are triggered through the keyboard, though (which certainly makes sense for snippets).
pierrely avatar
cn flag
echo $XDG_SESSION_TYPE gets me wayland (lower case w) . xdotools getactivewindow returns a result.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.