Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Nov 9, 2023
1 parent 6a76a19 commit 3e4c0e6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#+DATE: 2023-10-21T12:09:48+0800
#+LASTMOD: 2023-10-22T22:40:34+0800
#+LASTMOD: 2023-11-09T22:26:31+0800
#+TYPE: docs

* Zigcli
Expand All @@ -21,9 +21,10 @@ This package provides:
- =loc=, lines of code.
- =tree=, list contents of directories in a tree-like format.
- =yes=, output a string repeatedly until killed.
- =pidof=, like [[https://man7.org/linux/man-pages/man1/pidof.1.html][pidof]], but for macOS.
- =night-shift=, control [[https://support.apple.com/guide/mac-help/use-night-shift-mchl97bc676d/mac][Night Shift]] in cli, build for macOS.
- =repeat=, repeat a command until it succeeds.
- =pidof=, like [[https://man7.org/linux/man-pages/man1/pidof.1.html][pidof]], but for macOS.
- =night-shift=, control [[https://support.apple.com/guide/mac-help/use-night-shift-mchl97bc676d/mac][Night Shift]] in macOS.
- =dark-mode=, Get dark mode status in macOS.

* Install
** Programs
Expand Down
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fn makeCompileStep(
) ?*Build.CompileStep {
const name = comptime source.name();
const path = comptime source.path();
if (std.mem.eql(u8, name, "night-shift") or std.mem.eql(u8, name, "pidof")) {
if (std.mem.eql(u8, name, "night-shift") or std.mem.eql(u8, name, "dark-mode") or std.mem.eql(u8, name, "pidof")) {
if (target.getOsTag() != .macos) {
return null;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/content/docs/programs/dark-mode.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Dark mode
Get dark mode status for macOS.
4 changes: 2 additions & 2 deletions src/bin/dark-mode.zig
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ pub fn main() !void {
};

if (std.mem.eql(u8, darkValue, std.mem.span(appearanceValue.?))) {
std.debug.print("on\n", .{});
std.debug.print("on", .{});
} else {
std.debug.print("off\n", .{});
std.debug.print("off", .{});
}
}

0 comments on commit 3e4c0e6

Please sign in to comment.