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.










share|improve this question




























    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.










    share|improve this question


























      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.










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 14 '17 at 11:01









      Jeff Schaller

      37.9k1053123




      37.9k1053123










      asked Jul 14 '17 at 2:39









      TerminalBasher

      111




      111






















          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.






          share|improve this answer




























            up vote
            -1
            down vote













            Try this



            aafire -driver curses





            share|improve this answer










            New contributor




            Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















              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
              });


              }
              });














              draft saved

              draft discarded


















              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.






              share|improve this answer

























                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.






                share|improve this answer























                  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.






                  share|improve this answer












                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 14 '17 at 8:21









                  nshiff

                  1113




                  1113
























                      up vote
                      -1
                      down vote













                      Try this



                      aafire -driver curses





                      share|improve this answer










                      New contributor




                      Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






















                        up vote
                        -1
                        down vote













                        Try this



                        aafire -driver curses





                        share|improve this answer










                        New contributor




                        Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.




















                          up vote
                          -1
                          down vote










                          up vote
                          -1
                          down vote









                          Try this



                          aafire -driver curses





                          share|improve this answer










                          New contributor




                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          Try this



                          aafire -driver curses






                          share|improve this answer










                          New contributor




                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer








                          edited yesterday









                          jimmij

                          30.6k869103




                          30.6k869103






                          New contributor




                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered yesterday









                          Larry E

                          1




                          1




                          New contributor




                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Larry E is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Accessing regular linux commands in Huawei's Dopra Linux

                              Can't connect RFCOMM socket: Host is down

                              Kernel panic - not syncing: Fatal Exception in Interrupt