]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #3441 from stapelberg/template
authorOrestis <orestisf1993@gmail.com>
Sun, 7 Oct 2018 19:09:28 +0000 (22:09 +0300)
committerGitHub <noreply@github.com>
Sun, 7 Oct 2018 19:09:28 +0000 (22:09 +0300)
add specific GitHub issue templates

configure.ac
docs/userguide
libi3/resolve_tilde.c
src/config_directives.c

index 1784fa83d0541edcc695097d9203a193d9af26c3..5cc9d4a69796791e3c13012b726f9fe5742222cd 100644 (file)
@@ -110,12 +110,27 @@ AC_PROG_MAKE_SET
 AC_PROG_RANLIB
 AC_PROG_LN_S
 
-AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc])
-AC_PATH_PROG([PATH_XMLTO], [xmlto])
-AC_PATH_PROG([PATH_POD2MAN], [pod2man])
-
-AM_CONDITIONAL([BUILD_MANS], [test x$PATH_ASCIIDOC != x && test x$PATH_XMLTO != x && test x$PATH_POD2MAN != x])
-AM_CONDITIONAL([BUILD_DOCS], [test x$PATH_ASCIIDOC != x])
+AC_ARG_ENABLE(docs,
+  AS_HELP_STRING(
+    [--disable-docs],
+    [disable building documentation]),
+  [ax_docs=$enableval],
+  [ax_docs=yes])
+AC_ARG_ENABLE(mans,
+  AS_HELP_STRING(
+    [--disable-mans],
+    [disable building manual pages]),
+  [ax_mans=$enableval],
+  [ax_mans=yes])
+AS_IF([test x$ax_docs = xyes || test x$ax_mans = xyes], [
+  AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc])
+])
+AS_IF([test x$ax_mans = xyes], [
+  AC_PATH_PROG([PATH_XMLTO], [xmlto])
+  AC_PATH_PROG([PATH_POD2MAN], [pod2man])
+])
+AM_CONDITIONAL([BUILD_MANS], [test x$ax_mans = xyes && test x$PATH_ASCIIDOC != x && test x$PATH_XMLTO != x && test x$PATH_POD2MAN != x])
+AM_CONDITIONAL([BUILD_DOCS], [test x$ax_docs = xyes && test x$PATH_ASCIIDOC != x])
 
 AM_PROG_AR
 
index 9c601e8869167da2385665ba66a1d57e782393f6..da5d98737197ca0fb9cd1416bf287068df69768c 100644 (file)
@@ -755,14 +755,23 @@ set_from_resource $black i3wm.color0 #000000
 
 To automatically make a specific window show up on a specific workspace, you
 can use an *assignment*. You can match windows by using any criteria,
-see <<command_criteria>>. It is recommended that you match on window classes
-(and instances, when appropriate) instead of window titles whenever possible
-because some applications first create their window, and then worry about
-setting the correct title. Firefox with Vimperator comes to mind. The window
-starts up being named Firefox, and only when Vimperator is loaded does the
-title change. As i3 will get the title as soon as the application maps the
-window (mapping means actually displaying it on the screen), you’d need to have
-to match on 'Firefox' in this case.
+see <<command_criteria>>. The difference between +assign+ and
++for_window <criteria> move to workspace+ is that the former will only be
+executed when the application maps the window (mapping means actually displaying
+it on the screen) but the latter will be executed whenever a window changes its
+properties to something that matches the specified criteria.
+
+Thus, it is recommended that you match on window classes (and instances, when
+appropriate) instead of window titles whenever possible because some
+applications first create their window, and then worry about setting the correct
+title. Firefox with Vimperator comes to mind. The window starts up being named
+Firefox, and only when Vimperator is loaded does the title change. As i3 will
+get the title as soon as the application maps the window, you’d need to have to
+match on 'Firefox' in this case.
+Another known issue is with Spotify, which doesn't set the class hints when
+mapping the window, meaning you'll have to use a +for_window+ rule to assign
+Spotify to a specific workspace.
+Finally, using +assign [tiling]+ and +assign [floating]+ is not supported.
 
 You can also assign a window to show up on a specific output. You can use RandR
 names such as +VGA1+ or names relative to the output with the currently focused
index 51d642db37ec37f3f1dc014f44d51b31dd324390..6dbf132fa7605d59e3c7f96c4ce7ae2c57e0e51f 100644 (file)
@@ -35,9 +35,10 @@ char *resolve_tilde(const char *path) {
     } else {
         head = globbuf.gl_pathv[0];
         result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1);
-        strncpy(result, head, strlen(head));
-        if (tail)
-            strncat(result, tail, strlen(tail));
+        strcpy(result, head);
+        if (tail) {
+            strcat(result, tail);
+        }
     }
     globfree(&globbuf);
 
index dfbb52d858ad7f7ebff31c47544c0cfd0a192f52..5c85197f6e0194cf702bff727ef8c45ba4d67c1a 100644 (file)
@@ -406,6 +406,11 @@ CFGFUN(assign_output, const char *output) {
         return;
     }
 
+    if (current_match->window_mode != WM_ANY) {
+        ELOG("Assignments using window mode (floating/tiling) is not supported\n");
+        return;
+    }
+
     DLOG("New assignment, using above criteria, to output \"%s\".\n", output);
     Assignment *assignment = scalloc(1, sizeof(Assignment));
     match_copy(&(assignment->match), current_match);
@@ -420,6 +425,11 @@ CFGFUN(assign, const char *workspace, bool is_number) {
         return;
     }
 
+    if (current_match->window_mode != WM_ANY) {
+        ELOG("Assignments using window mode (floating/tiling) is not supported\n");
+        return;
+    }
+
     if (is_number && ws_name_to_number(workspace) == -1) {
         ELOG("Could not parse initial part of \"%s\" as a number.\n", workspace);
         return;