Commit Graph

3123 Commits

Author SHA1 Message Date
Mikkel Oscar Lyderik
2c43bd2ac8 Only update visibility if WS isn't destroyed after
No need to update visibility if the workspace will be destroyed right
after.
2016-01-21 22:05:06 +01:00
Drew DeVault
72f297fc71 Merge pull request #456 from gpyh/fix-config-dir
Fix issue #455
2016-01-21 15:15:50 -05:00
Yacine Hmito
c487cf71a5 Fix issue #455
CMAKE_INSTALL_FULL_SYSCONFIG is not actually passed to
the C preprocessor. I remember it working, so I must have
messed up somewhere last time I touched this.
This is fixed by manually passing its value to the C preprocessor
through the SYSCONFDIR definition
2016-01-21 21:08:18 +01:00
Drew DeVault
d969a1dec0 Fix memory leak in config.c
Thanks @jollywho
2016-01-21 11:18:13 -05:00
Mikkel Oscar Lyderik
ac740271a5 Strip stray whitespace 2016-01-21 17:03:21 +01:00
Drew DeVault
a6b19988c5 Merge pull request #440 from SethBarberee/zsh-completions
Basic Zsh auto-completion for --options
2016-01-19 18:50:12 -05:00
Drew DeVault
b72a62b02b Merge pull request #448 from colemickens/libinput
libinput configuration
2016-01-19 10:08:44 -05:00
Cole Mickens
28081b7689 libinput 2016-01-19 06:51:36 -08:00
Seth Barberee
fcd0071555 added basic zsh shell completion for sway, swaybg, and swaygrab 2016-01-17 22:06:26 -06:00
Drew DeVault
fe241126bb Add ffmpeg/imagemagick to depenency list 2016-01-17 14:04:36 -05:00
Mikkel Oscar Lyderik
e0ba689dba Copy filename from argv
Fix #449
2016-01-17 18:48:29 +01:00
Drew DeVault
2597321236 Merge pull request #445 from crondog/assign
cmd_assign
2016-01-15 04:51:23 -05:00
crondog
81caf89ff8 cmd_assign
This implements cmd_assign. Basically a copy and paste from
cmd_for_window however it has → handling and injects a `move container to
workspace`
2016-01-15 16:03:34 +11:00
Mikkel Oscar Lyderik
0ba3f08f52 Strip quotes from workspace name v2
This is a more general fix for #444

This reverts part of commit 222f0d44fc.
2016-01-11 03:42:45 +01:00
Mikkel Oscar Lyderik
fc8e5703a5 Strip quotes of each argv when handling command 2016-01-11 03:39:34 +01:00
Mikkel Oscar Lyderik
222f0d44fc Strip quotes from workspace name.
Fix #444

This is a temporary fix, the real fix is to store the commands as a
formatted argv array, so they don't have to be reformatted all over the
place.
2016-01-11 03:13:36 +01:00
Drew DeVault
46992d6060 Merge pull request #443 from mikkeloscar/binding-event-input_code
Add bindcode to binding events.
2016-01-09 15:12:08 -05:00
Mikkel Oscar Lyderik
15621ea8ff Add backwards compatability for binding event 2016-01-09 20:56:42 +01:00
Mikkel Oscar Lyderik
e3ddcaabc4 Add bindcode to binding events. 2016-01-09 20:31:18 +01:00
Mikkel Oscar Lyderik
93c93dd0f7 Make enable-binding-event option have an affect.
The option was added to late so it was never set in the build.
2016-01-09 20:25:45 +01:00
Drew DeVault
7388e1ecd8 Merge pull request #442 from mikkeloscar/bincode
Add support for bincode command
2016-01-09 12:10:37 -05:00
Mikkel Oscar Lyderik
f8b260d4a1 Add support for bincode command
If a bindsym and bincode maps to the same combination, the last one will
overwrite any previous mappings.
2016-01-09 18:07:47 +01:00
Drew DeVault
b4ea9d492c Make wallpaper optional (cmake flag) 2016-01-08 18:49:42 -05:00
Mikkel Oscar Lyderik
cb8ac7fd4a Unescape string after doing var replacement
Fix #426
2016-01-08 23:30:18 +01:00
Drew DeVault
e2d49afb4a Merge pull request #438 from mikkeloscar/binding-event
Implement IPC binding event (keyboard)
2016-01-08 09:48:24 -05:00
Mikkel Oscar Lyderik
15cbc53a77 Make IPC binding event support a compile time opt. 2016-01-08 15:03:25 +01:00
Mikkel Oscar Lyderik
14147ac056 Reduce duplicate code 2016-01-08 14:27:41 +01:00
Mikkel Oscar Lyderik
6392abe35b Implement IPC binding event (keyboard)
This implements the IPC binding event for keyboard bindings.  It is
slightly different from the i3 implementation [1] since sway supports
more than one non-modifier key in a binding. Thus the json interface has
been changed from:

    {
      ...
      "symbol": "t",
      ...
    }

