{"id":15422970,"url":"https://github.com/letmaik/psexercise","last_synced_at":"2026-04-16T18:02:29.800Z","repository":{"id":141777842,"uuid":"311095291","full_name":"letmaik/PSExercise","owner":"letmaik","description":"▶️ YouTube videos on a schedule","archived":false,"fork":false,"pushed_at":"2020-11-15T11:41:14.000Z","size":102,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T05:26:23.341Z","etag":null,"topics":["exercise","kiosk-mode","task-scheduler","windows","youtube"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/letmaik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-08T15:39:22.000Z","updated_at":"2020-11-15T11:41:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"9edefdd3-0678-4e49-a2b8-94244376fef6","html_url":"https://github.com/letmaik/PSExercise","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"bf681179519ee69be27a19ca89aed12e7c7de4c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letmaik%2FPSExercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letmaik%2FPSExercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letmaik%2FPSExercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letmaik%2FPSExercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letmaik","download_url":"https://codeload.github.com/letmaik/PSExercise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245971600,"owners_count":20702651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exercise","kiosk-mode","task-scheduler","windows","youtube"],"created_at":"2024-10-01T17:39:58.706Z","updated_at":"2026-04-16T18:02:24.761Z","avatar_url":"https://github.com/letmaik.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSExercise\n\nA tool for Windows that shows fullscreen YouTube videos on a configurable time schedule.\n\nIt's called PSExercise because I use it to interrupt my desk life with exercise videos and it is based on [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview).\n\n| ![Screenshot](screenshot.jpg) |\n|:--:| \n| *Two monitors using the blur option* |\n\n## Features\n\n- Configuration through simple PowerShell file (see [`config.sample.ps1`](config.sample.ps1))\n- Add videos by copy-pasting \"Share\" link from YouTube\n- Automatically closes video if end time is given in addition to \"Share\" link\n- Select screen on which to show video (default: the largest)\n- Blur out extra screens or show an image or color\n- Option to ask for confirmation before starting video\n- Delayed confirmation popup when fullscreen app is in foreground\n- Set start/end time of day and interval for showing videos\n- Set weekdays for showing videos\n- Uses Microsoft Edge in private-browsing mode (with a fresh profile)\n- Uses Windows Task Scheduler (no background processes!)\n\n## Getting started\n\nFirst, clone or download this repository.\n\n**All the following commands have to be run in a PowerShell terminal.**\nTry [Windows Terminal](https://aka.ms/terminal) for a modern terminal app.\n\nIf you downloaded and extracted this repository from the **ZIP archive**, you need to unblock the scripts first:\n```sh\nls *.ps1 | Unblock-File\n```\n\nBefore running the scripts, you may have to change your execution policy (affects only current terminal session):\n```sh\nSet-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned\n```\n\nNOTE: Never run scripts that you haven't inspected yourself first!\n\n### Configuration\n\nMake a copy of `config.sample.ps1` and save it as `config.ps1`.\nYou can configure all options and your video collection in this file.\nOpen it with any text or code editor like [VS Code](https://code.visualstudio.com/).\nWhen you're done, continue with the next section.\n\n### Run manually\n\nTo test your configuration options (at least the ones unrelated to task scheduling), run the following:\n```sh\n.\\run.ps1\n```\n\n**Note:** To stop a video early or if you haven't specified `t2`, press \u003ckbd\u003eAlt\u003c/kbd\u003e+\u003ckbd\u003eF4\u003c/kbd\u003e.\n\n### Register as scheduled task\n\n```sh\n.\\register.ps1\n```\nWhen opening the [Windows Task Scheduler](https://en.wikipedia.org/wiki/Windows_Task_Scheduler) you can now find the task inside the `letmaik` folder.\n\nNote: Any time you make a change to the task registration options in `config.ps1` or if you move or rename the repository folder, simply re-run the above command.\n\n### Unregister the scheduled task\n\nTo stop the automated schedule, you can remove the task again from the Windows Task Scheduler by running:\n```sh\n.\\register.ps1 -remove\n```\n\n## FAQ\n\n### How do I stop the video (early)?\n\nPress \u003ckbd\u003eAlt\u003c/kbd\u003e+\u003ckbd\u003eF4\u003c/kbd\u003e.\n\n### Why is \u003ckbd\u003eEsc\u003c/kbd\u003e and \u003ckbd\u003eF11\u003c/kbd\u003e not working?\n\nThe browser is started in kiosk mode which makes it fullscreen and blocks access to most controls. The idea is that it shouldn't be too easy to skip a video.\n\n### Why is the window closed too early when the video is paused for a while?\n\nWhen the end time `t2` is given for a video in `config.ps1` then the video duration is automatically computed and the window is closed when the video is supposed to have ended (by keeping a timer running in the background), meaning the tool does not actually check the playback status of YouTube, since it doesn't have easy access to it.\n\nThis essentially means that videos shouldn't be paused if `t2` is given, otherwise the window will close too early.\nIf `t2` is not given, then the window is not closed automatically, instead \u003ckbd\u003eAlt\u003c/kbd\u003e+\u003ckbd\u003eF4\u003c/kbd\u003e has to be pressed.\n\n### I use an image for my extra screens. Why does it take 1-2s to display?\n\nThis is a known technical limitation and happens especially for big images.\nIf you're curious, check out the comments in `run.ps1` starting around `$overlays = @()`.\n\n### Why is this tool written in PowerShell?\n\nMostly because it doesn't require any extra setup/installation steps.\nThe tool also interacts a fair bit with .NET and Win32 APIs, both of which is easy with PowerShell.\n\n### Why is this tool relying on Microsoft Edge?\n\nEdge is available on all up-to-date Windows 10 PCs and this means the tool will work out-of-the-box.\n\n### What is stored in the hidden `.data` folder?\n\n`history.txt`: Playback history of the current day to avoid showing the same video twice\n\n`lastrun.txt`: Terminal output from the last run to aid in diagnosing issues\n\n`Edge/`: A fresh browser profile to force starting Edge in a separate process and avoid interfering with any other open browser windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmaik%2Fpsexercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletmaik%2Fpsexercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmaik%2Fpsexercise/lists"}