Skip to content

source single startup file instead of inlining Hyprland config or lua file - #80

Open
notcandy001 wants to merge 4 commits into
Brainitech:devfrom
notcandy001:main
Open

source single startup file instead of inlining Hyprland config or lua file#80
notcandy001 wants to merge 4 commits into
Brainitech:devfrom
notcandy001:main

Conversation

@notcandy001

Copy link
Copy Markdown
Contributor

Overview

Replaces the inline exec-once (hyprland.conf) / hl.on (hyprland.lua) block that
the installer appended into the user's Hyprland config with a single-line
injection instead.

  • Startup commands now live in dots-extra/templates/startup.conf.tpl /
    startup.lua.tpl. The installer renders these (substituting the detected
    keyboard layout) to ~/.config/hypr/brain-shell-startup.conf / .lua,
    and injects just one line into the user's own config:
    • source = $HOME/.config/hypr/brain-shell-startup.conf
    • dofile(os.getenv("HOME") .. "/.config/hypr/brain-shell-startup.lua")
  • The injected line is wrapped in >>>/<<< markers so re-running the
    installer finds and replaces it instead of duplicating it on reinstall.
  • Also detects and strips the old fully-inlined block from pre-existing
    installs, so upgrading from an older Brain Shell leaves a clean config.
  • Added keyboard layout auto-detection (localectl, falling back to the
    live hyprctl device list when run inside an active Hyprland session),
    baked into the generated startup file's input block.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (causes existing functionality to not work as expected)

Testing Checklist

  • I have tested these changes locally and on a fresh VM install.
  • I have tested the QML UI on my primary resolution.
  • (If applicable) I have tested UI changes on secondary monitors or different resolutions.
  • (If applicable) I have verified my bash scripts run cleanly without syntax errors.

Related Issues

(link the issue/discussion this addresses, if any)

@Brainitech Brainitech left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Everything Looks good, but I suggest you retain the comments removed in install-arch.sh

@notcandy001

Copy link
Copy Markdown
Contributor Author

done 👍🏽

@notcandy001
notcandy001 requested a review from Brainitech August 27, 2026 17:12
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