summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.ci/build.sh16
-rw-r--r--.travis.yml13
-rw-r--r--sway/commands.c11
3 files changed, 10 insertions, 30 deletions
diff --git a/.ci/build.sh b/.ci/build.sh
deleted file mode 100755
index ece5b2a3..00000000
--- a/.ci/build.sh
+++ /dev/null
@@ -1,16 +0,0 @@
1#!/bin/bash
2
3# clone and build wlc
4git clone https://github.com/Cloudef/wlc.git
5cd wlc
6git submodule update --init --recursive # - initialize and fetch submodules
7mkdir target && cd target # - create build target directory
8cmake -DCMAKE_BUILD_TYPE=Upstream .. # - run CMake
9make # - compile
10sudo make install # - install
11
12cd ../..
13
14# build sway
15cmake .
16make
diff --git a/.travis.yml b/.travis.yml
index ad746552..a8e292ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,23 +11,16 @@ arch:
11 - cmake 11 - cmake
12 - xorg-server-xwayland 12 - xorg-server-xwayland
13 - asciidoc 13 - asciidoc
14 - pcre
15 - json-c 14 - json-c
16 - pixman
17 - wayland 15 - wayland
18 - libxkbcommon
19 - libinput
20 - libx11
21 - libxcb
22 - xcb-util-image 16 - xcb-util-image
23 - libgl
24 - mesa
25 - pango 17 - pango
26 - cairo 18 - cairo
27 - gdk-pixbuf2 19 - gdk-pixbuf2
28 - xcb-util-wm 20 - wlc-git
29 script: 21 script:
30 - "bash .ci/build.sh" 22 - "cmake ."
23 - "make"
31 24
32script: 25script:
33 - "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" 26 - "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
diff --git a/sway/commands.c b/sway/commands.c
index f6326038..9f6e5032 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -169,15 +169,18 @@ static struct cmd_results *cmd_assign(int argc, char **argv) {
169 169
170 char *criteria = *argv++; 170 char *criteria = *argv++;
171 171
172 if (strncmp(*argv, "→", 1) == 0) { 172 if (strncmp(*argv, "→", strlen("→")) == 0) {
173 if (argc < 3) {
174 return cmd_results_new(CMD_INVALID, "assign", "Missing workspace");
175 }
173 argv++; 176 argv++;
174 } 177 }
175 178
176 char *movecmd = "move container to workspace "; 179 char *movecmd = "move container to workspace ";
177 int arglen = strlen(*argv); 180 int arglen = strlen(movecmd) + strlen(*argv) + 1;
178 char *cmdlist = calloc(1, sizeof(movecmd) + arglen); 181 char *cmdlist = calloc(1, arglen);
179 182
180 sprintf(cmdlist, "%s%s", movecmd, *argv); 183 snprintf(cmdlist, arglen, "%s%s", movecmd, *argv);
181 184
182 struct criteria *crit = malloc(sizeof(struct criteria)); 185 struct criteria *crit = malloc(sizeof(struct criteria));
183 crit->crit_raw = strdup(criteria); 186 crit->crit_raw = strdup(criteria);