Tag Info

Hot answers tagged

39

In some sense, it is a UI convention with history that goes back all the way to 1984. Since Windows and X11 both post date the original Mac GUI, one might say that Windows does it the Windows way "just to be different" rather than suggesting that the Mac is the oddball. Back in the earliest days of the Macintosh, you could only run one application at a ...


32

vim can easily do that: ctrl+ws - Split windows ctrl+ww - switch between windows ctrl+wq - Quit a window ctrl+wv - Split windows vertically :sp filename will open filename in new buffer and split a window.


12

This can be done using Emacs. It works in GUI and in terminal mode. You can even split multiple times. Here are some basic key combinations: C-x 2 Split the selected window into two windows, one above the other (split-window-below). C-x 3 Split the selected window into two windows, positioned side by side (split-window-right). C-Mouse-2 ...


11

With vim, you can use split or vsplit. The first one will split horizintally and the second one will split vertically. CTRLw then to navigate through split screens. You can also use tab. tabnew filename will open filename in a new tab. You can use tabnext and :tabprevious to navigate between tabs. I personnaly maps the left and right arrows to navigate ...


10

The window is not the application in MacOS, in MacOS the windows connects to the application. That is why the application don't exit when you close a window. On Windows the window is the application, that is why the the application should exit when you hit the exit button. On Linux the developer decide what architecture he like to use, both ways is ...


9

xdotool exposes the pointer location (xdotool getmouselocation). None of xdotool, xwininfo or wmctrl appear to have a way to match a window by a screen position where it's visible. The underlying X library call is XQueryPointer (corresponding to a QueryPointer message). Here's a simple Python wrapper script around this call (using ctypes). Error checking ...


9

The xwininfo command gives this kind of output, but you do have to click on the window you want info on: % xwininfo xwininfo: Please select the window about which you would like information by clicking the mouse in that window. xwininfo: Window id: 0xa0000d "flask" ... So doing: xwininfo | grep 'Window id:' might give you something ...


9

If you install Compiz Config Settings Manager with: sudo aptitude install compizconfig-settings-manager You can then enable this functionality with Grid mode. Go to Systems > Preferences > CompizConfig Settings Manager and scroll down to Window Management. Then check Grid mode and, once you open the options for that mode, choose keybindings for Put ...


8

Minimizing a window might free a little memory, but it depends on the application, and it won't amount to much. In any case, minimizing won't make more difference than any other form of hiding. Even if an application's window is minimized, it's still running. The application isn't going to need to keep less data in memory just because one of its windows is ...


8

This is application specific. For example the System Preferences application does quit when you click on the red button. However, the majority of programs only close the window (an the documents within) when you try to "close" it. I guess the idea behind this is to make things faster when you want to use the application again. If I want to close, I want ...


6

If you are the kind of guy who likes to partition your screen up into increments like full screen and half screen using keyboard shortcuts, you might consider using a different window manager entirely. I don't think there is any reason you have to stay with the whole Gnome/Metacity/Compiz scene. There are a plethora of Window Managers available for Linux ...


6

