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

whererun

9 years ago

the same to me .
[100%] Building CXX object CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o
/home/hades/Downloads/workspacestrap/workspacestrap.cpp: 在构造函数‘KWin::WorkspaceStrapEffect::WorkspaceStrapEffect()’中:
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:61:5: 错误:‘KActivities’未声明
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:61:28: 错误:‘ac’在此作用域中尚未声明
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:61:37: 错误:expected type-specifier before ‘KActivities’
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:61:37: 错误:expected ‘;’ before ‘KActivities’
make[2]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o] 错误 1
make[1]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/all] 错误 2
make: *** [all] 错误 2


fedora 16 x64
kde 4.7.4

Report

C

KAnton

9 years ago

Three things:
1. Delete your build-files and try again (sure you have the latest version?)
2. Please run `LANG=en make` and post the output of that instead
3. 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

whererun

9 years ago

1.latest files
2,english now
3.
[[email protected] ~]$ find /usr/include -name *consumer.h
/usr/include/kde4/kactivities/consumer.h
/usr/include/kde4/kworkspace/kactivityconsumer.h

4.
[[email protected] build]$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt-Version 4.8.0 (using /usr/bin/qmake-qt4)
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXpm.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXpm.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib64/libssl.so
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl
-- Found Phonon: /usr/include
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
-- Found KDE 4.7 include dir: /usr/include/kde4
-- Found KDE 4.7 library dir: /usr/lib64/kde4/devel
-- Found the KDE4 kconfig_compiler4 preprocessor: /usr/bin/kconfig_compiler4
-- Found automoc4: /usr/bin/automoc4
-- Found X11: /usr/lib64/libX11.so
-- using kde4/kactivities/consumer.h
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hades/Downloads/workspacestrap/build
[[email protected] build]$ make
Scanning dependencies of target kcm_kwin4_effect_workspacestrap_automoc
Generating workspacestrap_config.moc
[ 0%] Built target kcm_kwin4_effect_workspacestrap_automoc
[ 20%] Generating ui_workspacestrap_config.h
Scanning dependencies of target kcm_kwin4_effect_workspacestrap
[ 40%] Building CXX object CMakeFiles/kcm_kwin4_effect_workspacestrap.dir/kcm_kwin4_effect_workspacestrap_automoc.o
[ 60%] Building CXX object CMakeFiles/kcm_kwin4_effect_workspacestrap.dir/workspacestrap_config.o
Linking CXX shared module lib/kcm_kwin4_effect_workspacestrap.so
[ 60%] Built target kcm_kwin4_effect_workspacestrap
Scanning dependencies of target kwin4_effect_workspacestrap_automoc
Generating workspacestrap.moc
[ 60%] Built target kwin4_effect_workspacestrap_automoc
Scanning dependencies of target kwin4_effect_workspacestrap
[ 80%] Building CXX object CMakeFiles/kwin4_effect_workspacestrap.dir/kwin4_effect_workspacestrap_automoc.o
[100%] Building CXX object CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o
/home/hades/Downloads/workspacestrap/workspacestrap.cpp: In constructor ‘KWin::WorkspaceStrapEffect::WorkspaceStrapEffect()’:
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:62:5: error: ‘KActivities’ has not been declared
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:62:28: error: ‘ac’ was not declared in this scope
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:62:37: error: expected type-specifier before ‘KActivities’
/home/hades/Downloads/workspacestrap/workspacestrap.cpp:62:37: error: expected ‘;’ before ‘KActivities’
make[2]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/workspacestrap.o] Error 1
make[1]: *** [CMakeFiles/kwin4_effect_workspacestrap.dir/all] Error 2


5,
fedora 16 x64
kde 4.7.4
kernel3.1.6
qt 4.8
cmake 2.8.6
make 3.82
gcc 4.6.2

need more ?

Report

C

KAnton

9 years ago

Well, I already feared this error would come...
I will try to find a solution, but I have made a package for Fedora, you can just install that one.

Report

C

KAnton

9 years ago

Please download the code via `git clone git://anongit.kde.org/scratch/akreuzkamp/workspacestrap.git` and try to compile. If it works, I'll update the code-package here.

Report

whererun

9 years ago

