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.

120 lines
6.0 KiB

  1. static void flextile(Monitor *m);
  2. static void getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact);
  3. static void mirrorlayout(const Arg *arg);
  4. static void rotatelayoutaxis(const Arg *arg);
  5. #if IPC_PATCH || DWMC_PATCH
  6. static void setlayoutaxisex(const Arg *arg);
  7. #endif // IPC_PATCH | DWMC_PATCH
  8. static void incnstack(const Arg *arg);
  9. /* Symbol handlers */
  10. static void setflexsymbols(Monitor *m, unsigned int n);
  11. static void monoclesymbols(Monitor *m, unsigned int n);
  12. static void decksymbols(Monitor *m, unsigned int n);
  13. /* Layout split */
  14. static void layout_no_split(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  15. static void layout_split_vertical(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  16. static void layout_split_horizontal(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  17. static void layout_split_vertical_dual_stack(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  18. static void layout_split_horizontal_dual_stack(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  19. static void layout_split_centered_vertical(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  20. static void layout_split_centered_horizontal(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  21. static void layout_floating_master(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  22. static void layout_split_vertical_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  23. static void layout_split_horizontal_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  24. static void layout_split_vertical_dual_stack_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  25. static void layout_split_horizontal_dual_stack_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  26. static void layout_split_centered_vertical_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  27. static void layout_split_centered_horizontal_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  28. static void layout_floating_master_fixed(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n);
  29. /* Layout tile arrangements */
  30. static void arrange_left_to_right(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  31. static void arrange_top_to_bottom(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  32. static void arrange_monocle(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  33. static void arrange_gapplessgrid(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  34. static void arrange_gapplessgrid_alt1(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  35. static void arrange_gapplessgrid_alt2(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  36. static void arrange_gridmode(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  37. static void arrange_horizgrid(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  38. static void arrange_dwindle(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  39. static void arrange_spiral(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  40. static void arrange_tatami(Monitor *m, int ax, int ay, int ah, int aw, int ih, int iv, int n, int an, int ai);
  41. /* Named flextile constants */
  42. enum {
  43. LAYOUT, // controls overall layout arrangement / split
  44. MASTER, // indicates the tile arrangement for the master area
  45. STACK, // indicates the tile arrangement for the stack area
  46. STACK2, // indicates the tile arrangement for the secondary stack area
  47. LTAXIS_LAST,
  48. };
  49. /* Layout arrangements */
  50. enum {
  51. NO_SPLIT,
  52. SPLIT_VERTICAL, // master stack vertical split
  53. SPLIT_HORIZONTAL, // master stack horizontal split
  54. SPLIT_CENTERED_VERTICAL, // centered master vertical split
  55. SPLIT_CENTERED_HORIZONTAL, // centered master horizontal split
  56. SPLIT_VERTICAL_DUAL_STACK, // master stack vertical split with dual stack
  57. SPLIT_HORIZONTAL_DUAL_STACK, // master stack vertical split with dual stack
  58. FLOATING_MASTER, // (fake) floating master
  59. SPLIT_VERTICAL_FIXED, // master stack vertical fixed split
  60. SPLIT_HORIZONTAL_FIXED, // master stack horizontal fixed split
  61. SPLIT_CENTERED_VERTICAL_FIXED, // centered master vertical fixed split
  62. SPLIT_CENTERED_HORIZONTAL_FIXED, // centered master horizontal fixed split
  63. SPLIT_VERTICAL_DUAL_STACK_FIXED, // master stack vertical split with fixed dual stack
  64. SPLIT_HORIZONTAL_DUAL_STACK_FIXED, // master stack vertical split with fixed dual stack
  65. FLOATING_MASTER_FIXED, // (fake) fixed floating master
  66. LAYOUT_LAST,
  67. };
  68. static char layoutsymb[] = {
  69. 32, // " ",
  70. 124, // "|",
  71. 61, // "=",
  72. 94, // "^",
  73. 126, // "~",
  74. 58, // ":",
  75. 59, // ";",
  76. 43, // "+",
  77. 124, // "¦",
  78. 61, // "=",
  79. 94, // "^",
  80. 126, // "~",
  81. 58, // ":",
  82. 59, // ";",
  83. 43, // "+",
  84. };
  85. /* Tile arrangements */
  86. enum {
  87. TOP_TO_BOTTOM, // clients are arranged vertically
  88. LEFT_TO_RIGHT, // clients are arranged horizontally
  89. MONOCLE, // clients are arranged in deck / monocle mode
  90. GAPPLESSGRID, // clients are arranged in a gappless grid (original formula)
  91. GAPPLESSGRID_ALT1, // clients are arranged in a gappless grid (alt. 1, fills rows first)
  92. GAPPLESSGRID_ALT2, // clients are arranged in a gappless grid (alt. 2, fills columns first)
  93. GRIDMODE, // clients are arranged in a grid
  94. HORIZGRID, // clients are arranged in a horizontal grid
  95. DWINDLE, // clients are arranged in fibonacci dwindle mode
  96. SPIRAL, // clients are arranged in fibonacci spiral mode
  97. TATAMI, // clients are arranged as tatami mats
  98. AXIS_LAST,
  99. };
  100. static char tilesymb[] = {
  101. 61, // "=",
  102. 124, // "|",
  103. 68, // "D",
  104. 71, // "G",
  105. 49, // "1",
  106. 50, // "2"
  107. 35, // "#",
  108. 126, // "~",
  109. 92, // "\\",
  110. 64, // "@",
  111. 84, // "T",
  112. };