Add a lot more FIFO funcs
This commit is contained in:
parent
a3a860fe26
commit
d892f8a986
22
docs/docs.md
22
docs/docs.md
|
@ -776,6 +776,28 @@ for performance reasons.
|
||||||
| togglefuzzy | Toggle fuzzy |
|
| togglefuzzy | Toggle fuzzy |
|
||||||
| toggleimg | Toggle images |
|
| toggleimg | Toggle images |
|
||||||
| toggleimgtype | Toggle image type |
|
| toggleimgtype | Toggle image type |
|
||||||
|
| screenshot | Screenshot spmenu |
|
||||||
|
| setprofile | Open profile menu |
|
||||||
|
| setlines+ | Increase lines by 1 |
|
||||||
|
| setlines- | Decrease lines by 1 |
|
||||||
|
| setcolumns+ | Increase columns by 1 |
|
||||||
|
| setcolumns- | Decrease columns by 1 |
|
||||||
|
| moveup | Move up one item |
|
||||||
|
| movedown | Move down one item |
|
||||||
|
| moveleft | Move left one item |
|
||||||
|
| moveright | Move right one item |
|
||||||
|
| movestart | Move to the start |
|
||||||
|
| moveend | Move to the end |
|
||||||
|
| movenext | Move to the next page |
|
||||||
|
| moveprev | Move to the previous page |
|
||||||
|
| moveword+ | Move caret to the next word |
|
||||||
|
| moveword- | Move caret to the previous word |
|
||||||
|
| movecaret+ | Move caret to the next character |
|
||||||
|
| movecaret- | Move caret to the previous character |
|
||||||
|
| clear | Clear input |
|
||||||
|
| viewhist | View history buffer |
|
||||||
|
| backspace | Backspace |
|
||||||
|
| deleteword | Remove one full word forward |
|
||||||
| exit_0 | Exit with exit code 0 |
|
| exit_0 | Exit with exit code 0 |
|
||||||
| exit_1 | Exit with exit code 1 |
|
| exit_1 | Exit with exit code 1 |
|
||||||
|
|
||||||
|
|
134
libs/fifo.c
134
libs/fifo.c
|
@ -55,50 +55,124 @@ void execute_fifo_cmd(void) {
|
||||||
fprintf(stdout, "%d\n", selecteditem->index);
|
fprintf(stdout, "%d\n", selecteditem->index);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(fifot, "toggleinput")) {
|
} else if (!strcmp(fifot, "toggleinput")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleinput(arg);
|
toggleinput(&arg);
|
||||||
} else if (!strcmp(fifot, "togglelarrow")) {
|
} else if (!strcmp(fifot, "togglelarrow")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglelarrow(arg);
|
togglelarrow(&arg);
|
||||||
} else if (!strcmp(fifot, "togglerarrow")) {
|
} else if (!strcmp(fifot, "togglerarrow")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglerarrow(arg);
|
togglerarrow(&arg);
|
||||||
} else if (!strcmp(fifot, "toggleitem")) {
|
} else if (!strcmp(fifot, "toggleitem")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleitem(arg);
|
toggleitem(&arg);
|
||||||
} else if (!strcmp(fifot, "toggleprompt")) {
|
} else if (!strcmp(fifot, "toggleprompt")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleprompt(arg);
|
toggleprompt(&arg);
|
||||||
} else if (!strcmp(fifot, "togglecaps")) {
|
} else if (!strcmp(fifot, "togglecaps")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglecaps(arg);
|
togglecaps(&arg);
|
||||||
} else if (!strcmp(fifot, "togglepowerline")) {
|
} else if (!strcmp(fifot, "togglepowerline")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglepowerline(arg);
|
togglepowerline(&arg);
|
||||||
} else if (!strcmp(fifot, "togglecaret")) {
|
} else if (!strcmp(fifot, "togglecaret")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglecaret(arg);
|
togglecaret(&arg);
|
||||||
} else if (!strcmp(fifot, "togglehighlight")) {
|
} else if (!strcmp(fifot, "togglehighlight")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglehighlight(arg);
|
togglehighlight(&arg);
|
||||||
} else if (!strcmp(fifot, "togglematchcount")) {
|
} else if (!strcmp(fifot, "togglematchcount")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglematchcount(arg);
|
togglematchcount(&arg);
|
||||||
} else if (!strcmp(fifot, "togglemode")) {
|
} else if (!strcmp(fifot, "togglemode")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglemode(arg);
|
togglemode(&arg);
|
||||||
} else if (!strcmp(fifot, "toggleregex")) {
|
} else if (!strcmp(fifot, "toggleregex")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleregex(arg);
|
toggleregex(&arg);
|
||||||
} else if (!strcmp(fifot, "togglefuzzy")) {
|
} else if (!strcmp(fifot, "togglefuzzy")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
togglefuzzy(arg);
|
togglefuzzy(&arg);
|
||||||
} else if (!strcmp(fifot, "toggleimg")) {
|
} else if (!strcmp(fifot, "toggleimg")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleimg(arg);
|
toggleimg(&arg);
|
||||||
} else if (!strcmp(fifot, "toggleimgtype")) {
|
} else if (!strcmp(fifot, "toggleimgtype")) {
|
||||||
Arg *arg;
|
Arg arg;
|
||||||
toggleimgtype(arg);
|
toggleimgtype(&arg);
|
||||||
|
} else if (!strcmp(fifot, "screenshot")) {
|
||||||
|
Arg arg;
|
||||||
|
screenshot(&arg);
|
||||||
|
} else if (!strcmp(fifot, "setprofile")) {
|
||||||
|
Arg arg;
|
||||||
|
setprofile(&arg);
|
||||||
|
} else if (!strcmp(fifot, "setlines+")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = +1;
|
||||||
|
setlines(&arg);
|
||||||
|
} else if (!strcmp(fifot, "setlines-")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = -1;
|
||||||
|
setlines(&arg);
|
||||||
|
} else if (!strcmp(fifot, "setcolumns+")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = +1;
|
||||||
|
setcolumns(&arg);
|
||||||
|
} else if (!strcmp(fifot, "setcolumns-")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = -1;
|
||||||
|
setcolumns(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveup")) {
|
||||||
|
Arg arg;
|
||||||
|
moveup(&arg);
|
||||||
|
} else if (!strcmp(fifot, "movedown")) {
|
||||||
|
Arg arg;
|
||||||
|
movedown(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveleft")) {
|
||||||
|
Arg arg;
|
||||||
|
moveleft(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveright")) {
|
||||||
|
Arg arg;
|
||||||
|
moveright(&arg);
|
||||||
|
} else if (!strcmp(fifot, "movestart")) {
|
||||||
|
Arg arg;
|
||||||
|
movestart(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveend")) {
|
||||||
|
Arg arg;
|
||||||
|
moveend(&arg);
|
||||||
|
} else if (!strcmp(fifot, "movenext")) {
|
||||||
|
Arg arg;
|
||||||
|
movenext(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveprev")) {
|
||||||
|
Arg arg;
|
||||||
|
moveprev(&arg);
|
||||||
|
} else if (!strcmp(fifot, "viewhist")) {
|
||||||
|
Arg arg;
|
||||||
|
viewhist(&arg);
|
||||||
|
} else if (!strcmp(fifot, "backspace")) {
|
||||||
|
Arg arg;
|
||||||
|
backspace(&arg);
|
||||||
|
} else if (!strcmp(fifot, "deleteword")) {
|
||||||
|
Arg arg;
|
||||||
|
deleteword(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveword+")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = +1;
|
||||||
|
moveword(&arg);
|
||||||
|
} else if (!strcmp(fifot, "moveword-")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = -1;
|
||||||
|
moveword(&arg);
|
||||||
|
} else if (!strcmp(fifot, "movecursor+")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = +1;
|
||||||
|
movecursor(&arg);
|
||||||
|
} else if (!strcmp(fifot, "movecursor-")) {
|
||||||
|
Arg arg;
|
||||||
|
arg.i = -1;
|
||||||
|
movecursor(&arg);
|
||||||
|
} else if (!strcmp(fifot, "clear")) {
|
||||||
|
Arg arg;
|
||||||
|
clear(&arg);
|
||||||
} else if (!strcmp(fifot, "exit_0")) {
|
} else if (!strcmp(fifot, "exit_0")) {
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (!strcmp(fifot, "exit_1")) {
|
} else if (!strcmp(fifot, "exit_1")) {
|
||||||
|
|
110
spmenu.1
110
spmenu.1
|
@ -1005,6 +1005,116 @@ T}@T{
|
||||||
Toggle image type
|
Toggle image type
|
||||||
T}
|
T}
|
||||||
T{
|
T{
|
||||||
|
screenshot
|
||||||
|
T}@T{
|
||||||
|
Screenshot spmenu
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
setprofile
|
||||||
|
T}@T{
|
||||||
|
Open profile menu
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
setlines+
|
||||||
|
T}@T{
|
||||||
|
Increase lines by 1
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
setlines-
|
||||||
|
T}@T{
|
||||||
|
Decrease lines by 1
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
setcolumns+
|
||||||
|
T}@T{
|
||||||
|
Increase columns by 1
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
setcolumns-
|
||||||
|
T}@T{
|
||||||
|
Decrease columns by 1
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveup
|
||||||
|
T}@T{
|
||||||
|
Move up one item
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
movedown
|
||||||
|
T}@T{
|
||||||
|
Move down one item
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveleft
|
||||||
|
T}@T{
|
||||||
|
Move left one item
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveright
|
||||||
|
T}@T{
|
||||||
|
Move right one item
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
movestart
|
||||||
|
T}@T{
|
||||||
|
Move to the start
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveend
|
||||||
|
T}@T{
|
||||||
|
Move to the end
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
movenext
|
||||||
|
T}@T{
|
||||||
|
Move to the next page
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveprev
|
||||||
|
T}@T{
|
||||||
|
Move to the previous page
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveword+
|
||||||
|
T}@T{
|
||||||
|
Move caret to the next word
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
moveword-
|
||||||
|
T}@T{
|
||||||
|
Move caret to the previous word
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
movecaret+
|
||||||
|
T}@T{
|
||||||
|
Move caret to the next character
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
movecaret-
|
||||||
|
T}@T{
|
||||||
|
Move caret to the previous character
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
clear
|
||||||
|
T}@T{
|
||||||
|
Clear input
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
viewhist
|
||||||
|
T}@T{
|
||||||
|
View history buffer
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
backspace
|
||||||
|
T}@T{
|
||||||
|
Backspace
|
||||||
|
T}
|
||||||
|
T{
|
||||||
|
deleteword
|
||||||
|
T}@T{
|
||||||
|
Remove one full word forward
|
||||||
|
T}
|
||||||
|
T{
|
||||||
exit_0
|
exit_0
|
||||||
T}@T{
|
T}@T{
|
||||||
Exit with exit code 0
|
Exit with exit code 0
|
||||||
|
|
Loading…
Reference in a new issue