to:

    {
      ...
      "symbols": [ "t" ],
      ...
    }

[1] http://i3wm.org/docs/ipc.html#_binding_event
2016-01-08 03:03:55 +01:00
Mikkel Oscar Lyderik
32cd3f70eb Add function for duplication a sway_binding 2016-01-08 03:03:55 +01:00
Mikkel Oscar Lyderik
dffacea831 Add function for getting list of modifier names.
Get an array of modifier names from modifier masks.
2016-01-08 03:03:40 +01:00
Drew DeVault
320c2915b0 Merge pull request #439 from mikkeloscar/bindsym-release
Implement bindsym --release
2016-01-07 16:38:33 -05:00
Mikkel Oscar Lyderik
55f63935ab Implement bindsym --release
This is a "simple" version of --release (same as i3) that only supports
a binding that contain one normal key. e.g.:

    bindsym --release $mod+x exec somthing-fun

I didn't bother implementing it for a combination like `$mod+x+z` since
it is a bit tricky to get right and also a bit weird to actually do on a
keyboard.
2016-01-07 21:43:00 +01:00
Drew DeVault
8f5de70c93 Merge pull request #434 from mikkeloscar/detect-modifier
Send IPC modifier event on bar_modifier up/down
2016-01-06 07:26:54 -05:00
Mikkel Oscar Lyderik
18f8185011 Fix whitespaces in cmake config 2016-01-05 23:53:37 +01:00
Mikkel Oscar Lyderik
9186455a3c Merge branch 'master' of github.com:SirCmpwn/sway 2016-01-05 23:44:03 +01:00
Mikkel Oscar Lyderik
364e37a1eb Fix whitespace issues. 2016-01-05 23:42:40 +01:00
Mikkel Oscar Lyderik
843e2ad2c1 Only send modifier event once for active modifiers
This makes sure that a modifier event is only sent for active bar
modifiers, and that it is only sent once for each of those modifiers.

An active bar modifier is a modifier defined for a bar with `mode hide`
and `hidden_state hide`.
2016-01-05 23:18:59 +01:00
Drew DeVault
e700e76d84 Merge pull request #436 from Kaligule/master
Clearer order of locations searched for config file.
2016-01-05 16:17:11 -05:00
Jøhannes Lippmann
648db4016f Clearer order of locations searched for config file.
The i3wm config locations are visited _before_ using the fallback
configs. The man page was confusing - it talked about the fallback
configs first, but also said they are looked at "at last". By changing
the order of the sentences, this should be clearer.
2016-01-05 22:06:02 +01:00
Mikkel Oscar Lyderik
2e0ef533f2 Init layout before checking config 2016-01-05 19:16:46 +01:00
Mikkel Oscar Lyderik
a8402035e9 Add modifier key to bar_config json 2016-01-05 18:36:26 +01:00
Mikkel Oscar Lyderik
95e0f44c73 Move modifier name table to common/util.c
Lookup of modifier names is required in several places, thus it makes
sense to move it to a general place.
2016-01-05 18:36:24 +01:00
Drew DeVault
caaff5ac54 Revert "Free wordexp_t in config.c:get_config_path"
This reverts commit 33b24736c7.
2016-01-04 23:00:56 -05:00
Mikkel Oscar Lyderik
c20c63b677 Send IPC modifier event on bar_modifier up/down
Detects when a bar modifier key is pressed/released and sends a modifier
IPC event to any listeners (usually swaybars).

This way a swaybar can listen on the modifier event and hide/show the
bar accordingly (not implemented yet)

The modifier event looks like this:

    {
      "change": "pressed", // or released
      "modifier": "Mod4"
    }
2016-01-05 02:25:56 +01:00
Drew DeVault
33b24736c7 Free wordexp_t in config.c:get_config_path
Thanks @jollywho
2016-01-04 19:39:33 -05:00
Mikkel Oscar Lyderik
5af4e747d3 Merge pull request #433 from crondog/issue431
Return focus to fullscreen view
2016-01-05 01:14:28 +01:00
crondog
b755fd073e Return focus to fullscreen view
This fixes https://github.com/SirCmpwn/sway/issues/431 by returning
focus to the fullscreen view. Also it fixes the issue with the
fullscreen view pointer not being set which did my head in
2016-01-05 10:55:29 +11:00
Mikkel Oscar Lyderik
7727c9efbc Detect bar modifier pressed/released 2016-01-05 00:49:44 +01:00
Drew DeVault
f9b92783c5 Merge pull request #432 from mikkeloscar/fix-sway-multikey
Fix overwriting current pressed keys.
2016-01-04 17:57:04 -05:00
Mikkel Oscar Lyderik
e62c49f83c Fix overwriting current pressed keys.
This fixes a bug where the key at index 0 in the `key_state_array` would
be overwritten by the next pressed key. This broke any bindings
consisting of multiple non-mod keys like: `$mod+a+b`.
2016-01-04 23:26:40 +01:00