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