<html>
<head>
<title>Documentation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<style>
body {
background-color:#f2f2f2;
color:#333333;
font-family: system-ui;
margin-left: auto;
margin-right: auto;
padding: 5%;
max-width: 650px;
}
p{
font-size:18px;
color:black;
font-weight:400;
}
h1{
font-size:35px;
font-weight:200;
}
.title {
font-weight:800;
font-size:55px;
margin-top:-40;
color:#E7A253;
text-align:center;
}
h2{
font-weight:600;
font-size:33px;
color:black;
}
h3 {
font-weight:600;
font-size:25px;
color:black;
}
h4 {
font-weight:600;
font-size:20px;
color:black;
}
img{width:80%;border-radius:10px;}
.icon {
height:75px;
width:75px;
margin-top:-20px;
border-radius:0px;
}
a {color:#E7A253;}
span {color:#E7A253;}
.b {color:#007AFF;}
ul {
margin-left:-15px;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #1C1C1E;
color: #AAAAAA;
}
p {
color: #AAAAAA;
}
h2,h3,h4{
color:white;
}
}
</style>
</head>
<body>
<h1>Documentation</h1>
<h2 class="title">Toggler</h2>
<center><img class="icon" src="data:image/jpeg;base64,
base img.toggle
"></center>
<h2>Editing/Creating Toggles</h2>
<h3>What Is A Toggle</h3>
<p>A Toggle is a collection of <strong>switches</strong> that if ran, instantaneously switch to the value you preselected. With <span>Toggler</span>, you can create and edit toggles to fit your needs.</p>
<h3>Parts Of A Toggle</h3>
<p>The image below is what the main editing menu will look like. At the top is the toggleβs name in double quotes. The menu options are either <strong>switches</strong> or <strong>non-switches</strong>.</p>
<center><img src="data:image/jpeg;base64,
base img.icon
"></center>
<h4>Non-Switch</h4>
<p>You can tell what a <strong>non-switches</strong> is by the images. They have icons in their image and are all the same style. <strong>non-switches</strong> each have different functions. The "Save & Exit" option exits the shortcut and the toggle will be saved. "Home" returns to the main menu. "Settings Switches" brings up another menu with more settings-based <strong>switches</strong>. It also has a "Back" <strong>non-switches</strong> that returns to the main editing menu.</p>
<h4>Switch</h4>
<p>These menu options have images that are one or two coloured. They <em>are</em> the toggle. Each <strong>switch</strong> has 3 parts, the name, image and <strong>value</strong>. The name (such as Bluetooth or Airplane Mode), is the thing that can change (like to on or off) when the toggle is run. The image and <strong>value</strong> go hand-in-hand and are explained below.</p>
<h4>Value</h4>
<p>The <strong>value</strong> is the subtitle shown beneath the <strong>switch</strong> name (such as "Unchanged"). The <strong>value</strong> is what the <strong>switch</strong> name will change to when the toggle is run (such as "Wi-Fi to Off"). Different switches have different possible <strong>values</strong>. You can tap on a switch to edit the value. The images in the switch also correspond to the <strong>value</strong>, each different <strong>value</strong> has different images.</p>
<h2>Running Toggles</h2>
<p>When you run a toggle, all the switches instantaneously change to the values you choose them to be.</p>
<p>Hereβs an example. Letβs say you have a toggle with the following switches that are <strong>not</strong> "Unchanged" (switches with an "Unchanged" value do not change when the toggle is run).</p>
<ul>
<li>Appearance - Dark</li>
<li>Wi-Fi - Off</li>
<li>Cellular Data - On</li>
<li>Volume - 30</li>
<li>Smart Invert - Toggle</li>
<li>Flashlight - On to 50</li>
</ul>
<p>When you run this toggle, the following things happen:</p>
<ul>
<li>Appearance will turn to dark mode</li>
<li>Wi-Fi will be turned off</li>
<li>Cellular Data will be turned on</li>
<li>Volume will be turned to 30%</li>
<li>Smart Invert will be toggled (if on, it will be turned off. If off, it will be turned on)</li>
<li>Flashlight will turn on to 50%</li>
</ul>
<p><strong>Wi-Fi is Weird</strong> - When toggling Wi-Fi, it will turn off only if you're <strong>connected</strong> to Wi-Fi, not if you are <strong>searching</strong> for a connection. If Wi-Fi is not connected, it will be toggled on and try to connect.</p>
<h2>Running In Automations And Shortcuts</h2>
<p>You are not limited to only this shortcut to run your toggles with, you can run a toggle in any shortcut or automation using the following code:</p>
<center><img src="data:image/jpeg;base64,
base img.code
"></center>
<ol>
<li>Add a "Get File" action</li>
<li>Toggle off "Show Document Picker"</li>
<li>Enter "Toggler/Toggles" as the file path (<em>/Shortcuts/Toggler/Toggles</em> is the full file path)</li>
<li>Toggle off "Error If Not Found" if you would like to</li>
<li>Add a "Filter Files" action below the "Get File"</li>
<li>Add a filter to the "Filter Files". Filter where "Name" "Is" "<em>Toggle name case sensitive</em>"</li>
<li>Add a "Run Shortcut" action below the "Filter Files"</li>
<li>Select to run <span>Toggler</span></li>
<li>Make sure that the "Run Shortcut" has an Input of the "Filter Files", now your done</li>
</ol>
<p>Here is a shortcut that provides an example of how you can run a toggle from automation or in a shortcut. It also allows you to quickly run your toggles: <a href="https://www.icloud.com/shortcuts/98614e6cd33a4d299c70f62ccd64fad1">Toggler Quick Run</a></p>
<h2>Sharing And Downloading</h2>
<p><span>Toggler</span> gives you the ability to share your toggles to other people and receive/download them as well. To share and download, you will need to follow these steps:</p>
<ol>
<li>Make sure that both the Sender and Receiver are on the same version of <span>Toggler</span>, or, even better, check for an update on <a href="https://routinehub.co/shortcut/8261/">RoutineHub</a> to each be on the newest version.</li>
<li>Then the Sender will send (using iMessages) one of their toggles to the Receiver using the "Share" menu option (after you click a toggle in the main menu, it's below "Edit").</li>
<li>The toggle will send as a json file. The Receiver will now be able to copy the full file: Click on the file. Next, tap on the share icon in the bottom left corner. Then tap "Copy".</li>
<li>The Receiver will run <span>Toggler</span> (after making sure they have the json copied). They will click "Download" in the main menu, choose their toggleβs name and then they will have the toggle to use.</li>
</ol>
<h2>Feedback</h2>
<p>If you have any feedback regarding bugs or other errors, suggestions, or if you need some help understanding the shortcut, you can reach me on <a href="https://www.reddit.com/user/PEKKA_SLAYER">reddit</a> or post to <a href="https://routinehub.co/shortcut/8261/">this shortcutβs RoutineHub page</a>.</p>
<h2>Updates</h2>
<p>All updates will take place on <a href="https://routinehub.co/">RoutineHub</a>. You can check for an update by going to <a href="https://routinehub.co/shortcut/8261/">this shortcutβs RoutineHub page</a>.</p>
<p>Tap <strong class="b">Done</strong> to continue.</p>
</body>
</html>