Compare commits
2 commits
06311bdf7e
...
d39af55417
| Author | SHA1 | Date | |
|---|---|---|---|
| d39af55417 | |||
| 71fabc3a5f |
3 changed files with 44 additions and 0 deletions
|
|
@ -86,3 +86,24 @@ output_path = '~/.config/ghostty/matugen'
|
||||||
input_path = './templates/vicinae.toml'
|
input_path = './templates/vicinae.toml'
|
||||||
output_path = '~/.local/share/vicinae/themes/matugen.toml'
|
output_path = '~/.local/share/vicinae/themes/matugen.toml'
|
||||||
post_hook = 'vicinae theme set matugen'
|
post_hook = 'vicinae theme set matugen'
|
||||||
|
|
||||||
|
[templates.macos-accent]
|
||||||
|
colors_to_compare = [
|
||||||
|
{ name = "-1", color = "#696766" }, # graphite
|
||||||
|
{ name = "0", color = "#C03437" }, # red
|
||||||
|
{ name = "1", color = "#C65D0A" }, # orange
|
||||||
|
{ name = "2", color = "#BE8F0F" }, # yellow
|
||||||
|
{ name = "3", color = "#409226" }, # green
|
||||||
|
{ name = "4", color = "#1B5DC7" }, # blue
|
||||||
|
{ name = "5", color = "#AD29AB" }, # purple
|
||||||
|
{ name = "6", color = "#BC3F77" }, # pink
|
||||||
|
]
|
||||||
|
|
||||||
|
compare_to = "{{colors.primary.default.hex}}"
|
||||||
|
pre_hook = "defaults write -globalDomain AppleAccentColor -int {{closest_color}}"
|
||||||
|
post_hook = "~/.config/matugen/scripts/macos-accent-notification"
|
||||||
|
input_path = "/dev/null"
|
||||||
|
|
||||||
|
[templates.macos-dark-mode]
|
||||||
|
input_path = "/dev/null"
|
||||||
|
post_hook = '~/.config/matugen/scripts/macos-darkmode.sh {{mode}}'
|
||||||
|
|
|
||||||
14
stow/.config/matugen/scripts/macos-accent-notification
Executable file
14
stow/.config/matugen/scripts/macos-accent-notification
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env swift
|
||||||
|
// from: https://alexwlchan.net/2022/changing-the-macos-accent-colour/
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
let notifications = [
|
||||||
|
"AppleColorPreferencesChangedNotification",
|
||||||
|
"AppleAquaColorVariantChanged"
|
||||||
|
]
|
||||||
|
|
||||||
|
for name in notifications {
|
||||||
|
let notifyEvent = Notification.Name(name)
|
||||||
|
DistributedNotificationCenter.default().post(name: notifyEvent, object: nil)
|
||||||
|
}
|
||||||
9
stow/.config/matugen/scripts/macos-darkmode.sh
Executable file
9
stow/.config/matugen/scripts/macos-darkmode.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$1" = "dark" ]; then
|
||||||
|
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
|
||||||
|
elif [ "$1" = "light" ]; then
|
||||||
|
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'
|
||||||
|
else
|
||||||
|
echo "$0: [dark|light]"
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue