Workspace-Strap Effect

Various KDE 1.-4. Improvements

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

5
8.0
Available as/for: -
Description:

This is a KWin Effect that lets you organize your windows on a linear strap, that is bigger than your screen. Using configurable modifier keys, you can easliy move the part of the strap you see.
This gives you more space on your Desktop and more freedom in organizing your windows.

Requires KDE 4.7.

Attention: After updating your KDE-Version to a new Feature-Release (4.x) you have to rebuild this effect, as KWin doesn't load effects that were built against an older KDE-version than installed.

Features:
-A preview of the whole strap when pressing the modifier keys
-Automatically moves your view to a just activated window
-Choose between a horizontal strap (better for big screens) or a vertical strap (better for small screens)
-Shortcut (ALT+Meta+Space) to move the view to the center of the strap
Last changelog:

6 years ago

0.1: Initial release
0.1.1: Added a README-file
0.1.2: Have a separate position for each virtual desktop and activity
0.2: Optionally make the strap vertical
1.0: -Make the strap automove when less than 33%(configurable) of the window is shown
-Shortcut to move the view to the center of the strap
-Remove the annoying flickering
-Fix a bug with tabbed windows (Requires 4.8)
-Improve the handling of maximized windows
-Fix the compiling bug of not finding kactivityconsumer.h
1.0.1: Fix 3 compiling errors, concerning kactivities
1.0.2: Fix a bug that caused the effect to move only one window on 4.7
1.0.3: Make the effect work again with KDE >= 4.11 (tested with 4.13)
1.0.4: Fix two small bugs from previous version
1.0.5: Fix automove

Rasi

9 years ago

Maybe an option that allows moving along the whole desktop like you do e.g. on google maps. great for touch devices.

Report

D--

9 years ago

i get this:

/home/Shared/Apps/Sources/workspacestrap/workspacestrap.cpp: In constructor ‘KWin::WorkspaceStrapEffect::WorkspaceStrapEffect()’:
/home/Shared/Apps/Sources/workspacestrap/workspacestrap.cpp:59:5: error: ‘Activities’ has not been declared
/home/Shared/Apps/Sources/workspacestrap/workspacestrap.cpp:59:27: error: ‘ac’ was not declared in this scope
/home/Shared/Apps/Sources/workspacestrap/workspacestrap.cpp:59:36: error: expected type-specifier before ‘Activities’
/home/Shared/Apps/Sources/workspacestrap/workspacestrap.cpp:59:36: error: expected ‘;’ before ‘Activities’
make[2]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o] Error 1
make[1]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/all] Error 2
make: *** [all] Error 2

kde 4.8 RC1

Report

C

KAnton

9 years ago

I'm going to update the effect as soon as I have a fix for the above problem, until then you can edit the file workspacestrap.cpp and replace line 59 by this:
KActivities::Consumer *ac = new KActivities::Consumer(this);
Then it should work.

Report

D--

9 years ago

it builds now

Report

Hmpf

9 years ago

Same here with the same kde version, Kubuntu 11.10 with the beta-ppa for KDE. It seems they did some changes concerning /usr/include/kactivities/consumer.h as it is now found in the package libkactivities-dev, see https://code.launchpad.net/~yofel/kubuntu-packaging/kdelibs-active-4.7/+merge/71555

Report

9

kalmar

9 years ago

I get this while linking:

