Skip to content

config impl (pt.1) #1550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions docs/wiki/home.md → .github/wiki/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ Welcome to the onefetch's wiki!
- **General**
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
- [Nix local setup](https://github.com/o2sh/onefetch/wiki/nix-local-setup)
- **Options**
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
- **Images**
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/images-in-the-terminal)
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal)
- **Ascii**
- [Ascii art](https://github.com/o2sh/onefetch/wiki/ascii-art)
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/wiki/_Sidebar.md → .github/wiki/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
- **General**
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
- [Nix local setup](https://github.com/o2sh/onefetch/wiki/nix-local-setup)
- **Options**
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
- **Images**
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/flake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Weekly flake.lock update

on:
schedule:
- cron: '0 11 * * 4'
workflow_dispatch:

jobs:
update-flake:
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: DeterminateSystems/determinate-nix-action@v3
- name: Update flake.lock
id: flake-upd
uses: DeterminateSystems/update-flake-lock@v25
with:
pr-title: "Update flake.lock to nixpkgs ${{ steps.flake-upd.outputs.commit-hash }}"
pr-labels: |
dependencies
pr-rebase: true

20 changes: 10 additions & 10 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Publish Wiki
name: Sync Wiki
on:
push:
branches: [main]
paths:
- "docs/wiki/**"
- ".github/wiki/**"

workflow_dispatch:

concurrency:
group: wiki
cancel-in-progress: true
permissions:
contents: write
jobs:
wiki:
update-wiki:
runs-on: ubuntu-latest
name: Sync Wiki
concurrency:
group: wiki
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
- uses: spenserblack/actions-wiki@v0.3.0
- uses: spenserblack/actions-wiki@v0.1
with:
path: docs/wiki
token: ${{ secrets.WIKI_TOKEN }}
16 changes: 0 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.24.0 (2025-04-12)

### New Features

- add language support for Lean by @foxyseta in https://github.com/o2sh/onefetch/pull/1509
- add language support for Typst by @foxyseta in https://github.com/o2sh/onefetch/pull/1508
- add language support for Razor by @SrS2225a in https://github.com/o2sh/onefetch/pull/1521

### Chores

- more idiomatic way to fetch HEAD refs by @o2sh in https://github.com/o2sh/onefetch/pull/1515
- more idiomatic way to fetch repository remote URL by @o2sh in https://github.com/o2sh/onefetch/pull/1516
- update holyc language logo by @o2sh in https://github.com/o2sh/onefetch/pull/1543
- update wiki powershell-snippet by @FallenDeity in https://github.com/o2sh/onefetch/pull/1542
- add nix local setup @Sk7Str1p3 in https://github.com/o2sh/onefetch/pull/1549

## 2.23.1 (2025-01-01)

### Bug Fixes
Expand Down
92 changes: 65 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ byte-unit = "5.1.6"
clap.workspace = true
clap_complete = "4.5.47"
crossbeam-channel = "0.5.15"
dirs = "6.0.0"
gix = { version = "0.72.1", default-features = false, features = [
"max-performance-safe",
"blob-diff",
Expand All @@ -67,6 +68,7 @@ strum.workspace = true
time = { version = "0.3.41", features = ["formatting"] }
time-humanize = { version = "0.1.3", features = ["time"] }
tokei = "13.0.0-alpha.8"
toml = "0.8.22"
typetag = "0.2"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion assets/msrv-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions benches/repo.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use gix::{open, ThreadSafeRepository};
use onefetch::{cli::CliOptions, info::build_info};
use std::hint::black_box;
use onefetch::{cli::CliOptions, config::ConfigOptions, info::build_info};

fn bench_repo_info(c: &mut Criterion) {
let name = "make_repo.sh".to_string();
Expand All @@ -11,10 +10,11 @@ fn bench_repo_info(c: &mut Criterion) {
input: repo.path().to_path_buf(),
..Default::default()
};
let toml = ConfigOptions::default();

c.bench_function("get repo information", |b| {
b.iter(|| {
let result = black_box(build_info(&config));
let result = black_box(build_info(&config, &toml));
assert!(result.is_ok());
});
});
Expand Down
2 changes: 1 addition & 1 deletion docs/onefetch.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH ONEFETCH "1" "April 2025" "onefetch 2.24.0" "User Commands"
.TH ONEFETCH "1" "January 2025" "onefetch 2.23.1" "User Commands"
.SH NAME
onefetch \- Command-line Git information tool
.SH SYNOPSIS
Expand Down
Loading