You can use xdotool, a versatile X window automation tool. focused_window_id=$(xdotool getwindowfocus) active_window_id=$(xdotool getactivewindow) active_window_pid=$(xdotool getwindowpid "$active_window_id") (I don't know what the difference between focused and active is.) (I thought wmctrl could do this, but apparently not.)


6

joe (Joe's Own Editor) can do this, too: ctrl+ko - split window horizontally ctrl+kp - switch to the previous window ctrl+kn - switch to the next window ctrl+ke - open new file in current window ctrl+kg - grow height of current window ctrl+kt - shrink height of current window ctrl+ki - hide all windows except the current one, press again to show all ...


6

Kate KDE Advanced Text Editor is very featureful. It has everything you described in the question and much more. See for yourself: To split the view, go to View → Split View. Then you can select one of these options: Split Vertical (Ctrl+Shift+L) Split Horizotal (Ctrl+Shift+T) Close Current View (Ctrl+Shift+R) To get the layout like on this ...


6

The first two examples will activate the first listed Firefox window, based on its Title. Firefox always ends its Title-bar with "Mozilla Firefox"... "listed" means: as listed by wmctrl querying X. The first example uses a fuzzy match for the title. wmctrl -a "Mozilla Firefox" Or, to get the title more specifically: wmctrl -Fa "$(wmctrl -l | sed ...


5

Some Window Managers have a lot of customizability to do stuff like this, but a lot more recent ones including metacity and compiz have lost this kind of customization. I used to use fvwm to do stuff like that. A simpler WM independent approach would be to try and reassign focus back to the right window. Look at the xdotool ...


5

Just use a shortcut app to create shortcuts for this script.. Example calls: script_name left ... script_name right The best documentaton/examples I've found for wmctrl is at Spiral of Hope For xprop, the man page has a few basic examples, but I haven't found anything for it with as much detail as the Spiral of Hope page... #!/bin/bash # $1 ... ...


5

Cygwin X Faq states that they use getdtablesize : Cygwin/X queries getdtablesize() for the maximum number of client connections allowed; by default Cygwin returns 32 from getdtablesize(). Cygwin/X Server Test Series release Test44, released on 2001-08-15, changed the maximum number of clients from 32 to 1024 by passing the square of ...


5

Since evince lacks options to explicitly control its own window management (as do most applications), the next approach is to control evince externally from the window manager itself. Assuming GNOME with metacity as the window manager, you'll have to use devilspie to get the window matching features. Install devilspie from your official Ubuntu ...


4

I don't have Lubuntu installed to test but maybe: To configuration file ~/.config/openbox/lubuntu-rc.xml adding the lines below : <!-- Option to maximize all normal window when launched--> <application type="normal"> <maximized>true</maximized> </application> Removal of this was suggested as a way to STOP it from doing so ...


4

Devil's Pie does have such an option. See e.g. the Ubuntu wiki and this howto. In X11 parlance, a window's size and location make up its geometry. Write something like (if (is (application_name) "Foo") (geometry "400x200-0+20"))


4

Same way, but you need to run a ssh server on the Windows machine (and make sure you are not firewalling the connection). See - http://stackoverflow.com/questions/18292/what-are-some-good-ssh-servers-for-windows Edit: If you need a windows ssh client, use PuTTy http://www.chiark.greenend.org.uk/~sgtatham/putty/


3

Try the xwininfo command, http://www.xfree86.org/4.2.0/xwininfo.1.html, it definitely returns the window title and as far as process goes, well ... X has assigned it an ID and become the parent PID of the window and would also conceal it by default, so, assuming that Gnome has NET_WM_PID supported, as this patch from 2001 indicates it has, ...


3

You need to focus the window that you want to recieve these keystrokes. wmname provides such functionality, you can probably find it in your package manager. wmctrl -ai "$windowID" ; xmacroplay "$DISPLAY" < full.txt (where $windowID is the window ID as determined through xwininfo, et al) is probably what you want.


3

Simpler (IMO) than OP's solution (i.e. without ps, grep and awk), to get the process nameĀ : cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm Or if you want an end of lineĀ : echo $(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)


3

Try to resize the Window with alt+middle mousebutton. Or try wmctrl to force a resize: wmctrl -r "Windowname" -e g,x,y,w,h Change Windowname into the one you want to be resized. g -> gravity, just set it to 0 you're good to go x -> x position on your desktop, 0 is left y -> y position on your desktop, 0 is top w -> new width for the window in pixel h -> ...


3

The reason for this is due to what is a window. In Microsoft Windows each application gets its own window where in Mac OSX and previous releases of Mac OS each file or document has its own window. When you "close Safari" you aren't closing [exiting] the application Safari but merely closing the file (http://unix.stackexchange.com). Likewise if you close the ...


3

Yes, this is very, very annoying. Meanwhile, this app should help: http://www.carsten-mielke.com/redquits.html From the description: Have you ever tried to close an application with its red button and wondered why it is still open? RedQuits changes this. All programs now quit and close all open windows if you click the red button.


3

As far as I know, this is not possible as Firefox does not accept commands to control the window. That's also (mostly) the responsibility of the window manager, so I doubt that there ever will be parameters to do that. However, you can control the window with wmctrl, but that's going to be a little bit difficult: #!/bin/sh firefox -new-instance -new-window ...


3

If you are interested in getting to grips a bit better with VIM, check out vimcasts.org, it has a bunch of really friendly video tutorials. This one especially for split screen magic Enjoy!



Only top voted, non community-wiki answers of a minimum length are eligible