Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
270 B

  1. void
  2. layoutmenu(const Arg *arg) {
  3. FILE *p;
  4. char c[3], *s;
  5. int i;
  6. if (!(p = popen(layoutmenu_cmd, "r")))
  7. return;
  8. s = fgets(c, sizeof(c), p);
  9. pclose(p);
  10. if (!s || *s == '\0' || c == '\0')
  11. return;
  12. i = atoi(c);
  13. setlayout(&((Arg) { .v = &layouts[i] }));
  14. }