Is it possible to color the output of `aafire`?
up vote
1
down vote
favorite
The program seems cool, but giving it a red color really makes it look like my computer is on fire. I think using grep or similar piping command can do the trick, but I see that it prints ASCII escape codes for colors and removes the special formatting of the output that makes it look like fire.
terminal colors output
add a comment |
up vote
1
down vote
favorite
The program seems cool, but giving it a red color really makes it look like my computer is on fire. I think using grep or similar piping command can do the trick, but I see that it prints ASCII escape codes for colors and removes the special formatting of the output that makes it look like fire.
terminal colors output
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
The program seems cool, but giving it a red color really makes it look like my computer is on fire. I think using grep or similar piping command can do the trick, but I see that it prints ASCII escape codes for colors and removes the special formatting of the output that makes it look like fire.
terminal colors output
The program seems cool, but giving it a red color really makes it look like my computer is on fire. I think using grep or similar piping command can do the trick, but I see that it prints ASCII escape codes for colors and removes the special formatting of the output that makes it look like fire.
terminal colors output
terminal colors output
edited Jul 14 '17 at 11:01
Jeff Schaller
37.9k1053123
37.9k1053123
asked Jul 14 '17 at 2:39
TerminalBasher
111
111
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
Using command line flags, you can configure the output to display in your terminal rather than a popup window.
aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options
Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.
As far as changing the font color and background color itself, this appears to be possible in principle:
aatest
Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.
In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.
Alternatively, you might have to call the library, for instance from a C program.
#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
{
if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
printf("Usage: %s [options]n"
"Options:n"
"%s", argv[0], aa_help);
exit(1);
}
context = aa_autoinit(&aa_defparams);
if(context == NULL) {
fprintf(stderr,"Cannot initialize AA-lib. Sorryn");
exit(2);
}
...
aa_close(context);
}
Example source code from the aalib documentation.
add a comment |
up vote
-1
down vote
Try this
aafire -driver curses
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f378374%2fis-it-possible-to-color-the-output-of-aafire%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Using command line flags, you can configure the output to display in your terminal rather than a popup window.
aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options
Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.
As far as changing the font color and background color itself, this appears to be possible in principle:
aatest
Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.
In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.
Alternatively, you might have to call the library, for instance from a C program.
#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
{
if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
printf("Usage: %s [options]n"
"Options:n"
"%s", argv[0], aa_help);
exit(1);
}
context = aa_autoinit(&aa_defparams);
if(context == NULL) {
fprintf(stderr,"Cannot initialize AA-lib. Sorryn");
exit(2);
}
...
aa_close(context);
}
Example source code from the aalib documentation.
add a comment |
up vote
0
down vote
Using command line flags, you can configure the output to display in your terminal rather than a popup window.
aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options
Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.
As far as changing the font color and background color itself, this appears to be possible in principle:
aatest
Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.
In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.
Alternatively, you might have to call the library, for instance from a C program.
#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
{
if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
printf("Usage: %s [options]n"
"Options:n"
"%s", argv[0], aa_help);
exit(1);
}
context = aa_autoinit(&aa_defparams);
if(context == NULL) {
fprintf(stderr,"Cannot initialize AA-lib. Sorryn");
exit(2);
}
...
aa_close(context);
}
Example source code from the aalib documentation.
add a comment |
up vote
0
down vote
up vote
0
down vote
Using command line flags, you can configure the output to display in your terminal rather than a popup window.
aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options
Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.
As far as changing the font color and background color itself, this appears to be possible in principle:
aatest
Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.
In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.
Alternatively, you might have to call the library, for instance from a C program.
#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
{
if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
printf("Usage: %s [options]n"
"Options:n"
"%s", argv[0], aa_help);
exit(1);
}
context = aa_autoinit(&aa_defparams);
if(context == NULL) {
fprintf(stderr,"Cannot initialize AA-lib. Sorryn");
exit(2);
}
...
aa_close(context);
}
Example source code from the aalib documentation.
Using command line flags, you can configure the output to display in your terminal rather than a popup window.
aafire -driver stdout -width 80 # match width of your terminal
aafire --help # see available options
Now, the color is controlled using your shell application's preferences. For example, I am using gnome-terminal on Ubuntu, so I just go to the menu Edit>Profile Preferences.
As far as changing the font color and background color itself, this appears to be possible in principle:
aatest
Notice that the first line has a blue background. I imagine this is accomplished with escape characters specifying the background color. You can find lots of discussion about this with people asking about changing their bash prompt color.
In order to insert your escape characters to change the color, I am not sure it would be possible to do this from the shell. Perhaps you could write a custom bash script that accepts input from stdin, pipe the output of aafire into your script, echo the color-changing characters, and finally echo the message from stdin.
Alternatively, you might have to call the library, for instance from a C program.
#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(int argc, char **argv)
{
if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) {
printf("Usage: %s [options]n"
"Options:n"
"%s", argv[0], aa_help);
exit(1);
}
context = aa_autoinit(&aa_defparams);
if(context == NULL) {
fprintf(stderr,"Cannot initialize AA-lib. Sorryn");
exit(2);
}
...
aa_close(context);
}
Example source code from the aalib documentation.
answered Jul 14 '17 at 8:21
nshiff
1113
1113
add a comment |
add a comment |
up vote
-1
down vote
Try this
aafire -driver curses
New contributor
add a comment |
up vote
-1
down vote
Try this
aafire -driver curses
New contributor
add a comment |
up vote
-1
down vote
up vote
-1
down vote
Try this
aafire -driver curses
New contributor
Try this
aafire -driver curses
New contributor
edited yesterday
jimmij
30.6k869103
30.6k869103
New contributor
answered yesterday
Larry E
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f378374%2fis-it-possible-to-color-the-output-of-aafire%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown