Re: [xmonad] Resize floating scratchpad with keyboard

On Fri, Oct 7, 2011 at 02:34, informationen
On Thu, Oct 6, 2011 at 16:36, informationen
wrote: i am using scratchpad as drop-down terminal together with screen. The scratchpad window is configured to take 35% of the window height. How can i increase and decrease the scratchpad height without using the mouse?
XMonad.Actions.FloatKeys might be of interest.
This works for most applications, but does not work for most terminals. The only terminal type i can use it with is gnome-terminal. But when i use gnome-terminal as a scratchpad-terminal, it won't work anymore. I can descrease the window height, but not increase it.
Is this a know bug? Does anyone have any ideas how to fix this?
This is how i use floatkeys with namedscratchads in my config:
scratchpads = [ NS "screen" "gnome-terminal --title=screen" (title =? "screen") (customFloating $ W.RationalRect 0 0 1 0.57), ] , ("M-i", namedScratchpadAction scratchpads "screen") , ("M-o", withFocused (keysResizeWindow (0,20) (0,0))) --expand float at top , ("M-p", withFocused (keysResizeWindow (0,-20) (0,0))) --shrink float at top
Chris
You should probably send this back to the list. (I've copied it there.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

I find resizing from the window top-left as you have, or resizing from the bottom edge or lower-right all work correctly for me with xmonad-0.9.2 and darcs xmonad + gnome-terminal or rxvt-unicode. Is there any possibility your "M-o" key binding is being over-ridden by another "M-o" binding somewhere in your key bindings? Here are they key bindings I used: ("M-i", withFocused $ keysResizeWindow (0, 19) (1,1)) ("M-u", withFocused $ keysResizeWindow (0,-19) (1,1)) ("M-M1-i", withFocused $ keysResizeWindow (0,-19) (0,0)) ("M-M1-u", withFocused $ keysResizeWindow (0, 19) (0,0)) ("M-o", withFocused $ keysResizeWindow ( 9, 0) (0,0)) ("M-y", withFocused $ keysResizeWindow (-9, 0) (0,0)) ("M-M1-o", withFocused $ keysResizeWindow (-9, 0) (1,1)) ("M-M1-y", withFocused $ keysResizeWindow ( 9, 0) (1,1))
On Thu, Oct 6, 2011 at 16:36, informationen
wrote: ..... How can i increase and decrease the scratchpad height without using the mouse?
XMonad.Actions.FloatKeys might be of interest.
This works for most applications, but does not work for most terminals. The only terminal type i can use it with is gnome-terminal. But when i use gnome-terminal as a scratchpad-terminal, it won't work anymore. I can descrease the window height, but not increase it.
Is this a know bug? Does anyone have any ideas how to fix this?
This is how i use floatkeys with namedscratchads in my config:
scratchpads = [ NS "screen" "gnome-terminal --title=screen" (title =? "screen") (customFloating $ W.RationalRect 0 0 1 0.57), ] , ("M-i", namedScratchpadAction scratchpads "screen") , ("M-o", withFocused (keysResizeWindow (0,20) (0,0))) --expand float at top , ("M-p", withFocused (keysResizeWindow (0,-20) (0,0))) --shrink float at top
-- regards, wmw

Hi Wirt, thanks for confirming that it works. That made me rethink my approach. Now , ("M-+", withFocused (keysResizeWindow (0,40) (1,0))) --expand float at bottom , ("M--", withFocused (keysResizeWindow (0,-40) (1,0))) --shrink float at bottom does exactly what i want. Chris
I find resizing from the window top-left as you have, or resizing from the bottom edge or lower-right all work correctly for me with xmonad-0.9.2 and darcs xmonad + gnome-terminal or rxvt-unicode. Is there any possibility your "M-o" key binding is being over-ridden by another "M-o" binding somewhere in your key bindings?
Here are they key bindings I used:
("M-i", withFocused $ keysResizeWindow (0, 19) (1,1)) ("M-u", withFocused $ keysResizeWindow (0,-19) (1,1)) ("M-M1-i", withFocused $ keysResizeWindow (0,-19) (0,0)) ("M-M1-u", withFocused $ keysResizeWindow (0, 19) (0,0)) ("M-o", withFocused $ keysResizeWindow ( 9, 0) (0,0)) ("M-y", withFocused $ keysResizeWindow (-9, 0) (0,0)) ("M-M1-o", withFocused $ keysResizeWindow (-9, 0) (1,1)) ("M-M1-y", withFocused $ keysResizeWindow ( 9, 0) (1,1))
On Thu, Oct 6, 2011 at 16:36, informationen
wrote: ..... How can i increase and decrease the scratchpad height without using the mouse?
XMonad.Actions.FloatKeys might be of interest.
This works for most applications, but does not work for most terminals. The only terminal type i can use it with is gnome-terminal. But when i use gnome-terminal as a scratchpad-terminal, it won't work anymore. I can descrease the window height, but not increase it.
Is this a know bug? Does anyone have any ideas how to fix this?
This is how i use floatkeys with namedscratchads in my config:
scratchpads = [ NS "screen" "gnome-terminal --title=screen" (title =? "screen") (customFloating $ W.RationalRect 0 0 1 0.57), ] , ("M-i", namedScratchpadAction scratchpads "screen") , ("M-o", withFocused (keysResizeWindow (0,20) (0,0))) --expand float at top , ("M-p", withFocused (keysResizeWindow (0,-20) (0,0))) --shrink float at top
-- regards, wmw
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- If you want to make God laugh, tell him your plans.
participants (3)
-
Brandon Allbery
-
informationen
-
Wirt Wolff