Repository navigation
Converge omarchy-mac and omarchy-mx-mac into upstream Omarchy #13362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maralcbr
wants to merge
73
commits into
omacom:quattro
Choose a base branch
from
omacom:upstream/convergence
base: quattro
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+13,721
−329
Open
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
e0a8581
Add omarchy-hw-platform to tell Apple Silicon and Qualcomm machines a…
maralcbr 66981a4
Reject platform gates keyed only on the CPU architecture
maralcbr 5b1730f
Compose default packages from base, architecture and platform lists
maralcbr c35ea70
Early-load thunderbolt only where the kernel builds the module
maralcbr aaa3cc7
Compose mkinitcpio HOOKS from an early baseline drop-in
maralcbr d53ccc4
Resolve the LUKS parent from raw lsblk output
maralcbr 3ff77f8
Check the factory-reset passphrase against keyslots only
maralcbr f133ad8
Test LUKS parent lookup during owner setup and factory reset
scottjones c398d23
Cover LUKS parent lookup through an LVM volume group
maralcbr b77b9b2
Journal the first-boot LUKS re-key so an interrupted attempt resumes
maralcbr 0eb79b2
Change the root volume's LUKS key before the login and root passwords
maralcbr 699bc69
Add omarchy-lifecycle-dispatch for platform boot operations
maralcbr d4fe519
Let the platform's boot package own first-boot setup's boot chain and…
maralcbr 38e079b
Reset through the platform's boot package where it owns the boot chain
maralcbr 3598a76
Check the platform's boot chain after an update
maralcbr 9aa1508
Hand a machine to its platform's migration through lifecycle dispatch
maralcbr cd2c9ea
Refuse packages tagged for another platform in a pacman hook
maralcbr 8280ba0
Enable Voxtype's Vulkan backend only when it is installed
maralcbr 1e54ed9
Link the system Widevine CDM into Brave
maralcbr 6494409
Report failed setup steps on the console
maralcbr 949b439
Let a migration defer itself without stopping the update
maralcbr ad6fc66
Keep Apple Silicon's systemd initramfs on the HOOKS baseline
maralcbr 65fb14e
Hide optional installs that have no package on this machine
maralcbr f200105
Run 1Password with software GL where there is no render GPU
maralcbr 166ee06
Record with wf-recorder when gpu-screen-recorder can't start
maralcbr 56ce28d
Hold logind's lid switch while a display it doesn't count is in use
maralcbr 802591d
Keep the focused workspace in front when a monitor goes away
maralcbr 789b391
Drive the keyboard backlight from the ambient light sensor
maralcbr c98615d
Defer an image build's hardware setup to the machine's first boot
maralcbr 2d2b63e
Give an image-built root a UTF-8 locale when LANG is still C
maralcbr 62b9ff6
Let a platform's packages run their own boot, system and user setup
maralcbr 84d8f49
Find batteries, lids and panels that aren't named like a PC's
maralcbr da11f6a
Keep the user's XDG config and state directories in platform user setup
maralcbr 66b9e3e
Let a platform package add Hyprland defaults of its own
maralcbr 5228cba
Let a platform package name keys in the keybindings menu
maralcbr 60e3376
Keep the top bar out of a panel's camera cutout
maralcbr 6c941e2
Keep PC and Intel Mac quirks off Apple Silicon
maralcbr 72af019
Let a platform's runtime package adjust the apps it needs to
maralcbr b2a1d69
Ask the platform's boot package before an update takes over its files
maralcbr 2200717
Install the Mac's package set on Apple Silicon
maralcbr a685357
Give existing aarch64 machines the zram swap Omarchy configures
maralcbr 213ddfb
Keep an ARM machine's repositories when it changes channel
maralcbr c1b0483
Keep Arch Linux ARM's signing keys current on ARM machines
maralcbr 27d40f7
Mark the runtime's platform files as deciding at runtime
maralcbr 58be18a
Set the wireless regulatory domain from the owner's timezone at first…
maralcbr a5786a9
Ask again for a keyboard layout first-boot setup could not apply
maralcbr a159a3b
Refresh a platform's own signing keyrings before an update
maralcbr 570b231
Drive an untyped default input from the audio panel
maralcbr c08b056
Give first-boot setup an XKB layout for keymaps systemd cannot map
ryanrhughes 8a4b86c
Leave keys a firmware key turned off dark
ryanrhughes 2260b6d
Drop the optional-install availability guards
ryanrhughes b94e15d
Put the current root back when the factory root cannot take its place
maralcbr 1ca672f
Leave other recorders alone when the saved recorder pid is stale
maralcbr 2c06cdd
Name the audio a wf-recorder recording could not capture
maralcbr 2b9b988
Show the Edge, Spotify and Dropbox installers on x86_64 only
maralcbr 2874ad6
Revoke the generic reset's throwaway slot when the reset fails
maralcbr 9d131c9
Clear a stale recorder pid when a recording starts
maralcbr f119249
Word the dropped-audio notice for every reason a source is left out
maralcbr a6a7e2f
Show the Heroic and Minecraft installers on x86_64 only
maralcbr 8ab1dd1
Ask the recorder script whether its stop has a recording to end
maralcbr 66e546b
Copy every platform's pacman templates into place, as x86_64 does
ryanrhughes fb68056
Revert "Copy every platform's pacman templates into place, as x86_64 …
ryanrhughes 9c6f2d1
Copy every platform's pacman templates into place, as x86_64 does
ryanrhughes 853b9d8
Drop the migrations no installed machine needs
ryanrhughes ccb123a
Drop the generic changes Mac support doesn't need
ryanrhughes e76b9cb
Drop the platform Hyprland slots
ryanrhughes 2907d02
Keep aarch64 machines off the release channels until a release suppor…
maralcbr 1614977
Leave a filter's own capture alone when choosing an input again
maralcbr b6151ec
Say aarch64 offers edge alone where the templates are described
maralcbr b905116
Point the Mac packages at omacom/omarchy-mac-pkgs
maralcbr e7b9848
Stop naming a platform migration among the dispatcher's callers
maralcbr c69afd4
Keep the Intel Mac Broadcom migration off Apple Silicon again
maralcbr 2827c5e
Say when Steam's post-install hook runs now that the drivers go first
maralcbr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| #!/usr/bin/python3 | ||
| # omarchy:summary=Print an audio input's level for the audio panel | ||
| # omarchy:group=audio | ||
| # omarchy:args=<source-name> | ||
| # omarchy:hidden=true | ||
|
|
||
| # The panel meters a typed input with Quickshell's peak monitor, which takes | ||
| # only nodes of an exact media class. A virtual source (an | ||
| # Audio/Source/Virtual) is untyped there, so this records it, as apps do, and | ||
| # prints one peak per 40 ms on the panel's scale (the cube root of the sample | ||
| # peak). Samples are inspected, never kept. | ||
|
|
||
| import array | ||
| import ctypes | ||
| import os | ||
| import signal | ||
| import subprocess | ||
| import sys | ||
|
|
||
| RATE = 48000 | ||
| CHUNK = RATE // 25 * 4 | ||
| NAME = 'omarchy-audio-level' | ||
|
|
||
|
|
||
| def level(samples): | ||
| peak = max((abs(sample) for sample in samples), default=0.0) | ||
| return min(1.0, peak) ** (1 / 3) | ||
|
|
||
|
|
||
| def die_with(parent): | ||
| # parec must not outlive this helper, even one killed outright; a parent | ||
| # already gone before the request would never send the signal. | ||
| def request(): | ||
| try: | ||
| ctypes.CDLL(None, use_errno=True).prctl(1, signal.SIGTERM) | ||
| except (AttributeError, OSError): | ||
| pass | ||
| if os.getppid() != parent: | ||
| os._exit(0) | ||
| return request | ||
|
|
||
|
|
||
| def main(): | ||
| if len(sys.argv) != 2 or not sys.argv[1] or sys.argv[1].startswith('-'): | ||
| print('Usage: omarchy-audio-source-level <source-name>', file=sys.stderr) | ||
| return 2 | ||
| try: | ||
| process = subprocess.Popen(['parec', '--device=' + sys.argv[1], '--raw', '--format=float32le', '--channels=1', | ||
| '--rate=' + str(RATE), '--latency-msec=40', '--client-name=' + NAME, | ||
| '--property=node.name=' + NAME, '--property=media.category=Monitor'], | ||
| stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, | ||
| preexec_fn=die_with(os.getpid())) | ||
| except OSError as error: | ||
| print('Could not read the input level: ' + str(error), file=sys.stderr) | ||
| return 1 | ||
| signal.signal(signal.SIGTERM, lambda *_: sys.exit(0)) | ||
| pending = b'' | ||
| try: | ||
| while True: | ||
| chunk = os.read(process.stdout.fileno(), CHUNK) | ||
| if not chunk: | ||
| return 0 | ||
| pending += chunk | ||
| while len(pending) >= CHUNK: | ||
| print('%.3f' % level(array.array('f', pending[:CHUNK])), flush=True) | ||
| pending = pending[CHUNK:] | ||
| except (BrokenPipeError, KeyboardInterrupt): | ||
| os.dup2(os.open(os.devnull, os.O_WRONLY), sys.stdout.fileno()) | ||
| return 0 | ||
| finally: | ||
| process.kill() | ||
| process.wait() | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| raise SystemExit(main()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.