so thanks ,but I got this :
[[email protected] hades]# rpm -ivh Downloads/kwin-effect-workspacestrap-1.0-76.1.fc16.x86_64.rpm
warning: Downloads/kwin-effect-workspacestrap-1.0-76.1.fc16.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 914c6ace: NOKEY
error: Failed dependencies:
libkactivities.so.5()(64bit) is needed by kwin-effect-workspacestrap-1.0-76.1.fc16.x86_64

libkactivities.so.5 is including kdelibs-4.7.2
my is kdelibs-4.7.4

thanks again.

Report

C

KAnton

9 years ago

For 4.7.4 you need to install the package libkactivities (I don't have Fedora so I can't verify it, but it's probably like this). It's probably not listed as dependency because OBS builds against 4.7.2, but it should be in the fedora-repos.

Report

C

KAnton

9 years ago

It was a typo, I didn't recognize. Should now be fixed with the latest download.

Report

Hmpf

9 years ago

Hi,

thanks for this interesting effect and your help with compiling. I fully agree with the statement in your blog, activities are to seperate your work and VDs are all about space. :)

So some feedback:
The effect can not be activated when the binary kwin_gles is used, it has to be the kwin binary.

When one switches to a two monitor setup a "kwin --replace" is needed, otherwise the strip stays empty. Note I used "xrandr --output LVDS1 --auto --output VGA1 --mode 1680x1050 --above LVDS1" to switch to two monitors.

In the mentioned two monitor setup the tab strip occurs where both screens meet, see http://wstaw.org/m/2012/01/05/plasma-desktophS1890.png

Report

C

KAnton

9 years ago

These are defenitely three things that need investigation. I will look at them as soon as I have free time, which is always quite unpredictable...
But I'm glad you like it :)

Report

cgonzalez

9 years ago

In Fedora 16, consumer.h is in /usr/include/kde4/kactivities/. I've made a symbolic link to /usr/include/kactivities for compiling this :-).

Report

C

KAnton

9 years ago

Can you please download the updated version and try to compile again without the symlink? it should now work, but I'd like to have it tested.
Thanks.

Report

cgonzalez

9 years ago

Now it builds without the symlink, thank you :-).

Report

scalpel

9 years ago

it's me again ...

really cool stuff, I must say.
However, I'd have two suggestions. First, to begin with, I'd fancy an option for a 2-dimensional scroll pane. And second, scroll ratio should be customisable (using a touchpad it's a bit akward to have to reinitiate the move once you hit the border). Other than that I really felt comfortable within a jiffie.

thx Mich;

Report

scalpel

9 years ago

Hey Anton,

if CONSUMER_INCLUDE==2 the namespace for the Consumer class is KActivities rather than Activities

bye Mich;

Report

C

KAnton

9 years ago

Thanks a lot for the hint, when I made this change the namespace was Activities, it was just changed to KActivities.

Report

masterdany88

9 years ago

compilation goes without problems
but I dont get it, how to used it???
I got transparent stripe, and I cant move anything,
maybe some screencast on youtube about it???

Report

9

JanGerritJose

9 years ago

You can have a look at http://akreuzkamp.de/2012/01/04/rethinking-virtual-desktops/ which explains how to use it - including a screencast.

Report

masterdany88

9 years ago

it dosnt work on my desktop.
compilation ok
but I can move the windows like you!!!

Report

C

KAnton

9 years ago

Have a look in Systemsettings->Desktop Effects->All Effects. One of the last items should be Workspacestrap. Is it activated?
If yes, what happens if you press Meta(aka Windows-key)+ALT?
(What should happen is that you get the preview of the strap and then can move it by dragging.)

Report

masterdany88

9 years ago

Its hard to explain that in words
so I've made screencast
here it is
http://www.youtube.com/watch?v=DbNZfTB36gY&feature=youtu.be

Report

9

kalmar

9 years ago

I forgot to add:

http://pastebin.com/FSK7YqB7

the xprop of moving window. (Options dialog for Desktop Strap effect)

Report

C

KAnton

9 years ago

Yet another stupid mistake of mine.
It should now be fixed.

Report

9

kalmar

9 years ago

After successful compilation (1.0.1 did it) I am experiencing the same behavior...

Report

C

KAnton

9 years ago

This behaviour is really strange...
Please run xprop (you will have to click on a window) on a window that moves correctly and one that doesn't move and post the output.

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 0