Commit Graph

334 Commits (42c5feb22f230a16871059ef4403841c78fc4c12)

Author SHA1 Message Date
Ingo Bürk 47562b4143 Introduce support for specifying variables from X resources. (#2286)
This patch introduces a new 'set_from_resource' config directive which
allows defining a variable by retrieving its value from the X resource
database. This avoids having to configure a color scheme in multiple
files. The directive takes an additional fallback value which is used
in case the resource cannot be found or during config validation where
no X connection is available.

Furthermore, this patch includes the following changes:
- If the same variable is defined twice, we now properly overwrite the
  value of the assignment rather than inserting two variable definitions
  with the same key.
- We now depend on xcb-util-xrm to query the resource.
- Increase the buffer size for variable / resource assignments.

fixes #2130
2016-05-08 12:55:27 +02:00
Johannes Lange a8757625c3 Do not count '\' in comment as line continuation (#2181)
fixes #2176
2016-05-08 00:20:08 +02:00
Kenneth Lyons ac97dbdf90 Fix typos in documentation. 2016-03-21 10:00:25 -07:00
Ingo Bürk 018922dcc4 Allow "modifier none" in i3bar to disable the modifier.
This allows "modifier none" (and "modifier off") for the bar config
in order to disable the modifier key altogether. This is useful
for users who use a different approach to hiding / showing the bar,
e.g., a custom keybind that involved multiple keys or scripts.

fixes #2208
2016-02-11 20:51:05 +01:00
Ingo Bürk 6cbff6bfd4 Ensure that the "border" command uses logical pixels.
Until now, only the config directive for borders (new_window,
new_float) respected the DPI setting (using logical_px). This
patch makes sure we also do so for runtime "border" commands.

fixes #2202
2016-02-09 21:03:44 +01:00
Johannes Lange 0c57abe8e5 "hiding vertical borders" -> "hiding outer borders"
This option can be used to hide horizontal or horizontal+vertical
borders since 57effd6
2016-02-04 20:01:24 +01:00
Ingo Bürk 811ff07b8e Rename decoration_border to child_border.
fixes #2154
2016-01-09 16:47:33 -05:00
Michael Stapelberg 3853d1866b Merge pull request #2143 from Airblader/feature-2120
Allow title_format for all containers
2016-01-05 22:32:15 +01:00
Ingo Bürk 1f660a4cc4 Move title_format from window to container.
This patch moves the title_format information from windows to containers.
Furthermore, it allows correctly setting it on window-less containers and
displays the title accordingly for split containers.

We now also dump and read title_format in GET_TREE / during restarts.

fixes #2120
2016-01-05 12:22:27 -05:00
Lauri Tirkkonen 034a12acad add decoration_border color for the actual client borders
see https://github.com/i3/i3/pull/2136
2016-01-05 12:17:48 +02:00
Johannes Lange 8bfd06c3dd added "toggle" option to "split" command
as requested in #1814
2016-01-04 17:31:47 +01:00
Kyle Kneitinger 3919dd8daa userguide: clarify quoting of exec commands 2015-12-27 12:07:41 -08:00
Michael Stapelberg b5693d6fb3 userguide: faq has moved to reddit 2015-12-20 13:12:37 +01:00
Florian Merkel 33f017daa9 Support matching _NET_WM_WINDOW_TYPE_NOTIFICATION
This commit fixes #1969 by adding support for matching a window's type
against _NET_WM_WINDOW_TYPE_NOTIFICATION. The userguide and tests were
updated to reflect this change.
2015-12-15 21:55:33 +01:00
Ingo Bürk bc250b26a0 Allow multiple tray_output directives.
This patch introduces the possibility to specify the tray_output directive
multiple times. All values will be used by i3bar, in the order they are
given.

This way, a single bar configuration can be used for several machines with
internal output names "eDP1" and "LVDS-0" by specifying tray_output for both.
Any external output (e.g., "DP-0") will still not receive the tray. The same
effect can be achieved by using "primary", but forces the user to couple the
tray display to the primary output which may not be desirable behavior.

relates to #555
2015-11-01 16:35:17 -05:00
David Simon dc05d905c1 Optionally change i3bar color on focused output, implements #2020 2015-10-27 09:12:57 -04:00
Ingo Bürk 57a7ff301f Add --no-auto-back-and-forth for moving windows.
This patch extends the previously introduced flag --no-auto-back-and-forth
to also apply to

    move window to workspace <name>
    move window to workspace number <number>

relates to #2028
2015-10-26 22:40:06 +01:00
Ingo Bürk 7270206e24 Added --no-auto-back-and-forth to workspace commands.
This patch introduces the --no-auto-back-and-forth flag to both of

    workspace --no-auto-back-and-forth <name>
    workspace --no-auto-back-and-forth number <number>

This flag will only have an effect if the back_and_forth feature is
enabled. If passed, the feature will be ignored for this particular
call only.

fixes #2028
2015-10-24 00:12:03 +02:00
Ingo Bürk 60158d31a2 Introduce special value __focused__ for criterion con_id.
This allows matching with

    [con_id=__focused__] unmark

for commands that do not default to operating on the focused window
if no criteria have been specified (such as unmark).

relates to #2014
2015-10-22 15:46:55 +02:00
Ingo Bürk 9537ada5ad Make 'unmark' aware of matched windows.
This patch allows using 'unmark' on matched windows. The old behavior
of applying it to all windows if no criteria were specified is kept.

relates to #2014
2015-10-22 15:32:18 +02:00
Ingo Bürk 7a77c5f0bb Introduce "--add" for marking windows.
In order to keep compatibility to before allowing multiple marks on a window,
we introduce a flag "--add" that must be set to put more than one mark on a
window. The default, which is also available as "--replace", keeps the old
behavior of overwriting a mark when setting a new one.

fixes #2014
2015-10-22 15:32:15 +02:00
Ingo Bürk 9bb2f038ab Allow multiple marks on windows.
This patch allows multiple marks to be set on a single window. The restriction that a mark may
only be on one window at a time is still upheld as this is necessary for commands like
"move window to mark" to make sense.

relates to #2014
2015-10-22 15:29:42 +02:00
Adaephon-GH 68c10f7257 Make rendering of key bindings more consistent
- Render key names and key bindings verbatim if they could be used like
  that in the configuration (no special format for "colloquial" names:
  Alt, Windows, ...)
- Use only lower case letters for key bindings
2015-10-21 13:58:45 +02:00
Adaephon-GH 103cef7b2b Improve placement of explicit IDs for headings
In some cases the IDs of section titles was placed after the section
title. With that in the rendered HTML the ID was placed on the paragraph
and not on the heading. This led to heading not being shown when the
corresponding link was clicked.
2015-10-21 13:35:52 +02:00
Adaephon-GH 29490c2336 Quote __focused__ to prevent parsing by asciidoc
Text between two "__" is rendered as italics by asciidoc. This affects
the display of the new __focused__ special value for criteria.
2015-10-21 13:08:21 +02:00
Adaephon-GH 3e3a2f0549 Fix erroneous headline for moving to mark
The headline indicated that it would be possible to move containers and *workspaces* to marks but the following text clearly shows that it should state containers and *windows*.
2015-10-19 07:39:59 +02:00
Ingo Bürk 52d306db24 Add proper documentation for binding modes.
fixes #1996
2015-10-18 17:53:27 +02:00
hwangcc23 dd400ff74b Revise workspace next/prev
See the issue #1798 (http://github.com/i3/i3/issues/1798).

+workspace_next+ as-is cycles through either numbered or named workspaces,
but when it reaches the last numbered/named workspace, it only looks for
named workspaces. This commit changes it: look for named workspaces after
exhausting numbered ones, but also for numbered ones after exhausting
named ones.

Also add a test case 528-workspace-next-prev.t (numbered workspaces and named
workspaces on 2 outputs) for testing this.
2015-10-16 23:25:12 +08:00
Ingo Bürk f7907c11d7 Suppress no_focus for first window on a workspace.
With this patch, the no_focus directive will be ignored if the
to-be-opened window is the first on its workspace as there's no
reason the user would not want to focus it in this case.
This improves usability when, for example, using a tabbed
workspace_layout.

fixes #1987
2015-10-12 12:59:01 +02:00
Ingo Bürk 54486ca498 Fix documentation for no_focus.
fixes #1986
2015-10-11 17:05:30 +02:00
Jakob Haufe 7a66d55df5 Fix formatting of description list 2015-10-02 19:52:45 +02:00
Nils Schneider c87b256200 Revert "Add a timeout: delay_exit_on_zero_displays"
This reverts commit 2c77d7ceed.
2015-09-14 22:34:05 +02:00
Ingo Bürk 9866b00802 Implement new 'sticky' command to manually set, remove or toggle the sticky state on a window. 2015-09-13 20:40:20 +02:00
Michael Stapelberg ef6f2f4365 Merge pull request #1893 from rr-/resize
Added cmd_size
2015-09-11 14:31:33 -07:00
rr- 23d16e1332 Support "resize set W H" 2015-09-11 23:12:07 +02:00
lasers bb5ebd38da Fix typo in userguide 2015-09-10 22:42:00 -05:00
Ingo Bürk 2daded90ea Fix typo in userguide. 2015-08-29 14:04:15 +02:00
Ingo Bürk 54d270e359 Support a special value "__focused__" as a command criterion pattern for class, instance, title, window_role and workspace.
This special value will match if the window's property equals that of the currently focused window.

relates to #1770
2015-08-28 10:07:12 +02:00
Michael Stapelberg bf3cd41b5d Use libxkbcommon for translating keysyms, support all XKB groups.
fixes #1835

This commit improves the translation of keysyms to keycodes by loading
keymaps using libxkbcommon-x11 and using libxkbcommon for figuring out
the keymap, depending on each keybinding’s modifiers. This way, the
upper layers of complex layouts are now usable with i3’s bindsym
directive, such as de_neo’s layer 3 and higher.

Furthermore, the commit generalizes the handling of different XKB
groups. We formerly had support only for two separate groups, the
default group 1, and group 2. While Mode_switch is only one way to
switch to group 2, we called the binding option Mode_switch. With this
commit, the new names Group1, Group2 (an alias for Mode_switch), Group3
and Group4 are introduced for configuring bindings. This is only useful
for advanced keyboard layouts, such as people loading two keyboard
layouts and switching between them (us, ru seems to be a popular
combination).

When grabbing keys, one can only specify the modifier mask, but not an
XKB state mask (or value), so we still dynamically unbind and re-bind
keys whenever the XKB group changes.

The commit was manually tested using the following i3 config:

    bindsym Group4+n nop heya from group 4
    bindsym Group3+n nop heya from group 3
    bindsym Group2+n nop heya from group 2
    bindsym n nop heya
    bindsym shift+N nop explicit shift binding
    bindsym shift+r nop implicit shift binding
    bindcode Group2+38 nop fallback overwritten in group 2 only
    bindcode 38 nop fallback

…with the following layout:

    setxkbmap -layout "us,ua,ru,de" -variant ",winkeys,,neo" \
      -option "grp:shift_caps_toggle,grp_led:scroll" \
      -model pc104 -rules evdev

By default (xkb group 1, us layout), pressing “n” will result in the
“heya” message appearing. Pressing “a” will result in the “fallback”
message appearing. “j” is not triggered.

By pressing Shift+CapsLock you switch to the next group (xkb group 2, ua
layout). Pressing “a” will result in the “fallback overwritten in group
2 only” message, pressing “n” will still result in “heya”. “j” is not
triggered.

In the next group (xkb group 3, ru layout), pressing “a” will result in
the “fallback” message again, pressing “n” will result in “heya”,
“j” is not triggered.

In the last group (xkb group 4, de_neo layout), pressing “a” will still
result in “fallback”, pressing “n” will result in “heya”, pressing “j”
will result in “heya from group 4”.

Pressing shift+n results in “explicit shift binding”, pressing shift+r
results in “implicit shift binding”. This ensures that keysym
translation falls back to looking at non-shift keys (“r” can be used
instead of ”R”) and that the order of keybindings doesn’t play a role
(“bindsym n” does not override “bindsym shift+n”, even though it’s
specified earlier in the config).

The fallback behavior ensures use-cases such as ticket #1775 are still
covered.

Only binding keys when the X server is in the corresponding XKB group
ensures use-cases such as ticket #585 are still covered.
2015-08-26 09:56:42 +02:00
Michael Stapelberg f1bb9524ca Merge pull request #1864 from Airblader/feature-1861-class-instance
Added '%class' and '%instance' as placeholders for the title_format
2015-08-25 19:29:17 +02:00
Ingo Bürk 2938fc0ab1 Added '%class' and '%instance' as placeholders for the title_format directive.
relates to #1861
2015-08-25 19:22:05 +02:00
Michael Stapelberg 1784906d6d docs/userguide: document behavior of tray_output with multiple bars
fixes #1855
2015-08-25 09:23:41 +02:00
Ingo Bürk 39fbb2c5dd Add client.background to the list of all available colorclasses rather than mentioning it as something special afterwards. 2015-08-18 00:05:06 +02:00
Michael Stapelberg d3608bb6eb userguide: explain i3-config-wizard’s behavior
fixes #1782
2015-08-07 08:41:39 +02:00
Michael Stapelberg c8b4303eff Make line continuation userguide entry more verbose. 2015-07-27 22:33:03 +02:00
Michael Stapelberg 691d6714fc Merge pull request #1797 from hwangcc23/config-file-line-continuation
Support config file line continuation
2015-07-27 13:27:03 -07:00
hwangcc23 fc1477dfb5 Support config file line continuation
1. Allow to use the line continuation, which is indicated by \ before the new line character, in config files.
2. Add a new testcase "247-config-line-continuation.t" for
    a). testing line continuation
    b). making sure string escaping still works
    c). testing line continuations within a string
    b). testing line continuations with too many lines
