Commit Graph

127 Commits (70e6ba1d0b0ee77abaed26e4ce73c361fbec088e)

Author SHA1 Message Date
Michael Stapelberg fb0ad1e8f9 display i3 version in errors, make conversion message an error 2011-11-30 20:09:32 +00:00
Michael Stapelberg 0e56fcb971 add a few more keywords to make i3 recognize configs as v4 2011-11-29 21:20:42 +00:00
Michael Stapelberg 60bfc3a600 Bugfix: Correctly handle --no-startup-id with quoted exec commands (Thanks aksr)
Parser changes shortly before a release. What could possibly go wrong.
2011-11-11 00:28:04 +00:00
Michael Stapelberg 5227b29b0f Make named workspace assignments work again
Please note that you need a quoted string for the workspace name.
Example:
    workspace "1: www" output HDMI2

Fixes: #456
2011-10-27 22:43:53 +01:00
Michael Stapelberg af1871e414 Bugfix: Only fallback on the font if it’s actually set (Thanks phnom) 2011-10-26 21:21:55 +01:00
Michael Stapelberg bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg 8660ae4e12 bar config: fall back to the i3 font (Thanks pl) 2011-10-25 20:50:57 +01:00
Michael Stapelberg 31cb3dda8d cfgparse: use different literal strings for ambiguous keywords in bar context 2011-10-23 16:41:23 +01:00
Michael Stapelberg 9d15a00ba8 introduce sasprintf() in libi3, use it everywhere 2011-10-23 13:16:56 +01:00
Michael Stapelberg 753d67fb64 migration from exec i3bar to bar config: i3 substitutes exec with a bar block, shows nagbar 2011-10-22 16:33:00 +01:00
Michael Stapelberg 77961ad9c8 cfgparse: Don’t use asprintf when parsing hex colors 2011-10-21 23:09:57 +01:00
Michael Stapelberg 12d866e4f6 Don’t start i3-nagbar when using -C to validate the config 2011-10-20 22:25:59 +01:00
Michael Stapelberg 15bface10d Create different IDs for each bar (+test) 2011-10-19 19:57:39 +01:00
Michael Stapelberg 063b124e35 Implement parsing bar {} config blocks 2011-10-18 22:16:04 +01:00
Michael Stapelberg 178be03fa6 Implement 'workspace back_and_forth' (Patch by Michael Walle) 2011-10-17 23:17:56 +01:00
Michael Stapelberg 6420b2b102 Introduce the i3-sensible-{pager,editor,terminal} scripts
The former two provide fallbacks in case $PAGER or $EDITOR is not set (which
might be more common than you think, because they have to be set in
~/.xsession, not in the shell configuration!) while the latter tries to launch
a terminal emulator. The scripts are most prominently used in i3-nagbar, which
alerts the user when the configuration is broken for some reason. Also,
i3-sensible-terminal is used in the default configuration.

This commit does not rely on the shell supporting ${PAGER:-less} anymore, which
is not the case for 'fish'.
2011-09-25 18:46:37 +01:00
Michael Stapelberg 143663f031 Merge branch 'master' into next 2011-09-20 22:37:08 +01:00
Michael Stapelberg 77ae3cd8f7 Bugfix: use bufcopy instead of buf when boundary checking (Thanks thomasba)
Also replace the useless (bufcopy + (next - bufcopy)) with next
2011-09-20 22:36:23 +01:00
Michael Stapelberg de7c2841ed Merge branch 'master' into next 2011-09-20 21:42:51 +01:00
Michael Stapelberg cd6c3fedcb A bit more boundary-checking when replacing variables.
Makes valgrind happy
2011-09-20 21:42:26 +01:00
Michael Stapelberg e1949aa694 Bugfix: Correctly split key/value when parsing variables (Thanks xeen) 2011-09-20 21:42:09 +01:00
Michael Walle 5aa43d61f8 Add force_xinerama configuration option
The configuration option does the same as the commandline parameter, except
it can be easily set by the user (e.g. you are using KDM and can't start a
session through ~/.xsession).

Signed-off-by: Michael Walle <michael@walle.cc>
2011-09-19 23:10:38 +01:00
Michael Stapelberg b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg fe35c80741 Also make compilation possible on systems with libev 3
From the source:

    We need ev >= 4 for the following code. Since it is not *that* important
    (it only makes sure that there are no i3-nagbar instances left behind) we
    still support old systems with libev 3.
2011-09-17 17:55:36 +01:00
Michael Stapelberg 2c7148c46e Same bugfix as 2a215fd, but for assignments with invalid criteria 2011-09-11 22:54:41 +01:00
Michael Stapelberg 717ae819c5 Merge branch 'master' into next 2011-09-11 22:52:44 +01:00
Michael Stapelberg 2a215fd7e2 Bugfix: Ignore for_window commands with empty (invalid) criteria (+test) (Thanks aksr) 2011-09-11 22:52:33 +01:00
Michael Stapelberg d82698efa7 make the old assign syntax trigger an i3-nagbar warning (it’s deprecated), adjust test 2011-09-11 22:01:36 +01:00
Michael Stapelberg e47e100819 Introduce a new syntax for the 'assign' command:
Instead of using a quoted string to specify the class / title, the assign
command now uses criteria, just like the for_window command or the command
scopes.

An example comes here:

    # Assign all Chromium windows (including popups) to workspace 1: www
    assign [class="^Chromium$"] → 1: www

    # Make the main browser window borderless
    for_window [class="^Chromium$" title=" - Chromium$"] border none

This gives you more control over the matching process due to various reasons:

1) Criteria work case-sensitive by default. Use the (?i) option if you want a
   case-insensitive match, like this:
   assign [class="(?i)^ChroMIUM$"] → 1

2) class and instance of WM_CLASS can now be matched separately. For example,
   when starting urxvt -name irssi, xprop will report this:
   WM_CLASS(STRING) = "irssi", "URxvt"
   The first part of this is the instance ("irssi"), the second part is the
   class ("URxvt").
   An appropriate assignment looks like this:
   assign [class="^URxvt$" instance="irssi"] → 2

3) You can now freely use a forward slash (/) in all strings since that is no
   longer used to separate class from title (in-band signaling is bad, mhkay?).
2011-09-11 21:54:13 +01:00
Michael Stapelberg d03dffe012 Kill left-over i3-nagbar processes on 'exit' 2011-09-11 21:49:35 +01:00
Michael Stapelberg b3e1fb1f3b Make the old 'assign' case-insensitive again (+test) (Thanks aksr) 2011-09-11 21:16:45 +01:00
Michael Stapelberg 2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg b4809e9ba7 Merge branch 'master' into next 2011-08-31 14:45:14 +02:00
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