Commit Graph

221 Commits (71e0e49c0e47285eaa17ecec6b1f431e21e148e9)

Author SHA1 Message Date
Michael Stapelberg 0b6b8e8380 Bugfix: Use both parts of WM_CLASS (it contains instance and class) (Thanks fallen)
Actually, WM_CLASS contains two null-terminated strings, so we cannot
use asprintf() to get its value but rather use strdup() to get both
of them. Both values are compared when a client is matched against
a wm_class/title combination (for assignments for example).
2010-02-12 12:12:25 +01:00
Michael Stapelberg 88b9700cdb Invert logic for the last commit
This makes it more clear that the option is meant to be a special
case (it *disables* part of the focus handling). Also, when
initializing the config data structure with zeros, it will get
initialized with the right value.

Furthermore, the config file parser now also accepts various values
which represent "true", not only numbers.
2010-01-29 21:58:50 +01:00
Kim Silkebækken (lokaltog) 7f10970fc7 Added focus_follows_mouse config option 2010-01-29 21:58:50 +01:00
Michael Stapelberg fc4ce84d36 Use doxygen compatible comments 2010-01-03 21:53:42 +01:00
Michael Stapelberg 8afdf54078 Update copyright to 2010 2010-01-03 21:53:30 +01:00
Jan-Erik Rediger 614b360bd4 added popup for handling SIGSEGV or SIGFPE
the popup is placed on each of the virtual screens
the user can decide to restart or quit i3
in case of an exit a core-dump is generated
2010-01-03 21:32:50 +01:00
Michael Stapelberg ba2dd3a3eb Bugfix: Containers could lose their snap state (Thanks Atsutane)
When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
2010-01-01 22:40:50 +01:00
Michael Stapelberg 75aac5bc02 ewmh: implement support for _NET_WORKAREA (rdesktop can use that)
Please note that rdesktop’s -g workarea option will not work on
64-bit systems at the moment because of a bug in rdesktop (see the
rdesktop-devel mailing list).
2009-12-31 17:48:41 +01:00
Michael Stapelberg e7e9e8e49d ewmh: correctly set _NET_ACTIVE_WINDOW 2009-12-25 15:19:39 +01:00
Michael Stapelberg 0641e6a1a3 ewmh: correctly set _NET_CURRENT_DESKTOP to the number of the active workspace 2009-12-25 15:05:17 +01:00
Michael Stapelberg 848d9c1b01 Make containers containing exactly one window behave like default containers
Starting from this commit, a borderless window will always be
borderless if it is the only window in a container. For example,
you can have Firefox borderless in a tabbed container and as soon
as the download manager or a viewer gets opened, the container
will be rendered like a normal tabbed container.

This solves the user-interface dilemma of borderless/1-px-border
windows inside stacked/tabbed containers, at least for this special
case. Thanks to Merovius for this suggestion.
2009-12-22 23:40:06 +01:00
Michael Stapelberg e900a8d23d xinerama: correctly put windows which are assigned to a specific screen on that screen when it becomes available (Thanks badboy) 2009-12-21 22:30:08 +01:00
Michael Stapelberg 6ef0d1fa79 Touch each log message and classify it as DLOG (debug), ELOG (error) or LOG (verbose) 2009-12-19 22:40:23 +01:00
Michael Stapelberg 4226cc61de add log.c/log.h which contain all the log related macros and functions 2009-12-19 22:40:23 +01:00
Michael Stapelberg f87b98e0a7 Take into account the window’s base_{width,height} when resizing (Thanks Mirko) 2009-12-12 22:27:57 +01:00
Michael Stapelberg 4ace0d2138 config: delete old parser, new lexer/parser is the default by now 2009-11-22 20:25:33 +01:00
Michael Stapelberg 52945486fd Bugfix: Also fix horizontal resizing
The same problem as in the commit before this one was present. Additionally,
the dock_clients and internal bar were not taken into account everywhere.
2009-11-22 14:32:40 +01:00
Michael Stapelberg c0c4dd2978 Disable XKB instead of quitting with an error (Thanks sur5r)
This is necessary for running i3 in Xvnc for example.
2009-11-13 00:30:42 +01:00
Michael Stapelberg 64c99cb235 Implement configuration setting to change the default border of windows 2009-11-08 12:43:01 +01:00
Michael Stapelberg 2b70e05ee9 Refactor workspaces to be stored in a TAILQ instead of an array
This fixes many problems we were having with a dynamically growing
array because of the realloc (pointers inside the area which was
allocated were no longer valid as soon as the realloc moved the
memory to another address).

