Add toggleimgtype

This commit is contained in:
Jacob 2023-08-09 05:48:32 +02:00
parent 288963dad1
commit d3798b90ff
6 changed files with 21 additions and 5 deletions

View file

@ -1123,6 +1123,8 @@ bind:
- Toggle fuzzy matching - Toggle fuzzy matching
- `toggleimg` - `toggleimg`
- Toggle images - Toggle images
- `toggleimgtype`
- Toggle image type
- `flipimg` - `flipimg`
- Flip image, 0 means vertically, 1 means horizontally - Flip image, 0 means vertically, 1 means horizontally
- `setimgpos` - `setimgpos`

View file

@ -537,6 +537,12 @@ void toggleimg(Arg *arg) {
#endif #endif
} }
void toggleimgtype(Arg *arg) {
#if IMAGE
imagetype = !imagetype;
#endif
}
void defaultimg(Arg *arg) { void defaultimg(Arg *arg) {
#if IMAGE #if IMAGE

View file

@ -74,6 +74,7 @@ static void togglehighlight(Arg *arg);
static void toggleregex(Arg *arg); static void toggleregex(Arg *arg);
static void togglefuzzy(Arg *arg); static void togglefuzzy(Arg *arg);
static void toggleimg(Arg *arg); static void toggleimg(Arg *arg);
static void toggleimgtype(Arg *arg);
/* hover */ /* hover */
static void selecthover(Arg *arg); static void selecthover(Arg *arg);

View file

@ -391,6 +391,7 @@ static FuncList fl[] = {
{ "toggleregex", toggleregex }, { "toggleregex", toggleregex },
{ "togglefuzzy", togglefuzzy }, { "togglefuzzy", togglefuzzy },
{ "toggleimg", toggleimg }, { "toggleimg", toggleimg },
{ "toggleimgtype", toggleimgtype },
{ "setprofile", setprofile }, { "setprofile", setprofile },
{ "setlineheight", setlineheight }, { "setlineheight", setlineheight },
{ "switchmode", switchmode }, { "switchmode", switchmode },

View file

@ -40,11 +40,11 @@ static int powerlinecount = 1; /* Enable powerline for the match co
static int powerlinemode = 1; /* Enable powerline for the mode indicator */ static int powerlinemode = 1; /* Enable powerline for the mode indicator */
static int powerlinecaps = 1; /* Enable powerline for the caps lock indicator */ static int powerlinecaps = 1; /* Enable powerline for the caps lock indicator */
static int powerlineitems = 1; /* Enable powerline for the items */ static int powerlineitems = 1; /* Enable powerline for the items */
static int promptpwlstyle = 2; /* Prompt powerline style (0: >, 1: \, 2: )) */ static int promptpwlstyle = 2; /* Prompt powerline style (0: Arrow, 1: Slash, 2: Rounded) */
static int matchcountpwlstyle = 2; /* Match count powerline style (0: <, 1: /, 2: () */ static int matchcountpwlstyle = 2; /* Match count powerline style (0: Arrow, 1: Slash, 2: Rounded) */
static int modepwlstyle = 2; /* Mode indicator powerline style (0: <, 1: /, 2: () */ static int modepwlstyle = 2; /* Mode indicator powerline style (0: Arrow, 1: Slash, 2: Rounded) */
static int capspwlstyle = 2; /* Caps lock indicator powerline style (0: <, 1: /, 2: () */ static int capspwlstyle = 2; /* Caps lock indicator powerline style (0: Arrow, 1: Slash, 2: Rounded) */
static int itempwlstyle = 2; /* Item powerline style (0: <>, 1: /\, 2: ()) */ static int itempwlstyle = 2; /* Item powerline style (0: Arrow, 1: Slash, 2: Rounded)) */
/* Window properties */ /* Window properties */
static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */ static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */

View file

@ -2279,6 +2279,12 @@ Toggle fuzzy matching
Toggle images Toggle images
.RE .RE
.IP \[bu] 2 .IP \[bu] 2
\f[V]toggleimgtype\f[R]
.RS 2
.IP \[bu] 2
Toggle image type
.RE
.IP \[bu] 2
\f[V]flipimg\f[R] \f[V]flipimg\f[R]
.RS 2 .RS 2
.IP \[bu] 2 .IP \[bu] 2