MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. shin10
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 5
    • Best 1
    • Controversial 0
    • Groups 1

    shin10

    @shin10

    Module Developer

    1
    Reputation
    1
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    shin10 Unfollow Follow
    Module Developer

    Best posts made by shin10

    • RE: CSS Help

      Just use

      .region.top.bar .module {
          display: inline-block;
      }
      

      or even better, explicitly the modules you want in one line (to avoid notifications shifting everything to the left in case they pop up)

      .MMM-FlipClock, .MMM-Worldclock {
          display: inline-block;
      }
      

      (*oops - edited)

      posted in Custom CSS
      S
      shin10

    Latest posts made by shin10

    • RE: MMM-FlipClock

      It’s doable

      .MMM-FlipClock [data-key=seconds] .tick-flip-front,
      .MMM-FlipClock [data-key=seconds] .tick-flip-back {
          color: red;
          background: blue;
      }
      
      posted in Requests
      S
      shin10
    • RE: ImageSlideShow keeping scale

      @KlausLadegaard

      Probably too late, just add something like this to your css/custom.css file:

      .MMM-ImageSlideShow img {
          max-width: 80vw;
          max-height: 80vh;
          object-fit: contain;
          object-position: 50% 50%;
      }
      

      Just modify the width/height values as needed.

      posted in Requests
      S
      shin10
    • RE: CSS Help

      Just use

      .region.top.bar .module {
          display: inline-block;
      }
      

      or even better, explicitly the modules you want in one line (to avoid notifications shifting everything to the left in case they pop up)

      .MMM-FlipClock, .MMM-Worldclock {
          display: inline-block;
      }
      

      (*oops - edited)

      posted in Custom CSS
      S
      shin10
    • RE: Show Module based on date

      @sdetweil For sure. I just hadn’t thought about that usecase till now. It’s just a little helper to things done without the need for writing a dedicated module and do some hacking. So I’d prefer to keep it free of dependencies.

      That said, anyone in the need for a cron might be better off with MMM-ModuleScheduler. Hadn’t known about this (I’m pretty new to MM), but it seems to be the one @Snille is actually using, despite he mentioned the profile switcher instead? And it seems to do exactly what the the op asked for: https://github.com/ianperrin/MMM-ModuleScheduler#individual-module-schedules

      posted in Requests
      S
      shin10
    • RE: Show Module based on date

      Hi there,

      I’ve recently written a module to inject custom code/styles for simple tasks and modifications like this. https://github.com/shin10/MMM-FF-code-injector

      The following config for example will show the clock module only Mon - Fri, 06:00 - 10:00. I just tested it with MMM-Pages and it works quite nice.

      {
        module: "MMM-FF-code-injector",
        disabled: false,
        config: {
          position: "top",
          scripts: {
            intervals:[  {
              interval: 60 * 1000, // test all 60 seconds
              description: "Show module only Mon - Fri, 06:00 - 10:00",
              func: function() {
                MM.getModules().enumerate((module) => {
                  if (module.name === "clock") { // name of the module to show/hide
                    let now = new Date();
                    let day = now.getDay();
                    if (day >= 1 && day <= 5) { // mon -fri
                      let hour = now.getHours();
                      if(hour >= 6 && hour <= 10) { // 06:00 - 10:00
                        module.show(1000, { lockString: "code-injector"});
                        return
                      }
                    }
                    module.hide(1000, { lockString: "code-injector"});
                  }
                });
              }
            }]
          },
        },
      },
      
      posted in Requests
      S
      shin10