MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. amanzimdwini
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 20
    • Posts 108
    • Groups 0

    Posts

    Recent Best Controversial
    • Custom.css

      I’m not getting something - and now am tired of banging my head against this:

      custom.css

      /* this is how you make EVERYTHING    .bright   red  - Makes sense and works 
       * .bright {
       *  color: #ff0000;
       * } */
      
      /* this is how you make ONLY     calendar .bright    red  - again, makes sense and works
       * .module.calendar .bright {
       * color: #ff0000;
       * } */
      
      /* but how do you make EVERYTHING in the    calendar module    red?  This does not work for me:  */
       .module.calendar {
       color: #ff0000;
       }
      

      I must be missing something…
      Thanks

      posted in Troubleshooting
      A
      amanzimdwini
    • Wunderlist - sorting by due date

      I might be missing something, but my Wunderlist on MM2 is in a different order from the one on the Web (which sorts by Due Date). Any help would be appreciated.

      posted in Troubleshooting
      A
      amanzimdwini
    • RE: Alternating Modules to save on real estate

      @KirAsh4
      Thanks! I messed around a bit with it - here is what I came up with. (and yes, 99.999% is yours!)
      Still, here it is for anyone else who wants to play with it. But ALL credit goes to @KirAsh4

      This works best for me for MMM-Wunderground and MMM-Wunderlist - which I keep at top-right.
      a) my config.js extract:

                      {
                              module: 'my_swap',      // as supplied by KirAsh4
                              config: {
                                      showsecs: 30,   // seconds each module is shown (default =30)
                                                      // 30 is a "relaxed" speed
                                      fadems: 4000,   // fade time in ms (default = 4000)
                                                      //  4000 is also very relaxed - no coffee yet.
                                      modA: 'MMM-WunderGround',  // both modules need to be listed NEXT
                                      modB: 'MMM-Wunderlist'     // they should be of similar size, 
                                                                 // and in the same location.
                                                                 // These two are _prefect_ 
                                      }
                      },
                      {
                              module: 'MMM-WunderGround',
                              position: 'top_right',
                              config: {
                                      apikey: '****',
                                      pws: '****',
                                      lang: 'EN',
                                      fctext: '1',
                                      fcdaycount: "5",
                                      fcdaystart: "0",
                                      hourly: '1',
                                      hourlyinterval: "3",
                                      hourlycount: "1",
                                      alerttime: 10000,
                                      alerttruncatestring: "english:",
                                      fade: true
                              }
                      },
                      {
                              module: 'MMM-Wunderlist',
                              position: 'top_right', 
                              config: {
                                      accessToken: '****',
                                      clientID: '****',
                                      lists: [
                                              'MagicMirror'
                                              ],
                                      interval: 60,
                                      fadePoint: 0.9,
                                      fade: true
                                      }
                      },
      

      Then the file my_swap.js ( in \modules\my_swap) needs to look like this:

      Module.register("my_swap",{
      
        // Default module config.
        defaults: {
              modA: "MMM-NonExistA",  // if we dont know the EXACT NAME, we don't do anything!
              modB: "MMM-NonExistB",  //    ="=
              showsecs: 30,           //  as in compliments
              fadems: 4000            //    ="=
        },
      
        // Define required scripts.
        getScripts: function() {
          return ["moment.js"];
        },
      
        start: function() {
          Log.log("Starting module: " + this.name);
          this.DOMloaded = 0;
          this.isHidden = 0;
      
          var self = this;
          setInterval(function() {
            self.swapModules();
          }, 1000);
        },
      
        notificationReceived: function(notification, payload, sender) {
          if (notification === 'DOM_OBJECTS_CREATED') {
            this.DOMloaded = 1;
          }
        },
      
        // swapModules.
        swapModules: function() {
      
          var now = moment();
          var self = this;
      
              var mod1 = this.config.modA     // yank from config file
              var mod2 = this.config.modB
              var fadems = this.config.fadems
              var showsecs = this.config.showsecs
      
          if (!(now.seconds() % showsecs)) { 
            if (this.DOMloaded) {
              if (self.isHidden) {
                MM.getModules().exceptModule(this).enumerate(function(module) {
                  if (module.name === mod1) {
                    module.hide(fadems, function() {
                      MM.getModules().exceptModule(this).enumerate(function(module) {
                        if (module.name === mod2) {
                          module.show(fadems, function() {
                          });
                        }
                      });
                    });
                  }
                });
                self.isHidden = 0;
              } else {
                MM.getModules().exceptModule(this).enumerate(function(module) {
                  if (module.name === mod2) {
                    module.hide(fadems, function() {
                      MM.getModules().exceptModule(this).enumerate(function(module) {
                        if (module.name === mod1) {
                          module.show(fadems, function() {
                          });
                        }
                      });
                    });
                  }
                });
                self.isHidden = 1;
              }
            }
          }
        }
      });
      

      Works great for me! Thanks again for the clean code to play with. You should submit it as an official module.

      posted in Requests
      A
      amanzimdwini
    • RE: Alternating Modules to save on real estate

      @KirAsh4
      That was fast. Thanks. I’ll give it a whirl.

      Yes, I understand about all the caveats - I like the fading: that will make the jumping less obvious. But that problem already exists if you place the news-ticker at bottom_center, since it will vary between 2 and three lines. And I guess I could force the alternating modules to have the same width.

      BTW: thanks for teaching how to program modules. I love learning this way.

      posted in Requests
      A
      amanzimdwini
    • Alternating Modules to save on real estate

      There are now so many wonderful modules out there that my MM is a bit crowded :)

      So the logical question arises: might it be possible to alternate two modules in one location?

      I’m thinking along the lines of
      postion: top_left
      {module 1 = weather
      module2 = tasklist
      switchtime = 120 seconds}
      and every two minutes weather and tasklist would alternate.

      Thanks,
      Karl

      posted in Requests
      A
      amanzimdwini
    • Google Calendar repeatingCount

      I can’t figure out how how set up the

      displayRepeatingCountTitle
      ( see https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar)

      “inside” my Google Calendar.

      Googeling RepeatingCount + “Google Calendar” shows that others want this to work too; I recall seeing it on some showcase mirror? Anyway, I suspect I need to fiddle with my GoogleCalendar rather than my MM setup?

      Thanks

      posted in Troubleshooting
      A
      amanzimdwini
    • RE: Sachin's Mirror

      @KirAsh4

      THANKS! (major lightbulb).
      Happy 4th to you and @Wilco89

      posted in Show your Mirror
      A
      amanzimdwini
    • RE: Sachin's Mirror

      @KirAsh4 @Wilco89
      I really appreciate the help (and it works!)

      While I’m at it: just so that I understand: since compliments.js references thin xlarge bright I could have changed any of those three? They were referenced, so I can overwrite them? Ie in my custom.css:

      .module.compliments.bright {
        color: #ff0000;
      }
      

      or

      .module.compliments.xlarge{
        color: #ff0000;
      }
      

      would/should both in effect do the same thing?

      Or can I just change EVERYTHING in compliments to be color: #ff0000? ie

      .module.compliments{
        color: #ff0000;
      }
      

      (which I tried, and it did not work :( )

      posted in Show your Mirror
      A
      amanzimdwini
    • RE: Sachin's Mirror

      @Wilco89
      WOAH - I was really close. (and I was just guessing!). (looking at inspect elements gave me a headache)
      Thanks! I;ll try it right now

      posted in Show your Mirror
      A
      amanzimdwini
    • RE: Sachin's Mirror

      @Wilco89
      Thanks. Am an old male - need EXPLICIT instructions :)

      posted in Show your Mirror
      A
      amanzimdwini
    • 1 / 1