2015-07-26 07:54:06 +08:00
Michael Stapelberg e89f391589 Merge pull request #1805 from lasers/next
Added missing bar section for tray_output primary
2015-07-19 22:48:04 +02:00
Chris b9e1973948 Added missing bar section for tray_output primary 2015-07-18 18:50:02 -05:00
Ingo Bürk be406d036d Implement new criterion 'workspace'.
If the match expression is a plain number (e.g., '99'), the number of a workspace will be compared strictly. Otherwise, the match expression is taken as a regular expression and compared against the workspace's name.
This allows all of the following:

for_window [workspace=5] ...
for_window [workspace="5:foo"] ...
for_window [workspace="foo"] ...

fixes #1769
2015-06-30 20:53:52 +02:00
Michael Stapelberg 8df7e4ecb9 Merge pull request #1747 from Airblader/feature-1723
Implement "title_format"
2015-06-29 00:24:59 -07:00
Ingo Bürk cf11fb5574 Added documentation for "title_format". 2015-06-29 09:19:50 +02:00
Michael Hofmann bad4203755 Configurable tray padding. 2015-06-28 00:14:37 +02:00
Michael Stapelberg 696d844ffa Merge pull request #1697 from Airblader/feature-1695
Extend mouse commands on i3bar
2015-06-18 20:50:56 +02:00
Ingo Bürk f0ac9629b9 Adapted userguide for new i3bar 'bindsym' command. 2015-06-18 19:28:24 +02:00
Michael Stapelberg 34183b97fd Merge pull request #1744 from Airblader/feature-docs-7
Documentation Improvements
2015-06-13 12:39:59 +02:00
Ingo Bürk 9940571069 Fix documentation for border styles. 2015-06-12 17:54:54 +02:00
Michael Stapelberg 801b795b45 userguide: document signal handling caveat affecting at least dash(1)
fixes #1741
2015-06-12 09:52:02 +02:00
Ingo Bürk 9571200baa Remove dead documentation for non-existing feature "stack-limit". 2015-06-09 23:13:15 +02:00
Ingo Bürk b118b588ee Added the 'binding_mode' color directive to the documentation. 2015-06-01 16:57:13 +02:00
Ingo Bürk e2d5ebce1a Fixed syntax for tray_output in userguide. 2015-05-22 22:07:43 -04:00
Michael Stapelberg 43386c51d4 Merge pull request #1706 from Airblader/feature-docs-5
Made syntax of syntax descriptions consistent:
2015-05-18 21:46:47 +02:00
Ingo Bürk 94a46a1e35 Made syntax of syntax descriptions consistent:
* <xyz> denotes that some string must be used which is not a fixed value (e.g., a command), but a variable string (text, a number, ...)
* [xyz] denotes that the parameter is optional
* abc|xyz denotes that either abc or xyz must be given
2015-05-18 11:18:00 -04:00
Michael Stapelberg da064cc08f Merge pull request #1698 from Airblader/feature-1696
Added 'move position mouse'
2015-05-17 15:02:50 +02:00
Ingo Bürk d2cfe38c04 Added 'move position mouse' command to the userguide. 2015-05-12 17:47:18 -04:00
Michael Stapelberg 66a1fa7d46 Merge pull request #1638 from hwangcc23/fix-1489
Add a timeout: delay_exit_on_zero_displays
2015-05-05 00:43:43 -07:00
Michael Stapelberg 95f3f7f8c9 userguide: quoted strings need to be used, escaping isn’t possible
fixes #1678
2015-05-03 18:57:05 +02:00
Michael Stapelberg 57ddd00814 userguide: add a note to both “exec”s about semicolon and comma
fixes #1678
2015-04-24 18:46:42 +02:00
Michael Stapelberg 67ec2333ee Merge pull request #1665 from Airblader/feature-1658
Added criterion 'window_type'
2015-04-21 08:42:16 +02:00
Ingo Bürk 550c0ec318 Implement new criterion 'window_type = normal|dialog|utility|toolbar|splash|menu|dropdown_menu|popup_menu|tooltip'
fixes #1658
2015-04-20 19:27:39 +02:00
Ingo Bürk 9613a0744d Added configuration directive for 'move [container|window] [to] mark <str>' 2015-04-19 20:57:44 +02:00
Michael Stapelberg 8a608ee63a Merge pull request #1632 from Deiz/binding-border
Add a --border flag to enable mouse binds to trigger on border click
2015-04-19 09:28:08 -07:00
hwangcc 2c77d7ceed Add a timeout: delay_exit_on_zero_displays
Outputs may disappear momentarily and come back later.
To prevent i3 from exit when no output is available momentarily, add a timeout delay_exit_on_zero_displays.
2015-04-11 22:13:10 +08:00
Ingo Bürk 40b9048102 Use a reasonable default sep_block_width if a separator_symbol is given 2015-04-06 15:43:47 +02:00
Ingo Bürk a952ae74f4 Use a reasonable default sep_block_width if a separator_symbol is given 2015-04-03 22:54:59 +02:00
Deiz 601043cbf3 Update userguide for --border 2015-04-02 16:43:54 -04:00
Ingo Bürk 5d8dfe0ec5 Update docs to clarify that split containers get a representation of their children in the decoration 2015-04-02 08:53:40 +02:00
Ingo Bürk 0788f43db7 Updates userguide for 'no_focus <criteria>' (#1416) 2015-04-01 20:46:56 +02:00
Ingo Bürk 6036d4e506 Changed the default for show_marks from "no" to "yes" 2015-03-30 23:11:50 +02:00
Ingo Bürk 245a29e233 Make show_marks configurable
Introduce a config directive "show_marks [yes|no]" to en- or disable drawing marks on window decorations.
To not change the look & feel of existing configurations, the default is "no".
2015-03-30 23:11:50 +02:00
Ingo Bürk 195acb4911 Updated userguide for the directive focus_on_window_activation introduced in #1426. 2015-03-30 22:10:06 +02:00
Ingo Bürk 47222ab261 Updated docs for #1463 2015-03-29 21:21:50 +02:00
Michael Stapelberg 00e86c4de4 Merge pull request #1580 from Airblader/feature-nop
Allow nop command without argument
2015-03-27 09:39:28 +01:00
Ingo Bürk e0332b6f07 Allow nop command without argument
fixes #1318
2015-03-27 09:29:16 +01:00
Ingo Bürk 80da100ac8 Add support for a custom separator symbol
This introduces a "separator_symbol" property for the i3bar configuration.
If set, the specified string will be used as a separator instead of a vertical line. Since it is an optional configuration, complete backwards compatibility is given.

fixes #1472
2015-03-25 21:38:55 +01:00
Tony Crisci e18e2b9f98 i3bar: use Pango markup
Parse text within workspace buttons and the i3bar statusline as Pango
markup. This lets people specify things like font weight, text color,
background color, font size, and font family in the text of i3bar.

fixes #1468
2015-02-12 14:45:34 -05:00
Tony Crisci c815fc798d Handle button release events
This enables the --release switch on mouse button bindings.
2015-02-10 17:46:02 -05:00
Tony Crisci 74b69d6d02 Add mouse binding pointer position configuration
Add the `--whole-window` switch for mouse bindings. This switch controls
what part of the container the pointer must be over to trigger a mouse
binding. The default is to only trigger mouse bindings over the
titlebars. With this switch, a mouse binding will be triggered over the
main part of the window as well.

This is a breaking change to the previous behavior, which would trigger
a mouse binding with a modifier over any part of the window.

fixes #1429
2015-01-31 21:29:48 +01:00
Mats e59a76e456 Extend the fullscreen command
Rather than just toggling the fullscreen modes, allow to set them
directly with:

    fullscreen enable|toggle [global]
    fullscreen disable

For compatibility, retain the previous command and its toggling behavior:

    fullscreen [global]

fixes #1120
2014-12-10 20:42:52 +01:00
Tony Crisci 8e23dc881b i3bar: implement custom mouse wheel commands
Users can specify a command to run when a button was pressed on i3bar to
override the default behavior. Currently only the mouse wheel buttons
are supported. This is useful for disabling the scroll wheel action or
running scripts that implement custom behavior for these buttons.

Example:

bar {
    wheel_up_cmd nop
    wheel_down_cmd exec ~/.i3/scripts/custom_wheel_down
}

fixes #1104
2014-07-10 22:40:12 +02:00
Tony Crisci 0df172fd05 Feature: implement mouse bindings
A configured mouse binding (for example `bindsym button3 kill`) runs
its command when the mouse button is pressed over parts of a container.

If the binding has no modifer, it will only run when the button is
clicked on the window titlebar.

Otherwise if the binding has a modifier, it will run over the titlebar
or any part of the contained window.

fixes #558
2014-06-19 12:28:54 +02:00
Tony Crisci f4a8253593 userguide: document exit confirmation dialog
In the section "Exiting i3", document the confirmation dialog (nagbar)
that will show when the user presses the default keys to exit in such a
way to hint that it is configurable.
2014-06-16 09:50:31 +02:00
Atte Peltomaki 62ea60ba42 Add configuration option for disabling mouse warping
This patch adds a new configuration option "mouse_warping [output|none]".

When mouse warping is disabled, mouse cursor does not jump to middle of current
screen when changing workspaces between multiple outputs. This introduces a
"special" cursor state, where focus is in one window and cursor on another.
Useful for eg. scrolling a web page with mouse wheel while typing into another
window on keyboard.
2014-05-31 14:55:29 +02:00
Tony Crisci e707e0a5fa i3bar: implement custom workspace numbers config
Implement the configuration option within the bar config directive for
custom workspace numbers with the directive `strip_workspace_numbers
yes`.

This directive strips the workspace name of the number prefix and
delimiter. When the workspace name consists only of the number, it will
default to show the number.

For example:

* "2:5" -> "5"
* "4:$" -> "$"
* "8" -> "8"

This allows customization of i3bar for alternate ordering of workspaces
which has a legitimate use for alternate keyboard layouts such as
Dvorak.

fixes #1131
2014-05-16 17:55:30 +02:00
Michael Stapelberg b69b3fc572 docs/userguide: fix default key binding (Thanks Maxime) 2014-05-08 08:45:30 +02:00
jeroentbt 85df107b0d docs: fix typo 2014-03-21 19:21:51 +01:00
jeroentbt c0589ad5be fix typo 2014-03-21 19:21:47 +01:00
Jonas Maaskola 1bd13ce555 Doc update: title right click resizes floating windows
This documentation update describes the change implemented in
905440d6d1
It avoids repetitive usage of the word 'also'.
2014-02-08 20:41:16 +01:00
Michael Stapelberg 7cf0c632c3 Merge branch 'master' into next 2014-01-23 22:20:39 +01:00
Wieland Hoffmann 658abe2e11 docs/userguide: change 'reseted' to 'reset'
It's an irregular verb.
2014-01-23 22:20:36 +01:00