Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-02-08 18:49:01

caibbor
Member
Registered: 2012-02-08
Posts: 14

Keyboard Shortcuts including Mouse Buttons

I'd like to be able to CTRL+Super+Mouse1 on a window to maximize the window under the mouse cursor, CTRL+SUPER+Mouse3 to minimize, etc.

This can be done in Fluxbox with a one-liner in the keys config

OnWindow Control Mod4 Mouse1 :Maximize
OnWindow Control Mod4 Mouse3 :Minimize
OnWindow Control Mod4 Mouse2 :Close

How can this be achieved in XFCE4?

Last edited by caibbor (2012-02-08 19:02:13)

Offline

#2 2012-02-11 15:21:22

caibbor
Member
Registered: 2012-02-08
Posts: 14

Re: Keyboard Shortcuts including Mouse Buttons

So, no feature for this, eh?

Offline

#3 2012-02-12 10:57:16

angstrom
Member
Registered: 2011-08-13
Posts: 267

Re: Keyboard Shortcuts including Mouse Buttons

Maybe to be added to the wish list ? http://wiki.xfce.org/wish_list#window_manager


Xfce is NOT Xubuntu. Bugs in Xubuntu don't mean that Xfce is buggy ...

Offline

#4 2012-02-21 21:21:23

caibbor
Member
Registered: 2012-02-08
Posts: 14

Re: Keyboard Shortcuts including Mouse Buttons

I found a way to do it regardless of window manager (well, almost).

requires: xdotool, wmctrl, xbindkeys

add to .xbindkeysrc:

#maximize toggle
"wmctrl -i -r `xdotool getmouselocation 2>/dev/null | sed 's/.*window:\(.*\)/\1/g'` -b toggle,maximized_vert,maximized_horz"
        control + mod4 + b:1

start xbindkeys / add it to startup.

Ctrl+Win+Click on a window, this maximizes the window.


edit:

here's an xbindkeysrc thing that maximizes *and* focuses the window

"id=`xdotool getmouselocation 2>/dev/null | sed 's/.*window:\(.*\)/\1/g'` ; wmctrl -i -r $id -b toggle,maximized_vert,maximized_horz ; wmctrl -i -a $id"
        control + mod4 + b:1

edit:

for pesky windows the freeze up and won't respond to Alt+F4, CTRL+WIN+middle click to annihilate it

# kill window
"id=`xdotool getmouselocation 2>/dev/null | sed 's/.*window:\(.*\)/\1/g'` ; pid=`xdotool getwindowpid $id` ; kill -9 $pid"
        control + mod4 + x + b:2

Last edited by caibbor (2012-02-21 21:49:35)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 524.08 KiB (Peak: 532.34 KiB) ]