Again, this is a rather big change, so expect problems and enable
core-dumps.
2009-09-29 19:45:41 +02:00
Michael Stapelberg e101940c5e Implement options to change the default mode of containers
The following new directives have been implemented for the configuration
file:

	new_container <default|stacking|tabbed>
	new_container stack-limit <cols|rows> <value>

Note that they require using the new lexer/parser, which you can
do by passing -l to i3 when starting.
2009-09-27 23:08:27 +02:00
Michael Stapelberg 8f67eba044 Implement modes. Modes allow you to use different keybindings and switch between them.
For example, you can create a mode which will let you resize windows
with some easy to use keys. So, instead of binding a combination
of your homerow and modifiers to resize, like this:

	bind Mod4+44 resize right +10
	bind Mod4+45 resize right -10
	...

You can instead define a new mode:

	mode "resize" {
		bind 44 resize right +10
		bind 45 resize right -10
		...
		bind 36 mode default
	}

	bindsym Mod4+r mode resize

So, if you press Mod4+r now, your keybindings will be set to the ones
defined in your resize mode above. You can then use your homerow
(without any other modifier) to resize the current column/row and
press enter to go back to the default mode when you are done.

Note that using this option requires you to enable the new lexer/parser
by passing the -l flag to i3 when starting.
2009-09-27 18:45:39 +02:00
Michael Stapelberg 9b1699f4c4 Add documentation for workspace_get() 2009-09-27 15:20:47 +02:00
Michael Stapelberg f38809288a Make number of workspaces dynamic (no longer limited by 10)
Warning: This is not yet thoroughly tested, so be prepared to
encounter some segfaults. Please enable logging and coredumps,
so we can fix bugs quickly.
2009-09-27 14:00:54 +02:00
Michael Stapelberg a55d0b77fe Implement resize command
Syntax: resize <left|right|up|down> [+|-]<pixels>
2009-09-26 17:18:50 +02:00
Michael Stapelberg 7be41492c6 Obey the client’s border_width setting (Thanks shatter)
xterm by default sets a border_width of 2. This was not taken into
account when determining the size of the window by i3. Still, you
probably want to set this to 0 in your .Xresources as the pixels
are just lost.
2009-09-26 13:47:48 +02:00
Michael Stapelberg f4ec7fdfe9 Implement stack-limit for further defining how stack windows should look
Using this command, you can limit the amount of columns or rows for
a stacking container. This allows for better usage of screen estate
when using stacking containers with many clients.

Examples:
  i3-msg "stack-limit cols 2"
You will now have a stack window which has two columns of windows.
2009-09-22 18:07:59 +02:00
Michael Stapelberg d9ca8e8d1a Move handler for clicking to its own file 2009-09-22 18:07:25 +02:00
Michael Stapelberg 3ada8f326c Implement vim-like marks
Commands are 'mark' and 'goto'. Both can be used either directly,
like 'mark a' and 'goto a', or interactively (just 'mark'). For
interactive mode, i3-input must be installed and in your PATH.
2009-09-20 16:54:29 +02:00
Michael Stapelberg ca472559b9 Finish configfile parsing with lexer, implement -l to use the lexer.
Every user is encouraged to use -l to switch to the new lexer and
see if there are any problems.
2009-09-19 19:05:15 +02:00
Michael Stapelberg 7fda4a2c32 Make variable expansion work with the new parsing 2009-09-13 21:32:58 +02:00
Michael Stapelberg 2ff2a6a315 Implement the urgency hint for windows/workspaces
Thanks to Mikael for bringing it to my mind. This change introduces
two new color classes, client.urgent and bar.urgent. By default,
urgent clients are drawn in red (colors by Atsutane).
2009-09-06 22:40:11 +02:00
Michael Stapelberg e893902585 Implement horizontal resize 2009-09-06 16:50:45 +02:00
Michael Stapelberg a8352a8988 Merge patches for OpenBSD compatibility 2009-09-02 22:25:50 +02:00
Michael Stapelberg 55b1bf4582 Bugfix: Correctly use base_width/base_height and size increment hints, correctly send fake configure notify events 2009-08-23 21:49:38 +02:00
Michael Stapelberg d9d4d9fff1 Implement tabbing
Use command "T" to switch to tabbing
2009-08-22 09:07:23 +02:00
Michael Stapelberg c7ba95e79d Implement resizing floating clients with Mod1 + right mouse button 2009-08-22 07:49:28 +02:00
Michael Stapelberg 44d9111d65 More log cleanups 2009-08-11 15:23:58 +02:00
Michael Stapelberg 556f180290 Bugfix: Fix screen wrapping, cleanup some log messages
Before this fix, you could go upwards and select the screen which
was at the rightmost because it also was the one topmost (if all
screen’s top position is equal).
2009-08-11 15:02:30 +02:00
Michael Stapelberg dd134a74ef Implement support for width_inc and height_inc of size hints
This fixes the problem where you saw old window contents when resizing
a window (due to opening new windows or similar), especially in terminals.
2009-08-11 14:08:04 +02:00
Michael Stapelberg b9636ceeec Set WM_STATE_WITHDRAWN when unmapping, unmap windows when destroying (Thanks xeen)
Seems like java apps need it. Also, you probably want to use XToolkit,
when you have to work with java apps:

export AWT_TOOLKIT=XToolkit
2009-08-11 12:16:10 +02:00
Michael Stapelberg ceb3670d65 Reduce number of configuration requests and thus flickering
This reduces flickering when opening new windows and especially moving
existing windows in tiling mode. Especially noticable on multi-monitor
setups.
2009-08-08 21:31:42 +02:00
Michael Stapelberg 47a798ac4a Implement assignments of workspaces to screens, big cleanup of workspace code
Please test this! Plug in screens, unplug them, use your video projector,
change resolutions, etc.

To use the assignments, use the following syntax:
workspace <number> [screen <screen>] [name]

Where screen can be one of:
<number> (It is not provided that these numbers stay constant, so use with care)
<x>x<y> (Coordinates where the screen starts, so 1280 will be fine to match the
	 screen right of the main screen if your main screen is 1280 pixels
	 width. However, 1281 will not match)
<x>
x<y>

Some examples follow:

 workspace 1 screen 0
 workspace 1 screen 1
 workspace 1 screen 1280x0
 workspace 2 screen 1280
 workspace 3 screen x0
 workspace 3 screen 1 www
 workspace 4 screen 0 mail
2009-08-08 19:51:51 +02:00
Michael Stapelberg 7cdaa1b277 Implement support for using key symbols in configuration file
Use "bindsym" instead of "bind". You have to use the names of keys
as in xmodmap. To get a list of currently bounud symbols, use
xmodmap -pke

