Commit Graph

306 Commits (aa0b1f599f25cfe858ebbc7fa80d459bcdb2ae02)

Author SHA1 Message Date
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
Michael Stapelberg 35b70ca423 introduce client.placeholder color 2013-12-22 21:52:49 +01:00
Michael Stapelberg 665ac5b7c3 userguide: explain the difference between comma and semicolon for command chaining 2013-12-11 19:47:36 +01:00
Trung Ngo 3dba51500e Update userguide on multiple criteria
Change wording, add an example for multiple criteria and move
the sentence explaining the Firefox example into the code listing
block.
2013-11-10 19:55:45 +01:00
Alexander Neumann 4622fd8703 Correct typos in user guide 2013-10-19 10:05:10 +02:00
Alexander Neumann 7f9d2ac948 Add quoting for sample command
The user's guide talks about renaming workspaces, for example to
"2: mail", and a sample key binding for use with i3-input is supplied.
However, this example lacks proper quoting for the format string, so
that when workspace name with a space in it, like "2: mail", is given,
the current workspace is renamed to "2:". This patch adds proper
quoting.
2013-10-13 17:17:24 +02:00
syl20bnr 7098ef602b Add new bar.binding_mode_indicator configuration.
i3 current behavior hides the binding mode indicator when
workspace buttons are disabled.
This patch adds a new configuration for i3bar called
'binding_mode_indicator' which acts like the workspace_buttons.
It is now possible to configure i3bar to hide the
workspace buttons and keep showing the binding mode indicator.
This should make the hide workspace buttons configuration
more convenient for those who are heavily using binding
modes.
Default value for binding_mode_indicator is true.
2013-09-24 06:59:26 +02:00
James Baumgarten 4ff01e59ca Clarify userguide description of urgent_workspace configuration 2013-09-09 05:09:45 +02:00
Michael Stapelberg 3216cc79de Merge branch 'master' into next 2013-08-12 09:13:55 +02:00
Michael Stapelberg ee533a6ddc Fix userguide formatting (Thanks Slava) 2013-08-12 09:12:53 +02:00
syl20bnr 3be0b519c9 Update documentation paragraph on variables
see http://infra.in.zekjur.net/archives/i3-discuss/2013-August/001377.html
2013-08-08 22:42:15 +02:00
koebi 88671986f4 implement unmark command 2013-07-17 23:02:31 +02:00
Alexander Berntsen 023594909e Implement debuglog command
Add debuglog command that takes toggle|on|off. Add get_debug_logging()
to be able to toggle. Make t/187-commands-parser.t expect 'debuglog'.
Document the debuglog command in userguide.
2013-07-07 15:33:42 +02:00
Michael Stapelberg 71dfcbc674 userguide: improve the shmlog docs
• the section heading needs === instead of ==
• better title
• explain what shared memory logging does and where to find more
  information
• add syntax section
• improve examples
• clarify that shmlog <size> discards the current log
2013-06-23 22:10:42 +02:00
Alexander Berntsen f9d93d75b3 Implement shmlog command
Add shmlog command that takes <size>|toggle|on|off. Separate logbuffer
management into open_logbuffer() and close_logbuffer(). Make
t/187-commands-parser.t expect 'shmlog'. Add update_shmlog_atom() to
update the SHMLOG_PATH. Document the shmlog command in userguide.
2013-06-23 21:48:02 +02:00
haptix@web.de e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
Eric S. Raymond d0fbc10aca Typo and usage fixes in documentation and comments. 2013-04-11 22:37:39 +02:00
Michael Stapelberg 82b59788ac userguide: mention forgotten layout splitv/splith (Thanks Eelis) 2013-03-30 13:03:35 +01:00
Artem Shinkarov 5f05ca6b5d Separator color via config; separator width and on/off via ipc
This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
2013-02-18 10:44:44 +01:00
Michael Stapelberg 1e3075e69b userguide: remove obsolete sentence about client.background (Thanks Tucos) 2013-02-14 20:47:41 +01:00
Michael Stapelberg be287876d6 userguide: be explicit about assignment processing order (Thanks Donald) 2013-02-07 15:49:35 +01:00
Michael Stapelberg 3e59a8c949 Merge branch 'master' into next 2013-01-27 20:20:53 +01:00
Michael Stapelberg 8b97a5e159 userguide: be more clear about the resize command arguments (Thanks Tucos) 2013-01-27 20:20:37 +01:00
Michael Stapelberg d6e4910c22 userguide: fix typo: s/11x/11px/ 2012-12-26 18:32:13 +01:00
Michael Stapelberg 5b8df27270 userguide: s/mailclient/mail client/g (Thanks joepd) 2012-12-20 23:54:48 +01:00
Michael Stapelberg aa69b9fc5f userguide: document new_float option (like new_window) 2012-12-02 17:57:24 +01:00
Michael Stapelberg eaf13eace2 userguide: add section with synonym "screen" for "RandR output"
While the docs describe the feature, plenty of people ask for it on IRC.
Let’s see if this makes it easier to find.
2012-11-20 17:11:54 +01:00
Quentin Glidic f0d2d84b1c libi3/font: Use "pango:" prefix to avoid confusion
Also add a user-friendly font description syntax to userguide
2012-11-07 21:23:21 +01:00
Michael Walle ae14fe9141 introduce new command to rename focused workspace
The corresponding command is 'rename workspace to <name>'. As a side-effect
this fixes the command 'rename workspace 1 to to'.

Signed-off-by: Michael Walle <michael@walle.cc>
2012-10-31 09:09:56 +01:00