-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update #1760
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
chore: update #1760
Changes from all commits
09846a1
8026503
67e61ae
aab11b2
ac126c2
cc183e7
f0d2e62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| [install] | ||||||
| minimumReleaseAge = 604800 | ||||||
| exact = true | ||||||
| ignoreScripts = true | ||||||
| optional = false | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Prompt for AI agents
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| _: { | ||
| home.file.".bunfig.toml" = { | ||
| source = ./bunfig.toml; | ||
| force = true; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,14 +1,31 @@ | ||||||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||||||
| # Inhibit idle when on AC power so noctalia's idle timeouts only fire on battery. | ||||||||||||||||||||||
| # Polls every 2s so AC state changes take effect well within the 5-min idle window. | ||||||||||||||||||||||
| # On battery: run swayidle for screen-off (5 min) and suspend (10 min). | ||||||||||||||||||||||
| # On AC: stop swayidle so only noctalia's lock fires. | ||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardware-specific path: |
||||||||||||||||||||||
| AC=/sys/class/power_supply/ACAD/online | ||||||||||||||||||||||
| SWAYIDLE_PID="" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| cleanup() { [ -n "$SWAYIDLE_PID" ] && kill "$SWAYIDLE_PID" 2>/dev/null; } | ||||||||||||||||||||||
| trap cleanup EXIT | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| while true; do | ||||||||||||||||||||||
| if [ "$(cat "$AC" 2>/dev/null)" = "1" ]; then | ||||||||||||||||||||||
| systemd-inhibit --what=idle --why="On AC power" --mode=block sleep 2 | ||||||||||||||||||||||
| ON_AC="$(cat "$AC" 2>/dev/null)" | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The script uses
Suggested change
References
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: The AC-state read can terminate the whole script under Prompt for AI agents
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if [ "$ON_AC" = "1" ]; then | ||||||||||||||||||||||
| if [ -n "$SWAYIDLE_PID" ] && kill -0 "$SWAYIDLE_PID" 2>/dev/null; then | ||||||||||||||||||||||
| kill "$SWAYIDLE_PID" 2>/dev/null | ||||||||||||||||||||||
| SWAYIDLE_PID="" | ||||||||||||||||||||||
| hyprctl dispatch dpms on | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
Comment on lines
+16
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Between the 🛡️ Suggested guard- if [ -n "$SWAYIDLE_PID" ] && kill -0 "$SWAYIDLE_PID" 2>/dev/null; then
- kill "$SWAYIDLE_PID" 2>/dev/null
- SWAYIDLE_PID=""
- hyprctl dispatch dpms on
- fi
+ if [ -n "$SWAYIDLE_PID" ] && kill -0 "$SWAYIDLE_PID" 2>/dev/null; then
+ kill "$SWAYIDLE_PID" 2>/dev/null || true
+ SWAYIDLE_PID=""
+ hyprctl dispatch dpms on || true
+ fiI also added 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| else | ||||||||||||||||||||||
| sleep 2 | ||||||||||||||||||||||
| if [ -z "$SWAYIDLE_PID" ] || ! kill -0 "$SWAYIDLE_PID" 2>/dev/null; then | ||||||||||||||||||||||
| swayidle -w \ | ||||||||||||||||||||||
| timeout 300 'hyprctl dispatch dpms off' \ | ||||||||||||||||||||||
| resume 'hyprctl dispatch dpms on' \ | ||||||||||||||||||||||
| timeout 600 'systemctl suspend' & | ||||||||||||||||||||||
| SWAYIDLE_PID=$! | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| sleep 2 | ||||||||||||||||||||||
| done | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,15 +16,24 @@ in | |||||
| force = true; | ||||||
| }; | ||||||
|
|
||||||
| # Inhibit idle when plugged into AC; noctalia's idle timeouts apply on battery only. | ||||||
| # Screen-off and suspend on battery only; noctalia handles lock on both AC and battery. | ||||||
| systemd.user.services.ac-idle-inhibit = { | ||||||
| Unit = { | ||||||
| Description = "Inhibit idle when on AC power"; | ||||||
| Description = "Screen-off and suspend on battery via swayidle"; | ||||||
| After = [ "graphical-session.target" ]; | ||||||
| PartOf = [ "graphical-session.target" ]; | ||||||
| }; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hyprctl needs more than
Suggested change
|
||||||
| Service = { | ||||||
| Type = "simple"; | ||||||
| PassEnvironment = "WAYLAND_DISPLAY"; | ||||||
| Environment = "PATH=${ | ||||||
| pkgs.lib.makeBinPath [ | ||||||
| pkgs.swayidle | ||||||
| pkgs.hyprland | ||||||
| pkgs.coreutils | ||||||
| pkgs.systemd | ||||||
| ] | ||||||
| }"; | ||||||
| ExecStart = "${pkgs.bash}/bin/bash ${./ac-idle-inhibit.sh}"; | ||||||
| Restart = "on-failure"; | ||||||
| }; | ||||||
|
|
@@ -148,9 +157,9 @@ in | |||||
| wallpaper.enabled = false; | ||||||
| idle = { | ||||||
| enabled = true; | ||||||
| screenOffTimeout = 300; # 5 min on battery | ||||||
| screenOffTimeout = 0; | ||||||
| lockTimeout = 300; | ||||||
| suspendTimeout = 600; # 10 min on battery | ||||||
| suspendTimeout = 0; | ||||||
| }; | ||||||
| systemMonitor.enableDgpuMonitoring = true; | ||||||
| colorSchemes.schedulingMode = "location"; | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| _: { | ||
| home.file.".npmrc" = { | ||
| source = ./npmrc; | ||
| force = true; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||
| minimum-release-age=10080 | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. npm ignores this setting — npm's canonical key is
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Wrong configuration key and unit. npm's setting is Prompt for AI agents
Suggested change
|
||||||||||
| ignore-scripts=true | ||||||||||
| save-exact=true | ||||||||||
| omit=optional | ||||||||||
| engine-strict=true | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| _: { | ||
| xdg.configFile."pnpm/rc" = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong path on macOS: pnpm reads its global rc from |
||
| source = ./rc; | ||
| force = true; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| minimum-release-age=10080 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latent on pnpm v11+: pnpm v11 restricted the global
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: In pnpm v11+, non-registry/auth settings in the global Prompt for AI agents |
||
| ignore-scripts=true | ||
| save-exact=true | ||
| omit=optional | ||
| engine-strict=true | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional = falseskips required native binaries: rollup, esbuild, swc, lightningcss, sharp, and many other modern toolchain packages ship per-arch binaries viaoptionalDependencies. Disabling optionals globally letsbun installsucceed but breaks the apps at runtime withCannot find module @rollup/rollup-linux-x64-gnu(or equivalent). Same applies to the correspondingomit=optionallines inconfig/npm/npmrcandconfig/pnpm/rc.