Skip to content

remove dead code - #12

Open
presto8 wants to merge 1 commit into
mainfrom
chore/remove-dead-code
Open

presto8 wants to merge 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@presto8

@presto8 presto8 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Three functions were defined but never called from main() or anywhere
else:

mute() -- an unused &>/dev/null wrapper.
disable_if_installed() -- also buggy: it looped over "$@" binding
each unit to $unit, then passed "$@" (the
whole list) to 'systemctl list-unit-files',
so the existence check never corresponded to
the unit being disabled. disable_service()
already covers this and is the one actually
used.
auto_start_terminal() -- along with startup-terminal.desktop, its
only consumer.

Verified each name appears exactly once in the file (its own
definition) before removal, and that nothing else references
startup-terminal.desktop. All three are recoverable from history if
wanted.


🤖 Generated with Claude Code

Three functions were defined but never called from main() or anywhere
else:

  mute()                 -- an unused &>/dev/null wrapper.
  disable_if_installed() -- also buggy: it looped over "$@" binding
                            each unit to $unit, then passed "$@" (the
                            whole list) to 'systemctl list-unit-files',
                            so the existence check never corresponded to
                            the unit being disabled. disable_service()
                            already covers this and is the one actually
                            used.
  auto_start_terminal()  -- along with startup-terminal.desktop, its
                            only consumer.

Verified each name appears exactly once in the file (its own
definition) before removal, and that nothing else references
startup-terminal.desktop. All three are recoverable from history if
wanted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are limited to removing unreferenced code/assets and do not affect any remaining call paths.

Pull request overview

This PR removes unused autostart and systemd helper code from the setup script, along with its unused .desktop file, reducing maintenance surface without changing executed behavior.

Changes:

  • Deleted three unused shell functions from setup: mute(), disable_if_installed(), and auto_start_terminal().
  • Removed the unused autostart entry file startup-terminal.desktop.
File summaries
File Description
setup Removes dead, unreferenced helper functions to simplify the installer script.
startup-terminal.desktop Deletes an unused autostart desktop entry that no longer has any consumer.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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