Displays a menu with options to adjust brightness
Displays menu with options to set brightness to a certain level. Displays current brightness and a menu including:
brightness presets, custom brightness, Invert colors, light/dark mode and links to settings: auto-lock, and display and text size (for resetting auto-brightness)
Nouveautés
Version 1.0
First release
Ce qu’il fait
55 actions-
Get Device Details
-
Calculate
-
Round Number
-
Set VariableBrightness'
-
Choose from Menu…% Brightness
-
Choose from Menu+5%
-
Calculate
-
Set Brightness
-
Choose from Menu-5%
-
Calculate
-
Set Brightness
-
Choose from Menu100%
-
Number
-
Set Brightness
-
Choose from Menu75%
-
Number
-
Set Brightness
-
Choose from Menu50%
-
Number
-
Set Brightness
-
Choose from Menu35%
-
Number
-
Set Brightness
-
Choose from Menu25%
-
Number
-
Set Brightness
-
Choose from Menu10%
-
Number
-
Set Brightness
-
Choose from Menu3%
-
Number
-
Set Brightness
-
Choose from Menu0%
-
Number
-
Set Brightness
-
Choose from MenuCustom
-
Ask for InputBrightness %
-
Calculate
-
Set Brightness
-
Choose from MenuSmart Invert
-
Toggle Smart Invertcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Choose from MenuClassic Invert
-
Toggle Classic Invertcom.apple.AccessibilityUtilities.AXSettingsShortcuts
-
Choose from MenuDark/Light mode
-
Set Appearance
-
Choose from MenuDisplay & Text Size ⚙️
-
URLprefs:root=ACCESSIBILITY&path=DISPLAY_AND_TEXT
-
Open URLs
-
Stop This Shortcut
-
Choose from MenuAuto-Lock ⚙️
-
URLprefs:root=DISPLAY&path=AUTOLOCK
-
Open URLs
-
Stop This Shortcut
-
Run ShortcutBrightness ☆
-
CommentV. 1.2 Moved current brightness from menu and into prompt title 2024.06.21 V. 1.2.1 Changed adjuster from 8% to 10% V. 1.2.2 Fixed incremenral brightness followed by preset bug by using "set variable" instead of "add to variable" for brightness valu…
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/web'
#include 'actions/settings'
#include 'actions/math'
#include 'actions/device'
#define color yellow
#define glyph sun
const CurrentBrightness = getDeviceDetail("Current Brightness")
const CalculationResult = CurrentBrightness * 100
ceil(CalculationResult, "Hundredths")
@Brightness
const MenuResult = menu "{@Brightness}% Brightness " {
item "+5%":
const CalculationResult1 = CurrentBrightness + 0.05
setBrightness(CalculationResult1)
item "-5%":
const CalculationResult2 = CurrentBrightness - 0.05
setBrightness(CalculationResult2)
item "100%":
const Number = 1
setBrightness(Number)
item "75%":
const Number1 = 0.75
setBrightness(Number1)
item "50%":
const Number2 = 0.5
setBrightness(Number2)
item "35%":
const Number3 = 0.35
setBrightness(Number3)
item "25%":
const Number4 = 0.25
setBrightness(Number4)
item "10%":
const Number5 = 0.1
setBrightness(Number5)
item "3%":
const Number6 = 0.03
setBrightness(Number6)
item "0%":
const Number7 = 0
setBrightness(Number7)
item "Custom":
const ProvidedInput = prompt("Brightness %", "Number")
const CalculationResult3 = ProvidedInput / 100
setBrightness(CalculationResult3)
item "Smart Invert":
toggleSmartInvert()
item "Classic Invert":
toggleClassicInvert()
item "Dark/Light mode":
darkMode()
item "Display & Text Size ⚙️":
const URL = url("prefs:root=ACCESSIBILITY&path=DISPLAY_AND_TEXT")
openURL(URL)
stop()
item "Auto-Lock ⚙️":
const URL1 = url("prefs:root=DISPLAY&path=AUTOLOCK")
openURL(URL1)
stop()
}
runSelf(MenuResult)
/*
V. 1.2
Moved current brightness from menu and into prompt title
2024.06.21
V. 1.2.1
Changed adjuster from 8% to 10%
V. 1.2.2
Fixed incremenral brightness followed by preset bug by using "set variable" instead of "add to variable" for brightness value.
▸ Apparently when a shortcut launchesbitself it affects add to variable.
V. 1.2.3
made 37.5% into 35% because "get current brightness" action rounds to ±5% (although set brightness accuratly sets small values.
*/
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de te55eract
Ça pourrait aussi te plaire
Publicité