Technical quirk: Xlib generated MappingNotify events upon
XkbMapNotify events (from XKB, as the name says). XCB does not yet
have support for XKB, thus we need to select and handle the event
by ourself. Hopefully, this will change in the future.
2009-08-07 15:35:12 +02:00
Michael Stapelberg 3bd724f08d Bugfix: Track the user’s pointer over the root window and update current workspace (Thanks xeen)
When not having any windows on the first workspace, switching to the
second workspace using your mouse was not registered by i3.
2009-08-06 00:59:48 +02:00
Michael Stapelberg 9222bea3b2 Implement borderless / 1-px-bordered windows
Use bn (normal), bp (1-px), bb (borderless) as commands to change the
border style of the currently focused window. Feel free to use i3-msg
to do this.
2009-08-05 18:33:44 +02:00
Michael Stapelberg 3114d6821d Add support for WM_CLIENT_LEADER, put floating windows mapping to (0x0) to center of leader/workspace 2009-08-05 00:39:55 +02:00
Michael Stapelberg 7cfe520755 Bugfix: Don’t hide assigned clients to inactive but visible workspaces (Thanks xeen) 2009-08-02 22:31:52 +02:00
Michael Stapelberg a753684ac5 cache text_width for named workspaces, fix memory leak 2009-08-02 21:32:35 +02:00
Michael Stapelberg e7bf93163d Make path configurable 2009-07-28 22:09:53 +02:00
Michael Stapelberg 45c3341e09 Add docs to include/ipc.h 2009-07-28 20:58:56 +02:00
Michael Stapelberg a43846ea27 Initial implementation of IPC via UNIX domain sockets 2009-07-28 20:51:29 +02:00
Michael Stapelberg 1befbb2a50 Use errx() instead of an own die() function 2009-07-28 14:03:50 +02:00
Michael Stapelberg e6198ad6c8 Some little fixes for bapt’s patch, use predict_text_width, support UTF8, pre-render workspace names 2009-07-28 13:55:09 +02:00
Bapt ddcb11baba Implements configurable named workspaces 2009-07-28 13:08:03 +02:00
Michael Stapelberg 1e095ece84 Merge branch 'next' of zekjur:/git/i3 into next 2009-07-25 22:31:01 +02:00
Michael Stapelberg 163c9ad7db Map window/its decoration *after* calling render_layout()
Thus, no more flickering because the window was first mapped and then
moved. Especially users of multiple monitors should be happy now ;-).
Rather radical change, though, so be prepared for problems.
2009-07-25 22:29:28 +02:00
Michael Stapelberg ed60b31fd0 Implement predict_text_width, which will be needed for named workspaces 2009-07-24 19:49:06 +02:00
bapt 40750e227d Implements a reload command 2009-07-23 18:46:21 +02:00
Michael Stapelberg ffcc8bbc3a Implement putting clients into floating mode at a specific workspace
This changes syntax of the assign command a bit. Old configurations
will continue to work. See the userguide.
2009-07-21 16:43:20 +02:00
Michael Stapelberg 5b51c8c6f0 optimization: Render on pixmaps and copy the result on Stack_Wins
This should speed up the rendering of Stack_Wins with many window
decorations and it should considerably reduce flicker.
2009-07-17 18:32:40 +02:00
Michael Stapelberg 91aeed0442 Resolve documentation FIXMEs, remove an unnecessary struct 2009-06-29 22:20:35 +02:00
Lars Hartmann 58cbce0380 updated doxygen docu, added FIXMEs, fixed headers to 80chars width. 2009-06-29 21:54:51 +02:00
Michael Stapelberg 28c4b045d6 Merge branch 'next' (3.β is stable now) 2009-06-26 13:27:06 +02:00
Michael Stapelberg 8659419ef6 Bugfix: Correctly handle moving fullscreen client onto another screen (Thanks dirkson) 2009-06-25 13:46:47 +02:00
Michael Stapelberg 62c8d58d82 Implement the configuration option floating_modifier and document it 2009-06-24 20:31:00 +02:00
Michael Stapelberg 607b1d071e Use drag_pointer from floating.c for the resize handler 2009-06-24 17:40:34 +02:00
Michael Stapelberg 07bebdf841 Correctly re-assign floating clients to the destination workspace when moving 2009-06-24 17:12:12 +02:00
Michael Stapelberg cba36914a8 Implement selecting the next tiling/floating window (using "focus")
Also update documentation (manpage, userguide).
To make the code easier to read/write when checking if a client is
floating, introduce client_is_floating().
2009-06-21 16:14:15 +02:00
Michael Stapelberg 626e6b2b6f Bugfix: yuck! FREE() used a wrong check, effectively never free()ing memory 2009-06-21 13:44:14 +02:00
Michael Stapelberg 8e19f8dabf floating: Don’t let clients become hidden under stack windows or fulscreen clients (Thanks Mirko) 2009-06-19 23:18:43 +02:00
Michael Stapelberg 325d1b301f Implement the special workspace ~ for assignments, which will set clients floating automatically 2009-06-19 20:20:00 +02:00
Michael Stapelberg 89c0caaec4 Implement a command for hiding all floating windows (and showing them again) 2009-06-19 13:59:29 +02:00
Michael Stapelberg 5c48444b4e Implement the possibility to set a workspace open clients automatically in floating mode
Use "wwt" (with workspace: toggle floating) in your configuration file
2009-06-19 13:20:10 +02:00
Michael Stapelberg 4135aaad7c Implement moving of floating clients 2009-06-19 12:57:21 +02:00
Michael Stapelberg a6d7f5451d Also set DIALOG, UTILITY and SPLASH windows floating automatically 2009-06-19 12:05:55 +02:00
Michael Stapelberg 00c6bdeb0b Implement changing focus via keyboard between floating clients, fix several floating bugs 2009-06-14 01:04:59 +02:00
Michael Stapelberg 052190ad05 Handle transient hint and window class dialog to mark clients as floating 2009-06-12 22:59:23 +02:00
Michael Stapelberg b13a43159f Static analyzers: Add noreturn attribute to die() 2009-06-11 03:37:13 +02:00
Michael Stapelberg e689be983b Implement variables in configfile.
This implements ticket #42.

