View previous topic :: View next topic |
Author |
Message |
yourcomrade n00b
Joined: 01 May 2006 Posts: 5 Location: Mankato, MN
|
Posted: Sun Aug 06, 2006 5:59 pm Post subject: KDE virtual desktop mapping/order |
|
|
I have 5 virtual desktops in KDE and I would like them to be positioned horizontally relative to each other. I want them to be traversible only horizontally, in this order 1-2-3-4-5. However, for reasons to me unclear, when I scroll horizontally the desktops switch from 1-3-5-4-2, in this order, and also vertical switching is enabled. I can't find where I can change this setting through KDE menus and controls or kpager or whatever. I'm guessing there is a config file somewhere to control this, but I don't know and can't find what it is. KDE user documentation iseems to be too superficial to be of any use for this (and many other things, although maybe I just don't know where to look). Please help, or point me to where I can actually find appropriate documentation for KDE to figure this out myself. Thanks. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sun Aug 06, 2006 6:17 pm Post subject: Re: KDE virtual desktop mapping/order |
|
|
yourcomrade wrote: | I have 5 virtual desktops in KDE and I would like them to be positioned horizontally relative to each other. I want them to be traversible only horizontally, in this order 1-2-3-4-5. However, for reasons to me unclear, when I scroll horizontally the desktops switch from 1-3-5-4-2, in this order, and also vertical switching is enabled. I can't find where I can change this setting through KDE menus and controls or kpager or whatever. I'm guessing there is a config file somewhere to control this, but I don't know and can't find what it is. KDE user documentation iseems to be too superficial to be of any use for this (and many other things, although maybe I just don't know where to look). Please help, or point me to where I can actually find appropriate documentation for KDE to figure this out myself. Thanks. |
This is one of the things that annoyed me about kde. The silly relation between some components. In this case, the only way to control how the desktops are aligned is to configure the layout of the kicker pager applet (yes, you need to have the applet in kicker). Then, right click it, and configure it in that menu to force 1 row only. The fact is that the desktops will be dispossed just like they are in the applet. And I know no other way to configure it. If he applet is not present, then the desktops are configured how they would be if the applet was present (so yes, the kicker size is what control the layout if you dont have the applet). Weird, very weird. But thats how it works right now. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Aug 07, 2006 4:18 pm Post subject: |
|
|
Hi again, I felt bored this morning and started playing a bit with dcop, it is kwin the one who controls de desktop layout -also weird, I always thought it was kdesktop-.
Playing a bit with dcop I found that kwin has an interface to properly set thing thing without having to install a silly desktop pager applet (usefull for those that like to go from desktop 1 to desktop 2 just "pushing" the screen right border with the mouse. This is what I did:
I started using dcop kwin, then "dcop kwin KWinInterface" showed a bunch of functions that i could use. I say one called "setDesktopLayout(int orientation,int x,int y)". It is not hard to figure what this things are, but as I had the name of the function I just googled and found this, the first:
http://lists.kde.org/?l=kwin&m=113086209326468&w=2
From there:
Code: | You can turn off the applet and set the layout yourself using DCOP: "dcop kwin \
KWinInterface setDesktopLayout <orient> <x> <y>", orientation is 0 for horizontal and \
1 for vertical, -1 for x or y means "depends on the other one". |
Nice, isn't it? So, you can just make a quick bash hack:
Code: | #!/bin/bash
# Sets the desktop layout without needing any applet
dcop kwin KWinInterface setDesktopLayout <orient> <x> <y>
|
Give it the +x permission and then put it in ~/.kde/Autostart or whatever that folder was called. Of course, substitute <orient> <x> <y> by the correct parameters for your needs
EDIT, I always wanted this in kde, and since it seems to work so nicely, I'll post my crappy script here, in case you want to give it a try.
Code: |
#!/bin/bash
#
# Adjust virtual desktop layout without needing
# an applet in your kicker
#
# Dont change those
HORIZONTAL=0
VERTICAL=1
# Change this to match your layout
COLUMNS=3
ROWS=3
`kde-config --prefix`/bin/dcop \
kwin \
KWinInterface \
setDesktopLayout \
$HORIZONTAL $COLUMNS $ROWS \
&& echo "Desktop Layout OK"
|
Just save it under ~/.kde/Autostart/, I called it "dcop-kwin_setDesktopLayout.sh", edit it to adjust ROWS and COLUMNS, you can also change $HORIZONTAL by $VERTICAL in the command, but I dont think it is necessary in any case. Make sure it has execution permission, rip off your desktop pager applet, and restart kde. It should work.
I also recommend to activate de "Show dektop name when changing desktop" option in kcontrol, it is usefull if there is no applet to look at to know in which desktop are you right now.
Cheers. |
|
Back to top |
|
|
yourcomrade n00b
Joined: 01 May 2006 Posts: 5 Location: Mankato, MN
|
Posted: Sat Aug 19, 2006 3:11 pm Post subject: |
|
|
Thank you very much for these tips. There is a little twist to my problem though. I am using two screens with a dual desktop layout. The desktop switching order works perfectly fine on Screen0, where I have seven virtual desktops and they all switch horizontally as they should. On Screen1/Desktop1 however things are out of order as I described in this post originally. Is it possible to apply the script you kindly provided to just Desktop1? Is there some sort of a config file somewhere for the pager applet, which I do use, or something? I very much appreciate your help. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Aug 19, 2006 8:03 pm Post subject: |
|
|
There are a couple of *pager* files in my ~/.kde/share/config, maybe you can start looking there. But that problem is strange. I never used multi-screen settings, so I cant help with that. But it is really strange, the script should be executed and run for every session if an X session is running on each screen.
If the behaviour is different on each screen, maybe it is time to fill a bug at kde.org
Best regards : |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|