Michael Stapelberg
e1631d6320
properly free memory/close fd upon errors (Thanks xeen)
...
Found with the static analyzer cppcheck
2011-08-31 14:44:48 +02:00
Michael Stapelberg
afff328c59
Merge branch 'master' into next
2011-08-26 12:37:04 +02:00
Michael Stapelberg
12e15609ef
Bugfix: Correctly recognize duplicate workspace assignments (Thanks Moredread)
...
Example of a faulty config:
workspace 5 VGA1
workspace 5 LVDS1
Fixes #498 , #499
2011-08-26 12:35:42 +02:00
Michael Stapelberg
4984b81282
Merge branch 'master' into next
2011-08-25 21:59:19 +02:00
Michael Stapelberg
f06059ec94
Bugfix: Accept '\t' in the 'set' command, don’t die but ELOG in case of errors (Thanks atsutane)
2011-08-25 21:58:03 +02:00
Mateusz Poszwa
42db9de7ec
Add new_float config option.
...
This option sets the default border style for containers automatically put into floating mode.
Fixes #264
2011-08-09 09:29:53 +02:00
Michael Stapelberg
4253aa4ba2
Merge branch 'master' into next
2011-08-09 09:27:55 +02:00
Peter Bui
5e06b1b21d
Fix some potential memory leaks
2011-08-09 09:27:15 +02:00
Michael Stapelberg
ecc2cae3f7
Bugfix: use ELOG to actually get the error message into the logfile shown by i3-nagbar
2011-08-04 21:43:55 +02:00
Michael Stapelberg
4e350664ae
Bugfix: Check that ->symbol != NULL before using strcasecmp()
2011-08-04 21:38:13 +02:00
Michael Stapelberg
787dd4059f
little style fixes for the previous patch
2011-08-04 21:25:47 +02:00
Radek Tříška
9d101d8473
check_for_duplicate_bindings
2011-08-04 20:37:01 +02:00
Mateusz Poszwa
1913bf0e5c
Add "instance" to matching criteria
2011-08-04 20:10:31 +02:00
Michael Stapelberg
c883e7050a
Include <limits.h> in all.h
2011-08-04 00:10:04 +02:00
Michael Stapelberg
92481b133c
docs/userguide: the correct command is 'floating enable', not 'mode floating' (Thanks Sander)
...
Fixes : #453
2011-08-03 20:48:28 +02:00
Michael Stapelberg
554a43ca4a
Bugfix: Make the criteria rules recursive in src/cfgparse.y, too (Thanks f8l)
2011-08-02 19:46:14 +02:00
Michael Stapelberg
3204caa98d
i3-migrate-config-to-v4: drop the .pl suffix
...
As lintian (a Debian package checker) mentions, it is more clever to install it
without the extension, since the implementation language might change.
2011-07-31 23:11:05 +02:00
Michael Stapelberg
cbfcf5bd8b
Bugfix: free font string after using it
2011-07-31 17:54:53 +02:00
Michael Stapelberg
ee83df9684
Bugfix: cfgparse: correctly free parser/lexer
2011-07-31 17:50:54 +02:00
Michael Stapelberg
797ba5f7c8
remove unnecessary close, because fclose already closes the file descriptor
2011-07-24 18:42:46 +02:00
Michael Stapelberg
370715d1a8
Bugfix: Don’t leak file descriptor
2011-07-23 22:11:01 +02:00
Michael Stapelberg
8c1a242f5f
reload the config after editing it through i3-nagbar
2011-07-13 18:47:08 +02:00
Claudio Marforio
cc24a96e96
patch to allow exec_always in configure file
...
fixed indentation, updated docs
2011-07-12 18:23:14 +02:00
Michael Stapelberg
897b53f1c2
Bugfix: run nagbar commands through sh(1) (Thanks Tucos)
2011-07-11 16:51:57 +02:00
Michael Stapelberg
429d310011
nagbar: use less / vi as fallbacks for PAGER / EDITOR
2011-07-11 16:40:10 +02:00
Michael Stapelberg
c55abca115
add i3-nagbar. tells you about config file errors (for example)
2011-07-10 14:33:19 +02:00
Michael Stapelberg
0ca229ceb3
migrate-config: also make force_focus_wrapping a v4-only statement
2011-07-08 00:17:48 +02:00
Michael Stapelberg
ac335fcffa
Automatically call the migration script when the config does not look like v4
2011-07-06 20:43:00 +02:00
Michael Stapelberg
e5c811248f
Bugfix: Fix floating assignments, extend test for the assign command (Thanks Tucos)
2011-06-13 17:42:59 +02:00
Michael Stapelberg
d641e1da3b
Don’t force wrapping when focusing in a direction would work (+test)
...
Think of the following layout:
-------------
| tab | |
| con | win |
| | |
-------------
The tabbed container on the left has two children. Assume you have focused the
second/right child in the tabbed container. i3 used to focus the first/left
container of the tabbed container when using 'focus right' (it wrapped focus).
With this commit, the default behaviour is to instead focus the window on the
right of the screen.
The intention is to make focus switching more intuitive, especially with tabbed
containers supporting 'focus left'/'focus right' in tree. You should end up
using less 'focus parent' :).
You can force the old behaviour with 'force_focus_wrapping true' in your
config.
Code coverage is 62.5% with this commit.
2011-06-12 12:56:50 +02:00
Michael Stapelberg
2c68c234ea
Implement assignments for (named) workspaces, with '~' compatibility (floating)
2011-05-23 18:41:17 +02:00
Michael Stapelberg
1d6447187c
cleanup cfgparse lexer/parser (ignore whitespace, solves conflicts)
2011-05-22 21:48:25 +02:00
Michael Stapelberg
5ae4620a24
Time Lord technology: for_window config directive to run arbitrary cmds
...
An example to set all XTerms floating:
for_window [class="XTerm"] mode floating
To make all urxvts use a 1-pixel border:
for_window [class="urxvt"] border 1pixel
A less useful, but rather funny example:
for_window [title="x200: ~/work"] mode floating
The commands are not completely arbitrary. The commands above were tested,
others may need some fixing. Internally, windows are compared against your
criteria (class, title, …) when they are initially managed and whenever one of
the relevant values change. Then, the specified command is run *once* (per
window). It gets prefixed with a criteria to make it match only the specific
window that triggered it. So, if you configure "mode floating", i3 runs
something like '[id="8393923"] mode floating'.
2011-05-15 20:10:25 +02:00
Michael Stapelberg
3f45d3c447
re-implement assignments of workspace to specific outputs
2011-05-14 22:19:58 +02:00
Michael Stapelberg
1fe5c58764
cfgparse.y: define types (Thanks Merovius)
2011-05-05 21:58:28 +02:00
Michael Stapelberg
bd73275771
re-indent cfgparse.y
2011-05-05 21:19:47 +02:00
Michael Stapelberg
3d1acd6c2f
re-implement assigning windows to workspaces
2011-05-02 23:29:26 +02:00
Sardem FF7
cd6f93be3f
Rename bind to bindcode
...
Also fallback when using just 'bind' to be backward-compatible
2011-04-18 23:52:45 +02:00
Michael Stapelberg
c3b4006f6b
Rename new_container to workspace_layout
2011-04-02 21:49:35 +02:00
Simon Kampe
650eebc347
Implemented config key 'new_container'
2011-04-02 21:43:49 +02:00
Michael Stapelberg
65b05169d3
change the config parser to use default_orientation instead of new_container_orientation
...
It’s a shorter and probably more meaningful description as it is not
immediately clear what a container exactly is when first installing i3.
2011-03-17 17:55:53 +01:00
Simon Kampe
2f992f5c0e
Added config key for default orientation of containers (new_container_orientation) and added support in randr.c for automatically changing the orientation when user does a xrandr rotate.
2011-03-17 17:43:35 +01:00
Michael Stapelberg
f162e7efaa
refactor font caching to just save the ID instead of mainting a cache with pattern→id-mapping
2011-03-10 23:20:17 +01:00
Michael Stapelberg
7154fecbbf
Implement the popup_during_fullscreen option, set default to leave_fullscreen
...
Fixes #333
2011-03-06 15:46:06 +01:00
Fernando Tarlá Cardoso Lemos
beaa85ceb9
Don't leak this descriptor (thanks dothebart).
...
Note that fclose closes the file descriptor frees the stream.
2011-02-28 16:49:10 +01:00
Fernando Tarlá Cardoso Lemos
a1dd74da5a
Implement default border styles (thanks litemotiv).
2010-12-27 13:10:45 +01:00
Fernando Tarlá Cardoso Lemos
0a17fe973c
Make the restart path configurable.
2010-11-28 01:18:10 +01:00
Michael Stapelberg
c3981e12d3
Bugfix: use bufcopy instead of buf (Thanks fernando)
2010-11-26 22:38:05 +01:00
Michael Stapelberg
4d7c24b92c
Bugfix: Correctly count variables when parsing the configfile (Thanks dbp)
2010-11-26 11:25:51 +01:00
Michael Stapelberg
4cd6dd0303
port fernando’s custom background color patch
2010-11-13 20:07:49 +01:00
Michael Stapelberg
8e5a831e27
re-add focus follows mouse handling
2010-04-13 18:43:37 +02:00
Michael Stapelberg
c145f7e529
first step of the big refactoring ("tree" branch).
...
From here on, we can track changes. It made no sense to put the
development up to this point into git.
2010-04-13 13:17:39 +02:00
Michael Stapelberg
41b6631f68
Bugfix: null-terminate buffer
2010-03-26 03:04:54 +01:00
Michael Stapelberg
a542515f9e
Fix memory leaks
2010-03-26 01:52:39 +01:00
Michael Stapelberg
2df374ca4c
Add configuration option to turn off workspace bar
2010-03-13 19:15:28 +01:00
Michael Stapelberg
aae824b1f3
Change workspace assignments to use the RandR output name instead of <screen>
2010-03-02 13:35:43 +01:00
Michael Stapelberg
432f06a21e
Add missing carriage return (Thanks fallen)
2010-02-16 19:55:04 +01:00
Michael Stapelberg
e225742415
Make the warning about $terminal being deprecated an error (Thanks fallen)
2010-02-16 19:25:07 +01:00
Michael Stapelberg
e78bb02082
parser: ignore errors
2010-02-14 16:59:22 +01:00
Michael Stapelberg
64cf88403d
lexer/parser: proper error messages
...
Error messages now look like this:
13.02.2010 19:42:30 - ERROR:
13.02.2010 19:42:30 - ERROR: CONFIG: syntax error, unexpected <word>,
expecting default/stacking/tabbed or stack-limit
13.02.2010 19:42:30 - ERROR: CONFIG: in file "inv", line 15:
13.02.2010 19:42:30 - ERROR: CONFIG: new_container foobar
13.02.2010 19:42:30 - ERROR: CONFIG: ^^^^^^
13.02.2010 19:42:30 - ERROR:
2010-02-13 19:42:54 +01:00
Michael Stapelberg
79a4e30488
parser: enable verbose error messages, add aliases to tokens
2010-02-13 15:27:43 +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
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
4ace0d2138
config: delete old parser, new lexer/parser is the default by now
2009-11-22 20:25:33 +01:00
Michael Stapelberg
6a5bdf6f8e
Bugfix: Also allow WORDs as workspace names (Thanks Grauwolf)
2009-11-18 19:53:57 +01:00
Michael Stapelberg
d266474f97
Remove the terminal option from config.
...
The welcome message is displayed using xmessage(1), not using your
terminal. Thus, it makes no sense to have this option anymore. Also,
the new lex/yacc parser cannot correctly handle the situation:
normal variables are expanded before parsing the file. As a replacement,
you can use:
set $terminal /usr/bin/urxvt
2009-11-13 20:36:59 +01:00
Michael Stapelberg
bf728be09b
parser: Use right parameter, suppress warning about expected shift/reduce conflict
2009-11-09 22:36:26 +01:00
Michael Stapelberg
f2dcc36333
Bugfix: WHITESPACE was missing in front of the workspace name (Thanks Mirko)
2009-11-08 21:43:47 +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
876417f49d
Bugfix: Don’t access wrong parameter (Thanks atsutane)
2009-11-07 16:51:10 +01:00
Michael Stapelberg
5583dfa5e4
parser: Solve last shift/reduce conflicts
2009-11-06 17:26:17 +01:00
Michael Stapelberg
8e1945a990
parser: solve shift/reduce conflict by moving WHITESPACE token to the right place
2009-11-06 17:19:01 +01:00
Michael Stapelberg
6aab45e7a4
configfile: make whitespace optional for modes (Thanks tsdh)
2009-11-06 15:42:03 +01:00
Michael Stapelberg
de3ca5c600
Bugfix: Ignore trailing/leading whitespaces when defining a mode (Thanks badboy)
...
…and shame on you for trailing/leading whitespace :).
2009-11-02 23:13:22 +01:00
Michael Stapelberg
15d83d472b
Fix debug message in cfgparse.y (Thanks shatter)
2009-10-23 22:57:35 +02:00
Michael Stapelberg
f72161d0c2
Bugfix: parser: Correctly generate colorpixels from hex codes
2009-10-01 12:29:27 +02:00
Michael Stapelberg
6aa0f965d2
Fix warnings in lexer/parser
2009-09-29 22:47:37 +02: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
ff0e9bb954
Bugfix: Fix parsing symbols which contain numbers, like F1 or 1 for bindsym (Thanks Rasi)
2009-09-29 11:32:57 +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
fa868ed61c
Bugfix: parser: limit of 10 workspaces is gone
2009-09-27 23:05:07 +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
d916e075c3
parser: Implement parsing mode sections
...
Wait for further commits before they are actually used.
2009-09-27 17:02:13 +02:00
Michael Stapelberg
051caf571d
retab! cfgparse.y
2009-09-27 17:02:05 +02:00
Michael Stapelberg
55f4e5ab68
Add vim modeline to lexer/parser
2009-09-27 17:01:06 +02:00
Michael Stapelberg
b898058105
Fix some compilation warnings (Thanks mxf)
2009-09-26 13:30:32 +02:00
Michael Stapelberg
0e8b87e9da
lexer: Implement workspace <number> "<name>"
2009-09-19 19:39:06 +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
207ad0a7df
Implement most code to actually set the configuration settings
2009-09-13 22:13:28 +02:00
Michael Stapelberg
7fda4a2c32
Make variable expansion work with the new parsing
2009-09-13 21:32:58 +02:00
Michael Stapelberg
2986636e03
Fix some parsing problems, retab!
2009-09-13 18:40:35 +02:00
Michael Stapelberg
268bf71222
Implement option -p to test if the lexer/parser can parse your configfile (specify -c before)
2009-09-13 14:54:27 +02:00
Michael Stapelberg
9dd975e974
Add first version of lexer/parser to git, update Makefile
2009-09-13 14:16:39 +02:00