• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Is it possible to change the CSS layout at a certain time? (Dark Mode)

Scheduled Pinned Locked Moved Development
11 Posts 6 Posters 3.2k Views 6 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mopedmann
    last edited by Mar 12, 2021, 9:35 AM

    Hi @sdetweil @Foxy25
    thanks a lot for the quick and great answers!
    However, I’m a total beginner in programming and am shambling through previous solutions on the forum to implement something in the same way.
    So if someone has time and desire to develop a dark mode/css switch for the Magic Mrror this would be great.

    K F 2 Replies Last reply Mar 12, 2021, 12:13 PM Reply Quote 0
    • K Offline
      KamiSchami @mopedmann
      last edited by Mar 12, 2021, 12:13 PM

      @mopedmann

      … otherwise you can also have the display dimmed temporarily

      Real programmers never work 9 to 5. If they are around at 9 AM, it's because they were up all night.

      1 Reply Last reply Reply Quote 0
      • F Offline
        Foxy25 @mopedmann
        last edited by Mar 12, 2021, 12:28 PM

        @mopedmann

        Its not that hard as it seems.

        A handfull of code that you have to write.

        A good task to learn a bit about bash programming under linux.

        Try the fist step, it would be helpful for the future…

        Greetings Torsten

        1 Reply Last reply Reply Quote 1
        • E Offline
          ember1205
          last edited by Mar 12, 2021, 4:18 PM

          This is an interesting idea, and I found this write-up that I thought was interesting.

          https://labs.tadigital.com/index.php/2020/04/10/night-and-day-switch-using-css-variables/

          1 Reply Last reply Reply Quote 0
          • M Offline
            mopedmann
            last edited by Mar 13, 2021, 10:12 AM

            Thank you for all the ideas and advice. I will report when I have made first progress
            With kind regards
            mopedman

            1 Reply Last reply Reply Quote 0
            • P Offline
              Piranha1605
              last edited by Mar 15, 2021, 6:43 AM

              I hope this help.

              https://github.com/Piranha1605/MMM-CSSswitch

              1 Reply Last reply Reply Quote 2
              • M Offline
                mopedmann @Foxy25
                last edited by Mar 15, 2021, 4:31 PM

                Hey everyone,
                yesterday I have implemented the idea of Foxy25 and it works great.
                @foxy25 said in Is it possible to change the CSS layout at a certain time? (Dark Mode):

                Hi

                maybe it is possible to write a script that rename the used .css in another filename (from custom.css to Custom.1) an after that, rename an other .css to custom.css. Packed this in an cronjob an you have a change of the .css files. After the rename routine restart the mirror…

                Piranha1605’s solution looks even better and easier!
                @piranha1605 said in Is it possible to change the CSS layout at a certain time? (Dark Mode):

                I hope this help.

                https://github.com/Piranha1605/MMM-CSSswitch

                Thanks for the great help

                F 1 Reply Last reply Mar 16, 2021, 8:24 AM Reply Quote 0
                • F Offline
                  Foxy25 @mopedmann
                  last edited by Mar 16, 2021, 8:24 AM

                  @mopedmann

                  Hi, the Css-Switcher is really the more comfortable way to do the change!

                  but, you don’t learn the basics of coding ;-)

                  Anyway, good to hear that it works in both ways.

                  Greetings Foxy

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 1 / 2
                  1 / 2
                  • First post
                    8/11
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy