Skip to content

Commit

Permalink
(mac) thoughts: good day & launchd
Browse files Browse the repository at this point in the history
  • Loading branch information
SensehacK committed Feb 18, 2025
1 parent 9620a60 commit bb594e3
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 4 deletions.
2 changes: 2 additions & 0 deletions os/mac/README_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

[keyboard](os/mac/keyboard.md)

[launchd](launchd.md)

[[mac_commands]]

[[mac_os_quirks]]
Expand Down
14 changes: 11 additions & 3 deletions os/mac/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ Annoying things that mac os does to make the keyboard feel sluggish






## Disable Accented characters

First disable the popup showing accented characters when holding down a key.
Expand All @@ -32,3 +29,14 @@ Just select the fastest in this settings.
3. Drag the “Key repeat rate” slider on the right to set how fast characters repeat.

Source: https://support.apple.com/guide/mac-help/set-how-quickly-a-key-repeats-mchl0311bdb4/mac



## Universal Control

My Apple magic keyboard wasn't working with Shift or control / command keys.
I need to use iPad Settings app and do the following.

You have to go to `Accessibility-> Keyboards -> Full Keyboard Access` and enable it

[Good reddit PSA for universal control on mac & ipad](https://www.reddit.com/r/apple/comments/tf488r/psa_fixing_universal_control_if_it_doesnt_work/)
62 changes: 62 additions & 0 deletions os/mac/launchd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@


## Desc

a unified, open-source service management framework for starting, stopping and managing daemons, applications, processes, and scripts.


## Property List

Example plist for running a script locally.
`chmod +x` of course of the user generated script.

```swift
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.sensehack.github.runner.auto.start</string>
<key>Program</key>
<string>/Users/builder/actions-runner/run-helper.sh</string>
<key>StartInterval</key>
<integer>3600</integer>
<key>StandardOutPath</key>
<string>/Users/builder/kay_logs/auto_script/log.stdout</string>
<key>StandardInPath</key>
<string>/Users/builder/kay_logs/auto_script/log.stdin</string>
<key>StandardErrorPath</key>
<string>/Users/builder/kay_logs/auto_script/log.stderr</string>
</dict>
</plist>
```

## Commands


Load the script.

```sh
launchctl load -w ~/Library/LaunchAgents/auto_run_script.plist
```

Start a specific job.
```sh
launchctl start auto_run_script
```

Check the status of your job. A status of zero is a successful run.

```sh
launchctl list | grep "local.sensehack"
```

The label is where the name of the running job is listed as in the terminal processes.


## References

[launchd Info](https://www.launchd.info/)

[good tutorial for simple launchd script](https://veerpalbrar.github.io/blog/How-to-Run-A-Program-or-Script-Hourly-on-MacOS/)

5 changes: 4 additions & 1 deletion thoughts/good_day.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ Inspired by Ice Cube - Today was a good day
- no huddle, teams, screen shares
- just slack standup
- or focus friday
-
- didn't have to delete xcode cache or device support files
- no more `not enough disk space` popups
- didn't even `Your system has run out of application memory` popup for the day
- even company spyware didn't hinder my mac's performance

## Apple Issues Mind Map

Expand Down

0 comments on commit bb594e3

Please sign in to comment.