Syntax is "set $key value". All further instances of $key will be
replaced with value before parsing each line of the configfile.
2009-06-01 16:19:06 +02:00
Michael Stapelberg 2a67630aa6 Optimization: Get the colorpixels when loading configuration, make use of the new config struct
Instead of building arrays of colorpixels we can simply use a pointer
to a struct Colortriple. Furthermore, by getting the colorpixels when
loading the configuration, we save a lot of function calls in the
main code.
2009-06-01 15:14:45 +02:00
Michael Stapelberg 0cb5d7448d Implement clients going automatically into floating 2009-05-31 00:31:18 +02:00
Michael Stapelberg 54fb9435f8 Add header for config.h, retab! the file 2009-05-30 22:22:58 +02:00
Michael Stapelberg cbc3880007 Use a more efficient struct for storing colors, validate/parse them more easily 2009-05-30 22:20:32 +02:00
Atsutane 65bcf170ed Introduced color setting. 2009-05-30 17:59:04 +02:00
Michael Stapelberg b1eb93326f Bugfix: Correctly cleanup stack_windows when setting clients to floating
This fixes ticket #44
2009-05-30 11:35:32 +02:00
Michael Stapelberg b58e2fa8ed Move toggle_fullscreen to client.c 2009-05-26 16:49:57 +02:00
Michael Stapelberg 5b8e2ecb18 Implement floating (please test and find bugs)
Details which are missing: A command to hide/show all floating clients,
moving/resizing clients with your mouse holding Mod1 (click anywhere
in the client, not just on its borders), resize/move by keyboard, select
next/previous client by keyboard
2009-05-23 16:34:03 +02:00
Michael Stapelberg b35599004a Move the manage_*-functions into their own file as they got quite large 2009-05-16 18:25:04 +02:00
Michael Stapelberg e79cca8f72 Implement putting clients onto specific workspaces ("assign" in the configfile)
This closes ticket #39
2009-05-16 17:32:36 +02:00
Michael Stapelberg 1256730b4b Bugfix: Fix display/resizing of colspanned containers 2009-05-09 18:43:50 +02:00
Michael Stapelberg 3ccc0d7794 Bugfix: Fix display/resizing of colspanned containers 2009-05-09 18:43:02 +02:00
Michael Stapelberg 5b4f10eaca Bugfix: Store width_factor/height_factor per workspace, not per container
This is a relatively big change, however all cases should be handled by
now.

Because the function to do graphical resizing got rather large, I’ve created
a new file src/resize.c for it.

This fixes ticket #35.
2009-05-09 17:50:51 +02:00
Michael Stapelberg 8e1990f058 Bugfix: Store width_factor/height_factor per workspace, not per container
This is a relatively big change, however all cases should be handled by
now.

Because the function to do graphical resizing got rather large, I’ve created
a new file src/resize.c for it.

This fixes ticket #35.
2009-05-09 17:48:35 +02:00
Michael Stapelberg 18da0a3017 Bugfix: Force reconfiguration of all windows on workspaces which needed to be re-assigned (Thanks Mirko)
When you disable a Xinerama screen (think of removing a video projector),
the workspaces of that screen need to be re-assigned to another screen.
Previously, the clients affected by this re-assignment did not get re-
configured, which made them appear on the next screen which got configured
at the position of the old one again if you did not switch to the reassigned
workspace before.

So, to reproduce it:
xrandr --output VGA --mode 1280x1024 --right-of LVDS
move windows to the new workspace
xrandr --output VGA --off
xrandr --output VGA --mode 1280x1024 --right-of LVDS

This fixes ticket #36
2009-05-09 13:04:34 +02:00
Michael Stapelberg d24e47a0f3 Bugfix: Force reconfiguration of all windows on workspaces which needed to be re-assigned (Thanks Mirko)
When you disable a Xinerama screen (think of removing a video projector),
the workspaces of that screen need to be re-assigned to another screen.
Previously, the clients affected by this re-assignment did not get re-
configured, which made them appear on the next screen which got configured
at the position of the old one again if you did not switch to the reassigned
workspace before.

So, to reproduce it:
xrandr --output VGA --mode 1280x1024 --right-of LVDS
move windows to the new workspace
xrandr --output VGA --off
xrandr --output VGA --mode 1280x1024 --right-of LVDS

This fixes ticket #36
2009-05-09 13:01:23 +02:00
Michael Rudolf 3400f0e6bd Implement autostart using "exec" in config
Syntax is "exec <application>", like when creating a binding.
Multiple entries are possible, applications are started in
the specified order.
2009-05-05 20:14:02 +02:00
Michael Stapelberg f72214725c Implement jumping to windows by matching their class / title 2009-05-05 16:53:22 +02:00
Michael Stapelberg e295ab302b Implement storing WM_CLASS of each client 2009-05-05 16:53:22 +02:00
Michael Stapelberg a0d23c53b3 Bugfix: Re-distribute free space when closing customly resized containers, re-evaluate for other containers
This fixes ticket #4
2009-05-03 14:29:58 +02:00