source single startup file instead of inlining Hyprland config or lua file - #80
notcandy001 wants to merge 4 commits into
Conversation
Brainitech
left a comment
There was a problem hiding this comment.
Everything Looks good, but I suggest you retain the comments removed in install-arch.sh
|
done 👍🏽 |
| input { | ||
| kb_layout = __KB_LAYOUT__ | ||
| kb_variant = __KB_VARIANT__ | ||
| } |
There was a problem hiding this comment.
| input { | |
| kb_layout = __KB_LAYOUT__ | |
| kb_variant = __KB_VARIANT__ | |
| } |
We don't want to touch the keyboard layout yet. It will mess with users config if it exists.
| hl.exec_cmd("hyprctl keyword input:kb_layout __KB_LAYOUT__") | ||
| hl.exec_cmd("hyprctl keyword input:kb_variant __KB_VARIANT__") |
There was a problem hiding this comment.
| hl.exec_cmd("hyprctl keyword input:kb_layout __KB_LAYOUT__") | |
| hl.exec_cmd("hyprctl keyword input:kb_variant __KB_VARIANT__") |
Same thing with the lua template
| STARTUP_CONF="$HOME/.config/hypr/brain-shell-startup.conf" | ||
| STARTUP_LUA="$HOME/.config/hypr/brain-shell-startup.lua" |
There was a problem hiding this comment.
| STARTUP_CONF="$HOME/.config/hypr/brain-shell-startup.conf" | |
| STARTUP_LUA="$HOME/.config/hypr/brain-shell-startup.lua" | |
| STARTUP_CONF="$HOME/.config/Brain_Shell/brain-shell-startup.conf" | |
| STARTUP_LUA="$HOME/.config/Brain_Shell/brain-shell-startup.lua" |
We'll keep the startup files in the Brain_Shell dir so the hypr file is touched as less as possible.
There was a problem hiding this comment.
Same thing with the newly added Keyboard Layout.
Also I notice that you're using sed to clear the previous lines.
I suggest that you rather restore the hyprland.conf/lua backup file this file makes.
DM or comment here if you want to clarify any doubts.
Brainitech
left a comment
There was a problem hiding this comment.
I've Suggested some changes and improvements. Do look into it and lmk what you'll do. Feel free to correct me if I made a mistake anywhere
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.
dots-extra/templates/startup.conf.tpl/startup.lua.tpl. The installer renders these (substituting the detectedkeyboard 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.confdofile(os.getenv("HOME") .. "/.config/hypr/brain-shell-startup.lua")>>>/<<<markers so re-running theinstaller finds and replaces it instead of duplicating it on reinstall.
installs, so upgrading from an older Brain Shell leaves a clean config.
localectl, falling back to thelive
hyprctldevice list when run inside an active Hyprland session),baked into the generated startup file's
inputblock.Type of Change
Testing Checklist
Related Issues
(link the issue/discussion this addresses, if any)