Linking CXX shared module lib/kwin4_effect_workspacestrap.so
CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o: In function `WorkspaceStrapEffect':
/home/marek/sources/kde-stuff/workspacestrap/workspacestrap.cpp:65: undefined reference to `KActivityConsumer::KActivityConsumer(QObject*)'
/home/marek/sources/kde-stuff/workspacestrap/workspacestrap.cpp:81: undefined reference to `KActivityConsumer::currentActivity() const'
collect2: ld returned 1 exit status
make[2]: *** [lib/kwin4_effect_workspacestrap.so] Error 1
make[1]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/all] Error 2
make: *** [all] Error 2

Gentoo, KDE-4.7.4

Report

C

KAnton

9 years ago

please post the ouput of `find /usr/include -name "*consumer.h"` and look in the file it should have found for something like "class KDE_EXPORT Consumer: public QObject {" and post that line, too.

Report

9

kalmar

9 years ago

I have both files:
/usr/include/kactivityconsumer.h
/usr/include/kworkspace/kactivityconsumer.h

They both are (as You surely know) a definition of a class and are slightly different (? diff returns more than comments). However the line You requested is the same and reads:

class KDE_EXPORT KActivityConsumer: public QObject {
Q_OBJECT

Q_PROPERTY(QString currentActivity READ currentActivity)
Q_PROPERTY(QStringList activities READ listActivities)

+ definitions of public and private parts ;-)

Report

C

KAnton

9 years ago

Thanks it helped me a lot to find the mistake.
It was a typo, I didn't recognize. Should now be fixed with the latest download.

Report

C

KAnton

9 years ago

please post the ouput of `find /usr/include -name "*consumer.h"` and look in the file it should have found for something like "class KDE_EXPORT Consumer: public QObject {" and post that line, too.

Report

FraSMOG

9 years ago

same here...
have someone solved this?

thank you and nice idea!

Report

yagami

9 years ago

Hi...

Thanks for the great plugin ... really nice.

2 things only :

make a easy way of switching , maybe by clicking on the desktop with the middle button and dragging the desktop ( kinda like android swiping )

mouse button scrolling : kinda like scrolling on normal windows with the mouse wheel. for example , if on vertical mode and i would scroll the wheel down while cursor is on desktop , the strap would move 5% or 25 % ( configurable ).

another good way would be for example , while the plugin is showing the strip , flipping mouse to the left would move the strip to the left :)

you should contact the kwin dev's about this plugin. its really nice. I much prefer this idea than the "static virtual / abstract " virtual desktops we have now :)

congrats

Report

C

KAnton

9 years ago

First of all: thanks :)
Quote:make a easy way of switching , maybe by clicking on the desktop with the middle button and dragging the desktop ( kinda like android swiping )
I didn't quite get what you mean, with that...
Quote:mouse button scrolling : kinda like scrolling on normal windows with the mouse wheel. for example , if on vertical mode and i would scroll the wheel down while cursor is on desktop , the strap would move 5% or 25 % ( configurable ).
I've never thought about things like that. Thanks for the input, I'll have a look whether it is possible.
Quote:another good way would be for example , while the plugin is showing the strip , flipping mouse to the left would move the strip to the left :)
Not quite sure whether this is possible, but I'll have a look at it, too.
Quote:you should contact the kwin dev's about this plugin. its really nice. I much prefer this idea than the "static virtual / abstract " virtual desktops we have now :)
I will blog about it, as soon as I finish version 1.0 (including all the wishes from the commentators) and have my blog on planetkde.org (I hope to get it rather soon, so stay tuned ;)

Report

9

tetris4

9 years ago

Many thanks for developing this one! Really loving it so far!

Came here to request 2 things:
1> +1 at having a per-activity focus (moving on one activity doesnt move the strap on another activity)
2> Can we have autofocus? So when I click on an app on the left, the strap moves to that section? If this can be done without a meta key, it would be even better imo.

Again congrats for a very useful effect.

Report

C

KAnton

9 years ago

Nice to hear that you like it :)
1) It should be already implemented... So, when you move the strap to the left on one activity switch to another one move it to the right and switch back, the strap is on the right for you?
If yes it's a big bug.
2) This is also already implemented, but just when the window is completely outside the view (and you use the taskbar/alt-tab to switch), but I'm planning to automove also when less than ~25% of the window is shown. Hopefully at the weekend I have time for it...

Report

9

tetris4

9 years ago

Thnx for the fast response!
1> Sorry, very stupid of me, I was using the same first key of the combination both to activate this effect and switch activity.
2> You are right, it works as you described it. I tend to have windows overlapping though, so it would be nice if clicking on the background window, autofocuses the strap to that application (if that is possible).

No rush, just thought to share some ideas that imho would make this effect even more powerful.

Report

9

reves121

9 years ago

I cannot write another comment in the original "error when compiling" but thank you very much, @suebi, that just made the trick.

Report

9

naaamo2004

9 years ago

Now it works for me, too :)
Great idea, thx for sharing!

Report

9

reves121

9 years ago

Hi KAnton, I tried to compile your plasmoid, but I get this error:

/home/migue/Proyectos/workspacestrap/workspacestrap.cpp:26:31: error fatal: kactivityconsumer.h: No existe el archivo o el directorio
compilación terminada.
make[2]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o] Error 1
make[1]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/all] Error 2
make: *** [all] Error 2

Can you help me? Please.

Report

9

naaamo2004

9 years ago

+1

Report

C

KAnton

9 years ago

What version of KDE are you using?
The file kactivityconsumer.h just exists like this in KDELibs 4.7. In master it was renamed to kactivities/consumer.h
PS: @reves121: If you get compile errors you should recompile using 'LANG=en make' and post the output of that one.

Report

9

reves121

9 years ago

I'm using KDE 4.7.2 (Kubuntu 11.10).

I'm going to try to compile using the options you gave, I'll post comment later.

Report

C

KAnton

9 years ago

Can you please search for kactivityconsumer.h in /usr/include? (if it's there please give me the exact path)

You don't have to recompile this one, just for the next time (LANG=en means that the output is in english. I understood the output, but for general it's better to have english output) ;)

Report

9

naaamo2004

9 years ago

/usr/include/kworkspace/kactivityconsumer.h

Report

kevincolyer

9 years ago

I think there is a typo in Cmakelists.txt, line 22. I think is should read if (EXISTS "/usr/include/kworkspace/kactivityconsumer.h") (there was a .hg at the end - with less of the heavy metal cmake worked!)

PS Wonderful creative thinking by the way!

Report

6 years ago

0.1: Initial release
0.1.1: Added a README-file
0.1.2: Have a separate position for each virtual desktop and activity
0.2: Optionally make the strap vertical
1.0: -Make the strap automove when less than 33%(configurable) of the window is shown
-Shortcut to move the view to the center of the strap
-Remove the annoying flickering
-Fix a bug with tabbed windows (Requires 4.8)
-Improve the handling of maximized windows
-Fix the compiling bug of not finding kactivityconsumer.h
1.0.1: Fix 3 compiling errors, concerning kactivities
1.0.2: Fix a bug that caused the effect to move only one window on 4.7
1.0.3: Make the effect work again with KDE >= 4.11 (tested with 4.13)
1.0.4: Fix two small bugs from previous version
1.0.5: Fix automove

12345678910
119
product-maker mirkogennari Jan 11 2017 9 excellent
product-maker bugzy Sep 21 2014 9 excellent
product-maker apfelmaus Feb 21 2012 9 excellent
product-maker kalmar Jan 07 2012 9 excellent
product-maker Saleel Jan 06 2012 9 excellent
product-maker boskicinek Jan 05 2012 9 excellent
product-maker JanGerritJose Jan 04 2012 9 excellent
product-maker gerstavros Jan 04 2012 9 excellent
product-maker hlebarkata Nov 12 2011 9 excellent
product-maker tetris4 Nov 08 2011 9 excellent
product-maker naaamo2004 Nov 08 2011 9 excellent
product-maker reves121 Nov 06 2011 9 excellent
product-maker trebor Nov 05 2011 9 excellent
product-maker steveke Oct 18 2011 9 excellent
product-maker herrbatka Aug 06 2011 9 excellent
product-maker Pyruzan Jul 25 2011 9 excellent
product-maker FSchulz Jul 23 2011 9 excellent
product-maker lazx888 Jul 23 2011 9 excellent
product-maker Znurre Jul 23 2011 9 excellent
product-maker vitoubien Jul 22 2011 3 bad
Be the first to comment
bugzy
Sep 21 2014
apfelmaus
Feb 21 2012
tomsdale
Feb 20 2012
tetris4
Nov 08 2011
FSchulz
Jul 24 2011
File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.0.4
updated Oct 25 2014
added Jul 22 2011
downloads 24h
0
mediaviews 24h 0
pageviews 24h 17