Keybindings for virtual desktops

Problems with decorations or key/mouse bindings? Or perhaps you have a cool mouse/key binding you want to share.
ewlabonte
Kitten
Kitten
Posts: 1
Joined: Thu Mar 13, 2014 2:46 pm

Keybindings for virtual desktops

Postby ewlabonte » Thu Mar 13, 2014 2:51 pm

I'm slowly learning fvwm by having used a pre-edited fvwmrc and changing things in it and seeing the results. But I haven't been able to find anything on how to assign keybindings for changing desktops. Right now I can only change desktops by clicking on the fvwm pager, or moving the pointer to the appropriate edge of the desktop. How is this done. I found the part of fvwmrc that deals with keybindings, but apparently none of the keybindings in this setup are for changing to another virtual desktop. Can someone help me?

fvwmuser
Kitten
Kitten
Posts: 3
Joined: Mon Mar 17, 2014 8:28 pm

Re: Keybindings for virtual desktops

Postby fvwmuser » Mon Mar 17, 2014 8:41 pm

See the "GotoDesk" command in the fvwm manual page, this will move the viewport to a desktop.

See the "Scroll" command to move to pages within a desktop.


Wayne

User avatar
TF
Moderator
Moderator
Posts: 246
Joined: Sat Sep 10, 2005 12:30 am
Location: Germany
Contact:

Re: Keybindings for virtual desktops

Postby TF » Wed Mar 19, 2014 4:50 pm

Here some examples from my config:

Code: Select all

#-----------------------------------------------------------------------
# press SHIFT-ALT arrow anywhere, move active
# window to next/previous page
#-----------------------------------------------------------------------
Key Left     A        SM        FuncMoveWindowToPage -1p +0p
Key Right    A        SM        FuncMoveWindowToPage +1p +0p
Key Up       A        SM        FuncMoveWindowToPage +0p -1p
Key Down     A        SM        FuncMoveWindowToPage +0p +1p

#-----------------------------------------------------------------------
# key 1-4 move current window to page n
#-----------------------------------------------------------------------
Key 1        A        SM        Current FuncMoveWindowToPage 0 0
Key 2        A        SM        Current FuncMoveWindowToPage 1 0
Key 3        A        SM        Current FuncMoveWindowToPage 0 1
Key 4        A        SM        Current FuncMoveWindowToPage 1 1

#-----------------------------------------------------------------------
# Go to page n with SHIFT-CTRL + number
#-----------------------------------------------------------------------
Key 1        A        SC        FuncGotoPage 0 0
Key 2        A        SC        FuncGotoPage 1 0
Key 3        A        SC        FuncGotoPage 0 1
Key 4        A        SC        FuncGotoPage 1 1

#-----------------------------------------------------------------------
# press SHIFT-CTRL arrow anywhere, and scroll by one page
#-----------------------------------------------------------------------
Key Left     A        SC        FuncGotoPage -1p +0p
Key Right    A        SC        FuncGotoPage +1p +0p
Key Up       A        SC        FuncGotoPage +0p -1p
Key Down     A        SC        FuncGotoPage +0p +1p

And here the functions:

Code: Select all

#-----------------------------------------------------------------------
# Move active window to next/previous page
#-----------------------------------------------------------------------
DestroyFunc FuncMoveWindowToPage
AddToFunc   FuncMoveWindowToPage
+ I MoveToPage $0 $1
+ I GotoPage $0 $1

#-----------------------------------------------------------------------
# GotoPage and set focus to window which is in the foreground
#-----------------------------------------------------------------------
DestroyFunc FuncGotoPage
AddToFunc   FuncGotoPage
+ I GotoPage $0 $1
+ I Next (CurrentPage, !Iconic, !Sticky, !Shaded, !Focused, !Overlapped) FuncSelectWindow

#-----------------------------------------------------------------------
# This function selects a window, give it the focus and raise it
#-----------------------------------------------------------------------
DestroyFunc FuncSelectWindow
AddToFunc   FuncSelectWindow
+ I Iconify off
+ I Focus
+ I Raise


Hope this helps 8)

- Thomas -
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -- Albert Einstein
Fvwm version: 2.6.5
Fvwm config: Fvwm-Nightshade


Return to “Decorations and bindings”

Who is online

Users browsing this forum: No registered users and 1 guest