Commit graph

22 commits

Author SHA1 Message Date
Simon Ser
fc640d5f6c Define _POSIX_C_SOURCE globally
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
2024-02-23 17:43:19 +03:00
Florian Franzen
cab2189aa6 sway: add bindgesture command
Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
2022-05-30 12:20:43 +02:00
Manuel Stoeckl
cb3c727632 Declare all struct cmd_handler arrays const
And make the functions handling these arrays use const types.
2021-02-04 09:49:06 +01:00
Brian Ashworth
1a8b9fda8a cmd_mode: don't reset to default after subcommand
In cmd_mode, the mode is currently being reset to the default mode after
a mode subcommand handler is executed. This stores and restores the mode
instead
2019-08-27 13:45:04 +09:00
Brian Ashworth
f59b665792 cmd_mode: make modes case sensitive
This mirrors a change in i3 4.17 that makes binding modes case
sensitive
2019-08-06 11:32:26 +09:00
Brian Ashworth
d0d01810f3 cmd_mode: allow runtime creation and modification
This allows for modes to be created, bindings to be added to modes, and
bindings to be removed from modes at runtime. Additionally, this also
allows for `mode <mode>` to be deferred in the config to set an initial
mode.
2019-06-20 10:14:19 -04:00
Brian Ashworth
8cd7f0171a cmd_mode: allow cmd_set to be a subcommand
This allows set to be used in mode blocks
2019-03-23 08:07:25 +02:00
Ryan Walklin
bdb402404c Support WLR_INPUT_DEVICE_SWITCH in sway
This commit adds support for laptop lid and tablet
mode switches as provided by evdev/libinput and
handled by wlroots.

Adds a new bindswitch command with syntax:
bindswitch <switch>:<state> <command>

Where <switch> is one of:
tablet for WLR_SWITCH_TYPE_TABLET_MODE
lid for WLR_SWITCH_TYPE_LID

<state> is one of:
on for WLR_SWITCH_STATE_ON
off for WLR_SWITCH_STATE_OFF
toggle for WLR_SWITCH_STATE_TOGGLE

(Note that WLR_SWITCH_STATE_TOGGLE doesn't map to
libinput and will trigger at both on and off events)
2019-03-19 23:58:47 -04:00
M Stoeckl
1211a81aad Replace wlr_log with sway_log
This commit mostly duplicates the wlr_log functions, although
with a sway_* prefix. (This is very similar to PR #2009.)
However, the logging function no longer needs to be replaceable,
so sway_log_init's second argument is used to set the exit
callback for sway_abort.

wlr_log_init is still invoked in sway/main.c

This commit makes it easier to remove the wlroots dependency for
the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-21 12:59:42 +01:00
M Stoeckl
2a684cad5f Remove now-unused "input" argument of cmd_results_new
Patch tested by compiling with `__attribute__ ((format (printf, 2, 3)))`
applied to `cmd_results_new`.

String usage constants have been converted from pointers to arrays when
encountered. General handler format strings were sometimes modified to
include the old input string, especially for unknown command errors.
2019-01-14 08:05:29 -05:00
emersion
3a310f92ab
Replace _XOPEN_SOURCE with _POSIX_C_SOURCE
And make sure we don't define both in the same source file.
2018-11-25 17:19:43 +01:00
Brian Ashworth
00a00aacef Create list for mouse binds when creating new mode 2018-07-31 23:49:42 -04:00
emersion
63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
Brian Ashworth
78c08fb0a2 Implement mode --pango_markup 2018-07-05 18:12:14 -04:00
Brian Ashworth
8bfa2def88 Address first round of review for generic blocks 2018-06-02 08:07:44 -04:00
Brian Ashworth
7c810dc344 Make command block implementation generic 2018-06-02 08:07:44 -04:00
Drew DeVault
8efee109ad Implement modes 2018-03-29 22:11:08 -04:00
Drew DeVault
733993a651 Move everything to sway/old/ 2017-11-18 11:22:02 -05:00
Drew DeVault
9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
Drew DeVault
248df18c24 Handle allocation failure in commands 2016-12-15 19:01:40 -05:00
Zandr Martin
65ace5dec5
merge in latest commits 2016-09-02 14:11:48 -05:00
Zandr Martin
b374c35758
refactor commands.c 2016-09-01 21:39:08 -05:00