Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Script to move/resize window
New Posts  All Forums:Forum Nav:

Script to move/resize window

post #1 of 7
Thread Starter 
Does anyone know if it's possible to create a shell script to move or resize a window, or somehow mimic a drag-&-drop mouse movement? I assume that I will need to know the PID and possibly the window ID (or unique_ID)? I'm actually using Solaris 10, which is also base on Linux I presume. Thanks in advance
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
post #2 of 7
What is your over all goal with this? What you've asked is very generic, if we know exactly what the end result is supposed to be, we can reverse engineer some help for you.
post #3 of 7
It would be more important to know what window manager you are using, like metacity for example. For example, in Fluxbox, it is really easy to do it, but the same command won't work in Gnome because Gnome generally uses metacity.
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
post #4 of 7
Thread Starter 
The overall goal is to create a script that I can run to move the windows to other locations, instead of having to move them manually each time. The program I intend to use it on it's called Pinnacle3. And I'm pretty new to the whole Linux/Solaris environment, so no idea what, if any window manager is being used
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
post #5 of 7
you can use wmctrl to do this .. i've done some of this in the distant past myself.

if you specify __exactly what you want in detail and in what WM/DE you are using i'd be happy to code it for you .. probably just 5 or 6 easy lines. otherwise just google wmctrl and hack through it.

one interesting aside - i run two monitors as two separate X screens. none of that twinview/xinerama crap. The only drawback is I cannot move a window from one monitor to the other, as they are two separate X servers. Yesterday I discovered a program called "XPRA" which is basically "GNU screen for X11". I was finally able to get a proof of concept script working where I could send any window over to the other monitor thumb.gif (and my laptop in the other room thumb.gifthumb.gif )

However, due to the way XPRA works as a client/server/proxy based solution and not a DMA remap, the performance of a window with video in it is crap... it's basically a little better than ssh -X. So back to the drawing board on that one. If anyone has any suggestions I'd love to hear it - however I doubt anybody does, as i've googled this one to no end for years. redface.gif
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
post #6 of 7
Never having used Pinnacle3, nor Solaris, I do not know what you are going through. However, I found this that might be helpful if you are looking for keyboard shortcuts that let you manipulate windows. I bet these are the scripts that you are looking for. http://linux.about.com/library/gnome/blgnome1n2b.htm

If you are looking for an elegant solution to make applications automatically do this:

450

Get a window tiler application that works with your current desktop environment (e. g. this EDIT: this is Linux only. You will need something else if you use Unix.) or install a tiling window manager (I use xmonad). Note, the second option is harder.

If I didn't answer your question, you are going to have to be a little more specific.
Edited by Rothen - 2/13/12 at 12:46pm
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
Ye Old Desktop
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 965 @ 4.24 GHz ASUS M4A77D PNY GTX 470 7 GB DDR2 RAM 
Hard DriveHard DriveOptical DriveOS
500 GB Hitachi 250 GB Maxtor (PATA) x16 DVD/CD RW Windows 7 Professional x68 
MonitorKeyboardPowerCase
Hannspree HF255HPB Logitech G15 (2nd Gen) Corsair TX 650 V2 Antec 300 
MouseAudio
Logitech G9 Creative Audigy 2 ZS 
  hide details  
Reply
post #7 of 7
Thread Starter 
I found out that the Solaris uses something called Common Desktop Environment. Anybody familiar with that?
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
System Prime
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dothan 770 @ 2.8GHz P4C800E-Dlux + CT-479 nVidia 7800 GS 2x1GB g.skill DDR500 
Hard DriveOptical DriveOSMonitor
2x80GB SATA + 200GB DVD + DVD-RW XP SP2 Viewsonic N2750W 
KeyboardPowerCaseMouse
some keyboard Corsair HX520W Lian-Li V2100 Plus 2 Logitech Trackball 
Mouse Pad
none 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Script to move/resize window