fix: routine shell - #1490
Conversation
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 52 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (17)
📝 WalkthroughWalkthroughThis PR introduces power management functionality (decafinate service), refactors tmux session initialization from tmuxinator to built-in bootstrapping, adds shell aliases for clipboard operations, updates Makefile nix-build host resolution logic, and includes supporting configuration changes across multiple home-manager modules, tests, and dependencies. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mesa DescriptionTL;DRAdds an AC-only "decafinate" keep-awake tool, streamlines tmux session bootstrapping, fixes Slack/Electron copy issues, makes What changed?
Description generated by Mesa. Update settings |
Slack was still misreading the synthesized Hyper-to-Ctrl copy path on Wayland and could trigger its unread behavior instead of a clean copy action. Route Framework+C through the Slack-specific xremap override and hand the copy chord off to the Nix-pinned wtype binary after a short delay so the app sees a clean Ctrl+C. Co-authored-by: Codex <noreply@openai.com>
Wire Framework+C directly to Ctrl+C in keyd so Slack sees the same chord as a physical copy shortcut instead of the synthetic Hyper-to-Ctrl remap path. Keep terminal copy working by teaching the Ghostty xremap override to translate C-c into Ctrl+Shift+C. Co-authored-by: Codex <noreply@openai.com>
Replace the store-backed config symlink with an activation-time copy so HyprPanel can write back to config.json at runtime without failing on symlink-safe file opens. Co-authored-by: Codex <noreply@openai.com>
Add a prerelease allowlist for uv global tools so packages like serena-agent can be installed without weakening version handling for the rest of the tool set. Co-authored-by: Codex <noreply@openai.com>
Advance dotagents to the local MCP hydration update so the parent repo captures the committed submodule state. Co-authored-by: Codex <noreply@openai.com>
Add a shared decafinate script that starts an inhibit session only while AC power is connected and exposes it through the fish decaf wrapper plus a rofi launcher entry. Keep the requested shell gates green by covering the new script and fish wrapper in shell tests, fixing the tmux fishtape assertions, and adding an offline nixfmt fallback so make format still works when nix fmt cannot resolve cache inputs. Co-authored-by: Codex <noreply@openai.com>
3b3489e to
cb2fa37
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a decafinate script for AC-powered sleep inhibition, refactors hyprpanel configuration to allow runtime updates, and replaces tmuxinator with a native Fish-based session bootstrap. Neovim terminal keybindings were updated to Alt-based mappings to prevent shell input interference, and uv tool installation now supports prerelease packages. Feedback highlights opportunities to remove redundant formatting commands in the Makefile, ensure correct tmux restoration by reordering script lookups, and reduce overhead in the decafinate service by avoiding unnecessary login shells.
I am having trouble creating individual review comments. Click here to see my feedback.
home-manager/programs/fish/functions/_two_function.fish (11-19)
The restore script path is currently looked up before ensuring that a tmux server is running. If no server is active, tmux list-keys will fail, resulting in an empty restore variable. Consequently, the function will skip the restoration logic even if the resurrect plugin is available once the server is started. Moving the lookup after the server bootstrap ensures the script path is correctly identified.
set -l bootstrapped 0
# Start a server if needed so we can invoke the restore script.
if not tmux list-sessions 2>/dev/null | grep -q .
tmux new-session -d -s _bootstrap
set bootstrapped 1
end
set -l restore (tmux list-keys 2>/dev/null | string match -rg '(/\S+/resurrect/scripts/restore\.sh)')
set -l restore $restore[1]
Makefile (522)
The nix-format target currently depends on nix-format-clear-cache, which executes $(NIX_EXEC) fmt -- --clear-cache. The body of nix-format then executes the exact same command again. Since nix fmt -- --clear-cache both clears the cache and performs the formatting, this dependency results in redundant execution. Removing the dependency streamlines the process.
nix-format: ## Format Nix files.
home-manager/modules/local-scripts/decafinate.sh (105)
Using a login shell (-lc) within the transient systemd unit is unnecessary and adds overhead. The script block provided to bash is self-contained (it even redefines the ac_online function) and systemd already provides a suitable environment for user units (including $HOME). A standard non-login shell execution is more robust and efficient here.
"$bash_bin" -c '
Summary by cubic
Adds an AC‑only “decafinate” keep‑awake tool, replaces tmuxinator with a built‑in tmux session bootstrap, fixes Slack copy by sending a real Ctrl+C, makes
hyprpanelconfig writable at runtime, and hardens Nix format tasks.New Features
decafinate: AC‑onlysystemd-inhibitsession with a fishdecafwrapper and arofilauncher; includes tests.__tmux_bootstrap_default_session) used by_tpo/_tmo/_tdo/_two/_tss; falls back from resurrect restore; tests added.uvtool installs via[tool.uv-globals].prereleaseinpyproject.toml.Bug Fixes
keydmaps Framework+C to Ctrl+C;xremapmapsC-c → C-Shift-cfor Ghostty to keep terminal copy behavior.hyprpanel: activation copies JSON to~/.configso the app can writeconfig.json(no store symlink failures).nixfmtfallback whennix fmtis unavailable and a safer cache clear; tests for host resolution.Written for commit b5a91f0. Summary will update on new commits.