Re: [kde] Mouse wheel workspace switching behavior
Mirko K. wrote, On 09/19/2012 01:42 PM: > On 19.09.2012 19:27, Duncan wrote: >> Mirko K. posted on Wed, 19 Sep 2012 18:39:21 +0200 as excerpted: >> >>> I'm using KDE 4.8.4 on Ubuntu 12.04 with a 3x2 virtual desktop. The >>> mouse wheel is bound to switch to the next/previous Desktop, and it goes >>> through all desktops. >>> >>> I'd like a different behavior: Wheel without modifier should switch one >>> desktop to the left/right, and wheel plus some modifier (Alt or Super) >>> should switch one desktop up/down. >>> >>> Any idea how to do that? >> >> You don't mention whether you already know about the mouse actions >> settings, which let you assign various mouse events (modified or not) to > > Thanks for your reply, and sorry for not mentioning where all I had looked, > which is pretty much everywhere. System Settings up and down, Hotkeys and > Gestures, Mouse, Desktop behaviour, etc. The settings of the Folderview and > other Activities. Grepped the KDE config files in $HOME and /usr/share, etc. > But nothing. :-) > > The mouse actions don't work, as the only related option is the standard > "Switch Desktop" (Arbeitsfläche wechseln, in my German system). > > The cube doesn't help either, as there also no option to make the mouse wheel > to only switch horizontal. > > I think there's really no way yet, which actually isn't that much of a > problem. I've just recently started to use the 3x2 layout after years with a > 4x1 layout. Perhaps I try to get used to the Activities which could give me a > somewhat similar workflow as I intend here. > > Anyway, if anybody knows a solution, I'm all ears. I use Keybindings to switch to Desktop N (CTRL-F{n} -> Desktop N). With a fixed pager layout, not a problem. KWin has a dbus interface that supports several desktop/pager switching options: $ qdbus org.kde.kwin /KWin | grep -i 'org.kde.kwin.*desktop' method Q_NOREPLY void org.kde.KWin.cascadeDesktop() method void org.kde.KWin.circulateDesktopApplications() method int org.kde.KWin.currentDesktop() method void org.kde.KWin.nextDesktop() method void org.kde.KWin.previousDesktop() method bool org.kde.KWin.setCurrentDesktop(int desktop) method Q_NOREPLY void org.kde.KWin.unclutterDesktop() What desktop am i currently on? $ qdbus org.kde.kwin /KWin currentDesktop 1 Switch to Desktop 4 $ qdbus org.kde.kwin /KWin setCurrentDesktop 4 true Unfortunately, there's no method "RowsByColumns()" or such, so no way to get how many rows/columns you have to figure out what desktop would be adjacent on a horizontal or vertical move (without reading the kwinrc config) So, the trick here would be to find a tool that would allow input actions to bind to a script that would issue those functions, along with figuring out what desktop was adjacent based on the input and currentDesktop(). kcmshell4 khotkeys lets you map key inputs to various actions, including DBus, or exec a command. Unfortunately, for me, at least, i can't get it to recognize a scroll event as an acceptable input, either modified or not. (so you're back to keys, if you can't get mouse actions), and that's already handled in: kcmshell4 keys [ select [Kwin] component] which DOES have key actions defined for relative Switch One Desktop to the (up,down,left,right) desktop switch motions. (so, this would really be the place to assign a {un,}modified mouse action. 'xev' shows my mouse generating: MotionNotify event, serial 34, synthetic NO, window 0x361, root 0x290, subw 0x0, time 1909453451, (145,33), root:(149,1051), state 0x0, is_hint 0, same_screen YES LeaveNotify event, serial 34, synthetic NO, window 0x361, root 0x290, subw 0x0, time 1909453451, (145,33), root:(149,1051), mode NotifyGrab, detail NotifyAncestor, same_screen YES, focus NO, state 2048 EnterNotify event, serial 34, synthetic NO, window 0x361, root 0x290, subw 0x0, time 1909453451, (145,33), root:(149,1051), mode NotifyUngrab, detail NotifyAncestor, same_screen YES, focus NO, state 2048 KeymapNotify event, serial 34, synthetic NO, window 0x0, keys: 4294967184 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ButtonPress event, serial 34, synthetic NO, window 0x361, root 0x290, subw 0x0, time 1909453451, (145,33), root:(149,1051), state 0x0, button 4, same_screen YES ButtonRelease event, serial 34, synthetic NO, window 0x361, root 0x290, subw 0x0, time 1909453451, (145,33), root:(149,1051), state 0x800, button 4, same_screen YES for a single-click scroll-up action. Not sure if it's (easily) possible to get that sequence of events to map to a key input sequence where you might be able to do something like: kwriteconfig \ --file kglobalshortcutsrc \ --group kwin \ --key "Switch One Desktop to the Right" "
Re: [kde] Mouse wheel workspace switching behavior
On 19.09.2012 19:27, Duncan wrote: Mirko K. posted on Wed, 19 Sep 2012 18:39:21 +0200 as excerpted: I'm using KDE 4.8.4 on Ubuntu 12.04 with a 3x2 virtual desktop. The mouse wheel is bound to switch to the next/previous Desktop, and it goes through all desktops. I'd like a different behavior: Wheel without modifier should switch one desktop to the left/right, and wheel plus some modifier (Alt or Super) should switch one desktop up/down. Any idea how to do that? You don't mention whether you already know about the mouse actions settings, which let you assign various mouse events (modified or not) to Thanks for your reply, and sorry for not mentioning where all I had looked, which is pretty much everywhere. System Settings up and down, Hotkeys and Gestures, Mouse, Desktop behaviour, etc. The settings of the Folderview and other Activities. Grepped the KDE config files in $HOME and /usr/share, etc. But nothing. :-) The mouse actions don't work, as the only related option is the standard "Switch Desktop" (Arbeitsfläche wechseln, in my German system). The cube doesn't help either, as there also no option to make the mouse wheel to only switch horizontal. I think there's really no way yet, which actually isn't that much of a problem. I've just recently started to use the 3x2 layout after years with a 4x1 layout. Perhaps I try to get used to the Activities which could give me a somewhat similar workflow as I intend here. Anyway, if anybody knows a solution, I'm all ears. Thanks! various actions. Click on the desktop cashew/toolbox, and select desktop (or folderview or whatever type of activity you have configured) settings. Often, you can also get to it with a context/right-click on the desktop and select desktop/whatever settings from there, too, but that action can be configured for something else, so clicking the cashew is the "canonical" method. Once in that dialog, select mouse actions, and you can map a whole list of different actions to different mouse-event triggers. While you can't /quite/ get the left/right up/down as described (without doing your own code patches), you CAN change the way it works to SOME extent. Note that I'm on kde 4.9.1 now and ran the 4.9 pre-releases as well, so it's been awhile since I ran 4.8 and don't remember whether this particular feature was available there, or not. So I'm not sure you'll have this yet, but it /is/ in 4.9 if you don't. kde settings (system settings, except they're more kde than system, since most only for kde, and only for that user, the kde3 name kcontrol was thus much more accurate, AND less generic so easier to google!), Workspace appearance and behavior, workspace behavior, virtual desktops. There should be two tabs, desktops, and switching. On the switching tab, if the animation is set to desktop cube animation, the configuration button (with the wrench/spanner) should be enabled (it's disabled for most of the other animations). If you click it, a dialog with several checkboxes should appear, including "use pager layout for animation". If this is checked, then it should honor your pager layout. Back on the main switching tab, there's a checkbox to enable navigation wrap-around between the first and last desktop, or not. Pager layout, meanwhile, is found on the desktops tab. Here, I've configured four desktops and four rows, so a single column, and indeed, I get vertical flips for all changes (no horizontal turns). I experimented with reversing it, 1 row so four columns, as well, and that as expected gives me all horizontal turns, no flips. But as I said, I don't believe it's possible to configure modified-scroll for one of vertical/horizontal and unmodified scroll for the other... without doing your own patch. At least not yet. Maybe in 4.10 or so (tho development focus will probably switch to kde-frameworks aka kde5 at some point pretty soon). ___ This message is from the kde mailing list. Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.
Re: [kde] Mouse wheel workspace switching behavior
Mirko K. posted on Wed, 19 Sep 2012 18:39:21 +0200 as excerpted: > I'm using KDE 4.8.4 on Ubuntu 12.04 with a 3x2 virtual desktop. The > mouse wheel is bound to switch to the next/previous Desktop, and it goes > through all desktops. > > I'd like a different behavior: Wheel without modifier should switch one > desktop to the left/right, and wheel plus some modifier (Alt or Super) > should switch one desktop up/down. > > Any idea how to do that? You don't mention whether you already know about the mouse actions settings, which let you assign various mouse events (modified or not) to various actions. Click on the desktop cashew/toolbox, and select desktop (or folderview or whatever type of activity you have configured) settings. Often, you can also get to it with a context/right-click on the desktop and select desktop/whatever settings from there, too, but that action can be configured for something else, so clicking the cashew is the "canonical" method. Once in that dialog, select mouse actions, and you can map a whole list of different actions to different mouse-event triggers. While you can't /quite/ get the left/right up/down as described (without doing your own code patches), you CAN change the way it works to SOME extent. Note that I'm on kde 4.9.1 now and ran the 4.9 pre-releases as well, so it's been awhile since I ran 4.8 and don't remember whether this particular feature was available there, or not. So I'm not sure you'll have this yet, but it /is/ in 4.9 if you don't. kde settings (system settings, except they're more kde than system, since most only for kde, and only for that user, the kde3 name kcontrol was thus much more accurate, AND less generic so easier to google!), Workspace appearance and behavior, workspace behavior, virtual desktops. There should be two tabs, desktops, and switching. On the switching tab, if the animation is set to desktop cube animation, the configuration button (with the wrench/spanner) should be enabled (it's disabled for most of the other animations). If you click it, a dialog with several checkboxes should appear, including "use pager layout for animation". If this is checked, then it should honor your pager layout. Back on the main switching tab, there's a checkbox to enable navigation wrap-around between the first and last desktop, or not. Pager layout, meanwhile, is found on the desktops tab. Here, I've configured four desktops and four rows, so a single column, and indeed, I get vertical flips for all changes (no horizontal turns). I experimented with reversing it, 1 row so four columns, as well, and that as expected gives me all horizontal turns, no flips. But as I said, I don't believe it's possible to configure modified-scroll for one of vertical/horizontal and unmodified scroll for the other... without doing your own patch. At least not yet. Maybe in 4.10 or so (tho development focus will probably switch to kde-frameworks aka kde5 at some point pretty soon). -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ___ This message is from the kde mailing list. Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.
[kde] Mouse wheel workspace switching behavior
Hi! I'm using KDE 4.8.4 on Ubuntu 12.04 with a 3x2 virtual desktop. The mouse wheel is bound to switch to the next/previous Desktop, and it goes through all desktops. I'd like a different behavior: Wheel without modifier should switch one desktop to the left/right, and wheel plus some modifier (Alt or Super) should switch one desktop up/down. Any idea how to do that? TFYT ___ This message is from the kde mailing list. Account management: https://mail.kde.org/mailman/listinfo/kde. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.