Compare commits
184 Commits
42f515f4a9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72f7e7b93d | ||
|
|
20de3d4f97 | ||
|
|
2a301a049f | ||
| bd7e5a5706 | |||
|
|
af8fa321ff | ||
|
|
6238f41e43 | ||
|
|
fb4d5d7acc | ||
|
|
99a6c7d547 | ||
|
|
85ef8745d7 | ||
|
|
b82954a7b5 | ||
|
|
66c98949ab | ||
| 07e2d5c51c | |||
| 2529ca114f | |||
| 94927952db | |||
| 0930458418 | |||
|
|
95101fda3f | ||
|
|
6e0d17b859 | ||
|
|
27d1506b54 | ||
|
|
90f07ae75c | ||
|
|
bfd95cb40b | ||
|
|
9283403d8f | ||
|
|
7bf4c3c637 | ||
|
|
ec6046793e | ||
|
|
2b6d452509 | ||
|
|
ac846f4b03 | ||
|
|
03968e5d0d | ||
|
|
d264371b46 | ||
|
|
9c672953bc | ||
|
|
7fa909ddf4 | ||
|
|
5ddb15ffef | ||
|
|
46738c3663 | ||
|
|
9be4363f4b | ||
|
|
f93eb7435f | ||
|
|
6b2c678669 | ||
|
|
ac4d66e54d | ||
|
|
098cd42ac8 | ||
|
|
158ae308cc | ||
|
|
c1895eefd4 | ||
|
|
74e2dc34e3 | ||
|
|
3510a51492 | ||
|
|
7064108ce7 | ||
|
|
bef7be01b8 | ||
|
|
d4f50afc62 | ||
|
|
2f18d4efcf | ||
|
|
329dc009b6 | ||
|
|
0af1395df2 | ||
|
|
f2b99e0f75 | ||
|
|
6411395d9f | ||
|
|
39b1a9c1b3 | ||
|
|
c5544e56c8 | ||
|
|
0306dff092 | ||
|
|
3b977f181d | ||
|
|
61cd993e54 | ||
|
|
1e9481849b | ||
|
|
27f5663cdf | ||
|
|
28cc41abdd | ||
|
|
5fc9f5ee34 | ||
|
|
5c5b377bd6 | ||
|
|
4b99fa3846 | ||
|
|
a741b0936c | ||
|
|
f318585dc4 | ||
|
|
386da51178 | ||
|
|
d06ef86bb9 | ||
|
|
3aadc36bff | ||
|
|
55f0653e59 | ||
|
|
dd48411013 | ||
|
|
c66f0b19cd | ||
|
|
6de8ecd093 | ||
|
|
21230a05eb | ||
|
|
4b2f16c2f0 | ||
|
|
21ee9c6035 | ||
|
|
8266dc7ee2 | ||
|
|
16ed8f1df1 | ||
|
|
e9c9342965 | ||
|
|
5b014cfa29 | ||
|
|
034da701a3 | ||
|
|
7086a6f29c | ||
|
|
1545e63c7d | ||
|
|
f965f0be2c | ||
|
|
fb22e390e8 | ||
|
|
074dc3576c | ||
|
|
0728da4374 | ||
|
|
983ade0f55 | ||
|
|
d2b508485a | ||
|
|
cc93491232 | ||
|
|
aa20399210 | ||
|
|
86bc0e570b | ||
|
|
bf30cd07d8 | ||
|
|
c9ff6f26f3 | ||
|
|
133ef9ddfc | ||
|
|
f09bfbc4e7 | ||
|
|
2950dd171e | ||
|
|
6ef28f022b | ||
|
|
3cb012bcba | ||
|
|
e438004cec | ||
|
|
a7e7fa9562 | ||
|
|
7fd0f78d7c | ||
|
|
6203413425 | ||
|
|
4ddc91b930 | ||
|
|
220fc7f699 | ||
|
|
f0bd25f902 | ||
|
|
955269f9a2 | ||
|
|
bb435a47bb | ||
|
|
e66537523a | ||
|
|
04512eabcd | ||
|
|
528447cc19 | ||
|
|
877da19770 | ||
|
|
096124c04a | ||
|
|
3101c0fea2 | ||
|
|
d9c35f5ff6 | ||
|
|
cabc668c77 | ||
|
|
2d587d40ff | ||
|
|
d3042c4fb6 | ||
|
|
b84693bc52 | ||
|
|
17de084789 | ||
|
|
1b75a440b1 | ||
|
|
540718693f | ||
|
|
73ae1232f3 | ||
|
|
6dd3c4b6e2 | ||
|
|
9746e75bc5 | ||
|
|
866e556656 | ||
|
|
66096cbc46 | ||
|
|
8e4e801244 | ||
|
|
6f4741c060 | ||
|
|
f0800e60ca | ||
|
|
ab9700f054 | ||
|
|
6b3e96b3b3 | ||
|
|
0e5fb6c813 | ||
|
|
f4ecaed31a | ||
|
|
1853617f12 | ||
|
|
ffdc67d246 | ||
|
|
b3fb246ce3 | ||
|
|
5f0834f30c | ||
|
|
a7dbca80a6 | ||
|
|
bbdf34ced8 | ||
|
|
a9ee79a5ce | ||
|
|
b27fc5aee8 | ||
|
|
769fd88f25 | ||
|
|
9f62f0f5f1 | ||
|
|
7590fc4057 | ||
|
|
db18304fb6 | ||
|
|
57580dbdb0 | ||
|
|
c6902d5b6d | ||
|
|
ef54a4b67c | ||
|
|
8ae026474f | ||
|
|
1184cad61a | ||
|
|
3ff6815ab0 | ||
|
|
98b7c99023 | ||
|
|
d0f7e67d3d | ||
|
|
a6ec85d1ef | ||
|
|
eebec40ea0 | ||
|
|
0ce8602384 | ||
|
|
8b4e9ef6c8 | ||
|
|
a31023c037 | ||
|
|
5c45b10d88 | ||
|
|
f5f515c2f7 | ||
|
|
358b129f0f | ||
|
|
0065334164 | ||
|
|
45ca66119a | ||
|
|
db8b009638 | ||
|
|
3e1b1efa6f | ||
|
|
db6bdd8495 | ||
|
|
0194569a42 | ||
|
|
bb6b46b76e | ||
|
|
c336f528a8 | ||
|
|
1fa60ed64a | ||
|
|
c71cb7ea71 | ||
|
|
70798abcb0 | ||
|
|
663ee214d6 | ||
|
|
ac6087559d | ||
|
|
2afd5eaa36 | ||
|
|
34c87d21ef | ||
|
|
9d36110123 | ||
|
|
8a72a09bd8 | ||
|
|
7f086f07bf | ||
|
|
d59cb8f0ca | ||
|
|
854f429360 | ||
|
|
64c1dc937d | ||
|
|
514b305713 | ||
|
|
9d5049aed5 | ||
|
|
4abd4d4686 | ||
|
|
e3d8c9ca75 | ||
|
|
09377e37ea | ||
|
|
08e2b4e248 |
102
.forgejo/workflows/check.yml
Normal file
102
.forgejo/workflows/check.yml
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
# Nomarchy CI — eval + lint.
|
||||||
|
#
|
||||||
|
# Catches the regressions that hurt today:
|
||||||
|
# 1. Flake stops evaluating (broken option ref, missing import, etc.).
|
||||||
|
# 2. A `nomarchy-*` shell script has a syntax error or a shellcheck
|
||||||
|
# error-severity issue.
|
||||||
|
# 3. `docs/SCRIPTS.md` drifts from the repo state because somebody
|
||||||
|
# added / removed / renamed a script and didn't run the generator
|
||||||
|
# (the pre-commit hook handles this, but only when enabled per-clone).
|
||||||
|
#
|
||||||
|
# Doesn't build ISOs — that needs a binary cache. Add a separate job
|
||||||
|
# once Cachix/Attic is in place.
|
||||||
|
|
||||||
|
name: Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
eval-and-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
with:
|
||||||
|
# Match the runner's effective channel. Nomarchy itself tracks
|
||||||
|
# nixos-25.11 via flake.nix; the installer-action default is fine.
|
||||||
|
extra-conf: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
|
||||||
|
- name: nix flake check --no-build
|
||||||
|
run: nix flake check --no-build
|
||||||
|
|
||||||
|
- name: Lint nomarchy-* scripts (bash -n + shellcheck)
|
||||||
|
run: |
|
||||||
|
# Mirror what .githooks/pre-commit runs locally, but across the
|
||||||
|
# whole tree instead of just changed files. Pre-commit gates
|
||||||
|
# individual commits; CI gates branches (including --no-verify
|
||||||
|
# bypasses).
|
||||||
|
set -e
|
||||||
|
fail=0
|
||||||
|
while IFS= read -r script; do
|
||||||
|
[[ -f "$script" ]] || continue
|
||||||
|
# Python helpers ship under the same nomarchy- prefix
|
||||||
|
# (e.g. nomarchy-haptic-touchpad). Skip non-bash.
|
||||||
|
head -1 "$script" | grep -qE '^#!.*\bbash\b' || continue
|
||||||
|
if ! bash -n "$script"; then
|
||||||
|
echo "::error file=$script::bash syntax error"
|
||||||
|
fail=1
|
||||||
|
fi
|
||||||
|
if ! nix shell nixpkgs#shellcheck --command shellcheck \
|
||||||
|
--severity=error --shell=bash "$script"; then
|
||||||
|
echo "::error file=$script::shellcheck error-severity issue"
|
||||||
|
fail=1
|
||||||
|
fi
|
||||||
|
done < <(find features/scripts/utils core/system/scripts \
|
||||||
|
themes/engine/scripts \
|
||||||
|
-maxdepth 1 -type f -name 'nomarchy-*')
|
||||||
|
exit "$fail"
|
||||||
|
|
||||||
|
- name: docs/SCRIPTS.md is up to date
|
||||||
|
run: |
|
||||||
|
# Regenerate to a temp file and compare. If different, the
|
||||||
|
# contributor forgot to run the generator (or skipped the
|
||||||
|
# pre-commit hook). Fail loudly and tell them the fix.
|
||||||
|
./bin/utils/nomarchy-docs-scripts --out /tmp/SCRIPTS.regen.md
|
||||||
|
if ! diff -q docs/SCRIPTS.md /tmp/SCRIPTS.regen.md >/dev/null; then
|
||||||
|
echo "::error::docs/SCRIPTS.md is stale."
|
||||||
|
echo "Run: ./bin/utils/nomarchy-docs-scripts --out docs/SCRIPTS.md"
|
||||||
|
echo "Then commit the regenerated file."
|
||||||
|
echo "--- diff ---"
|
||||||
|
diff -u docs/SCRIPTS.md /tmp/SCRIPTS.regen.md || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: installer/hardware-db.sh references real nixos-hardware modules
|
||||||
|
run: |
|
||||||
|
# Every 4th-pipe-field in HARDWARE_DB is a nixos-hardware module
|
||||||
|
# name. Half the DB used to point at modules that don't exist
|
||||||
|
# (e.g. microsoft-surface-pro-8 — there's only -pro-intel and
|
||||||
|
# -pro-9), which made the install fail at eval time with
|
||||||
|
# cryptic "attribute not found" errors on real laptops. This
|
||||||
|
# step catches that regression class.
|
||||||
|
awk -F'|' '/^ "/ { gsub(/"/,"",$4); gsub(/^[[:space:]]+|[[:space:]]+$/,"",$4); if ($4) print $4 }' \
|
||||||
|
installer/hardware-db.sh | sort -u > /tmp/db-refs.txt
|
||||||
|
nix eval --impure --json --expr '
|
||||||
|
let
|
||||||
|
nh = (builtins.getFlake (toString ./.)).inputs.nixos-hardware.nixosModules;
|
||||||
|
in builtins.attrNames nh' \
|
||||||
|
| nix shell nixpkgs#jq --command jq -r '.[]' | sort -u > /tmp/db-real.txt
|
||||||
|
missing=$(comm -23 /tmp/db-refs.txt /tmp/db-real.txt)
|
||||||
|
if [[ -n "$missing" ]]; then
|
||||||
|
echo "::error::hardware-db.sh references nixos-hardware modules that don't exist:"
|
||||||
|
printf ' - %s\n' $missing
|
||||||
|
echo "Either fix the name (check the actual attr in nixos-hardware) or drop the row."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
54
.githooks/pre-commit
Executable file
54
.githooks/pre-commit
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Nomarchy pre-commit hook.
|
||||||
|
#
|
||||||
|
# Enable per-clone with:
|
||||||
|
# git config core.hooksPath .githooks
|
||||||
|
#
|
||||||
|
# Two responsibilities:
|
||||||
|
# 1. Lint changed nomarchy-* scripts (bash -n + shellcheck if available)
|
||||||
|
# so syntax errors and unquoted-var bugs don't ship.
|
||||||
|
# 2. Regenerate docs/SCRIPTS.md when any nomarchy-* script under the three
|
||||||
|
# script directories is added, modified, or deleted in this commit, and
|
||||||
|
# stage the refreshed file so it lands with the change.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
repo_root="$(git rev-parse --show-toplevel)"
|
||||||
|
cd "$repo_root"
|
||||||
|
|
||||||
|
script_dirs_re='^(features/scripts/utils|core/system/scripts|themes/engine/scripts)/nomarchy-'
|
||||||
|
|
||||||
|
# 1. Lint changed scripts. bash -n catches syntax errors (always fatal).
|
||||||
|
# shellcheck catches unquoted-var, use-before-define, missing-shebang, etc.
|
||||||
|
# We only fail on severity=error so the long tail of pre-existing warnings
|
||||||
|
# (info / style / warning) doesn't block commits — those can be cleaned up
|
||||||
|
# incrementally without a flag day.
|
||||||
|
changed_scripts=$(git diff --cached --name-only --diff-filter=ACMR \
|
||||||
|
| grep -E "$script_dirs_re" || true)
|
||||||
|
if [[ -n "$changed_scripts" ]]; then
|
||||||
|
while IFS= read -r script; do
|
||||||
|
[[ -f "$script" ]] || continue
|
||||||
|
# Only lint scripts with a bash shebang. nomarchy-* is a name
|
||||||
|
# convention, not a language guarantee — at least one Python helper
|
||||||
|
# ships under the same prefix (nomarchy-haptic-touchpad).
|
||||||
|
head -1 "$script" | grep -qE '^#!.*\bbash\b' || continue
|
||||||
|
if ! bash -n "$script"; then
|
||||||
|
echo "pre-commit: bash syntax error in $script — aborting commit." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if command -v shellcheck >/dev/null 2>&1; then
|
||||||
|
if ! shellcheck --severity=error --shell=bash "$script"; then
|
||||||
|
echo "pre-commit: shellcheck found error-level issues in $script — aborting commit." >&2
|
||||||
|
echo "pre-commit: fix the reported issues, or rerun with --no-verify after a deliberate decision to ship." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done <<< "$changed_scripts"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 2. Regenerate the script audit doc.
|
||||||
|
if git diff --cached --name-only --diff-filter=ACMRD | grep -qE "$script_dirs_re"; then
|
||||||
|
echo "pre-commit: regenerating docs/SCRIPTS.md (script change detected)…"
|
||||||
|
./bin/utils/nomarchy-docs-scripts --out docs/SCRIPTS.md
|
||||||
|
git add docs/SCRIPTS.md
|
||||||
|
fi
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,6 +6,8 @@ result-*
|
|||||||
# Ignore automatically generated direnv output
|
# Ignore automatically generated direnv output
|
||||||
.direnv
|
.direnv
|
||||||
|
|
||||||
|
# Local IDE settings
|
||||||
|
.claude/
|
||||||
|
|
||||||
# VM and ISO artifacts
|
# VM and ISO artifacts
|
||||||
*.qcow2
|
*.qcow2
|
||||||
|
|||||||
40
GEMINI.md
40
GEMINI.md
@@ -1,40 +0,0 @@
|
|||||||
# Nomarchy - A NixOS-based distribution with Omarchy flavour - Agent Build Blueprint
|
|
||||||
|
|
||||||
## System Architecture Overview
|
|
||||||
Nomarchy uses a **Modular Merging Architecture**. The distro is distributed as a Nix Flake that exports two primary modules: `nixosModules.system` and `nixosModules.home`. This approach ensures strict separation between the "Upstream" core and the "Downstream" user configuration.
|
|
||||||
|
|
||||||
Users interact with the system by importing the distro's modules into their own `flake.nix` and then layering their own personal modules (`system.nix` and `home.nix`) on top. This follows the native NixOS design pattern for declarative, multi-module systems.
|
|
||||||
|
|
||||||
## Directory Structure
|
|
||||||
* `flake.nix` (Master entry point with core modules and test configurations)
|
|
||||||
* `installer/install-nomarchy.sh` (Interactive installer generating a clean downstream flake)
|
|
||||||
* `modules/system/default.nix` (Distro-wide OS defaults: SDDM, Plymouth, Audio, Network)
|
|
||||||
* `modules/home/default.nix` (Distro-wide user environment: Hyprland, Waybar, Styling)
|
|
||||||
* `bin/` (The collection of Omarchy productivity and config scripts)
|
|
||||||
* `themes/` (Distro-wide color palettes and backgrounds)
|
|
||||||
|
|
||||||
## Core Components & Logic
|
|
||||||
|
|
||||||
### 1. Separation of Concerns (Upstream vs. Downstream)
|
|
||||||
* **Upstream:** The `nomarchy/` directory contains the core logic. It is treated as an immutable input by the target system.
|
|
||||||
* **Downstream:** The user's `/etc/nixos/flake.nix` imports the upstream modules. The user's personal customizations are kept in `/etc/nixos/system.nix` and `/etc/nixos/home.nix`.
|
|
||||||
* **Merging:** NixOS automatically merges definitions. For example, if both the distro and the user add packages to `home.packages`, the final system includes the union of both lists.
|
|
||||||
|
|
||||||
### 2. The Interactive Installer (`installer/install-nomarchy.sh`)
|
|
||||||
The installer is designed to bootstrap a fresh system with this modular structure:
|
|
||||||
1. **Repo Detection:** Identifies the location of the Nomarchy source.
|
|
||||||
2. **Scaffolding:** Creates a new downstream `flake.nix` that imports Nomarchy core modules.
|
|
||||||
3. **User Files:** Generates skeleton `system.nix` and `home.nix` files for the user to customize.
|
|
||||||
4. **Flake Updates:** Uses the public Git repository as the upstream source, allowing users to update their system via `nix flake update`.
|
|
||||||
|
|
||||||
### 3. Home Manager Integration
|
|
||||||
* **Hybrid Declarative State:** While the distro is declarative, it uses state files in `~/.config/home-manager/` (managed by the distro's scripts) to allow for instant UI feedback (theming, fonts, wallpapers) without needing a full system rebuild for every small tweak.
|
|
||||||
* **Script Wrapping:** All scripts in `bin/` are wrapped with their specific dependencies (`swayosd`, `pulseaudio`, `jq`, etc.) to ensure they work reliably across different hardware.
|
|
||||||
|
|
||||||
### 4. Dynamic Theming
|
|
||||||
* **Palettes:** Themes are defined in simple `colors.toml` files. The distro dynamically generates Base16 palettes from these, allowing for infinite theme expansion without modifying Nix code.
|
|
||||||
|
|
||||||
## Verification & Build
|
|
||||||
* **Test Installer:** `./bin/nomarchy-test-installer` (Builds a VM of the installer environment).
|
|
||||||
* **Check Integrity:** `nix flake check --impure` (Verifies all configurations evaluate).
|
|
||||||
* **Build ISO:** `nix build .#nixosConfigurations.installerIso.config.system.build.isoImage` (Generates the flashable USB image).
|
|
||||||
52
README.md
52
README.md
@@ -1,6 +1,6 @@
|
|||||||
# 👑 Nomarchy
|
# 👑 Nomarchy
|
||||||
|
|
||||||
**Nomarchy** is a professional-grade NixOS distribution that replicates the Omarchy Wayland workflow with a strictly declarative, flake-based architecture. It provides a highly polished, "it just works" experience for power users who want a beautiful Hyprland environment without sacrificing the reliability of NixOS.
|
**Nomarchy** is a professional-grade NixOS distribution that ships a highly curated Hyprland desktop on a strictly declarative, flake-based foundation. It provides a highly polished, "it just works" experience for power users who want a beautiful Wayland environment without sacrificing the reliability of NixOS.
|
||||||
|
|
||||||
## ✨ Key Features
|
## ✨ Key Features
|
||||||
|
|
||||||
@@ -13,33 +13,51 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 📂 Component-Based Architecture
|
||||||
|
|
||||||
|
Nomarchy uses a **Feature-Centric Directory Structure**. For a comprehensive breakdown of the system architecture, folder roles, and module logic, see the [Detailed Architecture Documentation](docs/STRUCTURE.md).
|
||||||
|
|
||||||
|
Configuration, modules, and utilities are strictly organized to maintain sanity as the system grows.
|
||||||
|
|
||||||
|
- **`core/`**: Foundational OS & User defaults (Bootloader, Audio, Bluetooth, core system features).
|
||||||
|
- **`features/`**: Isolated modules containing Nix logic and raw dotfiles.
|
||||||
|
- **`features/apps/`**: App-specific configs (e.g., `features/apps/btop/`, `features/apps/kitty/`), each containing their own `default.nix` and standalone `config/` directory mapped via Home Manager.
|
||||||
|
- **`features/desktop/`**: Desktop environment components (e.g., Hyprland, Waybar).
|
||||||
|
- **`features/scripts/utils/`**: Consolidated repository for all custom Nomarchy bash scripts, centrally packaged and injected into the user's `PATH` with correct dependencies.
|
||||||
|
- **`themes/`**: The global theming engine. It holds pure color data and logic. *Theme-specific app layouts* (like a custom Waybar layout) are stored directly inside the app's feature folder, solving the matrix problem of theming.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 📥 Installation
|
## 📥 Installation
|
||||||
|
|
||||||
### 1. Try it in a VM (Recommended)
|
### 1. Try it in a VM (Recommended)
|
||||||
Verify the experience without touching your hardware:
|
Verify the experience without touching your hardware:
|
||||||
```bash
|
```bash
|
||||||
./bin/nomarchy-test-installer
|
./bin/utils/nomarchy-test-installer
|
||||||
```
|
```
|
||||||
This builds a full graphical VM of the installer environment. Once inside, click the **Install Nomarchy** icon or run `sudo /etc/install-nomarchy.sh`.
|
This builds a full graphical VM of the installer environment. Once inside, click the **Install Nomarchy** icon or run `nomarchy-install`.
|
||||||
|
|
||||||
### 2. Build the Installer ISO
|
### 2. Build the Installer ISO
|
||||||
To install on physical hardware, generate your own bootable image:
|
To install on physical hardware, generate your own bootable image:
|
||||||
```bash
|
```bash
|
||||||
nix build .#nixosConfigurations.installerIso.config.system.build.isoImage
|
./features/scripts/utils/nomarchy-build-iso # Minimal TTY installer
|
||||||
|
./features/scripts/utils/nomarchy-build-live-iso # Graphical try-before-install
|
||||||
```
|
```
|
||||||
The ISO will be located at `./result/iso/nixos-*.iso`. Flash it to a USB drive and boot.
|
The ISO will be located at `./result/iso/nixos-*.iso`. Flash it to a USB drive and boot.
|
||||||
|
|
||||||
### 3. Run the Installer
|
### 3. Run the Installer
|
||||||
Once booted into the Live environment, launch the installer:
|
Once booted into the Live environment, launch the installer:
|
||||||
```bash
|
```bash
|
||||||
sudo /etc/install-nomarchy.sh
|
nomarchy-install
|
||||||
```
|
```
|
||||||
The wizard will guide you through:
|
The wizard will guide you through:
|
||||||
- **Networking:** An interactive wizard to connect to Wi-Fi if needed.
|
- **Networking:** An interactive wizard to connect to Wi-Fi if needed.
|
||||||
- **Hardware:** Optimized profiles for Dell XPS, Framework, Apple T2, and more.
|
- **Hardware:** Optimized profiles for Dell XPS, Framework, Apple T2, and more.
|
||||||
- **Storage:** Choice between Standard Ext4 or Encrypted BTRFS with optional **Impermanence**.
|
- **Storage:** Choice between Standard Ext4 or Encrypted BTRFS with optional **Impermanence**.
|
||||||
- **Localization:** Searchable timezones and keyboard layout selection.
|
- **Localization:** Searchable timezones and keyboard layout selection.
|
||||||
- **Profiles:** One-click setups for Development, Gaming, and Media Production.
|
|
||||||
|
### Already on NixOS?
|
||||||
|
Layer Nomarchy onto an existing 25.11 install without reformatting — see the [Migration Guide](docs/MIGRATION.md).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -66,31 +84,35 @@ Add user-level packages, aliases, and dotfiles here.
|
|||||||
nomarchy.home.terminal = "kitty";
|
nomarchy.home.terminal = "kitty";
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For the full list of `nomarchy.*` options you can set in `system.nix` and `home.nix`, see the [Options Reference](docs/OPTIONS.md). Hit a rebuild error? Check [Troubleshooting](docs/TROUBLESHOOTING.md). For where the project is heading next, see the [Roadmap](docs/ROADMAP.md).
|
||||||
|
|
||||||
### Applying Changes
|
### Applying Changes
|
||||||
After editing your files, apply them instantly:
|
After editing your files, apply them instantly. **IMPORTANT:** Nomarchy requires the `--impure` flag for evaluation. You **MUST** use the following aliases rather than standard NixOS commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sys-update # Rebuilds the NixOS system
|
sys-update # Rebuilds the NixOS system (Runs: sudo nixos-rebuild switch --flake .#default --impure)
|
||||||
env-update # Reloads your Home Manager environment
|
env-update # Reloads your Home Manager environment (Runs: home-manager switch --flake .#default --impure)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🚀 Commands & Keybindings
|
## 🚀 Commands & Keybindings
|
||||||
|
|
||||||
|
The full list lives in [`docs/KEYBINDINGS.md`](docs/KEYBINDINGS.md) (auto-generated from the Hyprland configs). A few highlights:
|
||||||
|
|
||||||
| Keybinding | Action |
|
| Keybinding | Action |
|
||||||
| :--- | :--- |
|
| :--- | :--- |
|
||||||
| `Super + Alt + Space` | **Theme Selector** (Walker) |
|
|
||||||
| `Super + Ctrl + Space` | **Font Selector** |
|
|
||||||
| `Super + Shift + Space`| **Wallpaper Selector** |
|
|
||||||
| `Super + Space` | **App Launcher** (Walker) |
|
| `Super + Space` | **App Launcher** (Walker) |
|
||||||
|
| `Super + Shift + Space` | **Nomarchy Menu** (Walker) |
|
||||||
|
| `Super + Alt + Space` | **Toggle Top Bar** (Waybar) |
|
||||||
| `Super + Return` | Open Terminal |
|
| `Super + Return` | Open Terminal |
|
||||||
| `Super + Q` | Close Window |
|
| `Super + Q` | Close Window |
|
||||||
|
|
||||||
### Utility Scripts
|
### Utility Scripts
|
||||||
Nomarchy includes 150+ productivity scripts available in your PATH:
|
Nomarchy includes dozens of productivity scripts available in your PATH. Some highlights:
|
||||||
- `nomarchy-sync push <repo>`: Backup your setup to Git.
|
- `nomarchy-sync push <repo>`: Backup your setup to Git.
|
||||||
- `nomarchy-theme-bg-next`: Cycle to the next wallpaper in the current theme.
|
- `nomarchy-theme-bg-next`: Cycle to the next wallpaper in the current theme.
|
||||||
- `nomarchy-doctor`: (Coming Soon) Diagnose system health and state.
|
- `nomarchy-menu`: The central hub for all utilities and pickers.
|
||||||
|
|
||||||
---
|
---
|
||||||
*Built with ❤️ using NixOS, Hyprland, Stylix, and the spirit of Omarchy.*
|
*Built with ❤️ using NixOS, Hyprland, Stylix, and the Nomarchy Community.*
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns true if a battery is present on the system.
|
|
||||||
# Used by the battery monitor and other battery-related checks.
|
|
||||||
|
|
||||||
for bat in /sys/class/power_supply/BAT*; do
|
|
||||||
[[ -r $bat/present ]] &&
|
|
||||||
[[ $(cat $bat/present) == "1" ]] &&
|
|
||||||
[[ $(cat $bat/type) == "Battery" ]] &&
|
|
||||||
exit 0
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the branch for Nomarchy's git repository.
|
|
||||||
|
|
||||||
if (($# == 0)); then
|
|
||||||
echo "Usage: nomarchy-branch-set [master|rc|dev]"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
branch="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $branch != "master" && $branch != "rc" && $branch != "dev" ]]; then
|
|
||||||
echo "Error: Invalid branch '$branch'. Must be one of: master, rc, dev"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git -C $OMARCHY_PATH switch $branch
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the Nomarchy channel, which dictates what git branch and package repository is used.
|
|
||||||
#
|
|
||||||
# Stable uses the master branch, which only sees updates on official releases, and
|
|
||||||
# the stable package repository, which typically lags the edge by a month to ensure
|
|
||||||
# better compatibility.
|
|
||||||
#
|
|
||||||
# Edge tracks the latest package repository, but still relies on the master branch,
|
|
||||||
# so new packages which require config changes may cause conflicts or errors.
|
|
||||||
#
|
|
||||||
# Dev tracks the active development dev branch, which may include partial or broken updates,
|
|
||||||
# as well as the latest package repository. This should only be used by Nomarchy developers
|
|
||||||
# and people with a lot of experience managing Linux systems.
|
|
||||||
|
|
||||||
if (($# == 0)); then
|
|
||||||
echo "Usage: nomarchy-channel-set [stable|rc|edge|dev]"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
channel="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$channel" in
|
|
||||||
"stable") nomarchy-branch-set "master" && nomarchy-refresh-pacman "stable" ;;
|
|
||||||
"rc") nomarchy-branch-set "rc" && nomarchy-refresh-pacman "rc" ;;
|
|
||||||
"edge") nomarchy-branch-set "master" && nomarchy-refresh-pacman "edge" ;;
|
|
||||||
"dev") nomarchy-branch-set "dev" && nomarchy-refresh-pacman "edge" ;;
|
|
||||||
*) echo "Unknown channel: $channel"; exit 1; ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
nomarchy-update -y
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns true if any of the commands passed in as arguments are missing on the system.
|
|
||||||
|
|
||||||
for cmd in "$@"; do
|
|
||||||
if ! command -v "$cmd" &>/dev/null; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Add an EFI boot entry for the Nomarchy UKI, allowing the system to boot directly
|
|
||||||
# without a bootloader like Limine. Requires UEFI firmware and a built UKI.
|
|
||||||
|
|
||||||
if [[ ! -d /sys/firmware/efi ]]; then
|
|
||||||
echo "Error: System is not booted in UEFI mode" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! efibootmgr &>/dev/null; then
|
|
||||||
echo "Error: efibootmgr is not available or not functional" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends"; then
|
|
||||||
echo "Error: American Megatrends firmware may not safely support custom EFI entries" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
|
|
||||||
echo "Error: Apple firmware uses its own boot manager" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
uki_file=$(find /boot/EFI/Linux/ -name "nomarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
|
|
||||||
|
|
||||||
if [[ -z $uki_file ]]; then
|
|
||||||
echo "Error: No Nomarchy UKI found in /boot/EFI/Linux/" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
boot_source=$(findmnt -n -o SOURCE /boot)
|
|
||||||
disk=$(echo "$boot_source" | sed 's/p\?[0-9]*$//')
|
|
||||||
part=$(echo "$boot_source" | grep -o 'p\?[0-9]*$' | sed 's/^p//')
|
|
||||||
|
|
||||||
if gum confirm "Setup direct boot (so snapshot booting must be done via bios)?"; then
|
|
||||||
echo "Creating EFI boot entry for $uki_file"
|
|
||||||
|
|
||||||
sudo efibootmgr --create \
|
|
||||||
--disk "$disk" \
|
|
||||||
--part "$part" \
|
|
||||||
--label "Nomarchy" \
|
|
||||||
--loader "\\EFI\\Linux\\$uki_file"
|
|
||||||
fi
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Return exhaustive debugging information about the system to help diagnose problems.
|
|
||||||
|
|
||||||
NO_SUDO=false
|
|
||||||
PRINT_ONLY=false
|
|
||||||
|
|
||||||
while (( $# > 0 )); do
|
|
||||||
case "$1" in
|
|
||||||
--no-sudo)
|
|
||||||
NO_SUDO=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--print)
|
|
||||||
PRINT_ONLY=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option: $1"
|
|
||||||
echo "Usage: nomarchy-debug [--no-sudo] [--print]"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
LOG_FILE="/tmp/nomarchy-debug.log"
|
|
||||||
|
|
||||||
if [[ $NO_SUDO = "true" ]]; then
|
|
||||||
DMESG_OUTPUT="(skipped - --no-sudo flag used)"
|
|
||||||
else
|
|
||||||
DMESG_OUTPUT="$(sudo dmesg)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat > "$LOG_FILE" <<EOF
|
|
||||||
Date: $(date)
|
|
||||||
Hostname: $(hostname)
|
|
||||||
Nomarchy Branch: $(git -C "$OMARCHY_PATH" branch --show-current 2>/dev/null || echo "unknown")
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
SYSTEM INFORMATION
|
|
||||||
=========================================
|
|
||||||
$(inxi -Farz)
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
DMESG
|
|
||||||
=========================================
|
|
||||||
$DMESG_OUTPUT
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
JOURNALCTL (CURRENT BOOT, WARNINGS+ERRORS)
|
|
||||||
=========================================
|
|
||||||
$(journalctl -b -p 4..1)
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
INSTALLED PACKAGES
|
|
||||||
=========================================
|
|
||||||
$({ expac -S '%n %v (%r)' $(pacman -Qqe) 2>/dev/null; comm -13 <(pacman -Sql | sort) <(pacman -Qqe | sort) | xargs -r expac -Q '%n %v (AUR)'; } | sort)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [[ $PRINT_ONLY = "true" ]]; then
|
|
||||||
cat "$LOG_FILE"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPTIONS=("View log" "Save in current directory")
|
|
||||||
if ping -c 1 8.8.8.8 >/dev/null 2>&1; then
|
|
||||||
OPTIONS=("Upload log" "${OPTIONS[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
ACTION=$(gum choose "${OPTIONS[@]}")
|
|
||||||
|
|
||||||
case "$ACTION" in
|
|
||||||
"Upload log")
|
|
||||||
echo "Uploading debug log to 0x0.st..."
|
|
||||||
URL=$(curl -sF "file=@$LOG_FILE" -Fexpires=24 https://0x0.st)
|
|
||||||
if (( $? == 0 )) && [[ -n $URL ]]; then
|
|
||||||
echo "✓ Log uploaded successfully!"
|
|
||||||
echo "Share this URL:"
|
|
||||||
echo ""
|
|
||||||
echo " $URL"
|
|
||||||
echo ""
|
|
||||||
echo "This link will expire in 24 hours."
|
|
||||||
else
|
|
||||||
echo "Error: Failed to upload log file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"View log")
|
|
||||||
less "$LOG_FILE"
|
|
||||||
;;
|
|
||||||
"Save in current directory")
|
|
||||||
cp "$LOG_FILE" "./nomarchy-debug.log"
|
|
||||||
echo "✓ Log saved to $(pwd)/nomarchy-debug.log"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Detect whether the computer is a Framework Laptop 16.
|
|
||||||
|
|
||||||
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] &&
|
|
||||||
nomarchy-hw-match "Laptop 16"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Detect whether the computer has an Intel CPU.
|
|
||||||
|
|
||||||
[[ $(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') == "GenuineIntel" ]]
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Detect whether the computer has an Intel Panther Lake GPU.
|
|
||||||
|
|
||||||
lspci | grep -iE 'vga|3d|display' | grep -qi 'panther lake'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Detect whether the computer is a Microsoft Surface device.
|
|
||||||
|
|
||||||
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] &&
|
|
||||||
nomarchy-hw-match "Surface"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Launch the Walker application launcher while ensuring that it's data provider (called elephant) is running first.
|
|
||||||
|
|
||||||
# Ensure elephant is running before launching walker
|
|
||||||
if ! pgrep -x elephant > /dev/null; then
|
|
||||||
setsid uwsm-app -- elephant &
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure walker service is running
|
|
||||||
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
|
|
||||||
setsid uwsm-app -- walker --gapplication-service &
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec walker --width 644 --maxheight 300 --minheight 300 "$@"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Install an npx wrapper for a given npm package.
|
|
||||||
# Usage: nomarchy-npx-install <package> [command-name]
|
|
||||||
#
|
|
||||||
# If command-name is omitted, it defaults to the package name.
|
|
||||||
# Example: nomarchy-npx-install opencode-ai opencode
|
|
||||||
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
echo "Usage: nomarchy-npx-install <package> [command-name]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
package=$1
|
|
||||||
command=${2:-$1}
|
|
||||||
|
|
||||||
mkdir -p "$HOME/.local/bin"
|
|
||||||
|
|
||||||
cat > "$HOME/.local/bin/$command" <<EOF
|
|
||||||
#!/bin/bash
|
|
||||||
exec npx --yes $package "\$@"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x "$HOME/.local/bin/$command"
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Nomarchy on-boot initialization script.
|
|
||||||
# Automatically detects the hardware, applies necessary runtime tweaks,
|
|
||||||
# and sets the correct screen resolution/scaling.
|
|
||||||
|
|
||||||
# 1. Automatically configure optimal screen resolution and scaling
|
|
||||||
nomarchy-hyprland-monitor-scaling-cycle >/dev/null 2>&1
|
|
||||||
|
|
||||||
# 2. Hardware-specific runtime tweaks
|
|
||||||
if nomarchy-hw-match "Laptop 16"; then
|
|
||||||
# Framework 16 specific tweaks
|
|
||||||
nomarchy-theme-set-keyboard-f16 >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if nomarchy-hw-asus-rog; then
|
|
||||||
# Asus ROG specific tweaks
|
|
||||||
nomarchy-theme-set-keyboard-asus-rog >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. Declarative hardware configuration check (nixos-hardware)
|
|
||||||
# This part ensures that if we are on an installed system, the correct
|
|
||||||
# nixos-hardware module is selected in the configuration.
|
|
||||||
HW_FILE="/etc/nixos/hardware-selection.nix"
|
|
||||||
if [ -w "$HW_FILE" ]; then
|
|
||||||
PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null || echo "Unknown")
|
|
||||||
BOARD_NAME=$(cat /sys/class/dmi/id/board_name 2>/dev/null || echo "Unknown")
|
|
||||||
CPU_VENDOR=$(lscpu | grep "Vendor ID" | awk '{print $3}')
|
|
||||||
|
|
||||||
NEW_HW_MODULES=""
|
|
||||||
|
|
||||||
if [[ "$CPU_VENDOR" == "AuthenticAMD" ]]; then
|
|
||||||
NEW_HW_MODULES="inputs.nixos-hardware.nixosModules.common-cpu-amd"
|
|
||||||
elif [[ "$CPU_VENDOR" == "GenuineIntel" ]]; then
|
|
||||||
NEW_HW_MODULES="inputs.nixos-hardware.nixosModules.common-cpu-intel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Auto-detect specific known models for nixos-hardware
|
|
||||||
if echo "$PRODUCT_NAME" | grep -qi "XPS 15 9500"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.dell-xps-15-9500"
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "XPS 13"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.dell-xps-13-9300" # fallback example
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "Framework Laptop 16"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.framework-16-7040-amd"
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "Framework Laptop 13"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.framework-13-7040-amd"
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "Surface"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.microsoft-surface-pro-8" # fallback example
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "Zephyrus G14"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.asus-zephyrus-g14"
|
|
||||||
elif echo "$PRODUCT_NAME" | grep -qi "ThinkPad X1 Carbon"; then
|
|
||||||
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-carbon-gen9"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if the current HW file differs from our detection
|
|
||||||
if [ -n "$NEW_HW_MODULES" ] && ! grep -q "common-cpu" "$HW_FILE"; then
|
|
||||||
# This is a basic detection. We overwrite it if it's completely empty or missing common-cpu.
|
|
||||||
# It's better to let the user know, or auto-apply. We'll auto-apply for a smooth experience.
|
|
||||||
cat <<EOF > "$HW_FILE.tmp"
|
|
||||||
{ inputs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
$NEW_HW_MODULES
|
|
||||||
];
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if ! cmp -s "$HW_FILE" "$HW_FILE.tmp"; then
|
|
||||||
mv "$HW_FILE.tmp" "$HW_FILE"
|
|
||||||
# We notify the user instead of running sys-update silently, as it requires root and time.
|
|
||||||
notify-send -u normal "Hardware Auto-Detection" "New hardware profile detected. Please run 'sys-update' when ready."
|
|
||||||
else
|
|
||||||
rm "$HW_FILE.tmp"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
PKG_NAME="$1"
|
|
||||||
|
|
||||||
if [ -z "$PKG_NAME" ]; then
|
|
||||||
echo "Usage: nomarchy-pkg-missing <package-name>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
nomarchy-pkg-present "$PKG_NAME"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
PKG_NAME="$1"
|
|
||||||
|
|
||||||
if [ -z "$PKG_NAME" ]; then
|
|
||||||
echo "Usage: nomarchy-pkg-present <package-name>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
|
|
||||||
|
|
||||||
if [ ! -f "$STATE_FILE" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Restart an application by killing it and relaunching via uwsm.
|
|
||||||
# Usage: nomarchy-restart-app <application-name> [application-args...]
|
|
||||||
|
|
||||||
pkill -x $1
|
|
||||||
setsid uwsm-app -- "$@" >/dev/null 2>&1 &
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Reload hyprland configuration (used by the Nomarchy theme switching).
|
|
||||||
|
|
||||||
hyprctl reload >/dev/null
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Restart makima - key remapping service for remapping Copilot key to Nomarchy Menu
|
|
||||||
|
|
||||||
sudo systemctl restart makima
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Reload mako configuration (used by the Nomarchy theme switching).
|
|
||||||
|
|
||||||
makoctl reload
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Restart tmux if running with the latest configuration
|
|
||||||
|
|
||||||
if pgrep -x tmux; then
|
|
||||||
tmux source-file ~/.config/tmux/tmux.conf
|
|
||||||
fi
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
restart_services() {
|
|
||||||
if systemctl --user is-enabled elephant.service &>/dev/null; then
|
|
||||||
systemctl --user restart elephant.service
|
|
||||||
fi
|
|
||||||
|
|
||||||
if systemctl --user is-enabled app-walker@autostart.service &>/dev/null; then
|
|
||||||
systemctl --user restart app-walker@autostart.service
|
|
||||||
else
|
|
||||||
echo -e "\e[31mUnable to restart Walker -- RESTART MANUALLY\e[0m"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if (( EUID == 0 )); then
|
|
||||||
SCRIPT_OWNER=$(stat -c '%U' "$0")
|
|
||||||
USER_UID=$(id -u "$SCRIPT_OWNER")
|
|
||||||
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
|
|
||||||
bash -c "$(declare -f restart_services); restart_services"
|
|
||||||
else
|
|
||||||
restart_services
|
|
||||||
fi
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
nomarchy-restart-app waybar
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
lock_dns_to_resolved() {
|
|
||||||
for file in /etc/systemd/network/*.network; do
|
|
||||||
[[ -f $file ]] || continue
|
|
||||||
if ! grep -q "^\[DHCPv4\]" "$file"; then continue; fi
|
|
||||||
|
|
||||||
if ! sed -n '/^\[DHCPv4\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then
|
|
||||||
sudo sed -i '/^\[DHCPv4\]/a UseDNS=no' "$file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep -q "^\[IPv6AcceptRA\]" "$file" && ! sed -n '/^\[IPv6AcceptRA\]/,/^\[/p' "$file" | grep -q "^UseDNS="; then
|
|
||||||
sudo sed -i '/^\[IPv6AcceptRA\]/a UseDNS=no' "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
unlock_dns_to_dhcp() {
|
|
||||||
for file in /etc/systemd/network/*.network; do
|
|
||||||
[[ -f $file ]] || continue
|
|
||||||
sudo sed -i '/^\[DHCPv4\]/{n;/^UseDNS=no$/d}' "$file"
|
|
||||||
sudo sed -i '/^\[IPv6AcceptRA\]/{n;/^UseDNS=no$/d}' "$file"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
dns=$(gum choose --height 6 --header "Select DNS provider" Cloudflare Google DHCP Custom)
|
|
||||||
else
|
|
||||||
dns=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$dns" in
|
|
||||||
Cloudflare)
|
|
||||||
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
|
|
||||||
[Resolve]
|
|
||||||
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com
|
|
||||||
FallbackDNS=9.9.9.9 149.112.112.112
|
|
||||||
DNSOverTLS=opportunistic
|
|
||||||
EOF
|
|
||||||
lock_dns_to_resolved
|
|
||||||
;;
|
|
||||||
|
|
||||||
Google)
|
|
||||||
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
|
|
||||||
[Resolve]
|
|
||||||
DNS=8.8.8.8#dns.google 8.8.4.4#dns.google
|
|
||||||
FallbackDNS=9.9.9.9 149.112.112.112
|
|
||||||
DNSOverTLS=opportunistic
|
|
||||||
EOF
|
|
||||||
lock_dns_to_resolved
|
|
||||||
;;
|
|
||||||
|
|
||||||
DHCP)
|
|
||||||
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
|
|
||||||
[Resolve]
|
|
||||||
DNSOverTLS=no
|
|
||||||
EOF
|
|
||||||
unlock_dns_to_dhcp
|
|
||||||
;;
|
|
||||||
|
|
||||||
Custom)
|
|
||||||
echo "Enter your DNS servers (space-separated, e.g. '192.168.1.1 1.1.1.1'):"
|
|
||||||
read -r dns_servers
|
|
||||||
|
|
||||||
if [[ -z $dns_servers ]]; then
|
|
||||||
echo "Error: No DNS servers provided."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo tee /etc/systemd/resolved.conf >/dev/null <<EOF
|
|
||||||
[Resolve]
|
|
||||||
DNS=$dns_servers
|
|
||||||
FallbackDNS=9.9.9.9 149.112.112.112
|
|
||||||
EOF
|
|
||||||
lock_dns_to_resolved
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sudo systemctl restart systemd-networkd systemd-resolved
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Configure FIDO2 support declaratively for Nomarchy NixOS.
|
|
||||||
|
|
||||||
FEATURE_FILE="/etc/nixos/nomarchy-features/fido2.nix"
|
|
||||||
|
|
||||||
if [[ "--remove" == $1 ]]; then
|
|
||||||
if [ -f "$FEATURE_FILE" ]; then
|
|
||||||
sudo rm "$FEATURE_FILE"
|
|
||||||
echo "Removed $FEATURE_FILE."
|
|
||||||
echo "IMPORTANT: Remove './nomarchy-features/fido2.nix' from your imports and run 'sys-update'."
|
|
||||||
else
|
|
||||||
echo "FIDO2 support not found."
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$FEATURE_FILE" ]; then
|
|
||||||
echo "FIDO2 support is already configured in $FEATURE_FILE"
|
|
||||||
else
|
|
||||||
sudo mkdir -p "/etc/nixos/nomarchy-features"
|
|
||||||
cat <<EOF | sudo tee "$FEATURE_FILE" > /dev/null
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
security.pam.u2f = {
|
|
||||||
enable = true;
|
|
||||||
control = "sufficient";
|
|
||||||
cue = true;
|
|
||||||
# authFile = "/etc/fido2/fido2"; # Default is ~/.config/Yubico/u2f_keys
|
|
||||||
};
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
echo "Created $FEATURE_FILE."
|
|
||||||
echo "IMPORTANT: To finish enabling FIDO2 support, add './nomarchy-features/fido2.nix' to your imports list in /etc/nixos/system.nix or /etc/nixos/flake.nix,"
|
|
||||||
echo "then run 'sys-update'."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enrollment is still an imperative action
|
|
||||||
if command -v pamu2fcfg &> /dev/null; then
|
|
||||||
echo "Let's register your FIDO2 key now."
|
|
||||||
mkdir -p ~/.config/Yubico
|
|
||||||
pamu2fcfg > ~/.config/Yubico/u2f_keys
|
|
||||||
echo "FIDO2 key registered."
|
|
||||||
else
|
|
||||||
echo "pamu2fcfg not found. Please run 'nomarchy-pkg-add pam-u2f' or 'sys-update' if you just enabled it."
|
|
||||||
fi
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Configure Fingerprint support declaratively for Nomarchy NixOS.
|
|
||||||
|
|
||||||
FEATURE_FILE="/etc/nixos/nomarchy-features/fingerprint.nix"
|
|
||||||
|
|
||||||
if [[ "--remove" == $1 ]]; then
|
|
||||||
if [ -f "$FEATURE_FILE" ]; then
|
|
||||||
sudo rm "$FEATURE_FILE"
|
|
||||||
echo "Removed $FEATURE_FILE."
|
|
||||||
echo "IMPORTANT: Remove './nomarchy-features/fingerprint.nix' from your imports and run 'sys-update'."
|
|
||||||
else
|
|
||||||
echo "Fingerprint support not found."
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$FEATURE_FILE" ]; then
|
|
||||||
echo "Fingerprint support is already configured in $FEATURE_FILE"
|
|
||||||
else
|
|
||||||
sudo mkdir -p "/etc/nixos/nomarchy-features"
|
|
||||||
cat <<EOF | sudo tee "$FEATURE_FILE" > /dev/null
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.fprintd.enable = true;
|
|
||||||
# NixOS's fprintd module automatically configures PAM for login/sudo if enabled.
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
echo "Created $FEATURE_FILE."
|
|
||||||
echo "IMPORTANT: To finish enabling fingerprint support, add './nomarchy-features/fingerprint.nix' to your imports list in /etc/nixos/system.nix or /etc/nixos/flake.nix,"
|
|
||||||
echo "then run 'sys-update'."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enrollment is still an imperative action
|
|
||||||
if command -v fprintd-enroll &> /dev/null; then
|
|
||||||
echo "Let's enroll your fingerprint now."
|
|
||||||
fprintd-enroll "$USER"
|
|
||||||
else
|
|
||||||
echo "fprintd-enroll not found. Please run 'sys-update' first if you just enabled it."
|
|
||||||
fi
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Setup makima - key remapping service for remapping Copilot key to Nomarchy Menu
|
|
||||||
|
|
||||||
CONFIG_FILE="$HOME/.config/makima/AT Translated Set 2 keyboard.toml"
|
|
||||||
|
|
||||||
if [[ ! -f $CONFIG_FILE ]]; then
|
|
||||||
nomarchy-pkg-add makima-bin
|
|
||||||
|
|
||||||
mkdir -p "$HOME/.config/makima"
|
|
||||||
cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
sudo mkdir -p /etc/systemd/system/makima.service.d
|
|
||||||
sudo tee /etc/systemd/system/makima.service.d/override.conf >/dev/null <<EOF
|
|
||||||
[Service]
|
|
||||||
User=$USER
|
|
||||||
Environment="MAKIMA_CONFIG=/home/$USER/.config/makima"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl enable --now makima 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
COMMAND="$1"
|
|
||||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/nomarchy}
|
|
||||||
|
|
||||||
if [[ -z $COMMAND ]]; then
|
|
||||||
echo "Usage: nomarchy-snapshot <create|restore>" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v snapper &>/dev/null; then
|
|
||||||
exit 127 # nomarchy-update can use this to just ignore if snapper is not available
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$COMMAND" in
|
|
||||||
create)
|
|
||||||
DESC="$(nomarchy-version)"
|
|
||||||
|
|
||||||
echo -e "\e[32mCreate system snapshot\e[0m"
|
|
||||||
|
|
||||||
# Get existing snapper config names from CSV output
|
|
||||||
mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}')
|
|
||||||
|
|
||||||
for config in "${CONFIGS[@]}"; do
|
|
||||||
sudo snapper -c "$config" create -c number -d "$DESC"
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
;;
|
|
||||||
restore)
|
|
||||||
sudo limine-snapper-restore
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Prompt for sudo once and keep the credential alive in the background.
|
|
||||||
# Source this script so the trap applies to the calling shell:
|
|
||||||
# source nomarchy-sudo-keepalive
|
|
||||||
|
|
||||||
sudo -v
|
|
||||||
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
|
||||||
SUDO_KEEPALIVE_PID=$!
|
|
||||||
trap "kill $SUDO_KEEPALIVE_PID 2>/dev/null" EXIT
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Build and run the Nomarchy Installer VM for testing.
|
|
||||||
|
|
||||||
echo "Building Nomarchy Installer VM..."
|
|
||||||
nix build .#nixosConfigurations.installerVm.config.system.build.vm
|
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Success! Launching Installer VM..."
|
|
||||||
./result/bin/run-nomarchy-installer-vm
|
|
||||||
else
|
|
||||||
echo "Error: VM build failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Set the system theme declaratively.
|
|
||||||
# Usage: nomarchy-theme-set <theme-name>
|
|
||||||
|
|
||||||
THEME_NAME="$1"
|
|
||||||
|
|
||||||
if [[ -z $THEME_NAME ]]; then
|
|
||||||
echo "Usage: nomarchy-theme-set <theme-name>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
STATE_DIR="$HOME/.config/home-manager"
|
|
||||||
STATE_FILE="$STATE_DIR/state.json"
|
|
||||||
|
|
||||||
# Resolve themes directory (Built-in from Nix store via Home Manager, or user extra)
|
|
||||||
if [ -d "$HOME/.config/nomarchy/themes/$THEME_NAME" ]; then
|
|
||||||
THEMES_DIR="$HOME/.config/nomarchy/themes"
|
|
||||||
else
|
|
||||||
THEMES_DIR="$HOME/.local/share/nomarchy/themes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$STATE_DIR"
|
|
||||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
|
||||||
|
|
||||||
if [ ! -d "$THEMES_DIR/$THEME_NAME" ] && ! [[ "$THEME_NAME" == "nord" ]]; then
|
|
||||||
echo "Theme '$THEME_NAME' not found in $THEMES_DIR"
|
|
||||||
# Check if it exists in the palettes file
|
|
||||||
# (Assuming nomarchy-palettes.nix is imported in Nix)
|
|
||||||
fi
|
|
||||||
|
|
||||||
TMP_JSON=$(mktemp)
|
|
||||||
jq ".theme = \"$THEME_NAME\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
|
||||||
|
|
||||||
# Try to find a background for this theme
|
|
||||||
BG_DIR="$THEMES_DIR/$THEME_NAME/backgrounds"
|
|
||||||
if [ -d "$BG_DIR" ]; then
|
|
||||||
BG=$(ls "$BG_DIR" | head -n 1)
|
|
||||||
if [ -n "$BG" ]; then
|
|
||||||
TMP_JSON=$(mktemp)
|
|
||||||
jq ".wallpaper = \"$BG_DIR/$BG\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Theme set to $THEME_NAME. Applying changes with env-update..."
|
|
||||||
rm -rf "$HOME/.config/nomarchy/current/theme"
|
|
||||||
env-update
|
|
||||||
|
|
||||||
nomarchy-theme-set-templates
|
|
||||||
|
|
||||||
nomarchy-hook theme-set "$THEME_NAME"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
CHROMIUM_THEME=~/.config/nomarchy/current/theme/chromium.theme
|
|
||||||
|
|
||||||
if nomarchy-cmd-present chromium || nomarchy-cmd-present brave; then
|
|
||||||
if [[ -f $CHROMIUM_THEME ]]; then
|
|
||||||
THEME_RGB_COLOR=$(<$CHROMIUM_THEME)
|
|
||||||
THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${THEME_RGB_COLOR//,/ })
|
|
||||||
else
|
|
||||||
# Use a default, neutral grey if theme doesn't have a color
|
|
||||||
THEME_RGB_COLOR="28,32,39"
|
|
||||||
THEME_HEX_COLOR="#1c2027"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if nomarchy-cmd-present chromium; then
|
|
||||||
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null
|
|
||||||
chromium --refresh-platform-policy --no-startup-window >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
if nomarchy-cmd-present brave; then
|
|
||||||
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null
|
|
||||||
brave --refresh-platform-policy --no-startup-window >/dev/null
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Sync Nomarchy theme to VS Code, VSCodium, and Cursor
|
|
||||||
|
|
||||||
VS_CODE_THEME="$HOME/.config/nomarchy/current/theme/vscode.json"
|
|
||||||
|
|
||||||
set_theme() {
|
|
||||||
local editor_cmd="$1"
|
|
||||||
local settings_path="$2"
|
|
||||||
|
|
||||||
nomarchy-cmd-present "$editor_cmd" && [[ $NOMARCHY_TOGGLE_SKIP_VSCODE_THEME != "true" ]] || return 0
|
|
||||||
|
|
||||||
if [[ -f $VS_CODE_THEME ]]; then
|
|
||||||
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
|
|
||||||
extension=$(jq -r '.extension' "$VS_CODE_THEME")
|
|
||||||
|
|
||||||
if [[ -n $extension ]] && ! "$editor_cmd" --list-extensions | grep -Fxq "$extension"; then
|
|
||||||
"$editor_cmd" --install-extension "$extension" >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$(dirname "$settings_path")"
|
|
||||||
[[ -f $settings_path ]] || printf '{\n}\n' >"$settings_path"
|
|
||||||
|
|
||||||
if ! grep -q '"workbench.colorTheme"' "$settings_path"; then
|
|
||||||
sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ "workbench.colorTheme": "",/}' "$settings_path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i --follow-symlinks -E \
|
|
||||||
"s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \
|
|
||||||
"$settings_path"
|
|
||||||
elif [[ -f $settings_path ]]; then
|
|
||||||
sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$settings_path"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set_theme "code" "$HOME/.config/Code/User/settings.json"
|
|
||||||
set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json"
|
|
||||||
set_theme "codium" "$HOME/.config/VSCodium/User/settings.json"
|
|
||||||
set_theme "cursor" "$HOME/.config/Cursor/User/settings.json"
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Toggles the suspend menu option availability.
|
|
||||||
# Hybrid: updates state.json and runs env-update for persistence.
|
|
||||||
|
|
||||||
STATE_FILE="$HOME/.config/home-manager/state.json"
|
|
||||||
mkdir -p "$(dirname "$STATE_FILE")"
|
|
||||||
|
|
||||||
# Initialize if doesn't exist
|
|
||||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
|
||||||
|
|
||||||
# Get current state from env or state file
|
|
||||||
if [[ $NOMARCHY_TOGGLE_SUSPEND == "false" ]]; then
|
|
||||||
NEW_VALUE="true"
|
|
||||||
notify-send -u low " Suspend now available in system menu"
|
|
||||||
else
|
|
||||||
NEW_VALUE="false"
|
|
||||||
notify-send -u low " Suspend removed from system menu"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update JSON using jq
|
|
||||||
# We use a temporary file to avoid corruption if the shell is interrupted
|
|
||||||
TMP_JSON=$(mktemp)
|
|
||||||
jq ".suspend = $NEW_VALUE" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
|
|
||||||
|
|
||||||
echo "Suspend availability set to $NEW_VALUE. Updating environment..."
|
|
||||||
|
|
||||||
# Run env-update to apply changes to the menu
|
|
||||||
env-update
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
timezone=$(timedatectl list-timezones | gum filter --height 20 --header "Set timezone") || exit 1
|
|
||||||
sudo timedatectl set-timezone "$timezone"
|
|
||||||
echo "Timezone is now set to $timezone"
|
|
||||||
nomarchy-restart-waybar
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Nomarchy Update Script
|
|
||||||
# 1. Updates the flake inputs in /etc/nixos
|
|
||||||
# 2. Applies system-wide NixOS changes
|
|
||||||
# 3. Applies user-level Home Manager changes
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
REPO_DIR="/etc/nixos"
|
|
||||||
|
|
||||||
if [ ! -d "$REPO_DIR" ]; then
|
|
||||||
echo "Error: $REPO_DIR not found. Are you running on a Nomarchy system?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "--- Starting Nomarchy Update ---"
|
|
||||||
|
|
||||||
# 1. Update Flake Lock
|
|
||||||
echo "Updating flake inputs..."
|
|
||||||
sudo nix --extra-experimental-features "nix-command flakes" flake update --flake "$REPO_DIR"
|
|
||||||
|
|
||||||
# 2. Rebuild System
|
|
||||||
echo "Applying system-level updates..."
|
|
||||||
sudo nixos-rebuild switch --flake "$REPO_DIR#default"
|
|
||||||
|
|
||||||
# 3. Rebuild Home Environment
|
|
||||||
echo "Applying user-level updates..."
|
|
||||||
home-manager switch --flake "$REPO_DIR#default" --impure
|
|
||||||
|
|
||||||
# 4. Commit changes if it's a git repo
|
|
||||||
if [ -d "$REPO_DIR/.git" ]; then
|
|
||||||
echo "Committing update to local history..."
|
|
||||||
sudo git -C "$REPO_DIR" add flake.lock
|
|
||||||
sudo git -C "$REPO_DIR" commit -m "chore: update system (flake.lock)" || echo "No lockfile changes to commit."
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "--- Nomarchy Update Complete ---"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
update_log="/tmp/nomarchy-update.log"
|
|
||||||
|
|
||||||
# Check for initramfs generation failure
|
|
||||||
if grep -q "Updating linux initcpios" "$update_log"; then
|
|
||||||
if ! grep -q "Initcpio image generation successful" "$update_log"; then
|
|
||||||
echo -e '\e[31mError: Initramfs generation may have failed. Review logs before restart.\e[0m'
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Upload logs to 0x0.st
|
|
||||||
|
|
||||||
LOG_TYPE="${1:-install}"
|
|
||||||
TEMP_LOG="/tmp/upload-log.txt"
|
|
||||||
SYSTEM_INFO="/tmp/system-info.txt"
|
|
||||||
|
|
||||||
# Get system information if fastfetch is available
|
|
||||||
if command -v fastfetch >/dev/null 2>&1; then
|
|
||||||
{
|
|
||||||
echo "========================================="
|
|
||||||
echo "SYSTEM INFORMATION"
|
|
||||||
echo "========================================="
|
|
||||||
# Use fastfetch with no logo to get clean output
|
|
||||||
fastfetch --logo none --pipe 2>/dev/null || echo "Failed to get system info"
|
|
||||||
echo ""
|
|
||||||
echo "========================================="
|
|
||||||
echo "LOG CONTENT"
|
|
||||||
echo "========================================="
|
|
||||||
echo ""
|
|
||||||
} >"$SYSTEM_INFO"
|
|
||||||
else
|
|
||||||
# Fallback to basic info if fastfetch isn't available
|
|
||||||
{
|
|
||||||
echo "========================================="
|
|
||||||
echo "SYSTEM INFORMATION"
|
|
||||||
echo "========================================="
|
|
||||||
echo "Hostname: $(hostname)"
|
|
||||||
echo "Kernel: $(uname -r)"
|
|
||||||
echo "Date: $(date)"
|
|
||||||
echo ""
|
|
||||||
echo "========================================="
|
|
||||||
echo "LOG CONTENT"
|
|
||||||
echo "========================================="
|
|
||||||
echo ""
|
|
||||||
} >"$SYSTEM_INFO"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$LOG_TYPE" in
|
|
||||||
install)
|
|
||||||
ARCHINSTALL_LOG="/var/log/archinstall/install.log"
|
|
||||||
OMARCHY_LOG="/var/log/nomarchy-install.log"
|
|
||||||
|
|
||||||
# Combine system info with logs
|
|
||||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
||||||
cat $ARCHINSTALL_LOG $OMARCHY_LOG >>"$TEMP_LOG" 2>/dev/null
|
|
||||||
|
|
||||||
if [[ ! -s $TEMP_LOG ]]; then
|
|
||||||
echo "Error: No install logs found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Uploading installation log to 0x0.st..."
|
|
||||||
;;
|
|
||||||
|
|
||||||
this-boot)
|
|
||||||
# Combine system info with boot logs
|
|
||||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
||||||
journalctl -b 0 >>"$TEMP_LOG" 2>/dev/null
|
|
||||||
|
|
||||||
if [[ ! -s $TEMP_LOG ]]; then
|
|
||||||
echo "Error: No logs found for current boot"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Uploading current boot logs to 0x0.st..."
|
|
||||||
;;
|
|
||||||
|
|
||||||
last-boot)
|
|
||||||
# Combine system info with previous boot logs
|
|
||||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
||||||
journalctl -b -1 >>"$TEMP_LOG" 2>/dev/null
|
|
||||||
|
|
||||||
if [[ ! -s $TEMP_LOG ]]; then
|
|
||||||
echo "Error: No logs found for previous boot"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Uploading previous boot logs to 0x0.st..."
|
|
||||||
;;
|
|
||||||
|
|
||||||
installed|system-info)
|
|
||||||
# System info plus all installed packages
|
|
||||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
|
||||||
{
|
|
||||||
echo ""
|
|
||||||
echo "========================================="
|
|
||||||
echo "INSTALLED PACKAGES (pacman -Q)"
|
|
||||||
echo "========================================="
|
|
||||||
pacman -Q 2>/dev/null || echo "Failed to get package list"
|
|
||||||
} >>"$TEMP_LOG"
|
|
||||||
|
|
||||||
if [[ ! -s $TEMP_LOG ]]; then
|
|
||||||
echo "Error: Failed to gather system information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Uploading system information to 0x0.st..."
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 [install|this-boot|last-boot|installed|system-info]"
|
|
||||||
echo " install - Upload installation logs (default)"
|
|
||||||
echo " this-boot - Upload logs from current boot"
|
|
||||||
echo " last-boot - Upload logs from previous boot"
|
|
||||||
echo " installed - Upload system info and installed packages"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
URL=$(curl -sF "file=@$TEMP_LOG" -Fexpires=24 https://0x0.st)
|
|
||||||
|
|
||||||
if (( $? == 0 )) && [[ -n $URL ]]; then
|
|
||||||
echo "✓ Log uploaded successfully!"
|
|
||||||
echo "Share this URL:"
|
|
||||||
echo ""
|
|
||||||
echo " $URL"
|
|
||||||
echo ""
|
|
||||||
echo "This link will expire in 24 hours."
|
|
||||||
else
|
|
||||||
echo "Error: Failed to upload log file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cat $OMARCHY_PATH/version
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo $(git -C "$OMARCHY_PATH" rev-parse --abbrev-ref HEAD)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
url="$1"
|
|
||||||
web_url="https://app.hey.com"
|
|
||||||
|
|
||||||
# Handle mailto: URLs
|
|
||||||
if [[ $url =~ ^mailto: ]]; then
|
|
||||||
email=$(echo "$url" | sed 's/mailto://')
|
|
||||||
web_url="https://app.hey.com/messages/new?to=$email"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec nomarchy-launch-webapp "$web_url"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
url="$1"
|
|
||||||
web_url="https://app.zoom.us/wc/home"
|
|
||||||
|
|
||||||
if [[ $url =~ ^zoom(mtg|us):// ]]; then
|
|
||||||
confno=$(echo "$url" | sed -n 's/.*[?&]confno=\([^&]*\).*/\1/p')
|
|
||||||
|
|
||||||
if [[ -n $confno ]]; then
|
|
||||||
pwd=$(echo "$url" | sed -n 's/.*[?&]pwd=\([^&]*\).*/\1/p')
|
|
||||||
|
|
||||||
if [[ -n $pwd ]]; then
|
|
||||||
web_url="https://app.zoom.us/wc/join/$confno?pwd=$pwd"
|
|
||||||
else
|
|
||||||
web_url="https://app.zoom.us/wc/join/$confno"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec nomarchy-launch-webapp "$web_url"
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
FLAG_FILE="$HOME/.config/nomarchy/.first-run-done"
|
|
||||||
|
|
||||||
if [ -f "$FLAG_FILE" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure we have a terminal for the wizard
|
|
||||||
if [ -z "$TERMINAL_WIZARD" ]; then
|
|
||||||
export TERMINAL_WIZARD=1
|
|
||||||
alacritty -e "$0"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
gum style \
|
|
||||||
--foreground 212 --border-foreground 212 --border double \
|
|
||||||
--align center --width 50 --margin "1 2" --padding "2 4" \
|
|
||||||
"Nomarchy" "The NixOS Distribution with Omarchy Flavour"
|
|
||||||
|
|
||||||
echo "Welcome! Let's personalize your new system."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# 1. Select initial theme
|
|
||||||
echo "Step 1: Choose your starting theme"
|
|
||||||
nomarchy-theme-selector
|
|
||||||
|
|
||||||
# 2. Select initial font
|
|
||||||
echo "Step 2: Choose your preferred font"
|
|
||||||
nomarchy-font-selector
|
|
||||||
|
|
||||||
# 3. Setup Local Repo (Crucial for env-update to work)
|
|
||||||
echo ""
|
|
||||||
echo "Nomarchy relies on a local git repository for declarative updates."
|
|
||||||
if [ ! -d "/etc/nixos/.git" ]; then
|
|
||||||
echo "Warning: /etc/nixos is not a git repository. Declarative updates might fail."
|
|
||||||
if gum confirm "Would you like to initialize /etc/nixos as a git repo?"; then
|
|
||||||
sudo git -C /etc/nixos init
|
|
||||||
sudo git -C /etc/nixos add .
|
|
||||||
sudo git -C /etc/nixos commit -m "Initial Nomarchy System Commit"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 4. Success
|
|
||||||
mkdir -p "$(dirname "$FLAG_FILE")"
|
|
||||||
touch "$FLAG_FILE"
|
|
||||||
|
|
||||||
gum style --foreground 82 "Setup complete! Enjoy your Nomarchy experience."
|
|
||||||
sleep 3
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
for iface in /sys/class/net/*/wireless; do
|
|
||||||
iface="$(basename "$(dirname "$iface")")"
|
|
||||||
iw dev "$iface" set power_save "$1" 2>/dev/null
|
|
||||||
done
|
|
||||||
109
bin/utils/nomarchy-docs-keybindings
Executable file
109
bin/utils/nomarchy-docs-keybindings
Executable file
@@ -0,0 +1,109 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# nomarchy-docs-keybindings
|
||||||
|
#
|
||||||
|
# Regenerates docs/KEYBINDINGS.md from the Hyprland binding files. Run from the
|
||||||
|
# repo root or anywhere — paths are resolved relative to this script.
|
||||||
|
#
|
||||||
|
# nomarchy-docs-keybindings # write to stdout
|
||||||
|
# nomarchy-docs-keybindings --out docs/KEYBINDINGS.md
|
||||||
|
#
|
||||||
|
# Source files in render order. Each entry is "<repo-relative path>|<title>".
|
||||||
|
|
||||||
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||||
|
|
||||||
|
sources=(
|
||||||
|
"core/home/config/nomarchy/default/hypr/bindings/utilities.conf|Utilities"
|
||||||
|
"core/home/config/nomarchy/default/hypr/bindings/tiling-v2.conf|Tiling"
|
||||||
|
"core/home/config/nomarchy/default/hypr/bindings/clipboard.conf|Clipboard"
|
||||||
|
"core/home/config/nomarchy/default/hypr/bindings/media.conf|Media keys"
|
||||||
|
"features/desktop/hyprland/config/bindings.conf|Apps & web shortcuts"
|
||||||
|
)
|
||||||
|
|
||||||
|
prettify_key() {
|
||||||
|
case "$1" in
|
||||||
|
code:10) echo "1" ;; code:11) echo "2" ;; code:12) echo "3" ;;
|
||||||
|
code:13) echo "4" ;; code:14) echo "5" ;; code:15) echo "6" ;;
|
||||||
|
code:16) echo "7" ;; code:17) echo "8" ;; code:18) echo "9" ;;
|
||||||
|
code:19) echo "0" ;;
|
||||||
|
XF86AudioRaiseVolume) echo "Volume Up" ;;
|
||||||
|
XF86AudioLowerVolume) echo "Volume Down" ;;
|
||||||
|
XF86AudioMute) echo "Mute" ;;
|
||||||
|
XF86AudioMicMute) echo "Mic Mute" ;;
|
||||||
|
XF86AudioPlay) echo "Play/Pause" ;;
|
||||||
|
XF86AudioStop) echo "Stop" ;;
|
||||||
|
XF86AudioNext) echo "Next Track" ;;
|
||||||
|
XF86AudioPrev) echo "Previous Track" ;;
|
||||||
|
XF86MonBrightnessUp) echo "Brightness Up" ;;
|
||||||
|
XF86MonBrightnessDown) echo "Brightness Down" ;;
|
||||||
|
XF86KbdBrightnessUp) echo "Kbd Brightness Up" ;;
|
||||||
|
XF86KbdBrightnessDown) echo "Kbd Brightness Down" ;;
|
||||||
|
XF86KbdLightOnOff) echo "Kbd Backlight" ;;
|
||||||
|
*) echo "$1" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
trim() { sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//'; }
|
||||||
|
|
||||||
|
render_section() {
|
||||||
|
local file="$1" title="$2"
|
||||||
|
[[ ! -f "$repo_root/$file" ]] && return
|
||||||
|
local rows
|
||||||
|
rows=$(grep -E '^[[:space:]]*bind[a-z]*[[:space:]]*=' "$repo_root/$file" || true)
|
||||||
|
[[ -z "$rows" ]] && return
|
||||||
|
|
||||||
|
local body=""
|
||||||
|
while IFS= read -r line; do
|
||||||
|
# Strip the "bindXXX =" prefix.
|
||||||
|
local rhs="${line#*=}"
|
||||||
|
local mods key desc
|
||||||
|
IFS=',' read -r mods key desc _ <<<"$rhs"
|
||||||
|
mods=$(printf '%s' "${mods:-}" | trim)
|
||||||
|
key=$(printf '%s' "${key:-}" | trim)
|
||||||
|
desc=$(printf '%s' "${desc:-}" | trim)
|
||||||
|
[[ -z "$desc" ]] && continue # skip non-descriptive bindings
|
||||||
|
[[ -z "$mods" ]] && mods="—"
|
||||||
|
key=$(prettify_key "$key")
|
||||||
|
body+=$(printf '| %s | %s | %s |\n' "$mods" "$key" "$desc")
|
||||||
|
body+=$'\n'
|
||||||
|
done <<<"$rows"
|
||||||
|
|
||||||
|
[[ -z "$body" ]] && return
|
||||||
|
|
||||||
|
printf '\n## %s\n\n' "$title"
|
||||||
|
printf '_Source: `%s`_\n\n' "$file"
|
||||||
|
printf '| Modifiers | Key | Action |\n'
|
||||||
|
printf '| --- | --- | --- |\n'
|
||||||
|
printf '%s' "$body"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
cat <<'HEADER'
|
||||||
|
# Nomarchy Keybindings
|
||||||
|
|
||||||
|
Auto-generated from the Hyprland binding files. **Do not edit by hand.**
|
||||||
|
Re-run the generator after changing any `bindings/*.conf`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./bin/utils/nomarchy-docs-keybindings --out docs/KEYBINDINGS.md
|
||||||
|
```
|
||||||
|
|
||||||
|
`SUPER` is the Meta / Win key. `code:NN` keys (X11 digit keycodes) are
|
||||||
|
shown as the digit they correspond to. Media keys (`XF86Audio*`,
|
||||||
|
`XF86MonBrightness*`, …) are prettified.
|
||||||
|
HEADER
|
||||||
|
for entry in "${sources[@]}"; do
|
||||||
|
render_section "${entry%|*}" "${entry#*|}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
out=""
|
||||||
|
if [[ "${1:-}" == "--out" ]]; then
|
||||||
|
out="${2:?--out needs a path}"; shift 2
|
||||||
|
fi
|
||||||
|
if [[ -n "$out" ]]; then
|
||||||
|
main >"$out"
|
||||||
|
else
|
||||||
|
main
|
||||||
|
fi
|
||||||
276
bin/utils/nomarchy-docs-scripts
Executable file
276
bin/utils/nomarchy-docs-scripts
Executable file
@@ -0,0 +1,276 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Generator tolerates "no matches" exit codes from grep | sort.
|
||||||
|
# pipefail and -e off; -u stays.
|
||||||
|
set -u
|
||||||
|
|
||||||
|
# nomarchy-docs-scripts
|
||||||
|
#
|
||||||
|
# Regenerates docs/SCRIPTS.md from the repo state. Produces:
|
||||||
|
# 1. Header + status legend + regen instructions.
|
||||||
|
# 2. Table of every nomarchy-* script (location, callers, status).
|
||||||
|
# 3. Table of every menu entry in features/scripts/utils/nomarchy-menu
|
||||||
|
# (submenu, label, target command, status).
|
||||||
|
# 4. Snapshot list of orphaned references (called somewhere, no script).
|
||||||
|
#
|
||||||
|
# Status heuristic in Phase A:
|
||||||
|
# kept — file exists AND is called from at least one *.nix / *.conf /
|
||||||
|
# shell file outside its own directory.
|
||||||
|
# unused? — file exists but no caller found. Phase B decides delete-dead
|
||||||
|
# vs intentional public API.
|
||||||
|
# missing — referenced but no file. Phase B decides port-from-omarchy
|
||||||
|
# vs delete-dead vs stub-with-notify.
|
||||||
|
#
|
||||||
|
# nomarchy-docs-scripts # write to stdout
|
||||||
|
# nomarchy-docs-scripts --out docs/SCRIPTS.md
|
||||||
|
|
||||||
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||||
|
cd "$repo_root"
|
||||||
|
|
||||||
|
# --- Inventory -------------------------------------------------------------
|
||||||
|
|
||||||
|
# Where scripts live, in render order.
|
||||||
|
declare -A loc_label=(
|
||||||
|
["features/scripts/utils"]="features/scripts/utils"
|
||||||
|
["core/system/scripts"]="core/system/scripts"
|
||||||
|
["themes/engine/scripts"]="themes/engine/scripts"
|
||||||
|
)
|
||||||
|
script_dirs=(features/scripts/utils core/system/scripts themes/engine/scripts)
|
||||||
|
|
||||||
|
# Build name → location map (associative array of basename → repo-relative dir).
|
||||||
|
declare -A script_loc
|
||||||
|
for dir in "${script_dirs[@]}"; do
|
||||||
|
[[ -d "$dir" ]] || continue
|
||||||
|
while IFS= read -r f; do
|
||||||
|
script_loc["$(basename "$f")"]="$dir"
|
||||||
|
done < <(find "$dir" -maxdepth 1 -type f -name 'nomarchy-*')
|
||||||
|
done
|
||||||
|
|
||||||
|
# Find every nomarchy-* token referenced anywhere outside the script dirs.
|
||||||
|
# (We exclude the script files themselves so they don't list themselves as
|
||||||
|
# their own caller.)
|
||||||
|
# File types we search for references. *.md catches docs and README;
|
||||||
|
# branding/hook/extension files have varied or no extensions.
|
||||||
|
# *.lua catches elephant providers; *.ini catches mako on-button-* hooks;
|
||||||
|
# *.desktop catches MimeType-registered URL handlers.
|
||||||
|
grep_includes=(
|
||||||
|
--include='*.nix' --include='*.conf' --include='*.sh' --include='*.md'
|
||||||
|
--include='nomarchy-*' --include='*.jsonc' --include='*.json'
|
||||||
|
--include='*.toml' --include='*.ini' --include='*.lua'
|
||||||
|
--include='*.desktop' --include='*.txt' --include='*.sample'
|
||||||
|
)
|
||||||
|
search_dirs=(core features themes installer hosts bin lib README.md)
|
||||||
|
|
||||||
|
# Files whose mentions of nomarchy-* are documentation about the scripts,
|
||||||
|
# not real callers. Excluded from caller discovery so they don't promote
|
||||||
|
# every script to `kept`.
|
||||||
|
self_refs=(docs/SCRIPTS.md docs/ROADMAP.md docs/AGENT.md)
|
||||||
|
|
||||||
|
ref_files_per_cmd() {
|
||||||
|
local cmd="$1"
|
||||||
|
local self_pattern
|
||||||
|
self_pattern=$(IFS='|'; echo "${self_refs[*]}")
|
||||||
|
grep -rlE "\\b${cmd}\\b" \
|
||||||
|
"${grep_includes[@]}" \
|
||||||
|
"${search_dirs[@]}" 2>/dev/null \
|
||||||
|
| grep -vE "^(features/scripts/utils|core/system/scripts|themes/engine/scripts)/${cmd}$" \
|
||||||
|
| grep -vE "^(${self_pattern})$" \
|
||||||
|
| sort -u
|
||||||
|
}
|
||||||
|
|
||||||
|
# All distinct nomarchy-* tokens we see anywhere in the repo.
|
||||||
|
# Final char must be alphanumeric — dropping trailing-dash matches like
|
||||||
|
# `nomarchy-pkg-` that come from glob references (`for c in nomarchy-pkg-*`).
|
||||||
|
# Restrict to grep_includes so binaries / tmpfiles don't pollute the set.
|
||||||
|
# The first `grep -vE` drops lines where `nomarchy-*` is a derivation /
|
||||||
|
# tmp file / sudoers basename / systemd unit / flake output / docker
|
||||||
|
# container identifier rather than a shell invocation.
|
||||||
|
# The second `grep -vE` is a token-level safety net for prefix-only
|
||||||
|
# tokens left over from wildcards/expansions (e.g. `nomarchy-pkg-*`).
|
||||||
|
all_refs=$(grep -rhE 'nomarchy-[a-z0-9]([a-z0-9-]*[a-z0-9])?' \
|
||||||
|
"${grep_includes[@]}" \
|
||||||
|
"${search_dirs[@]}" 2>/dev/null \
|
||||||
|
| grep -vE \
|
||||||
|
-e '(pname|name)[[:space:]]*=[[:space:]]*"nomarchy-' \
|
||||||
|
-e '/tmp/nomarchy-' \
|
||||||
|
-e '/etc/sudoers\.d/[^"[:space:]]*nomarchy-' \
|
||||||
|
-e 'nixosConfigurations\.nomarchy-' \
|
||||||
|
-e 'packages\.[^.]+\.nomarchy-' \
|
||||||
|
-e '\./result/bin/run-nomarchy-' \
|
||||||
|
-e 'mktemp[[:space:]]+[^|]*-t[[:space:]]+nomarchy-' \
|
||||||
|
-e '(TIMER_NAME|NOPASSWD_FILE|UNIT_NAME)=.*nomarchy-' \
|
||||||
|
-e 'docker[[:space:]]+[^|]*nomarchy-' \
|
||||||
|
| grep -oE 'nomarchy-[a-z0-9]([a-z0-9-]*[a-z0-9])?' \
|
||||||
|
| grep -vE '^(nomarchy-launch|nomarchy-brightness|nomarchy-cmd|nomarchy-pkg|nomarchy-restart|nomarchy-toggle|nomarchy-theme|nomarchy-webapp-handler|nomarchy-font-selector|nomarchy-theme-selector|nomarchy-wallpaper-selector|nomarchy-setup|nomarchy-refresh|nomarchy-scripts|nomarchy-system-scripts|nomarchy-theme-engine-scripts)$' \
|
||||||
|
| grep -vE '^(nomarchy-plymouth|nomarchy-sddm-theme|nomarchy-live|nomarchy-rev|nomarchy-windows)$' \
|
||||||
|
| sort -u)
|
||||||
|
# The second denylist covers identifiers whose ambiguity survives the line
|
||||||
|
# filter: `nomarchy-plymouth` / `nomarchy-sddm-theme` are Nix derivation
|
||||||
|
# names referenced as bare idents in `[...]` lists, `nomarchy-live` is an
|
||||||
|
# ISO label that shows up in comments, `nomarchy-rev` is `/etc/nomarchy-rev`
|
||||||
|
# (written by the ISO), and `nomarchy-windows` is a docker container name
|
||||||
|
# in compose heredocs.
|
||||||
|
|
||||||
|
# --- Render: header --------------------------------------------------------
|
||||||
|
|
||||||
|
main() {
|
||||||
|
cat <<'HEADER'
|
||||||
|
# Nomarchy Script & Menu Audit
|
||||||
|
|
||||||
|
Auto-generated table for [Pillar 3 of the roadmap](ROADMAP.md#3-pillar-script--menu-audit).
|
||||||
|
**Do not edit by hand.** Regenerate after script or menu changes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./bin/utils/nomarchy-docs-scripts --out docs/SCRIPTS.md
|
||||||
|
```
|
||||||
|
|
||||||
|
The status column uses a Phase A heuristic — `kept` / `unused?` / `missing`.
|
||||||
|
Phase B (per-batch PRs) refines those into `port-from-omarchy`,
|
||||||
|
`delete-dead`, or `stub-with-notify` and updates the rows.
|
||||||
|
|
||||||
|
## Status legend
|
||||||
|
|
||||||
|
- `kept` — script exists and is called from somewhere outside its own directory.
|
||||||
|
- `unused?` — script exists but no caller was found. Could be dead, could be
|
||||||
|
intentional public API. Phase B triage decides.
|
||||||
|
- `missing` — referenced from code but no script file exists. Phase B triage
|
||||||
|
decides whether to port from Omarchy upstream, delete the caller, or stub
|
||||||
|
with `notify-send`.
|
||||||
|
- `port-from-omarchy` — Phase B verdict: lift the upstream Omarchy script,
|
||||||
|
rewrite for NixOS paths.
|
||||||
|
- `delete-dead` — Phase B verdict: remove and update callers.
|
||||||
|
- `stub-with-notify` — Phase B verdict: temporary `notify-send` stub.
|
||||||
|
|
||||||
|
HEADER
|
||||||
|
|
||||||
|
# --- Render: scripts table ----------------------------------------------
|
||||||
|
printf '## Scripts (%d)\n\n' "${#script_loc[@]}"
|
||||||
|
printf '| Script | Location | Callers | Status | Notes |\n'
|
||||||
|
printf '| --- | --- | --- | --- | --- |\n'
|
||||||
|
|
||||||
|
# Sort scripts by name.
|
||||||
|
for name in $(printf '%s\n' "${!script_loc[@]}" | sort); do
|
||||||
|
local dir="${script_loc[$name]}"
|
||||||
|
local callers status callers_str
|
||||||
|
callers=$(ref_files_per_cmd "$name")
|
||||||
|
if [[ -z "$callers" ]]; then
|
||||||
|
status='`unused?`'
|
||||||
|
callers_str='—'
|
||||||
|
else
|
||||||
|
status='`kept`'
|
||||||
|
# Trim caller list to 2 entries + count.
|
||||||
|
local count
|
||||||
|
count=$(printf '%s\n' "$callers" | wc -l)
|
||||||
|
if (( count > 2 )); then
|
||||||
|
callers_str=$(printf '%s\n' "$callers" | head -2 | paste -sd, -)
|
||||||
|
callers_str="$callers_str, +$((count - 2)) more"
|
||||||
|
else
|
||||||
|
callers_str=$(printf '%s\n' "$callers" | paste -sd, -)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
printf '| `%s` | `%s` | %s | %s | |\n' \
|
||||||
|
"$name" "$dir" "$callers_str" "$status"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
|
# --- Render: missing references -----------------------------------------
|
||||||
|
printf '## Missing references\n\n'
|
||||||
|
printf 'Tokens grepped from `core/`, `features/`, `themes/`, `installer/`, `hosts/`, `bin/`, `lib/` that have no matching script file.\n\n'
|
||||||
|
printf '| Token | Referenced in | Status |\n'
|
||||||
|
printf '| --- | --- | --- |\n'
|
||||||
|
while IFS= read -r token; do
|
||||||
|
[[ -z "$token" ]] && continue
|
||||||
|
[[ -n "${script_loc[$token]:-}" ]] && continue
|
||||||
|
local refs
|
||||||
|
self_pattern=$(IFS='|'; echo "${self_refs[*]}")
|
||||||
|
refs=$(grep -rlE "\\b${token}\\b" \
|
||||||
|
"${grep_includes[@]}" \
|
||||||
|
"${search_dirs[@]}" 2>/dev/null \
|
||||||
|
| grep -vE "^(${self_pattern})$" \
|
||||||
|
| sort -u)
|
||||||
|
[[ -z "$refs" ]] && continue
|
||||||
|
local count refs_str
|
||||||
|
count=$(printf '%s\n' "$refs" | wc -l)
|
||||||
|
if (( count > 2 )); then
|
||||||
|
refs_str=$(printf '%s\n' "$refs" | head -2 | paste -sd, -)
|
||||||
|
refs_str="$refs_str, +$((count - 2)) more"
|
||||||
|
else
|
||||||
|
refs_str=$(printf '%s\n' "$refs" | paste -sd, -)
|
||||||
|
fi
|
||||||
|
printf '| `%s` | %s | `missing` |\n' "$token" "$refs_str"
|
||||||
|
done <<<"$all_refs"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# --- Render: menu items -------------------------------------------------
|
||||||
|
printf '## Menu items\n\n'
|
||||||
|
printf 'Walked from `features/scripts/utils/nomarchy-menu`. Each `case` arm in a `show_*_menu` function becomes one row.\n\n'
|
||||||
|
printf '| Submenu | Entry | Calls | Status |\n'
|
||||||
|
printf '| --- | --- | --- | --- |\n'
|
||||||
|
|
||||||
|
awk '
|
||||||
|
/^show_[a-z_]+_menu\(\) {/ { sub(/\(\) {/, ""); current=$1; in_func=1; next }
|
||||||
|
/^[a-z_]+\(\) {/ && !/^show_/ { current=""; in_func=0; next }
|
||||||
|
/^}$/ { current=""; in_func=0; next }
|
||||||
|
!in_func { next }
|
||||||
|
/^ case \$\(menu / {
|
||||||
|
# extract the menu title between the first pair of double quotes
|
||||||
|
match($0, /menu "[^"]+" "[^"]+"/);
|
||||||
|
if (RSTART == 0) next;
|
||||||
|
title=substr($0, RSTART, RLENGTH);
|
||||||
|
# second quoted string is the option list
|
||||||
|
n=split(title, parts, "\"");
|
||||||
|
title=parts[2];
|
||||||
|
options=parts[4];
|
||||||
|
# split options on \n
|
||||||
|
split(options, opts, "\\\\n");
|
||||||
|
pending_submenu=current;
|
||||||
|
pending_title=title;
|
||||||
|
for (i=1;i<=length(opts);i++) pending_opts[i]=opts[i];
|
||||||
|
pending_count=length(opts);
|
||||||
|
next
|
||||||
|
}
|
||||||
|
/^ \*[A-Za-z]/ {
|
||||||
|
# case arm — extract pattern between the first * and the closing )
|
||||||
|
match($0, /\*[^)]*\)/);
|
||||||
|
if (RSTART == 0) next;
|
||||||
|
arm=substr($0, RSTART, RLENGTH);
|
||||||
|
gsub(/[*)]/, "", arm);
|
||||||
|
gsub(/^[[:space:]]+|[[:space:]]+$/, "", arm);
|
||||||
|
# action follows the )
|
||||||
|
rest=substr($0, RSTART+RLENGTH);
|
||||||
|
sub(/^[[:space:]]+/, "", rest);
|
||||||
|
sub(/[[:space:]]*;;[[:space:]]*$/, "", rest);
|
||||||
|
# match the first nomarchy-* token in the action
|
||||||
|
cmd=""
|
||||||
|
if (match(rest, /nomarchy-[a-z0-9-]+/)) {
|
||||||
|
cmd=substr(rest, RSTART, RLENGTH);
|
||||||
|
}
|
||||||
|
printf "%s|%s|%s\n", pending_submenu, arm, cmd;
|
||||||
|
}
|
||||||
|
' features/scripts/utils/nomarchy-menu > /tmp/nomarchy-menu-rows.$$
|
||||||
|
|
||||||
|
while IFS='|' read -r submenu entry cmd; do
|
||||||
|
[[ -z "$entry" ]] && continue
|
||||||
|
[[ "$entry" =~ ^\) ]] && continue
|
||||||
|
status='`kept`'
|
||||||
|
if [[ -n "$cmd" ]]; then
|
||||||
|
if [[ -z "${script_loc[$cmd]:-}" ]]; then
|
||||||
|
status='`missing`'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cmd='_(inline)_'
|
||||||
|
fi
|
||||||
|
printf '| `%s` | %s | `%s` | %s |\n' "$submenu" "$entry" "$cmd" "$status"
|
||||||
|
done < /tmp/nomarchy-menu-rows.$$
|
||||||
|
rm -f /tmp/nomarchy-menu-rows.$$
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
out=""
|
||||||
|
if [[ "${1:-}" == "--out" ]]; then
|
||||||
|
out="${2:?--out needs a path}"; shift 2
|
||||||
|
fi
|
||||||
|
if [[ -n "$out" ]]; then
|
||||||
|
main >"$out"
|
||||||
|
else
|
||||||
|
main
|
||||||
|
fi
|
||||||
@@ -1,309 +0,0 @@
|
|||||||
:root {
|
|
||||||
--accent-color: #aeb1b5; /* #'s before H1-3 */
|
|
||||||
--background-color: white;
|
|
||||||
--border-color: #ddd;
|
|
||||||
--code-bg-color: #f8f8f8;
|
|
||||||
--font-color: #42464c;
|
|
||||||
--header-color: #222324;
|
|
||||||
--link-color: #2077b2;
|
|
||||||
--control-text-color: #667176;
|
|
||||||
--side-bar-bg-color: #fafafa;
|
|
||||||
--body-font: "iA Writer Mono S";
|
|
||||||
--border-radius: 2px;
|
|
||||||
--document-horizontal-margin: 80px;
|
|
||||||
--document-padding-x: 10ch;
|
|
||||||
--font-size: 20px;
|
|
||||||
--h1-fontsize: 20px; /* 1,5 rem = 24px */
|
|
||||||
--h2-fontsize: 20px; /* 1,375 rem = 22px */
|
|
||||||
--h3-fontsize: 20px; /* 1,25 rem = 20px */
|
|
||||||
--h4-fontsize: 20px; /* 1,125 rem = 18px */
|
|
||||||
--line-height: 1.8;
|
|
||||||
--main-content-margin: 0 auto;
|
|
||||||
--main-content-max-width: 85ch;
|
|
||||||
--monospace-font-size: 20px;
|
|
||||||
--monospace-font: "iA Writer Mono S";
|
|
||||||
--monospace-line-height: 1.6;
|
|
||||||
--monospace: var(--monospace-font); /* Fixes source code mode */
|
|
||||||
--nav-width: 200px;
|
|
||||||
--vertical-padding: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Narrow layout styles */
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
:root {
|
|
||||||
--document-padding-x: 4ch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-size: var(--font-size);
|
|
||||||
background-color: var(--background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
color: var(--font-color);
|
|
||||||
font-family: var(--body-font);
|
|
||||||
line-height: var(--line-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
#write {
|
|
||||||
/* size of writing area: */
|
|
||||||
padding-left: var(--document-padding-x);
|
|
||||||
padding-right: var(--document-padding-x);
|
|
||||||
max-width: var(--main-content-max-width);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ---------------------
|
|
||||||
* Block Elements
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* yaml */
|
|
||||||
pre.md-meta-block {
|
|
||||||
background-color: var(--background-color);
|
|
||||||
padding-bottom: .5rem;
|
|
||||||
color: var(--accent-color);
|
|
||||||
border-bottom: 2px solid var(--border-color);
|
|
||||||
font-family: var(--monospace-font);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* headings */
|
|
||||||
h1, h2, h3 {
|
|
||||||
font-weight: bold;
|
|
||||||
color: var(--header-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin-top: 1rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-size: var(--h1-fontsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1:not(:first-child) {
|
|
||||||
margin-top: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
margin-top: 1rem;
|
|
||||||
margin-bottom: 0rem;
|
|
||||||
font-size: var(--h2-fontsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
margin-top: 1rem;
|
|
||||||
margin-bottom: 0rem;
|
|
||||||
font-size: var(--h3-fontsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
h4, h5, h6 {
|
|
||||||
color: var(--header-color);
|
|
||||||
margin-top: 1rem;
|
|
||||||
margin-bottom: 0rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: var(--h4-fontsize);
|
|
||||||
}
|
|
||||||
|
|
||||||
h6 {
|
|
||||||
color: var(--control-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1::before,
|
|
||||||
h2::before,
|
|
||||||
h3::before {
|
|
||||||
font-weight: 400;
|
|
||||||
text-align: right;
|
|
||||||
width: 5ch;
|
|
||||||
padding-right: 1ch;
|
|
||||||
margin-left: -5ch;
|
|
||||||
color: var(--accent-color);
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1::before {
|
|
||||||
content: '#';
|
|
||||||
}
|
|
||||||
|
|
||||||
h2::before {
|
|
||||||
content: '##';
|
|
||||||
}
|
|
||||||
|
|
||||||
h3::before {
|
|
||||||
content: '###';
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 tt,
|
|
||||||
h1 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
h2 tt,
|
|
||||||
h2 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
h3 tt,
|
|
||||||
h3 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
h4 tt,
|
|
||||||
h4 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
h5 tt,
|
|
||||||
h5 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
h6 tt,
|
|
||||||
h6 code {
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* table */
|
|
||||||
table {
|
|
||||||
margin-top: 1rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr:nth-child(2n),
|
|
||||||
thead {
|
|
||||||
background-color: var(--side-bar-bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
td,
|
|
||||||
th {
|
|
||||||
border-style: solid;
|
|
||||||
border-color: var(--border-color);
|
|
||||||
border-width: 1px;
|
|
||||||
padding: .35rem .7rem
|
|
||||||
}
|
|
||||||
|
|
||||||
li p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-list {
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-list-item {
|
|
||||||
padding-left: 1.5em;
|
|
||||||
margin-bottom: 0rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#write input[type='checkbox'] {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin: 1rem 0;
|
|
||||||
padding-left: 2ch;
|
|
||||||
margin-left: .5ch;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
border-left: 2px solid var(--border-color);
|
|
||||||
color: var(--accent-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* horizontal line */
|
|
||||||
hr {
|
|
||||||
border: none;
|
|
||||||
border-bottom: 2px solid var(--border-color);
|
|
||||||
margin-top: 1.4rem;
|
|
||||||
margin-bottom: 1.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 2rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code Fences
|
|
||||||
* see http:/*support.typora.io/Code-Block-Styles
|
|
||||||
*/
|
|
||||||
|
|
||||||
.cm-s-inner .CodeMirror-gutters {
|
|
||||||
background: var(--code-bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-tooltip {
|
|
||||||
box-shadow: none;
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background-color: var(--code-bg-color);
|
|
||||||
border-color: var(--border-color);
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-tooltip input {
|
|
||||||
outline: none;
|
|
||||||
width: 20ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-fences .code-tooltip {
|
|
||||||
bottom: -1.8rem;
|
|
||||||
padding: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-fences.md-focus .cm-s-inner {
|
|
||||||
/* Remove bottom right border radius when tooltip is shown */
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* code tooltip autocomplete list */
|
|
||||||
|
|
||||||
.autoComplt-hint {
|
|
||||||
background-color: transparent !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
padding: 0.125rem 0.375rem !important;
|
|
||||||
color: var(--text-color) !important;
|
|
||||||
line-height: var(--line-height) !important;
|
|
||||||
height: 1.4rem !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.autoComplt-hint-selected {
|
|
||||||
background-color: var(--link-color) !important;
|
|
||||||
color: var(--background-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* basic styles */
|
|
||||||
|
|
||||||
.md-fences,
|
|
||||||
code,
|
|
||||||
tt {
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background-color: var(--code-bg-color);
|
|
||||||
font-family: var(--monospace-font);
|
|
||||||
font-size: var(--monospace-font-size);
|
|
||||||
border-radius: .25rem;
|
|
||||||
padding: 0 .125rem;
|
|
||||||
line-height: var(--monospace-line-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-fences {
|
|
||||||
margin-bottom: 18px;
|
|
||||||
margin-top: 15px;
|
|
||||||
padding: 0.2em 1em;
|
|
||||||
padding-top: 8px;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: var(--link-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Control UI (optional)
|
|
||||||
*/
|
|
||||||
|
|
||||||
.outline-item:hover {
|
|
||||||
color: var(--header-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
#write div.md-toc-tooltip {
|
|
||||||
background-color: var(--background-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
@import 'night/codeblock.dark.css';
|
|
||||||
@import 'night/mermaid.dark.css';
|
|
||||||
@import 'night/sourcemode.dark.css';
|
|
||||||
@import 'ia_typora.css';
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--accented-background-color: #1e1e1e;
|
|
||||||
--light-header-color: #dbdbdb; /* H1-H3 */
|
|
||||||
--select-text-bg-color: #186a9a;
|
|
||||||
--accent-color: #4f525a;
|
|
||||||
--background-color: #101010;
|
|
||||||
--font-color: #bbbcbc;
|
|
||||||
--header-color: #bebebe; /* H4-H6 */
|
|
||||||
--border-color: #232629;
|
|
||||||
--link-color: #5584aa;
|
|
||||||
--code-bg-color: #1c1a1a;
|
|
||||||
--hover-bg-color: #050505;
|
|
||||||
--control-text-color: var(--font-color);
|
|
||||||
--side-bar-bg-color: var(--accented-background-color);
|
|
||||||
--control-text-hover-color: var(--header-color);
|
|
||||||
--item-hover-text-color: var(--header-color);
|
|
||||||
--item-hover-bg-color: var(--hover-bg-color);
|
|
||||||
--bg-color: var(--background-color);
|
|
||||||
--text-color: var(--font-color);
|
|
||||||
--meta-content-color: var(--accent-color);
|
|
||||||
--md-char-color: var(--accent-color);
|
|
||||||
--window-border: 1px solid rgba(0,0,0,.07);
|
|
||||||
--active-file-bg-color: var(--hover-bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.outline-item:hover {
|
|
||||||
background-color: var(--hover-bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
#write {
|
|
||||||
cursor: -webkit-image-set(url("night/cursor.png") 1x, url("night/cursor@2x.png") 2x) 8 8, auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3 {
|
|
||||||
color: var(--light-header-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
mark {
|
|
||||||
background: #b8b80a
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr:nth-child(2n),
|
|
||||||
thead {
|
|
||||||
background-color: #141313;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup.md-footnote {
|
|
||||||
background-color: var(--code-bg-color);
|
|
||||||
color: var(--font-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* right click menu */
|
|
||||||
.context-menu {
|
|
||||||
background-color: #141313;
|
|
||||||
}
|
|
||||||
|
|
||||||
.context-menu.dropdown-menu .divider {
|
|
||||||
background-color: #232629;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* focus mode */
|
|
||||||
.on-focus-mode .md-end-block:not(.md-focus):not(.md-focus-container) * {
|
|
||||||
color: #4f525a !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-focus-mode .md-end-block:not(.md-focus) img,
|
|
||||||
.on-focus-mode .md-task-list-item:not(.md-focus-container)>input {
|
|
||||||
opacity: #4f525a !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-focus-mode li[cid]:not(.md-focus-container){
|
|
||||||
color: #4f525a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-focus-mode .md-fences.md-focus .CodeMirror-code>*:not(.CodeMirror-activeline) *,
|
|
||||||
.on-focus-mode .CodeMirror.cm-s-inner:not(.CodeMirror-focused) * {
|
|
||||||
color: #4f525a !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-focus-mode .md-focus,
|
|
||||||
.on-focus-mode .md-focus-container {
|
|
||||||
color: var(--light-header-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-focus-mode #typora-source .CodeMirror-code>*:not(.CodeMirror-activeline) * {
|
|
||||||
color: #4f525a !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
general.import = [ "~/.config/nomarchy/current/theme/alacritty.toml" ]
|
|
||||||
|
|
||||||
[env]
|
|
||||||
TERM = "xterm-256color"
|
|
||||||
|
|
||||||
[terminal]
|
|
||||||
osc52 = "CopyPaste"
|
|
||||||
|
|
||||||
[font]
|
|
||||||
normal = { family = "JetBrainsMono Nerd Font", style = "Regular" }
|
|
||||||
bold = { family = "JetBrainsMono Nerd Font", style = "Bold" }
|
|
||||||
italic = { family = "JetBrainsMono Nerd Font", style = "Italic" }
|
|
||||||
size = 9
|
|
||||||
|
|
||||||
[window]
|
|
||||||
padding.x = 14
|
|
||||||
padding.y = 14
|
|
||||||
decorations = "None"
|
|
||||||
|
|
||||||
[keyboard]
|
|
||||||
bindings = [
|
|
||||||
{ key = "Insert", mods = "Shift", action = "Paste" },
|
|
||||||
{ key = "Insert", mods = "Control", action = "Copy" },
|
|
||||||
{ key = "Return", mods = "Shift", chars = "\u001B\r" }
|
|
||||||
]
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
INPUT_METHOD=fcitx
|
|
||||||
QT_IM_MODULE=fcitx
|
|
||||||
XMODIFIERS=@im=fcitx
|
|
||||||
SDL_IM_MODULE=fcitx
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Extra autostart processes
|
|
||||||
# exec-once = uwsm-app -- my-service
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
general {
|
|
||||||
lock_cmd = nomarchy-lock-screen # lock screen and 1password
|
|
||||||
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
|
||||||
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
|
|
||||||
inhibit_sleep = 3 # wait until screen is locked
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 150 # 2.5min
|
|
||||||
on-timeout = pidof hyprlock || nomarchy-launch-screensaver # start screensaver (if we haven't locked already)
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 151 # 5min
|
|
||||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 330 # 5.5min
|
|
||||||
on-timeout = brightnessctl -sd '*::kbd_backlight' set 0 # save state and turn off keyboard backlight
|
|
||||||
on-resume = brightnessctl -rd '*::kbd_backlight' # restore keyboard backlight
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 330 # 5.5min
|
|
||||||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
|
||||||
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# Learn how to configure Hyprland: https://wiki.hyprland.org/Configuring/
|
|
||||||
|
|
||||||
# Use defaults Nomarchy defaults (but don't edit these directly!)
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/autostart.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/bindings/media.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/bindings/clipboard.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/bindings/tiling-v2.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/bindings/utilities.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/envs.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/looknfeel.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/input.conf
|
|
||||||
source = ~/.local/share/nomarchy/default/hypr/windows.conf
|
|
||||||
source = ~/.config/nomarchy/current/theme/hyprland.conf
|
|
||||||
|
|
||||||
# Change your own setup in these files (and overwrite any settings from defaults!)
|
|
||||||
source = ~/.config/hypr/monitors.conf
|
|
||||||
source = ~/.config/hypr/input.conf
|
|
||||||
source = ~/.config/hypr/bindings.conf
|
|
||||||
source = ~/.config/hypr/looknfeel.conf
|
|
||||||
source = ~/.config/hypr/autostart.conf
|
|
||||||
|
|
||||||
# Add any other personal Hyprland configuration below
|
|
||||||
# windowrule = workspace 5, match:class qemu
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
source = ~/.config/nomarchy/current/theme/hyprlock.conf
|
|
||||||
|
|
||||||
general {
|
|
||||||
ignore_empty_input = true
|
|
||||||
}
|
|
||||||
|
|
||||||
background {
|
|
||||||
monitor =
|
|
||||||
color = $color
|
|
||||||
path = ~/.config/nomarchy/current/background
|
|
||||||
blur_passes = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
input-field {
|
|
||||||
monitor =
|
|
||||||
size = 650, 100
|
|
||||||
position = 0, 0
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
|
|
||||||
inner_color = $inner_color
|
|
||||||
outer_color = $outer_color
|
|
||||||
outline_thickness = 4
|
|
||||||
|
|
||||||
font_family = JetBrainsMono Nerd Font
|
|
||||||
font_color = $font_color
|
|
||||||
|
|
||||||
placeholder_text = Enter Password
|
|
||||||
check_color = $check_color
|
|
||||||
fail_text = <i>$FAIL ($ATTEMPTS)</i>
|
|
||||||
|
|
||||||
rounding = 0
|
|
||||||
shadow_passes = 0
|
|
||||||
fade_on_empty = false
|
|
||||||
}
|
|
||||||
|
|
||||||
auth {
|
|
||||||
fingerprint:enabled = false
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Makes hyprsunset do nothing to the screen by default
|
|
||||||
# Without this, the default applies some tint to the monitor
|
|
||||||
profile {
|
|
||||||
time = 07:00
|
|
||||||
identity = true
|
|
||||||
}
|
|
||||||
|
|
||||||
# To enable auto switch to nightlight, set in your .config/hypr/autostart:
|
|
||||||
# exec-once = uwsm app -- hyprsunset
|
|
||||||
# and use the following:
|
|
||||||
# profile {
|
|
||||||
# time = 20:00
|
|
||||||
# temperature = 4000
|
|
||||||
# }
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# Change the default Nomarchy look'n'feel
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
|
||||||
general {
|
|
||||||
# No gaps between windows or borders
|
|
||||||
# gaps_in = 0
|
|
||||||
# gaps_out = 0
|
|
||||||
# border_size = 0
|
|
||||||
|
|
||||||
# Change to niri-like side-scrolling layout
|
|
||||||
# layout = scrolling
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
|
||||||
decoration {
|
|
||||||
# Use round window corners
|
|
||||||
# rounding = 8
|
|
||||||
|
|
||||||
# Dim unfocused windows (0.0 = no dim, 1.0 = fully dimmed)
|
|
||||||
# dim_inactive = true
|
|
||||||
# dim_strength = 0.15
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
|
||||||
animations {
|
|
||||||
# Disable all animations
|
|
||||||
# enabled = no
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://wiki.hypr.land/Configuring/Variables/#layout
|
|
||||||
layout {
|
|
||||||
# Avoid overly wide single-window layouts on wide screens
|
|
||||||
# single_window_aspect_ratio = 1 1
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
screencopy {
|
|
||||||
allow_token_by_default = true
|
|
||||||
custom_picker_binary = hyprland-preview-share-picker
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
# paths to stylesheets on the filesystem which should be applied to the application
|
|
||||||
#
|
|
||||||
# relative paths are resolved relative to the location of the config file
|
|
||||||
stylesheets: ["../nomarchy/current/theme/hyprland-preview-share-picker.css"]
|
|
||||||
# default page selected when the picker is opened
|
|
||||||
default_page: outputs
|
|
||||||
|
|
||||||
window:
|
|
||||||
# height of the application window
|
|
||||||
height: 500
|
|
||||||
# width of the application window
|
|
||||||
width: 1000
|
|
||||||
|
|
||||||
image:
|
|
||||||
# size to which the images should be internally resized to reduce the memory footprint
|
|
||||||
resize_size: 500
|
|
||||||
# target size of the longer side of the image widget
|
|
||||||
widget_size: 150
|
|
||||||
|
|
||||||
classes:
|
|
||||||
# css classname of the window
|
|
||||||
window: window
|
|
||||||
# css classname of the card containing an image and a label
|
|
||||||
image_card: card
|
|
||||||
# css classname of the card containing an image and a label when the image is still being loaded
|
|
||||||
image_card_loading: card-loading
|
|
||||||
# css classname of the image inside the card
|
|
||||||
image: image
|
|
||||||
# css classname of the label inside the card
|
|
||||||
image_label: image-label
|
|
||||||
# css classname of the notebook containing all pages
|
|
||||||
notebook: notebook
|
|
||||||
# css classname of a label of the notebook
|
|
||||||
tab_label: tab-label
|
|
||||||
# css classname of a notebook page (e.g. windows container)
|
|
||||||
notebook_page: page
|
|
||||||
# css classname of the region selection button
|
|
||||||
region_button: region-button
|
|
||||||
# css classname of the button containing the session restore checkbox and label
|
|
||||||
restore_button: restore-button
|
|
||||||
|
|
||||||
windows:
|
|
||||||
# minimum amount of image cards per row on the windows page
|
|
||||||
min_per_row: 3
|
|
||||||
# maximum amount of image cards per row on the windows page
|
|
||||||
max_per_row: 999
|
|
||||||
# number of clicks needed to select a window
|
|
||||||
clicks: 1
|
|
||||||
# spacing in pixels between the window cards
|
|
||||||
spacing: 12
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
# number of clicks needed to select an output
|
|
||||||
clicks: 1
|
|
||||||
# spacing in pixels between the outputs in the layout
|
|
||||||
# note: the spacing is applied from both sides (the gap is `spacing * 2`)
|
|
||||||
spacing: 6
|
|
||||||
# show the label with the output name
|
|
||||||
show_label: false
|
|
||||||
# size the output cards respectively to their scaling
|
|
||||||
respect_output_scaling: true
|
|
||||||
|
|
||||||
region:
|
|
||||||
# command to run for region selection
|
|
||||||
# the output needs to be in the <output>@<x>,<y>,<w>,<h> (e.g. DP-3@2789,436,756,576) format
|
|
||||||
command: slurp -f '%o@%x,%y,%w,%h'
|
|
||||||
|
|
||||||
# hide the token restore checkbox and use the default value instead
|
|
||||||
hide_token_restore: true
|
|
||||||
# enable debug logs by default
|
|
||||||
debug: false
|
|
||||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
|||||||
[server]
|
|
||||||
show_percentage = true
|
|
||||||
max_volume = 100
|
|
||||||
style = "~/.config/swayosd/style.css"
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
@import "../nomarchy/current/theme/swayosd.css";
|
|
||||||
|
|
||||||
window {
|
|
||||||
border-radius: 0;
|
|
||||||
opacity: 0.97;
|
|
||||||
border: 2px solid @border-color;
|
|
||||||
|
|
||||||
background-color: @background-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-family: 'JetBrainsMono Nerd Font';
|
|
||||||
font-size: 11pt;
|
|
||||||
|
|
||||||
color: @label;
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
color: @image;
|
|
||||||
}
|
|
||||||
|
|
||||||
progressbar {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
progress {
|
|
||||||
background-color: @progress;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Nomarchy Battery Monitor Check
|
|
||||||
After=graphical-session.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=%h/.local/share/nomarchy/bin/nomarchy-battery-monitor
|
|
||||||
Environment=DISPLAY=:0
|
|
||||||
LogLevelMax=warning
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Nomarchy Battery Monitor Timer
|
|
||||||
Requires=nomarchy-battery-monitor.service
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnBootSec=1min
|
|
||||||
OnUnitActiveSec=30sec
|
|
||||||
AccuracySec=10sec
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
force_keyboard_focus = true # forces keyboard forcus to stay in Walker
|
|
||||||
selection_wrap = true # wrap list if at bottom or top
|
|
||||||
theme = "nomarchy-default" # theme to use
|
|
||||||
additional_theme_location = "~/.local/share/nomarchy/default/walker/themes/"
|
|
||||||
hide_action_hints = true # globally hide the action hints
|
|
||||||
|
|
||||||
[placeholders]
|
|
||||||
"default" = { input = " Search...", list = "No Results" } # placeholders for input and empty list, key is the providers name, so f.e. "desktopapplications" or "menus:other"
|
|
||||||
|
|
||||||
[keybinds]
|
|
||||||
quick_activate = []
|
|
||||||
|
|
||||||
[columns]
|
|
||||||
symbols = 1 # providers to be queried by default
|
|
||||||
|
|
||||||
[providers]
|
|
||||||
max_results = 256 # 256 should be enough for everyone
|
|
||||||
default = [
|
|
||||||
"desktopapplications",
|
|
||||||
"websearch",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = "/"
|
|
||||||
provider = "providerlist"
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = "."
|
|
||||||
provider = "files"
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = ":"
|
|
||||||
provider = "symbols"
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = "="
|
|
||||||
provider = "calc"
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = "@"
|
|
||||||
provider = "websearch"
|
|
||||||
|
|
||||||
[[providers.prefixes]]
|
|
||||||
prefix = "$"
|
|
||||||
provider = "clipboard"
|
|
||||||
|
|
||||||
[[emergencies]]
|
|
||||||
text = "Restart Walker"
|
|
||||||
command = "nomarchy-restart-walker"
|
|
||||||
@@ -1,268 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--The Xournal++ settings file. Do not edit this file! Most settings are available in the Settings dialog, the others are commented in this file, but handle with care!-->
|
|
||||||
<settings>
|
|
||||||
<property name="pressureSensitivity" value="true"/>
|
|
||||||
<property name="minimumPressure" value="0.05"/>
|
|
||||||
<property name="pressureMultiplier" value="1"/>
|
|
||||||
<property name="zoomGesturesEnabled" value="true"/>
|
|
||||||
<property name="selectedToolbar" value="Portrait"/>
|
|
||||||
<property name="lastSavePath" value="/home/dhh/Downloads"/>
|
|
||||||
<property name="lastOpenPath" value=""/>
|
|
||||||
<property name="lastImagePath" value="/home/dhh/Dropbox/Images"/>
|
|
||||||
<property name="edgePanSpeed" value="20"/>
|
|
||||||
<property name="edgePanMaxMult" value="5"/>
|
|
||||||
<property name="zoomStep" value="10"/>
|
|
||||||
<property name="zoomStepScroll" value="2"/>
|
|
||||||
<property name="displayDpi" value="72"/>
|
|
||||||
<property name="mainWndWidth" value="800"/>
|
|
||||||
<property name="mainWndHeight" value="600"/>
|
|
||||||
<property name="maximized" value="true"/>
|
|
||||||
<property name="showToolbar" value="true"/>
|
|
||||||
<property name="showSidebar" value="true"/>
|
|
||||||
<property name="sidebarWidth" value="150"/>
|
|
||||||
<property name="sidebarNumberingStyle" value="1"/>
|
|
||||||
<property name="sidebarOnRight" value="false"/>
|
|
||||||
<property name="scrollbarOnLeft" value="false"/>
|
|
||||||
<property name="menubarVisible" value="true"/>
|
|
||||||
<property name="filepathShownInTitlebar" value="false"/>
|
|
||||||
<property name="numColumns" value="1"/>
|
|
||||||
<property name="numRows" value="1"/>
|
|
||||||
<property name="viewFixedRows" value="false"/>
|
|
||||||
<property name="showPairedPages" value="false"/>
|
|
||||||
<property name="layoutVertical" value="false"/>
|
|
||||||
<property name="layoutRightToLeft" value="false"/>
|
|
||||||
<property name="layoutBottomToTop" value="false"/>
|
|
||||||
<property name="numPairsOffset" value="1"/>
|
|
||||||
<!--The icon theme, allowed values are "disabled", "onDrawOfLastPage", and "onScrollOfLastPage"-->
|
|
||||||
<property name="emptyLastPageAppend" value="disabled"/>
|
|
||||||
<property name="presentationMode" value="false"/>
|
|
||||||
<!--Which GUI elements are shown in default view mode, separated by a colon (,)-->
|
|
||||||
<property name="defaultViewModeAttributes" value="showMenubar,showToolbar,showSidebar"/>
|
|
||||||
<!--Which GUI elements are shown in fullscreen view mode, separated by a colon (,)-->
|
|
||||||
<property name="fullscreenViewModeAttributes" value="goFullscren,showToolbar,showSidebar"/>
|
|
||||||
<!--Which GUI elements are shown in presentation view mode, separated by a colon (,)-->
|
|
||||||
<property name="presentationViewModeAttributes" value="goFullscren,showToolbar"/>
|
|
||||||
<!--The cursor icon used with a stylus, allowed values are "none", "dot", "big", "arrow"-->
|
|
||||||
<property name="stylusCursorType" value="dot"/>
|
|
||||||
<!--The eraser cursor visibility used with a stylus, allowed values are "never", "always", "hover", "touch"-->
|
|
||||||
<property name="eraserVisibility" value="always"/>
|
|
||||||
<!--The icon theme, allowed values are "iconsColor", "iconsLucide"-->
|
|
||||||
<property name="iconTheme" value="iconsColor"/>
|
|
||||||
<!--Dark/light mode, allowed values are "useSystem", "forceLight", "forceDark"-->
|
|
||||||
<property name="themeVariant" value="forceDark"/>
|
|
||||||
<property name="highlightPosition" value="false"/>
|
|
||||||
<property name="cursorHighlightColor" value="2164260608"/>
|
|
||||||
<property name="cursorHighlightBorderColor" value="2147483903"/>
|
|
||||||
<property name="cursorHighlightRadius" value="30"/>
|
|
||||||
<property name="cursorHighlightBorderWidth" value="0"/>
|
|
||||||
<property name="useStockIcons" value="false"/>
|
|
||||||
<property name="disableScrollbarFadeout" value="false"/>
|
|
||||||
<property name="disableAudio" value="false"/>
|
|
||||||
<!--Hides scroolbars in the main window, allowed values: "none", "horizontal", "vertical", "both"-->
|
|
||||||
<property name="scrollbarHideType" value="none"/>
|
|
||||||
<property name="autoloadMostRecent" value="false"/>
|
|
||||||
<property name="autoloadPdfXoj" value="true"/>
|
|
||||||
<property name="defaultSaveName" value="%F-Note-%H-%M"/>
|
|
||||||
<property name="defaultPdfExportName" value="%{name}_annotated"/>
|
|
||||||
<property name="autosaveEnabled" value="true"/>
|
|
||||||
<property name="autosaveTimeout" value="3"/>
|
|
||||||
<property name="addHorizontalSpace" value="false"/>
|
|
||||||
<property name="addHorizontalSpaceAmount" value="150"/>
|
|
||||||
<property name="addVerticalSpace" value="false"/>
|
|
||||||
<property name="addVerticalSpaceAmount" value="150"/>
|
|
||||||
<property name="drawDirModsEnabled" value="false"/>
|
|
||||||
<property name="drawDirModsRadius" value="50"/>
|
|
||||||
<property name="snapRotation" value="true"/>
|
|
||||||
<property name="snapRotationTolerance" value="0.3"/>
|
|
||||||
<property name="snapGrid" value="true"/>
|
|
||||||
<property name="snapGridTolerance" value="0.5"/>
|
|
||||||
<property name="snapGridSize" value="14.17"/>
|
|
||||||
<property name="strokeRecognizerMinSize" value="40"/>
|
|
||||||
<property name="touchDrawing" value="false"/>
|
|
||||||
<property name="gtkTouchInertialScrolling" value="true"/>
|
|
||||||
<property name="pressureGuessing" value="false"/>
|
|
||||||
<property name="selectionBorderColor" value="4294901760"/>
|
|
||||||
<property name="backgroundColor" value="4292664021"/>
|
|
||||||
<property name="selectionMarkerColor" value="4285702095"/>
|
|
||||||
<property name="touchZoomStartThreshold" value="0"/>
|
|
||||||
<property name="pageRerenderThreshold" value="5"/>
|
|
||||||
<!--The count of rendered PDF pages which will be cached.-->
|
|
||||||
<property name="pdfPageCacheSize" value="10"/>
|
|
||||||
<property name="preloadPagesBefore" value="3"/>
|
|
||||||
<property name="preloadPagesAfter" value="5"/>
|
|
||||||
<property name="eagerPageCleanup" value="true"/>
|
|
||||||
<!--Config for new pages-->
|
|
||||||
<property name="pageTemplate" value="xoj/template copyLastPageSettings=true size=595.275591x841.889764 backgroundType=lined backgroundColor=#ffffff "/>
|
|
||||||
<property name="sizeUnit" value=""/>
|
|
||||||
<property name="audioFolder" value=""/>
|
|
||||||
<property name="audioInputDevice" value="-1"/>
|
|
||||||
<property name="audioOutputDevice" value="-1"/>
|
|
||||||
<property name="audioSampleRate" value="44100"/>
|
|
||||||
<property name="audioGain" value="1"/>
|
|
||||||
<property name="defaultSeekTime" value="5"/>
|
|
||||||
<property name="pluginEnabled" value=""/>
|
|
||||||
<property name="pluginDisabled" value=""/>
|
|
||||||
<property name="strokeFilterIgnoreTime" value="150"/>
|
|
||||||
<property name="strokeFilterIgnoreLength" value="1"/>
|
|
||||||
<property name="strokeFilterSuccessiveTime" value="500"/>
|
|
||||||
<property name="strokeFilterEnabled" value="false"/>
|
|
||||||
<property name="doActionOnStrokeFiltered" value="false"/>
|
|
||||||
<property name="trySelectOnStrokeFiltered" value="false"/>
|
|
||||||
<property name="snapRecognizedShapesEnabled" value="false"/>
|
|
||||||
<property name="restoreLineWidthEnabled" value="false"/>
|
|
||||||
<property name="numIgnoredStylusEvents" value="0"/>
|
|
||||||
<property name="inputSystemTPCButton" value="false"/>
|
|
||||||
<property name="inputSystemDrawOutsideWindow" value="true"/>
|
|
||||||
<property name="preferredLocale" value=""/>
|
|
||||||
<property name="stabilizerAveragingMethod" value="0"/>
|
|
||||||
<property name="stabilizerPreprocessor" value="0"/>
|
|
||||||
<property name="stabilizerBuffersize" value="20"/>
|
|
||||||
<property name="stabilizerSigma" value="0.5"/>
|
|
||||||
<property name="stabilizerDeadzoneRadius" value="1.3"/>
|
|
||||||
<property name="stabilizerDrag" value="0.4"/>
|
|
||||||
<property name="stabilizerMass" value="5"/>
|
|
||||||
<property name="stabilizerCuspDetection" value="true"/>
|
|
||||||
<property name="stabilizerFinalizeStroke" value="true"/>
|
|
||||||
<property name="latexSettings.autoCheckDependencies" value="true"/>
|
|
||||||
<property name="latexSettings.defaultText" value="x^2"/>
|
|
||||||
<property name="latexSettings.globalTemplatePath" value="/usr/share/xournalpp/resources/default_template.tex"/>
|
|
||||||
<property name="latexSettings.genCmd" value="pdflatex -halt-on-error -interaction=nonstopmode '{}'"/>
|
|
||||||
<property name="latexSettings.sourceViewThemeId" value=""/>
|
|
||||||
<property name="latexSettings.editorFont" value="Monospace 12"/>
|
|
||||||
<property name="latexSettings.useCustomEditorFont" value="false"/>
|
|
||||||
<property name="latexSettings.editorWordWrap" value="true"/>
|
|
||||||
<property name="latexSettings.sourceViewAutoIndent" value="true"/>
|
|
||||||
<property name="latexSettings.sourceViewSyntaxHighlight" value="true"/>
|
|
||||||
<property name="latexSettings.sourceViewShowLineNumbers" value="false"/>
|
|
||||||
<property name="font" font="Sans" size="12"/>
|
|
||||||
<data name="buttonConfig">
|
|
||||||
<data name="default">
|
|
||||||
<attribute name="color" type="hex" value="ff000000"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
<attribute name="size" type="string" value="thin"/>
|
|
||||||
<attribute name="tool" type="string" value="pen"/>
|
|
||||||
</data>
|
|
||||||
<data name="eraser">
|
|
||||||
<attribute name="eraserMode" type="string" value="none"/>
|
|
||||||
<attribute name="size" type="string" value="none"/>
|
|
||||||
<attribute name="tool" type="string" value="eraser"/>
|
|
||||||
</data>
|
|
||||||
<data name="middle">
|
|
||||||
<attribute name="tool" type="string" value="hand"/>
|
|
||||||
</data>
|
|
||||||
<data name="right">
|
|
||||||
<attribute name="tool" type="string" value="none"/>
|
|
||||||
</data>
|
|
||||||
<data name="stylus">
|
|
||||||
<attribute name="tool" type="string" value="none"/>
|
|
||||||
</data>
|
|
||||||
<data name="stylus2">
|
|
||||||
<attribute name="tool" type="string" value="none"/>
|
|
||||||
</data>
|
|
||||||
<data name="touch">
|
|
||||||
<attribute name="device" type="string" value=""/>
|
|
||||||
<attribute name="disableDrawing" type="boolean" value="false"/>
|
|
||||||
<attribute name="tool" type="string" value="none"/>
|
|
||||||
</data>
|
|
||||||
</data>
|
|
||||||
<data name="deviceClasses">
|
|
||||||
<data name="Wayland Finger Scrolling">
|
|
||||||
<attribute name="deviceClass" type="int" value="1"/>
|
|
||||||
<attribute name="deviceSource" type="int" value="6"/>
|
|
||||||
</data>
|
|
||||||
<data name="Wayland Pointer">
|
|
||||||
<attribute name="deviceClass" type="int" value="1"/>
|
|
||||||
<attribute name="deviceSource" type="int" value="0"/>
|
|
||||||
</data>
|
|
||||||
</data>
|
|
||||||
<data name="tools">
|
|
||||||
<attribute name="current" type="string" value="text"/>
|
|
||||||
<data name="drawArrow">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="drawCoordinateSystem">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="drawDoubleArrow">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="drawEllipse">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="drawRect">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="drawSpline">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="eraser">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
<attribute name="size" type="string" value="MEDIUM"/>
|
|
||||||
<attribute name="type" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="hand">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="highlighter">
|
|
||||||
<attribute name="color" type="hex" value="ffffff00"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
<attribute name="fill" type="int" value="0"/>
|
|
||||||
<attribute name="fillAlpha" type="int" value="128"/>
|
|
||||||
<attribute name="size" type="string" value="MEDIUM"/>
|
|
||||||
</data>
|
|
||||||
<data name="image">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="pen">
|
|
||||||
<attribute name="color" type="hex" value="ff3333cc"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
<attribute name="fill" type="int" value="0"/>
|
|
||||||
<attribute name="fillAlpha" type="int" value="128"/>
|
|
||||||
<attribute name="size" type="string" value="MEDIUM"/>
|
|
||||||
<attribute name="style" type="string" value="plain"/>
|
|
||||||
</data>
|
|
||||||
<data name="playObject">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectMultiLayerRect">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectMultiLayerRegion">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectObject">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectPdfTextLinear">
|
|
||||||
<attribute name="color" type="hex" value="ff000000"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectPdfTextRect">
|
|
||||||
<attribute name="color" type="hex" value="ff000000"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectRect">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="selectRegion">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="showFloatingToolbox">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="text">
|
|
||||||
<attribute name="color" type="hex" value="ff000000"/>
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
<data name="verticalSpace">
|
|
||||||
<attribute name="drawingType" type="string" value="default"/>
|
|
||||||
</data>
|
|
||||||
</data>
|
|
||||||
<data name="touch">
|
|
||||||
<attribute name="cmdDisable" type="string" value=""/>
|
|
||||||
<attribute name="cmdEnable" type="string" value=""/>
|
|
||||||
<attribute name="disableTouch" type="boolean" value="false"/>
|
|
||||||
<attribute name="method" type="string" value="auto"/>
|
|
||||||
<attribute name="timeout" type="int" value="1000"/>
|
|
||||||
</data>
|
|
||||||
</settings>
|
|
||||||
BIN
core/branding/Nomarchy.ttf
Normal file
BIN
core/branding/Nomarchy.ttf
Normal file
Binary file not shown.
16
core/branding/about.txt
Normal file
16
core/branding/about.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# About Nomarchy
|
||||||
|
|
||||||
|
Nomarchy is a highly curated, NixOS-based distribution designed for power users.
|
||||||
|
It features a customized Hyprland desktop environment with a declarative
|
||||||
|
theming engine and a suite of integrated utility scripts.
|
||||||
|
|
||||||
|
Built on a foundation of:
|
||||||
|
- NixOS (Linux)
|
||||||
|
- Hyprland (Window Manager)
|
||||||
|
- Waybar (Status Bar)
|
||||||
|
- Walker (Application Launcher & Menu)
|
||||||
|
- Stylix (Theming Engine)
|
||||||
|
|
||||||
|
Version: 2026.05.04
|
||||||
|
Docs: https://github.com/nomarchy/nomarchy/docs
|
||||||
|
Manual: nomarchy-manual (Command)
|
||||||
BIN
core/branding/icon.png
Normal file
BIN
core/branding/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
56
core/branding/icon.svg
Normal file
56
core/branding/icon.svg
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="210mm"
|
||||||
|
height="297mm"
|
||||||
|
viewBox="0 0 210 297"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||||
|
sodipodi:docname="icon.svg"
|
||||||
|
inkscape:export-filename="logo.svg"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="0.82803284"
|
||||||
|
inkscape:cx="215.57116"
|
||||||
|
inkscape:cy="452.27675"
|
||||||
|
inkscape:window-width="1025"
|
||||||
|
inkscape:window-height="1012"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="layer1" /><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"><g
|
||||||
|
id="g4"
|
||||||
|
transform="translate(3.1953242,-22.686801)"
|
||||||
|
style="fill:#000088;fill-opacity:1"><path
|
||||||
|
style="fill:#000088;stroke-width:0.264583;fill-opacity:1"
|
||||||
|
d="M 25.136891,85.823024 25.557592,210.77125 88.452409,174.38061 67.417351,160.49747 57.110174,166.38729 V 105.80633 Z"
|
||||||
|
id="path1" /><path
|
||||||
|
style="fill:#000088;stroke-width:0.264583;fill-opacity:1"
|
||||||
|
d="M 67.728991,112.41131 182.54178,185.60757 153.16137,202.85259 67.830432,148.17947 Z"
|
||||||
|
id="path2" /><path
|
||||||
|
style="fill:#000088;stroke-width:0.264583;fill-opacity:1"
|
||||||
|
d="M 139.74857,145.88014 140.00405,110.4959 54.800856,56.333749 25.675926,73.32329 Z"
|
||||||
|
id="path3" /><path
|
||||||
|
style="fill:#000088;stroke-width:0.264583;fill-opacity:1"
|
||||||
|
d="M 182.2863,172.70573 V 48.286069 l -62.59305,36.406166 20.82177,13.668277 10.21927,-5.74834 0.12774,60.165978 z"
|
||||||
|
id="path4" /></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.2 KiB |
34
core/branding/icon.txt
Normal file
34
core/branding/icon.txt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
${2},,,
|
||||||
|
${1},, ${2},,,,,,
|
||||||
|
${1},,,,,,,, ${2},,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,, ${2}.,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,,,,,. ${2},,,,,,,,,,,,,,,,,,,
|
||||||
|
${1}.,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1}, ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,, ${1},,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,, ${1}.,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,. ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,, ${2}.,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,, ${1}.,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,. ${2},,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},, ${1},,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,, ${1},,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,, ${1},,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,, ${1},,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,, ${1},,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,, ${1},,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,, ${1},,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,, ${1},, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,, ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,, ${2}.,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,, ${2},,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,,,,, ${1},,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,,,,, ${1}.,,,,,,,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,,,,, ${1},,,,,,,,,,,,,,
|
||||||
|
${1},,,,,,,,,, ${1},,,,,,,,,.
|
||||||
|
${1},,,,,, ${1},,
|
||||||
|
${1},,,,
|
||||||
BIN
core/branding/logo.png
Normal file
BIN
core/branding/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
64
core/branding/logo.svg
Normal file
64
core/branding/logo.svg
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="157.40488mm"
|
||||||
|
height="162.48518mm"
|
||||||
|
viewBox="0 0 157.40488 162.48518"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||||
|
sodipodi:docname="icon.svg"
|
||||||
|
inkscape:export-filename="logo.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="0.82803284"
|
||||||
|
inkscape:cx="216.175"
|
||||||
|
inkscape:cy="452.27675"
|
||||||
|
inkscape:window-width="1914"
|
||||||
|
inkscape:window-height="1012"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="layer1"><inkscape:page
|
||||||
|
x="0"
|
||||||
|
y="-1.1741086e-21"
|
||||||
|
width="157.40488"
|
||||||
|
height="162.48518"
|
||||||
|
id="page2"
|
||||||
|
margin="0"
|
||||||
|
bleed="0" /></sodipodi:namedview><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-28.332214,-25.599269)"><g
|
||||||
|
id="g4"
|
||||||
|
transform="translate(3.1953242,-22.686801)"
|
||||||
|
style="fill:#000088;fill-opacity:1"><path
|
||||||
|
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
d="M 25.136891,85.823024 25.557592,210.77125 88.452409,174.38061 67.417351,160.49747 57.110174,166.38729 V 105.80633 Z"
|
||||||
|
id="path1" /><path
|
||||||
|
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
d="M 67.728991,112.41131 182.54178,185.60757 153.16137,202.85259 67.830432,148.17947 Z"
|
||||||
|
id="path2" /><path
|
||||||
|
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
d="M 139.74857,145.88014 140.00405,110.4959 54.800856,56.333749 25.675926,73.32329 Z"
|
||||||
|
id="path3" /><path
|
||||||
|
style="fill:#000088;fill-opacity:1;stroke-width:0.264583"
|
||||||
|
d="M 182.2863,172.70573 V 48.286069 l -62.59305,36.406166 20.82177,13.668277 10.21927,-5.74834 0.12774,60.165978 z"
|
||||||
|
id="path4" /></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
34
core/branding/logo.txt
Normal file
34
core/branding/logo.txt
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
,,,
|
||||||
|
,, ,,,,,,
|
||||||
|
,,,,,,,, ,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,, .,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,,,,,. ,,,,,,,,,,,,,,,,,,,
|
||||||
|
.,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,, ,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,, .,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,. ,,,,,,,,,,,,,,,,,,,,,,,,, ,,, .,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,, .,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,. ,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,, ,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,, ,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,, ,,,,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,, ,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,, ,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,, ,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,, .,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,, ,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,,,,, .,,,,,,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,,,,, ,,,,,,,,,,,,,,
|
||||||
|
,,,,,,,,,, ,,,,,,,,,.
|
||||||
|
,,,,,, ,,
|
||||||
|
,,,,
|
||||||
11
core/branding/screensaver.txt
Normal file
11
core/branding/screensaver.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Nomarchy Screensaver Configuration
|
||||||
|
|
||||||
|
Nomarchy uses hyprlock for locking and hypridle for idle management.
|
||||||
|
To configure the screensaver/lock screen visuals, edit:
|
||||||
|
~/.config/hypr/hyprlock.conf
|
||||||
|
|
||||||
|
To configure idle timeouts and actions, edit:
|
||||||
|
~/.config/hypr/hypridle.conf
|
||||||
|
|
||||||
|
You can also toggle the screensaver/idle management via the Nomarchy Menu:
|
||||||
|
Trigger > Toggle > Idle Lock
|
||||||
5
core/default.nix
Normal file
5
core/default.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./system ];
|
||||||
|
}
|
||||||
39
core/home/bash.nix
Normal file
39
core/home/bash.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
bashrcExtra = ''
|
||||||
|
if [[ -f ~/.config/nomarchy/default/bash/rc ]]; then
|
||||||
|
source ~/.config/nomarchy/default/bash/rc
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellAliases = lib.mkDefault {
|
||||||
|
# File system
|
||||||
|
lsa = "ls -a";
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
"...." = "cd ../../..";
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
c = "opencode";
|
||||||
|
d = "docker";
|
||||||
|
r = "rails";
|
||||||
|
t = "tmux attach || tmux new -s Work";
|
||||||
|
|
||||||
|
# Git
|
||||||
|
g = "git";
|
||||||
|
gcm = "git commit -m";
|
||||||
|
gcam = "git commit -a -m";
|
||||||
|
gcad = "git commit -a --amend";
|
||||||
|
|
||||||
|
# NixOS commands
|
||||||
|
sys-update = "nomarchy-sys-update";
|
||||||
|
env-update = "nomarchy-env-update";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
--ozone-platform=wayland
|
--ozone-platform=wayland
|
||||||
--ozone-platform-hint=wayland
|
--ozone-platform-hint=wayland
|
||||||
--enable-features=TouchpadOverscrollHistoryNavigation
|
--enable-features=TouchpadOverscrollHistoryNavigation
|
||||||
--load-extension=~/.local/share/nomarchy/default/chromium/extensions/copy-url
|
--load-extension=~/.config/nomarchy/default/chromium/extensions/copy-url
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
--ozone-platform=wayland
|
--ozone-platform=wayland
|
||||||
--ozone-platform-hint=wayland
|
--ozone-platform-hint=wayland
|
||||||
--enable-features=TouchpadOverscrollHistoryNavigation
|
--enable-features=TouchpadOverscrollHistoryNavigation
|
||||||
--load-extension=~/.local/share/nomarchy/default/chromium/extensions/copy-url
|
--load-extension=~/.config/nomarchy/default/chromium/extensions/copy-url
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||||
"logo": {
|
"logo": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": "~/.config/nomarchy/branding/about.txt",
|
"source": "~/.config/nomarchy/branding/icon.txt",
|
||||||
"color": { "1": "green" },
|
"color": { "1": "green", "2": "blue" },
|
||||||
"padding": {
|
"padding": {
|
||||||
"top": 2,
|
"top": 2,
|
||||||
"right": 6,
|
"right": 6,
|
||||||
@@ -63,22 +63,9 @@
|
|||||||
"format": "\u001b[90m┌──────────────────────Software──────────────────────┐"
|
"format": "\u001b[90m┌──────────────────────Software──────────────────────┐"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "command",
|
"type": "os",
|
||||||
"key": "\ue900 OS",
|
"key": "\ue900 OS",
|
||||||
"keyColor": "blue",
|
"keyColor": "blue"
|
||||||
"text": "version=$(nomarchy-version); echo \"Nomarchy $version\""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"key": "│ ├",
|
|
||||||
"keyColor": "blue",
|
|
||||||
"text": "branch=$(nomarchy-version-branch); echo \"$branch\""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"key": "│ ├",
|
|
||||||
"keyColor": "blue",
|
|
||||||
"text": "channel=$(nomarchy-version-channel); echo \"$channel\""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "kernel",
|
"type": "kernel",
|
||||||
@@ -114,7 +101,7 @@
|
|||||||
"type": "command",
|
"type": "command",
|
||||||
"key": "│ ├",
|
"key": "│ ├",
|
||||||
"keyColor": "blue",
|
"keyColor": "blue",
|
||||||
"text": "theme=$(nomarchy-theme-current); echo -e \"$theme \\e[38m●\\e[37m●\\e[36m●\\e[35m●\\e[34m●\\e[33m●\\e[32m●\\e[31m●\""
|
"text": "theme=$(cat ~/.config/nomarchy/current/theme.name); echo -e \"$theme \\e[38m●\\e[37m●\\e[36m●\\e[35m●\\e[34m●\\e[33m●\\e[32m●\\e[31m●\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "terminalfont",
|
"type": "terminalfont",
|
||||||
@@ -141,12 +128,6 @@
|
|||||||
"key": " Uptime",
|
"key": " Uptime",
|
||||||
"keyColor": "magenta"
|
"keyColor": "magenta"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "command",
|
|
||||||
"key": " Update",
|
|
||||||
"keyColor": "magenta",
|
|
||||||
"text": "updated=$(nomarchy-version-pkgs); echo \"$updated\""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "custom",
|
"type": "custom",
|
||||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||||
84
core/home/config/nautilus-python/extensions/localsend.py
Normal file
84
core/home/config/nautilus-python/extensions/localsend.py
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from gi import require_version
|
||||||
|
|
||||||
|
require_version("Nautilus", "4.1")
|
||||||
|
|
||||||
|
from gi.repository import GObject, Gio, Nautilus
|
||||||
|
|
||||||
|
|
||||||
|
class SendViaLocalSendAction(GObject.GObject, Nautilus.MenuProvider):
|
||||||
|
def _launch_localsend(self, paths):
|
||||||
|
command = self._resolve_command()
|
||||||
|
if not command:
|
||||||
|
return
|
||||||
|
|
||||||
|
if command[-1] == "@@":
|
||||||
|
command = command + paths + ["@@"]
|
||||||
|
else:
|
||||||
|
command = command + paths
|
||||||
|
|
||||||
|
Gio.Subprocess.new(command, Gio.SubprocessFlags.NONE)
|
||||||
|
|
||||||
|
def _resolve_command(self):
|
||||||
|
localsend = shutil.which("localsend")
|
||||||
|
if localsend:
|
||||||
|
return [localsend, "--headless", "send"]
|
||||||
|
|
||||||
|
flatpak = shutil.which("flatpak")
|
||||||
|
if flatpak and self._has_flatpak_app(flatpak, "org.localsend.localsend_app"):
|
||||||
|
return [
|
||||||
|
flatpak,
|
||||||
|
"run",
|
||||||
|
"--file-forwarding",
|
||||||
|
"org.localsend.localsend_app",
|
||||||
|
"@@",
|
||||||
|
]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def _has_flatpak_app(self, flatpak, app_id):
|
||||||
|
process = Gio.Subprocess.new(
|
||||||
|
[flatpak, "info", app_id],
|
||||||
|
Gio.SubprocessFlags.STDOUT_SILENCE | Gio.SubprocessFlags.STDERR_SILENCE,
|
||||||
|
)
|
||||||
|
return process.wait_check()
|
||||||
|
|
||||||
|
def _selected_paths(self, files):
|
||||||
|
paths = []
|
||||||
|
|
||||||
|
for file in files:
|
||||||
|
location = file.get_location()
|
||||||
|
if not location:
|
||||||
|
continue
|
||||||
|
|
||||||
|
path = location.get_path()
|
||||||
|
if path and path not in paths:
|
||||||
|
paths.append(path)
|
||||||
|
|
||||||
|
return paths
|
||||||
|
|
||||||
|
def _make_item(self, paths):
|
||||||
|
label = (
|
||||||
|
"Send via LocalSend" if len(paths) == 1 else "Send selected via LocalSend"
|
||||||
|
)
|
||||||
|
item = Nautilus.MenuItem(
|
||||||
|
name="LocalSendNautilus::send_via_localsend",
|
||||||
|
label=label,
|
||||||
|
icon="localsend",
|
||||||
|
)
|
||||||
|
item.connect("activate", self._on_activate, paths)
|
||||||
|
return item
|
||||||
|
|
||||||
|
def _on_activate(self, _menu, paths):
|
||||||
|
self._launch_localsend(paths)
|
||||||
|
|
||||||
|
def get_file_items(self, *args):
|
||||||
|
files = args[0] if len(args) == 1 else args[1]
|
||||||
|
paths = self._selected_paths(files)
|
||||||
|
|
||||||
|
if not paths or not self._resolve_command():
|
||||||
|
return []
|
||||||
|
|
||||||
|
return [self._make_item(paths)]
|
||||||
408
core/home/config/nomarchy-skill/SKILL.md
Normal file
408
core/home/config/nomarchy-skill/SKILL.md
Normal file
@@ -0,0 +1,408 @@
|
|||||||
|
---
|
||||||
|
name: nomarchy
|
||||||
|
description: >
|
||||||
|
REQUIRED for end-user customization of Linux desktop, window manager, or system config.
|
||||||
|
Use when editing ~/.config/hypr/, ~/.config/waybar/, ~/.config/walker/,
|
||||||
|
~/.config/alacritty/, ~/.config/kitty/, ~/.config/ghostty/, ~/.config/mako/,
|
||||||
|
or ~/.config/nomarchy/. Triggers: Hyprland, window rules, animations, keybindings,
|
||||||
|
monitors, gaps, borders, blur, opacity, waybar, walker, terminal config, themes,
|
||||||
|
wallpaper, night light, idle, lock screen, screenshots, layer rules, workspace
|
||||||
|
settings, display config, and user-facing nomarchy commands. Excludes Nomarchy
|
||||||
|
source development in ~/.local/share/nomarchy/ and repo-internal workflows.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Nomarchy Skill
|
||||||
|
|
||||||
|
Manage [Nomarchy](https://nomarchy.org/) Linux systems - a beautiful, modern, opinionated Arch Linux distribution with Hyprland.
|
||||||
|
|
||||||
|
This skill is for end-user customization on installed systems.
|
||||||
|
It is not for contributing to Nomarchy source code.
|
||||||
|
|
||||||
|
## When This Skill MUST Be Used
|
||||||
|
|
||||||
|
**ALWAYS invoke this skill for end-user requests involving ANY of these:**
|
||||||
|
|
||||||
|
- Editing ANY file in `~/.config/hypr/` (window rules, animations, keybindings, monitors, etc.)
|
||||||
|
- Editing ANY file in `~/.config/waybar/`, `~/.config/walker/`, `~/.config/mako/`
|
||||||
|
- Editing terminal configs (alacritty, kitty, ghostty)
|
||||||
|
- Editing ANY file in `~/.config/nomarchy/`
|
||||||
|
- Window behavior, animations, opacity, blur, gaps, borders
|
||||||
|
- Layer rules, workspace settings, display/monitor configuration
|
||||||
|
- Themes, wallpapers, fonts, appearance changes
|
||||||
|
- User-facing `nomarchy-*` commands (`nomarchy-theme-*`, `nomarchy-refresh-*`, `nomarchy-restart-*`, etc.)
|
||||||
|
- Screenshots, screen recording, night light, idle behavior, lock screen
|
||||||
|
|
||||||
|
**If you're about to edit a config file in ~/.config/ on this system, STOP and use this skill first.**
|
||||||
|
|
||||||
|
**Do NOT use this skill for Nomarchy development tasks** — editing files in `~/.local/share/nomarchy/` or modifying repo internals.
|
||||||
|
|
||||||
|
## Critical Safety Rules
|
||||||
|
|
||||||
|
**For end-user customization tasks, NEVER modify anything in `~/.local/share/nomarchy/`** - but READING is safe and encouraged.
|
||||||
|
|
||||||
|
This directory contains Nomarchy's source files managed by git. Any changes will be:
|
||||||
|
- Lost on next `nomarchy-update`
|
||||||
|
- Cause conflicts with upstream
|
||||||
|
- Break the system's update mechanism
|
||||||
|
|
||||||
|
```
|
||||||
|
~/.local/share/nomarchy/ # READ-ONLY - NEVER EDIT (reading is OK)
|
||||||
|
├── bin/ # Source scripts (symlinked to PATH)
|
||||||
|
├── config/ # Default config templates
|
||||||
|
├── themes/ # Stock themes
|
||||||
|
├── default/ # System defaults
|
||||||
|
├── migrations/ # Update migrations
|
||||||
|
└── install/ # Installation scripts
|
||||||
|
```
|
||||||
|
|
||||||
|
**Reading `~/.local/share/nomarchy/` is SAFE and useful** - do it freely to:
|
||||||
|
- Understand how nomarchy commands work: `cat $(which nomarchy-theme-set)`
|
||||||
|
- See default configs before customizing: `cat ~/.local/share/nomarchy/config/waybar/config.jsonc`
|
||||||
|
- Check stock theme files to copy for customization
|
||||||
|
- Reference default hyprland settings: `cat ~/.config/nomarchy/default/hypr/*`
|
||||||
|
|
||||||
|
**Always use these safe locations instead:**
|
||||||
|
- `~/.config/` - User configuration (safe to edit)
|
||||||
|
- `~/.config/nomarchy/themes/<custom-name>/` - Custom themes (must be real directories)
|
||||||
|
- `~/.config/nomarchy/hooks/` - Custom automation hooks
|
||||||
|
|
||||||
|
If the request is to develop Nomarchy itself, this skill is out of scope. Follow repository development instructions instead of this skill.
|
||||||
|
|
||||||
|
## System Architecture
|
||||||
|
|
||||||
|
Nomarchy is built on:
|
||||||
|
|
||||||
|
| Component | Purpose | Config Location |
|
||||||
|
|-----------|---------|-----------------|
|
||||||
|
| **Arch Linux** | Base OS | `/etc/`, `~/.config/` |
|
||||||
|
| **Hyprland** | Wayland compositor/WM | `~/.config/hypr/` |
|
||||||
|
| **Waybar** | Status bar | `~/.config/waybar/` |
|
||||||
|
| **Walker** | App launcher | `~/.config/walker/` |
|
||||||
|
| **Alacritty/Kitty/Ghostty** | Terminals | `~/.config/<terminal>/` |
|
||||||
|
| **Mako** | Notifications | `~/.config/mako/` |
|
||||||
|
| **SwayOSD** | On-screen display | `~/.config/swayosd/` |
|
||||||
|
|
||||||
|
## Command Discovery
|
||||||
|
|
||||||
|
Nomarchy provides ~145 commands following `nomarchy-<category>-<action>` pattern.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# List all nomarchy commands
|
||||||
|
compgen -c | grep -E '^nomarchy-' | sort -u
|
||||||
|
|
||||||
|
# Find commands by category
|
||||||
|
compgen -c | grep -E '^nomarchy-theme'
|
||||||
|
compgen -c | grep -E '^nomarchy-restart'
|
||||||
|
|
||||||
|
# Read a command's source to understand it
|
||||||
|
cat $(which nomarchy-theme-set)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Command Categories
|
||||||
|
|
||||||
|
| Prefix | Purpose | Example |
|
||||||
|
|--------|---------|---------|
|
||||||
|
| `nomarchy-refresh-*` | Reset config to defaults (backs up first) | `nomarchy-refresh-waybar` |
|
||||||
|
| `nomarchy-restart-*` | Restart a service/app | `nomarchy-restart-waybar` |
|
||||||
|
| `nomarchy-toggle-*` | Toggle feature on/off | `nomarchy-toggle-nightlight` |
|
||||||
|
| `nomarchy-theme-*` | Theme management | `nomarchy-theme-set <name>` |
|
||||||
|
| `nomarchy-install-*` | Install optional software | `nomarchy-install-docker-dbs` |
|
||||||
|
| `nomarchy-launch-*` | Launch apps | `nomarchy-launch-browser` |
|
||||||
|
| `nomarchy-cmd-*` | System commands | `nomarchy-cmd-screenshot` |
|
||||||
|
| `nomarchy-pkg-*` | Package management | `nomarchy-pkg-install <pkg>` |
|
||||||
|
| `nomarchy-setup-*` | Initial setup tasks | `nomarchy-setup-fingerprint` |
|
||||||
|
| `nomarchy-update-*` | System updates | `nomarchy-update` |
|
||||||
|
|
||||||
|
## Configuration Locations
|
||||||
|
|
||||||
|
### Hyprland (Window Manager)
|
||||||
|
|
||||||
|
```
|
||||||
|
~/.config/hypr/
|
||||||
|
├── hyprland.conf # Main config (sources others)
|
||||||
|
├── bindings.conf # Keybindings
|
||||||
|
├── monitors.conf # Display configuration
|
||||||
|
├── input.conf # Keyboard/mouse settings
|
||||||
|
├── looknfeel.conf # Appearance (gaps, borders, animations)
|
||||||
|
├── envs.conf # Environment variables
|
||||||
|
├── autostart.conf # Startup applications
|
||||||
|
├── hypridle.conf # Idle behavior (screen off, lock, suspend)
|
||||||
|
├── hyprlock.conf # Lock screen appearance
|
||||||
|
└── hyprsunset.conf # Night light / blue light filter
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key behaviors:**
|
||||||
|
- Hyprland auto-reloads on config save (no restart needed for most changes)
|
||||||
|
- Use `hyprctl reload` to force reload
|
||||||
|
- Use `nomarchy-refresh-hyprland` to reset to defaults
|
||||||
|
|
||||||
|
### Waybar (Status Bar)
|
||||||
|
|
||||||
|
```
|
||||||
|
~/.config/waybar/
|
||||||
|
├── config.jsonc # Bar layout and modules (JSONC format)
|
||||||
|
└── style.css # Styling
|
||||||
|
```
|
||||||
|
|
||||||
|
**Waybar does NOT auto-reload.** You MUST run `nomarchy-restart-waybar` after any config changes.
|
||||||
|
|
||||||
|
**Commands:** `nomarchy-restart-waybar`, `nomarchy-refresh-waybar`, `nomarchy-toggle-waybar`
|
||||||
|
|
||||||
|
### Terminals
|
||||||
|
|
||||||
|
```
|
||||||
|
~/.config/alacritty/alacritty.toml
|
||||||
|
~/.config/kitty/kitty.conf
|
||||||
|
~/.config/ghostty/config
|
||||||
|
```
|
||||||
|
|
||||||
|
**Command:** `nomarchy-restart-terminal`
|
||||||
|
|
||||||
|
### Other Configs
|
||||||
|
|
||||||
|
| App | Location |
|
||||||
|
|-----|----------|
|
||||||
|
| btop | `~/.config/btop/btop.conf` |
|
||||||
|
| fastfetch | `~/.config/fastfetch/config.jsonc` |
|
||||||
|
| lazygit | `~/.config/lazygit/config.yml` |
|
||||||
|
| starship | `~/.config/starship.toml` |
|
||||||
|
| git | `~/.config/git/config` |
|
||||||
|
| walker | `~/.config/walker/config.toml` |
|
||||||
|
|
||||||
|
## Safe Customization Patterns
|
||||||
|
|
||||||
|
### Pattern 1: Edit User Config Directly
|
||||||
|
|
||||||
|
For simple changes, edit files in `~/.config/`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Read current config
|
||||||
|
cat ~/.config/hypr/bindings.conf
|
||||||
|
|
||||||
|
# 2. Backup before changes
|
||||||
|
cp ~/.config/hypr/bindings.conf ~/.config/hypr/bindings.conf.bak.$(date +%s)
|
||||||
|
|
||||||
|
# 3. Make changes with Edit tool
|
||||||
|
|
||||||
|
# 4. Apply changes
|
||||||
|
# - Hyprland: auto-reloads on save (no restart needed)
|
||||||
|
# - Waybar: MUST restart with nomarchy-restart-waybar
|
||||||
|
# - Walker: MUST restart with nomarchy-restart-walker
|
||||||
|
# - Terminals: MUST restart with nomarchy-restart-terminal
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pattern 2: Make a new theme
|
||||||
|
|
||||||
|
1. Create a directory under ~/.config/nomarchy/themes.
|
||||||
|
2. See how an existing theme is done via ~/.local/share/nomarchy/themes/catppuccin.
|
||||||
|
3. Download a matching background (or several) from the internet and put them in ~/.config/nomarchy/themes/[name-of-new-theme]
|
||||||
|
4. When done with the theme, run nomarchy-theme-set "Name of new theme"
|
||||||
|
|
||||||
|
### Pattern 3: Use Hooks for Automation
|
||||||
|
|
||||||
|
Create scripts in `~/.config/nomarchy/hooks/` to run automatically on events:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Available hooks (see samples in ~/.config/nomarchy/hooks/):
|
||||||
|
~/.config/nomarchy/hooks/
|
||||||
|
├── theme-set # Runs after theme change (receives theme name as $1)
|
||||||
|
├── font-set # Runs after font change
|
||||||
|
└── post-update # Runs after nomarchy-update
|
||||||
|
```
|
||||||
|
|
||||||
|
Example hook (`~/.config/nomarchy/hooks/theme-set`):
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
THEME_NAME=$1
|
||||||
|
echo "Theme changed to: $THEME_NAME"
|
||||||
|
# Add custom actions here
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pattern 4: Reset to Defaults -- ALWAYS SEEK USER CONFIRMATION BEFORE RUNNING
|
||||||
|
|
||||||
|
When customizations go wrong:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Reset specific config (creates backup automatically)
|
||||||
|
nomarchy-refresh-waybar
|
||||||
|
nomarchy-refresh-hyprland
|
||||||
|
|
||||||
|
# The refresh command:
|
||||||
|
# 1. Backs up current config with timestamp
|
||||||
|
# 2. Copies default from ~/.local/share/nomarchy/config/
|
||||||
|
# 3. Restarts the component
|
||||||
|
```
|
||||||
|
|
||||||
|
## Common Tasks
|
||||||
|
|
||||||
|
### Themes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-theme-list # Show available themes
|
||||||
|
nomarchy-theme-current # Show current theme
|
||||||
|
nomarchy-theme-set <name> # Apply theme (use "Tokyo Night" not "tokyo-night")
|
||||||
|
nomarchy-theme-next # Cycle to next theme
|
||||||
|
nomarchy-theme-bg-next # Cycle wallpaper
|
||||||
|
nomarchy-theme-install <url> # Install from git repo
|
||||||
|
nomarchy-theme-remove <name> # Remove an installed extra theme
|
||||||
|
nomarchy-theme-refresh # Re-apply current theme from templates
|
||||||
|
nomarchy-theme-bg-install # Open backgrounds dir to drop in custom images
|
||||||
|
```
|
||||||
|
|
||||||
|
### Keybindings
|
||||||
|
|
||||||
|
Edit `~/.config/hypr/bindings.conf`. Format:
|
||||||
|
```
|
||||||
|
bind = SUPER, Return, exec, xdg-terminal-exec
|
||||||
|
bind = SUPER, Q, killactive
|
||||||
|
bind = SUPER SHIFT, E, exit
|
||||||
|
```
|
||||||
|
|
||||||
|
View current bindings: `nomarchy-menu-keybindings --print`
|
||||||
|
|
||||||
|
**IMPORTANT: When re-binding an existing key:**
|
||||||
|
|
||||||
|
1. First check existing bindings: `nomarchy-menu-keybindings --print`
|
||||||
|
2. If the key is already bound, you MUST add an `unbind` directive BEFORE your new `bind`
|
||||||
|
3. Inform the user what the key was previously bound to
|
||||||
|
|
||||||
|
Example - rebinding SUPER+F (which is bound to fullscreen by default):
|
||||||
|
```
|
||||||
|
# Unbind existing SUPER+F (was: fullscreen)
|
||||||
|
unbind = SUPER, F
|
||||||
|
# New binding for file manager
|
||||||
|
bind = SUPER, F, exec, nautilus
|
||||||
|
```
|
||||||
|
|
||||||
|
Always tell the user: "Note: SUPER+F was previously bound to fullscreen. I've added an unbind directive to override it."
|
||||||
|
|
||||||
|
### Display/Monitors
|
||||||
|
|
||||||
|
Edit `~/.config/hypr/monitors.conf`. Format:
|
||||||
|
```
|
||||||
|
monitor = eDP-1, 1920x1080@60, 0x0, 1
|
||||||
|
monitor = HDMI-A-1, 2560x1440@144, 1920x0, 1
|
||||||
|
```
|
||||||
|
|
||||||
|
List monitors: `hyprctl monitors`
|
||||||
|
|
||||||
|
### Window Rules
|
||||||
|
|
||||||
|
**CRITICAL: Hyprland window rules syntax changes frequently between versions.**
|
||||||
|
|
||||||
|
Before writing ANY window rules, you MUST fetch the current documentation from the official Hyprland wiki:
|
||||||
|
- https://github.com/hyprwm/hyprland-wiki/blob/main/content/Configuring/Window-Rules.md
|
||||||
|
|
||||||
|
DO NOT rely on cached or memorized window rule syntax. The format has changed multiple times and using outdated syntax will cause errors or unexpected behavior.
|
||||||
|
|
||||||
|
Window rules go in `~/.config/hypr/hyprland.conf` or a sourced file. Always verify the current syntax from the wiki first.
|
||||||
|
|
||||||
|
### Fonts
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-font-list # Available fonts
|
||||||
|
nomarchy-font-current # Current font
|
||||||
|
nomarchy-font-set <name> # Change font
|
||||||
|
```
|
||||||
|
|
||||||
|
### System
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-update # Full system update
|
||||||
|
nomarchy-version # Show Nomarchy version
|
||||||
|
nomarchy-debug --no-sudo --print # Debug info (ALWAYS use these flags)
|
||||||
|
nomarchy-lock-screen # Lock screen
|
||||||
|
nomarchy-system-shutdown # Shutdown
|
||||||
|
nomarchy-system-reboot # Reboot
|
||||||
|
nomarchy-sudo-passwordless-toggle # Toggle 15-min passwordless sudo
|
||||||
|
nomarchy-sudo-reset # Clear sudo lockout / faillock
|
||||||
|
nomarchy-restart-trackpad # Reload intel_quicki2c (fixes dead THC trackpad)
|
||||||
|
```
|
||||||
|
|
||||||
|
**IMPORTANT:** Always run `nomarchy-debug` with `--no-sudo --print` flags to avoid interactive sudo prompts that will hang the terminal.
|
||||||
|
|
||||||
|
### Custom App Launchers
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-webapp-install # Add a web app launcher (interactive)
|
||||||
|
nomarchy-webapp-remove [name...] # Remove web apps (interactive if no name)
|
||||||
|
nomarchy-webapp-remove-all # Bulk-remove every web app
|
||||||
|
nomarchy-tui-install # Add a TUI launcher for a terminal program
|
||||||
|
nomarchy-tui-remove [name...] # Remove TUI launchers
|
||||||
|
nomarchy-tui-remove-all # Bulk-remove every TUI launcher
|
||||||
|
```
|
||||||
|
|
||||||
|
Both families write `.desktop` files into `~/.local/share/applications/` so they appear in the app launcher (walker / rofi).
|
||||||
|
|
||||||
|
### Voice dictation (Voxtype)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-voxtype-install # Install Voxtype + AI model (~150MB)
|
||||||
|
nomarchy-voxtype-remove # Uninstall Voxtype
|
||||||
|
nomarchy-voxtype-status # Running state (also shown in waybar)
|
||||||
|
```
|
||||||
|
|
||||||
|
Toggle dictation with `SUPER+CTRL+X` after install.
|
||||||
|
|
||||||
|
### Virtualization
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nomarchy-windows-vm install # Provision a Windows VM via docker-compose
|
||||||
|
nomarchy-windows-vm launch # Connect to the VM (auto-stop on disconnect)
|
||||||
|
nomarchy-windows-vm launch -k # Connect, keep VM running after disconnect
|
||||||
|
nomarchy-windows-vm stop # Shut the VM down
|
||||||
|
nomarchy-windows-vm status # Show current state
|
||||||
|
```
|
||||||
|
|
||||||
|
Requires KVM (`/dev/kvm`) and Docker (enable via `nomarchy.system.virtualization.docker`).
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Get debug information (ALWAYS use these flags to avoid interactive prompts)
|
||||||
|
nomarchy-debug --no-sudo --print
|
||||||
|
|
||||||
|
# Upload logs for support
|
||||||
|
nomarchy-upload-log
|
||||||
|
|
||||||
|
# Reset specific config to defaults
|
||||||
|
# Examples: nomarchy-refresh-fastfetch, nomarchy-refresh-hyprland, nomarchy-refresh-waybar
|
||||||
|
nomarchy-refresh-<app>
|
||||||
|
|
||||||
|
# Refresh specific config file
|
||||||
|
# config-file path is relative to ~/.config/
|
||||||
|
# eg. nomarchy-refresh-config hypr/hyprlock.conf will refresh ~/.config/hypr/hyprlock.conf
|
||||||
|
nomarchy-refresh-config <config-file>
|
||||||
|
|
||||||
|
# Full reinstall of configs (nuclear option)
|
||||||
|
nomarchy-reinstall
|
||||||
|
```
|
||||||
|
|
||||||
|
## Decision Framework
|
||||||
|
|
||||||
|
When user requests system changes:
|
||||||
|
|
||||||
|
1. **Is it a stock nomarchy command?** Use it directly
|
||||||
|
2. **Is it a config edit?** Edit in `~/.config/`, never `~/.local/share/nomarchy/`
|
||||||
|
3. **Is it a theme customization?** Create a NEW custom theme directory
|
||||||
|
4. **Is it automation?** Use hooks in `~/.config/nomarchy/hooks/`
|
||||||
|
5. **Is it a package install?** Use `nomarchy-pkg-add` (or `nomarchy-pkg-aur-add` for AUR-only packages)
|
||||||
|
6. **Unsure if command exists?** Search with `compgen -c | grep nomarchy`
|
||||||
|
|
||||||
|
## Out of Scope
|
||||||
|
|
||||||
|
This skill intentionally does not cover Nomarchy source development. Do not use this skill for:
|
||||||
|
- Editing files in `~/.local/share/nomarchy/` (`bin/`, `config/`, `default/`, `themes/`, `migrations/`, etc.)
|
||||||
|
- Creating or editing migrations
|
||||||
|
- Modifying Nomarchy's own source tree
|
||||||
|
|
||||||
|
## Example Requests
|
||||||
|
|
||||||
|
- "Change my theme to catppuccin" -> `nomarchy-theme-set catppuccin`
|
||||||
|
- "Add a keybinding for Super+E to open file manager" -> Check existing bindings first, add `unbind` if needed, then add `bind` in `~/.config/hypr/bindings.conf`
|
||||||
|
- "Configure my external monitor" -> Edit `~/.config/hypr/monitors.conf`
|
||||||
|
- "Make the window gaps smaller" -> Edit `~/.config/hypr/looknfeel.conf`
|
||||||
|
- "Set up night light to turn on at sunset" -> `nomarchy-toggle-nightlight` or edit `~/.config/hypr/hyprsunset.conf`
|
||||||
|
- "Customize the catppuccin theme colors" -> Create `~/.config/nomarchy/themes/catppuccin-custom/` by copying from stock, then edit
|
||||||
|
- "Run a script every time I change themes" -> Create `~/.config/nomarchy/hooks/theme-set`
|
||||||
|
- "Reset waybar to defaults" -> `nomarchy-refresh-waybar`
|
||||||
11
core/home/config/nomarchy/default/alacritty/screensaver.toml
Normal file
11
core/home/config/nomarchy/default/alacritty/screensaver.toml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[colors.primary]
|
||||||
|
background = "0x000000"
|
||||||
|
|
||||||
|
[colors.cursor]
|
||||||
|
cursor = "0x000000"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 18.0
|
||||||
|
|
||||||
|
[window]
|
||||||
|
opacity = 1.0
|
||||||
57
core/home/config/nomarchy/default/bash/aliases
Normal file
57
core/home/config/nomarchy/default/bash/aliases
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# File system
|
||||||
|
if command -v eza &> /dev/null; then
|
||||||
|
alias ls='eza -lh --group-directories-first --icons=auto'
|
||||||
|
alias lsa='ls -a'
|
||||||
|
alias lt='eza --tree --level=2 --long --icons --git'
|
||||||
|
alias lta='lt -a'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$TERM" == "xterm-kitty" ]]; then
|
||||||
|
alias ff="fzf --preview 'case \$(file --mime-type -b {}) in image/*) kitty icat --clear --transfer-mode=memory --stdin=no --place=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES}@0x0 {} ;; *) bat --style=numbers --color=always {} ;; esac'"
|
||||||
|
else
|
||||||
|
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||||
|
fi
|
||||||
|
alias eff='$EDITOR "$(ff)"'
|
||||||
|
sff() { if [ $# -eq 0 ]; then echo "Usage: sff <destination> (e.g. sff host:/tmp/)"; return 1; fi; local file; file=$(find . -type f -printf '%T@\t%p\n' | sort -rn | cut -f2- | ff) && [ -n "$file" ] && scp "$file" "$1"; }
|
||||||
|
|
||||||
|
if command -v zoxide &> /dev/null; then
|
||||||
|
alias cd="zd"
|
||||||
|
zd() {
|
||||||
|
if (( $# == 0 )); then
|
||||||
|
builtin cd ~ || return
|
||||||
|
elif [[ -d $1 ]]; then
|
||||||
|
builtin cd "$1" || return
|
||||||
|
else
|
||||||
|
if ! z "$@"; then
|
||||||
|
echo "Error: Directory not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "\U000F17A9 "
|
||||||
|
pwd
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
open() (
|
||||||
|
xdg-open "$@" >/dev/null 2>&1 &
|
||||||
|
)
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../..'
|
||||||
|
alias ....='cd ../../..'
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
alias c='opencode'
|
||||||
|
alias cx='printf "\033[2J\033[3J\033[H" && claude --allow-dangerously-skip-permissions'
|
||||||
|
alias d='docker'
|
||||||
|
alias r='rails'
|
||||||
|
alias t='tmux attach || tmux new -s Work'
|
||||||
|
n() { if [ "$#" -eq 0 ]; then command nvim . ; else command nvim "$@"; fi; }
|
||||||
|
|
||||||
|
# Git
|
||||||
|
alias g='git'
|
||||||
|
alias gcm='git commit -m'
|
||||||
|
alias gcam='git commit -a -m'
|
||||||
|
alias gcad='git commit -a --amend'
|
||||||
6
core/home/config/nomarchy/default/bash/envs
Normal file
6
core/home/config/nomarchy/default/bash/envs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Editor used by CLI
|
||||||
|
export SUDO_EDITOR="$EDITOR"
|
||||||
|
export BAT_THEME=ansi
|
||||||
|
|
||||||
|
# Duplicated from .config/uwsm/env so SSH works too
|
||||||
|
export PATH=$PATH:$HOME/.local/bin
|
||||||
3
core/home/config/nomarchy/default/bash/fns/compression
Normal file
3
core/home/config/nomarchy/default/bash/fns/compression
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Compression
|
||||||
|
compress() { tar -czf "${1%/}.tar.gz" "${1%/}"; }
|
||||||
|
alias decompress="tar -xzf"
|
||||||
59
core/home/config/nomarchy/default/bash/fns/drives
Normal file
59
core/home/config/nomarchy/default/bash/fns/drives
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Write iso file to sd card
|
||||||
|
iso2sd() {
|
||||||
|
if (( $# < 1 )); then
|
||||||
|
echo "Usage: iso2sd <input_file> [output_device]"
|
||||||
|
echo "Example: iso2sd ~/Downloads/ubuntu-25.04-desktop-amd64.iso /dev/sda"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
local drive="$2"
|
||||||
|
|
||||||
|
if [[ -z $drive ]]; then
|
||||||
|
local available_sds=$(lsblk -dpno NAME | grep -E '/dev/sd')
|
||||||
|
|
||||||
|
if [[ -z $available_sds ]]; then
|
||||||
|
echo "No SD drives found and no drive specified"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
drive=$(nomarchy-drive-select "$available_sds")
|
||||||
|
|
||||||
|
if [[ -z $drive ]]; then
|
||||||
|
echo "No drive selected"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo dd bs=4M status=progress oflag=sync if="$iso" of="$drive"
|
||||||
|
sudo eject "$drive"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Format an entire drive for a single partition using exFAT
|
||||||
|
format-drive() {
|
||||||
|
if (( $# != 2 )); then
|
||||||
|
echo "Usage: format-drive <device> <name>"
|
||||||
|
echo "Example: format-drive /dev/sda 'My Stuff'"
|
||||||
|
echo -e "\nAvailable drives:"
|
||||||
|
lsblk -d -o NAME -n | awk '{print "/dev/"$1}'
|
||||||
|
else
|
||||||
|
echo "WARNING: This will completely erase all data on $1 and label it '$2'."
|
||||||
|
read -rp "Are you sure you want to continue? (y/N): " confirm
|
||||||
|
|
||||||
|
if [[ $confirm =~ ^[Yy]$ ]]; then
|
||||||
|
sudo wipefs -a "$1"
|
||||||
|
sudo dd if=/dev/zero of="$1" bs=1M count=100 status=progress
|
||||||
|
sudo parted -s "$1" mklabel gpt
|
||||||
|
sudo parted -s "$1" mkpart primary 1MiB 100%
|
||||||
|
sudo parted -s "$1" set 1 msftdata on
|
||||||
|
|
||||||
|
partition="$([[ $1 == *"nvme"* ]] && echo "${1}p1" || echo "${1}1")"
|
||||||
|
sudo partprobe "$1" || true
|
||||||
|
sudo udevadm settle || true
|
||||||
|
|
||||||
|
sudo mkfs.exfat -n "$2" "$partition"
|
||||||
|
|
||||||
|
echo "Drive $1 formatted as exFAT and labeled '$2'."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# SSH Port Forwarding Functions
|
||||||
|
fip() {
|
||||||
|
(( $# < 2 )) && echo "Usage: fip <host> <port1> [port2] ..." && return 1
|
||||||
|
local host="$1"
|
||||||
|
shift
|
||||||
|
for port in "$@"; do
|
||||||
|
ssh -f -N -L "$port:localhost:$port" "$host" && echo "Forwarding localhost:$port -> $host:$port"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
dip() {
|
||||||
|
(( $# == 0 )) && echo "Usage: dip <port1> [port2] ..." && return 1
|
||||||
|
for port in "$@"; do
|
||||||
|
pkill -f "ssh.*-L $port:localhost:$port" && echo "Stopped forwarding port $port" || echo "No forwarding on port $port"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
lip() {
|
||||||
|
pgrep -af "ssh.*-L [0-9]+:localhost:[0-9]+" || echo "No active forwards"
|
||||||
|
}
|
||||||
97
core/home/config/nomarchy/default/bash/fns/tmux
Normal file
97
core/home/config/nomarchy/default/bash/fns/tmux
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
# Create a Tmux Dev Layout with editor, ai, and terminal
|
||||||
|
# Usage: tdl <c|cx|codex|other_ai> [<second_ai>]
|
||||||
|
tdl() {
|
||||||
|
[[ -z $1 ]] && { echo "Usage: tdl <c|cx|codex|other_ai> [<second_ai>]"; return 1; }
|
||||||
|
[[ -z $TMUX ]] && { echo "You must start tmux to use tdl."; return 1; }
|
||||||
|
|
||||||
|
local current_dir="${PWD}"
|
||||||
|
local editor_pane ai_pane ai2_pane
|
||||||
|
local ai="$1"
|
||||||
|
local ai2="$2"
|
||||||
|
|
||||||
|
# Use TMUX_PANE for the pane we're running in (stable even if active window changes)
|
||||||
|
editor_pane="$TMUX_PANE"
|
||||||
|
|
||||||
|
# Name the current window after the base directory name
|
||||||
|
tmux rename-window -t "$editor_pane" "$(basename "$current_dir")"
|
||||||
|
|
||||||
|
# Split window vertically - top 85%, bottom 15% (target editor pane explicitly)
|
||||||
|
tmux split-window -v -p 15 -t "$editor_pane" -c "$current_dir"
|
||||||
|
|
||||||
|
# Split editor pane horizontally - AI on right 30% (capture new pane ID directly)
|
||||||
|
ai_pane=$(tmux split-window -h -p 30 -t "$editor_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||||
|
|
||||||
|
# If second AI provided, split the AI pane vertically
|
||||||
|
if [[ -n $ai2 ]]; then
|
||||||
|
ai2_pane=$(tmux split-window -v -t "$ai_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||||
|
tmux send-keys -t "$ai2_pane" "$ai2" C-m
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run ai in the right pane
|
||||||
|
tmux send-keys -t "$ai_pane" "$ai" C-m
|
||||||
|
|
||||||
|
# Run nvim in the left pane
|
||||||
|
tmux send-keys -t "$editor_pane" "$EDITOR ." C-m
|
||||||
|
|
||||||
|
# Select the nvim pane for focus
|
||||||
|
tmux select-pane -t "$editor_pane"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create multiple tdl windows with one per subdirectory in the current directory
|
||||||
|
# Usage: tdlm <c|cx|codex|other_ai> [<second_ai>]
|
||||||
|
tdlm() {
|
||||||
|
[[ -z $1 ]] && { echo "Usage: tdlm <c|cx|codex|other_ai> [<second_ai>]"; return 1; }
|
||||||
|
[[ -z $TMUX ]] && { echo "You must start tmux to use tdlm."; return 1; }
|
||||||
|
|
||||||
|
local ai="$1"
|
||||||
|
local ai2="$2"
|
||||||
|
local base_dir="$PWD"
|
||||||
|
local first=true
|
||||||
|
|
||||||
|
# Rename the session to the current directory name (replace dots/colons which tmux disallows)
|
||||||
|
tmux rename-session "$(basename "$base_dir" | tr '.:' '--')"
|
||||||
|
|
||||||
|
for dir in "$base_dir"/*/; do
|
||||||
|
[[ -d $dir ]] || continue
|
||||||
|
local dirpath="${dir%/}"
|
||||||
|
|
||||||
|
if $first; then
|
||||||
|
# Reuse the current window for the first project
|
||||||
|
tmux send-keys -t "$TMUX_PANE" "cd '$dirpath' && tdl $ai $ai2" C-m
|
||||||
|
first=false
|
||||||
|
else
|
||||||
|
local pane_id=$(tmux new-window -c "$dirpath" -P -F '#{pane_id}')
|
||||||
|
tmux send-keys -t "$pane_id" "tdl $ai $ai2" C-m
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a multi-pane swarm layout with the same command started in each pane (great for AI)
|
||||||
|
# Usage: tsl <pane_count> <command>
|
||||||
|
tsl() {
|
||||||
|
[[ -z $1 || -z $2 ]] && { echo "Usage: tsl <pane_count> <command>"; return 1; }
|
||||||
|
[[ -z $TMUX ]] && { echo "You must start tmux to use tsl."; return 1; }
|
||||||
|
|
||||||
|
local count="$1"
|
||||||
|
local cmd="$2"
|
||||||
|
local current_dir="${PWD}"
|
||||||
|
local -a panes
|
||||||
|
|
||||||
|
tmux rename-window -t "$TMUX_PANE" "$(basename "$current_dir")"
|
||||||
|
|
||||||
|
panes+=("$TMUX_PANE")
|
||||||
|
|
||||||
|
while (( ${#panes[@]} < count )); do
|
||||||
|
local new_pane
|
||||||
|
local split_target="${panes[-1]}"
|
||||||
|
new_pane=$(tmux split-window -h -t "$split_target" -c "$current_dir" -P -F '#{pane_id}')
|
||||||
|
panes+=("$new_pane")
|
||||||
|
tmux select-layout -t "${panes[0]}" tiled
|
||||||
|
done
|
||||||
|
|
||||||
|
for pane in "${panes[@]}"; do
|
||||||
|
tmux send-keys -t "$pane" "$cmd" C-m
|
||||||
|
done
|
||||||
|
|
||||||
|
tmux select-pane -t "${panes[0]}"
|
||||||
|
}
|
||||||
53
core/home/config/nomarchy/default/bash/fns/transcoding
Normal file
53
core/home/config/nomarchy/default/bash/fns/transcoding
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Transcode a video to a good-balance 1080p that's great for sharing online
|
||||||
|
transcode-video-1080p() {
|
||||||
|
ffmpeg -i "$1" -vf scale=1920:1080 -c:v libx264 -preset fast -crf 23 -c:a copy "${1%.*}-1080p.mp4"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode a video to a good-balance 4K that's great for sharing online
|
||||||
|
transcode-video-4K() {
|
||||||
|
ffmpeg -i "$1" -c:v libx265 -preset slow -crf 24 -c:a aac -b:a 192k "${1%.*}-optimized.mp4"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode any image to JPG image that's great for shrinking wallpapers
|
||||||
|
img2jpg() {
|
||||||
|
img="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
magick "$img" "$@" -quality 85 -strip "${img%.*}-converted.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode any image to a small JPG (max 1080px wide)
|
||||||
|
img2jpg-small() {
|
||||||
|
img="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
magick "$img" "$@" -resize 1080x\> -quality 85 -strip "${img%.*}-small.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode any image to a 4K JPG (max 2160px wide)
|
||||||
|
img2jpg-medium() {
|
||||||
|
img="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
magick "$img" "$@" -resize 2160x\> -quality 85 -strip "${img%.*}-medium.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode any image to a 6K JPG (max 3160px wide)
|
||||||
|
img2jpg-large() {
|
||||||
|
img="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
magick "$img" "$@" -resize 3160x\> -quality 85 -strip "${img%.*}-large.jpg"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Transcode any image to compressed-but-lossless PNG
|
||||||
|
img2png() {
|
||||||
|
img="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
magick "$img" "$@" -strip -define png:compression-filter=5 \
|
||||||
|
-define png:compression-level=9 \
|
||||||
|
-define png:compression-strategy=1 \
|
||||||
|
-define png:exclude-chunk=all \
|
||||||
|
"${img%.*}-optimized.png"
|
||||||
|
}
|
||||||
36
core/home/config/nomarchy/default/bash/fns/worktrees
Normal file
36
core/home/config/nomarchy/default/bash/fns/worktrees
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Create a new worktree and branch from within current git directory.
|
||||||
|
ga() {
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
echo "Usage: ga [branch name]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local branch="$1"
|
||||||
|
local base="$(basename "$PWD")"
|
||||||
|
local wt_path="../${base}--${branch}"
|
||||||
|
|
||||||
|
git worktree add -b "$branch" "$wt_path"
|
||||||
|
mise trust "$wt_path"
|
||||||
|
cd "$wt_path"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove worktree and branch from within active worktree directory.
|
||||||
|
gd() {
|
||||||
|
if gum confirm "Remove worktree and branch?"; then
|
||||||
|
local cwd base branch root worktree
|
||||||
|
|
||||||
|
cwd="$(pwd)"
|
||||||
|
worktree="$(basename "$cwd")"
|
||||||
|
|
||||||
|
# split on first `--`
|
||||||
|
root="${worktree%%--*}"
|
||||||
|
branch="${worktree#*--}"
|
||||||
|
|
||||||
|
# Protect against accidentally nuking a non-worktree directory
|
||||||
|
if [[ "$root" != "$worktree" ]]; then
|
||||||
|
cd "../$root"
|
||||||
|
git worktree remove "$cwd" --force || return 1
|
||||||
|
git branch -D "$branch"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
1
core/home/config/nomarchy/default/bash/functions
Normal file
1
core/home/config/nomarchy/default/bash/functions
Normal file
@@ -0,0 +1 @@
|
|||||||
|
for f in $HOME/.config/nomarchy/default/bash/fns/*; do source "$f"; done
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user