• 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.

global variables in config.js

Scheduled Pinned Locked Moved Unsolved Feature Requests
14 Posts 3 Posters 2.4k Views 3 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.
  • ? Offline
    A Former User
    last edited by A Former User Oct 27, 2019, 2:39 PM Oct 27, 2019, 2:35 PM

    Don’t get me wrong. I don’t want to make any argument about this issue. I also believe the global level values be needed and useful really. However, I’m just saying about reality.

    Anyway who decides which variables should be included as MM-level-default-global?
    Maybe timeFormat and language might be the ones definitely. But those are already included. (By the way, timeFormat:24 is not so really useful to define complex time format of calendars or clocks. What 24 means? “23:45”? “23:45:01”? “23:45:01 pm”?)
    Maybe profile-related-things and page-related-things could be ones also. (Personally, I wish profile to be supported on MM by default).
    But others? what remains? As a module developer, if I want MM community to adopt my variable verbose: as a default global value, Should I make a PR for it? But if other developers never use/support that field either despite including, what is its worth?
    Only that is just my worry.

    S 2 Replies Last reply Oct 27, 2019, 2:44 PM Reply Quote 0
    • S Offline
      sdetweil @Guest
      last edited by Oct 27, 2019, 2:44 PM

      @Sean i just made a change to fix problems with the older pi hardware… and while fixing that realized everyone that needs to run serveronly has to create the startup scripts themselves, and its all hard coded…

      so, I added another variable to the config.js, serverOnly:

      it will help some users…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Guest
        last edited by sdetweil Oct 27, 2019, 2:46 PM Oct 27, 2019, 2:45 PM

        @Sean “24” means not am/pm, and it shows seconds ticking…

        you have great ideas, and modules… share improvements to help everyone!..

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        ? 1 Reply Last reply Oct 27, 2019, 3:01 PM Reply Quote 0
        • ? Offline
          A Former User @sdetweil
          last edited by A Former User Oct 27, 2019, 3:10 PM Oct 27, 2019, 3:01 PM

          @sdetweil said in global variables in config.js:

          @Sean “24” means not am/pm, and it shows seconds ticking…

          That is my point. Each value could have a different meaning in different modules. I can’t use MM-level-global-timeFormat in calendar and clock modules which are created by me because that value is too ambiguous and has a meaning only in default calendar/clock modules. But If timeFormat would become the definite global value,(well, frankly it is already) the user will expect it works also in my modules like default module. But I can’t.
          How about location? Some of the default weather-related-modules are using it like location: "New York", but other Geo-information-related-modules might need another format of value as that kind. If it could not be used really GLOBALLY, how it could become really useful?

          1 Reply Last reply Reply Quote 0
          • 1
          • 2
          • 2 / 2
          2 / 2
          • First post
            11/14
            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