Skip to content

About This Linux : show uptime, fix "More Info…" in dash-based shells - #28

Open
freroxx wants to merge 1 commit into
0-ss:mainfrom
freroxx:main
Open

freroxx wants to merge 1 commit into
0-ss:mainfrom
freroxx:main

Conversation

@freroxx

@freroxx freroxx commented Oct 24, 2026

Copy link
Copy Markdown

- Add an Uptime row after the OS row in the About This Linux window.
It reads /proc/uptime in its own Process, shows it as "2d 4h 12m", and refreshes every minute while the window is open. The label goes through I18n.tr, so it falls back to English until a translation exists.

- Fix the "More Info…" terminal closing immediately on systems where /bin/sh is dash (Debian, Ubuntu).
read -p is a bashism, so the prompt errored out and the terminal exited before fastfetch output could be read. Use printf + read, which is POSIX.

Add an Uptime row after the OS row in the About This Linux window.
It reads /proc/uptime in its own Process, shows it as "2d 4h 12m", and
refreshes every minute while the window is open. The label goes through
I18n.tr, so it falls back to English until a translation exists.

Fix the "More Info…" terminal closing immediately on systems where
/bin/sh is dash (Debian, Ubuntu). `read -p` is a bashism, so the prompt
errored out and the terminal exited before fastfetch output could be
read. Use printf + read, which is POSIX.
@juanpimg

Copy link
Copy Markdown
Contributor

Verified the two functional bits on CachyOS (dash installed, no VM needed):

  1. dash fix: dash -c 'read -p "x: " v' fails (read: Illegal option -p, exit 1) while printf ...; read _ works and shellcheck -s sh is clean. The old one-liner closed the terminal before anyone could read fastfetch on dash-as-sh systems — confirmed real.
  2. formatUptime: re-implemented the exact function and ran edge cases — 59→0m, 61→1m, 3600→1h 0m, 90000→1d 1h 0m, 187920→2d 4h 12m, 0→0m. All match. Timer gated on win.visible so no background polling when About is closed.

Small, correct, no behavior change besides the fix. LGTM from the outside.

MythosOfs added a commit to MythosOfs/MacShell that referenced this pull request Nov 22, 2026
Bring in Debian 13 support, GIF and WebP widgets, animated album art,
karaoke lyrics, System Monitor, optional Genie minimize, floating window
defaults, uptime, WireGuard, the audio hub, Reminders, Spotlight subtraction,
pinned-only Dock mode, tray collapse, and the unified icon grid.

Keep the fork's existing Spotlight screenshot search and Bluetooth status
reader. Sample Dock icons from the existing Image, fetch Apple Music motion
art from its public album page, and reuse MacLock's existing Spotify helper.
Isolate optional lyrics dependencies in a virtual environment.

Upstream: 0-ss#9, 0-ss#10, 0-ss#11, 0-ss#12, 0-ss#14, 0-ss#19, 0-ss#21, 0-ss#28, 0-ss#45, 0-ss#47,
0-ss#49, 0-ss#50, 0-ss#52, 0-ss#53, 0-ss#54.

Co-authored-by: 4sakenme <thienphutrinh4567@gmail.com>
Co-authored-by: Dexul <lcedu.dev@gmail.com>
Co-authored-by: Doffi4 <206447286+Doffi4@users.noreply.github.com>
Co-authored-by: Hrithik Ram Prasath <220790015+hrithikramprasath@users.noreply.github.com>
Co-authored-by: Marian Barba <134831821+MarianC-programing@users.noreply.github.com>
Co-authored-by: Victor Zwaga <victor.zwaga@gmail.com>
Co-authored-by: freroxx <yikni2829@gmail.com>
Co-authored-by: shuretokki <tri.r.utomo@gmail.com>
Co-authored-by: w4nnnn <irwanfebriansyah112@gmail.com>
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.

2 participants