Modify layout icons to use Nerd Font instead

This commit is contained in:
Alexis Jhon Gaspar 2023-10-05 18:18:52 +08:00
parent 9fb4bf1de9
commit 69b29a8dc4
5 changed files with 87 additions and 86 deletions

View file

@ -679,61 +679,61 @@ static const int scrollargs[][2] = {
#if FLEXTILE_DELUXE_LAYOUT
static const Layout layouts[] = {
/* symbol arrange function, { nmaster, nstack, layout, master axis, stack axis, secondary stack axis, symbol func } */
{ "[]=", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
{ "><>", NULL, {0} }, /* no layout function means floating behavior */
{ "[M]", flextile, { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL } }, // monocle
{ "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
{ ">M>", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
{ "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
{ "TTT", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
{ "===", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
{ "|M|", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
{ "-M-", flextile, { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL } }, // centeredmaster horiz
{ ":::", flextile, { -1, -1, NO_SPLIT, GAPPLESSGRID, GAPPLESSGRID, 0, NULL } }, // gappless grid
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, DWINDLE, 0, NULL } }, // fibonacci dwindle
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, SPIRAL, 0, NULL } }, // fibonacci spiral
{ "[T]", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI, 0, NULL } }, // tatami mats
{ "󰯌", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, NULL } }, // default tile layout
{ "󱂬", NULL, {0} }, /* no layout function means floating behavior */
{ "󱟱", flextile, { -1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL } }, // monocle
{ "󰕭", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
{ "󰕬", flextile, { -1, -1, FLOATING_MASTER, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // floating master
{ "󱒇", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
{ "󱢈", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
{ "󰯋", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
{ "󰕫", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
{ "󰕯", flextile, { -1, -1, SPLIT_CENTERED_HORIZONTAL, TOP_TO_BOTTOM, LEFT_TO_RIGHT, LEFT_TO_RIGHT, NULL } }, // centeredmaster horiz
{ "󰕰", flextile, { -1, -1, NO_SPLIT, GAPPLESSGRID, GAPPLESSGRID, 0, NULL } }, // gappless grid
{ "󰕴", flextile, { -1, -1, NO_SPLIT, DWINDLE, DWINDLE, 0, NULL } }, // fibonacci dwindle
{ "󱒎", flextile, { -1, -1, NO_SPLIT, SPIRAL, SPIRAL, 0, NULL } }, // fibonacci spiral
{ "󰡃", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TATAMI, 0, NULL } }, // tatami mats
#if TILE_LAYOUT
{ "[]=", tile, {0} },
{ "󰯌", tile, {0} },
#endif
#if MONOCLE_LAYOUT
{ "[M]", monocle, {0} },
{ "󱟱", monocle, {0} },
#endif
#if BSTACK_LAYOUT
{ "TTT", bstack, {0} },
{ "󱢈", bstack, {0} },
#endif
#if BSTACKHORIZ_LAYOUT
{ "===", bstackhoriz, {0} },
{ "󰯋", bstackhoriz, {0} },
#endif
#if CENTEREDMASTER_LAYOUT
{ "|M|", centeredmaster, {0} },
{ "󰕫", centeredmaster, {0} },
#endif
#if CENTEREDFLOATINGMASTER_LAYOUT
{ ">M>", centeredfloatingmaster, {0} },
{ "󰕬", centeredfloatingmaster, {0} },
#endif
#if COLUMNS_LAYOUT
{ "|||", col, {0} },
{ "󰕭", col, {0} },
#endif
#if DECK_LAYOUT
{ "[D]", deck, {0} },
{ "󱒇", deck, {0} },
#endif
#if FIBONACCI_SPIRAL_LAYOUT
{ "(@)", spiral, {0} },
{ "󱒎", spiral, {0} },
#endif
#if FIBONACCI_DWINDLE_LAYOUT
{ "[\\]", dwindle, {0} },
{ "󰕴", dwindle, {0} },
#endif
#if GRIDMODE_LAYOUT
{ "HHH", grid, {0} },
{ "󰾍", grid, {0} },
#endif
#if HORIZGRID_LAYOUT
{ "---", horizgrid, {0} },
{ "󱇙", horizgrid, {0} },
#endif
#if GAPPLESSGRID_LAYOUT
{ ":::", gaplessgrid, {0} },
{ "󰕰", gaplessgrid, {0} },
#endif
#if NROWGRID_LAYOUT
{ "###", nrowgrid, {0} },
{ "󰕳", nrowgrid, {0} },
#endif
};
#else

View file

@ -44,9 +44,10 @@ deck(Monitor *m)
#endif // VANITYGAPS_PATCH
getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
#if !MONOCLESYMBOL_PATCH
if (n - m->nmaster > 0) /* override layout symbol */
snprintf(m->ltsymbol, sizeof m->ltsymbol, "D %d", n - m->nmaster);
#endif // MONOCLESMYBOL_PATCH
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {

View file

@ -1,33 +1,33 @@
#!/bin/sh
cat <<EOF | xmenu
[]= (Flextile) Tiled 0
><> (Flextile) Floating 1
[M] (Flextile) Monocle 2
||| (Flextile) Columns 3
>M> (Flextile) Floating Master 4
[D] (Flextile) Deck 5
TTT (Flextile) Bottom Stack 6
=== (Flextile) Bottom Stack Horizontal 7
|M| (Flextile) Centered Naster 8
-M- (Flextile) Centered Master Horizontal 9
::: (Flextile) Gapless Grid 10
[\] (Flextile) Fibonacci Dwindle 11
(@) (Flextile) Fibonacci Spiral 12
[T] (Flextile) Tatami Tats 13
[]= Tiled 14
[M] Monocle 15
TTT Bottom Stack 16
=== Bottom Stack Horizontal 17
|M| Centered Master 18
>M> Centered Floating Master 19
||| Columns 20
[D] Deck 21
(@) Fibonacci Spiral 22
[\\] Fibonacci Dwindle 23
HHH Grid 24
--- Horizontal Grid 25
::: Gapless Grid 26
### N-row Grid 27
󰯌 (Flextile) Tiled 0
󱂬 Floating 1
󱟱 (Flextile) Monocle 2
󰕭 (Flextile) Columns 3
󰕬 (Flextile) Floating Master 4
󱒇 (Flextile) Deck 5
󱢈 (Flextile) Bottom Stack 6
󰯋 (Flextile) Bottom Stack Horizontal 7
󰕫 (Flextile) Centered Naster 8
󰕯 (Flextile) Centered Master Horizontal 9
󰕰 (Flextile) Gapless Grid 10
󰕴 (Flextile) Fibonacci Dwindle 11
󱒎 (Flextile) Fibonacci Spiral 12
󰡃 (Flextile) Tatami Tats 13
󰯌 Tiled 14
󱟱 Monocle 15
󱢈 Bottom Stack 16
󰯋 Bottom Stack Horizontal 17
󰕫 Centered Master 18
󰕬 Centered Floating Master 19
󰕭 Columns 20
󱒇 Deck 21
󰕴 Fibonacci Spiral 22
󱒎 Fibonacci Dwindle 23
󰾍 Grid 24
󱇙 Horizontal Grid 25
󰕰 Gapless Grid 26
󰕳 N-row Grid 27
EOF

View file

@ -772,7 +772,7 @@
* is activated. Do not display the number of open clients in the current tag.
* https://dwm.suckless.org/patches/monoclesymbol/
*/
#define MONOCLESYMBOL_PATCH 0
#define MONOCLESYMBOL_PATCH 1
/* Makes a window floating and 1/3rd the height and 1/3rd the width of the screen and is
* positioned in either the center or one of the 8 cardinal directions depending on which

View file

@ -1,33 +1,33 @@
#!/bin/sh
cat <<EOF | jgmenu --simple --at-pointer
(Flextile) Tiled, dwmc setlayoutex 0
(Flextile) Floating, dwmc setlayoutex 1
(Flextile) Monocle, dwmc setlayoutex 2
(Flextile) Columns, dwmc setlayoutex 3
(Flextile) Floating Master, dwmc setlayoutex 4
(Flextile) Deck, dwmc setlayoutex 5
(Flextile) Bottom Stack, dwmc setlayoutex 6
(Flextile) Bottom Stack Horizontal, dwmc setlayoutex 7
(Flextile) Centered Naster, dwmc setlayoutex 8
(Flextile) Centered Master Horizontal, dwmc setlayoutex 9
(Flextile) Gapless Grid, dwmc setlayoutex 10
(Flextile) Fibonacci Dwindle, dwmc setlayoutex 11
(Flextile) Fibonacci Spiral, dwmc setlayoutex 12
(Flextile) Tatami Tats, dwmc setlayoutex 13
Tiled, dwmc setlayoutex 14
Monocle, dwmc setlayoutex 15
Bottom Stack, dwmc setlayoutex 16
Bottom Stack Horizontal, dwmc setlayoutex 17
Centered Master, dwmc setlayoutex 18
Centered Floating Master, dwmc setlayoutex 19
Columns, dwmc setlayoutex 20
Deck, dwmc setlayoutex 21
Fibonacci Spiral, dwmc setlayoutex 22
Fibonacci Dwindle, dwmc setlayoutex 23
Grid, dwmc setlayoutex 24
Horizontal Grid, dwmc setlayoutex 25
Gapless Grid, dwmc setlayoutex 26
N-row Grid, dwmc setlayoutex 27
󰯌 (Flextile) Tiled, dwmc setlayoutex 0
󱂬 Floating, dwmc setlayoutex 1
󱟱 (Flextile) Monocle, dwmc setlayoutex 2
󰕭 (Flextile) Columns, dwmc setlayoutex 3
󰕬 (Flextile) Floating Master, dwmc setlayoutex 4
󱒇 (Flextile) Deck, dwmc setlayoutex 5
󱢈 (Flextile) Bottom Stack, dwmc setlayoutex 6
󰯋 (Flextile) Bottom Stack Horizontal, dwmc setlayoutex 7
󰕫 (Flextile) Centered Naster, dwmc setlayoutex 8
󰕯 (Flextile) Centered Master Horizontal, dwmc setlayoutex 9
󰕰 (Flextile) Gapless Grid, dwmc setlayoutex 10
󰕴 (Flextile) Fibonacci Dwindle, dwmc setlayoutex 11
󱒎 (Flextile) Fibonacci Spiral, dwmc setlayoutex 12
󰡃 (Flextile) Tatami Tats, dwmc setlayoutex 13
󰯌 Tiled, dwmc setlayoutex 14
󱟱 Monocle, dwmc setlayoutex 15
󱢈 Bottom Stack, dwmc setlayoutex 16
󰯋 Bottom Stack Horizontal, dwmc setlayoutex 17
󰕫 Centered Master, dwmc setlayoutex 18
󰕬 Centered Floating Master, dwmc setlayoutex 19
󰕭 Columns, dwmc setlayoutex 20
󱒇 Deck, dwmc setlayoutex 21
󰕴 Fibonacci Spiral, dwmc setlayoutex 22
󱒎 Fibonacci Dwindle, dwmc setlayoutex 23
󰾍 Grid, dwmc setlayoutex 24
󱇙 Horizontal Grid, dwmc setlayoutex 25
󰕰 Gapless Grid, dwmc setlayoutex 26
󰕳 N-row Grid, dwmc setlayoutex 27
EOF