Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
6.8

Available as/for:
Description:
This is a set of 9 bash scripts which I use to move my active window on screen similar to the Compiz Put plugin. You need to have the xdotool installed which can be found in most repositories.

Associating these scripts with keyboard shortcuts creates a great KDE desktop improvement for manipulating windows.

Ratings & Comments

2 Comments

BastianBalthazarreBux

for multiple monitors the following example (kput_top_right.sh) could be more appropriate: warning bash arrays inside http://paste.kde.org/177092/ #! /bin/bash Bottom_Panel=35 Gap=20 window=$(xdotool getactivewindow) # mousepos == ( "2401" "750" ) mousepos=( $( xdotool getmouselocation 2>&1 | sed -n -e 's|^x:\([0-9]\+\) y:\([0-9]\+\) .*$|\1 \2|p' | head -n1 ) ) # ${monitors[@]} == ( "2560,1440,1920,0" "1920,1080,0,0" ) monitors=( $(xrandr | sed -n -e 's:^.*\bconnected \([0-9]\+\)x\([0-9]\+\)+\([0-9]\+\)+\([0-9]\+\) .*$:\1,\2,\3,\4:p') ) monitor=( 0 0 1024 768 ) for m in ${monitors[@]} do tmpm=( ${m//,/ } ) x0=${tmpm[2]} x1=$((x0 + ${tmpm[0]})) y0=${tmpm[3]} y1=$((y0 + ${tmpm[1]})) xm=${mousepos[0]} ym=${mousepos[1]} if [[ ($x0 -le $xm) && ($xm -le $x1) && ($y0 -le $ym) && ($ym -le $y1) ]] then monitor=( $x0 $y0 $x1 $y1 ) break fi done x=${monitor[2]} y=${monitor[3]} w=$(xwininfo -id $window | grep "Width" | awk '{print $2}') h=$(xwininfo -id $window | grep "Height" | awk '{print $2}') newx=$(( x - w )) xpos=$(( newx - Gap )) xdotool windowmove "${window}" "${xpos}" "${Gap}"

jaugen

Great. You should do a complete set for multiple monitors. I use these only on my laptop. Thanks for your input.

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Various KDE 1.-4. Improvements:

Slicker Debian Package for Woody
cirrusgr
last update date: 22 years ago

Score 5.0

Konqueror/kdesktop suggestion
PovMan
last update date: 22 years ago

Score 5.0

Biiig buttons
dbojan
last update date: 20 years ago

Score 5.0

Yet Another KControl
Frans
last update date: 21 years ago

Score 5.0

Next window and next/previos window
dbojan
last update date: 20 years ago

Score 5.0

Fantasie Toolbar
katoe
last update date: 19 years ago

Score 5.0