En macOS High Sierra v 10.13.4, puedo hacer lo siguiente en Controles parentales :
Sin embargo, lo que me gustaría hacer es limitar el tiempo de uso de una aplicación específica. En particular, me gustaría limitar el uso de un juego específico por parte de mi hijo a x horas por día, pero las opciones anteriores no lo permiten.
¿Hay alguna manera de hacer esto usando macOS? Si no es así, ¿hay otra forma de hacerlo, ya sea con otra aplicación, a través de la línea de comandos o de otra manera?
( Esta pregunta similar con respecto a Mac OS X 10.10 hace referencia a una aplicación llamada Watcher, pero recibió malas críticas y no parece haberse actualizado recientemente ).
Nota: yo también soy un niño, espero que otros no me vean como un traidor por dar esta respuesta 🤣🤣
Aquí está el comienzo de mi aplicación. Es un trabajo en progreso. Estaré editando muy pronto para incluir nuevas funciones como
Edición remota de configuraciones (como los controles parentales le permiten hacer)
Capacidad para recibir alertas si el niño intenta eludir la restricción.
Posibilidad de ampliar el tiempo (¿sistema de recompensas?) con una contraseña de los padres
Capacidad para eludir la restricción por completo con la contraseña de los padres
Alertas múltiples
Más registros
Más comentarios en código
LaunchAgent y LaunchDemon
Muchas más características
Abra esto en el Editor de secuencias de comandos y expórtelo como una aplicación de solo lectura y asegúrese de permanecer abierto después de que el controlador de ejecución esté marcado
Después de exportar, siga esta guía para evitar que aparezca en el muelle.
Para salir, vaya al Monitor de actividad, busque lo que haya guardado en la aplicación y presione la X en la esquina superior izquierda de la ventana.
## Time Limiter - Created by Josh Brown - Created June 8th 2018 - Last Modified June 8th 2018 ##
global applist
global timelimit
global timelimits
global day1
global day2
## Settings ##
set applist to {"Google Chrome", "App Store"} -- Apps to limit
set timelimit to 10 -- time to limit in min, this is cumulative between all application
set alert1 to 5 -- time when to give a warning (great for giving a 5 min warning so they know they should save and wrap up what they are doing)
## Alert Settings ##
set alertme to false
set bypassattempts to 0
set maxbypassattemtps to 3 -- If the kid trys to reopen application after timelimit has expired alert you
## Bypass/Extention Settings ## -- If you would like to give the kid an extesion or bypass the block
set allowbypass to false
set pass1 to ""
set timelimit to timelimit * 60 -- Make into a seconds
set alert1 to alert1 * 60
set timelimits to timelimit
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
on checkapps()
set x to false
repeat with a from 1 to length of applist
set b to item a of applist
if is_running(b) then
set x to true
end if
end repeat
return x
end checkapps
on killall()
tell application "System Events"
repeat with myProcess in applist
set theID to (unix id of processes whose name is myProcess)
try
do shell script "kill -9 " & theID
end try
end repeat
end tell
end killall
on logme(msg)
set time1 to do shell script "date"
do shell script "echo \"" & msg & " " & time1 & "\" >> ~/Library/Logs/Time_Limit.log"
end logme
on checkday()
if day of (current date) is not equal to day1 then
set timelimit to timelimit + timelimits
set day1 to day of (current date)
end if
end checkday
logme("Begin Timer with Apps List: " & (applist as string))
set day1 to day of (current date)
repeat while 1 = 1
checkday()
if checkapps() then
if timelimit > 0 then
set timelimit to timelimit - 1
if timelimit is alert1 then
logme("Time Left:" & (timelimit as string) & "Displaying alert")
display notification "Please finsh what you are doing and save your work" with title "Time Limit Almost Up" subtitle ((timelimit * 60) & " Minitues remaing") as string
end if
else
(*
tell application app1
quit
end tell
delay 20
*)
if checkapps() then
killall()
logme("App Runnning after Limit, Killing")
end if
end if
end if
delay 1
end repeat
JBis
JBis
JBis