Skip to content

Conversation

@notnmeyer
Copy link
Owner

adds a copy subcommand that copies the specified log to the clipboard.

supports all the same log selection stuff. daylog copy copies today's log,

# 2025/06/10

TODAY

similarly, logs from past/future work too,
daylog copy -- tomorrow,

# 2025/06/11

TOMORROW

closes #48


also bumps go to 1.24

@notnmeyer
Copy link
Owner Author

notnmeyer commented Jun 12, 2025

blarg, golang.design/x/clipboard uses x11 and blows up under wayland on linux. sounds like clipboard access at the cli is a bit of a nightmare on linux.

@notnmeyer notnmeyer self-assigned this Jun 13, 2025
@notnmeyer
Copy link
Owner Author

other options look equally bad. this will work.

@notnmeyer notnmeyer requested a review from Copilot June 13, 2025 03:54

This comment was marked as outdated.

@notnmeyer notnmeyer requested a review from Copilot June 13, 2025 04:02

This comment was marked as resolved.

@notnmeyer notnmeyer requested a review from Copilot June 13, 2025 04:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new copy subcommand for copying logs to the clipboard and updates the environment/tooling to Go 1.24.

  • Adds a copy CLI command using the golang.design/x/clipboard package
  • Bumps Go versions across go.mod, shell.nix, and CI workflows to 1.24 and installs necessary system deps
  • Refactors task definitions in tasks.toml and updates the README with Linux build notes

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tasks.toml Flattened multi-line cmds arrays and added a new:command task
shell.nix Updated Go to 1.24, added nativeBuildInputs and X11 in buildInputs
go.mod Upgraded Go to 1.24, added golang.design/x/clipboard dependency
cmd/copy.go Implemented the new copy command
README.md Revised source install section and noted X11 header requirement
.github/workflows/test.yml Updated Go version, installed X11 headers
.github/workflows/release.yml Updated Go version, installed X11 headers
Comments suppressed due to low confidence (4)

cmd/copy.go:36

  • [nitpick] The function name "copy" shadows the built-in Go function and is ambiguous; consider renaming it to "copyToClipboard" for clarity.
func copy(content []byte) error {

.github/workflows/test.yml:15

  • The CI step installs only X11 headers but misses required build tools (gcc and pkg-config) needed for the clipboard dependency; add them to the apt-get install command.
      - run: sudo apt-get install libx11-dev

.github/workflows/release.yml:23

  • Similar to the test workflow, this step should also install gcc and pkg-config alongside libx11-dev to ensure successful builds with the clipboard package.
      - run: sudo apt-get install libx11-dev

go.mod:41

  • [nitpick] This indirect dependency appears to be pulled in transitively; consider removing explicit require lines for indirect modules and letting 'go mod tidy' handle them.
    golang.org/x/exp/shiny v0.0.0-20250606033433-dcc06ee1d476 // indirect

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@notnmeyer notnmeyer merged commit b64c7b1 into main Jun 13, 2025
1 check passed
@notnmeyer notnmeyer deleted the feat/copy-command branch June 13, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copy to clipboard

2 participants