feat(tmux): remove sed dependency for theme loading
This commit is contained in:
parent
d60e40e097
commit
546afee39d
1 changed files with 10 additions and 1 deletions
|
@ -225,7 +225,16 @@ main() {
|
|||
# NOTE: Pulling in the selected theme by the theme that's being set as local
|
||||
# variables.
|
||||
# shellcheck source=catppuccin-frappe.tmuxtheme
|
||||
source /dev/stdin <<<"$(sed -e "/^[^#].*=/s/^/local /" "${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme")"
|
||||
# https://github.com/dylanaraps/pure-sh-bible#parsing-a-keyval-file
|
||||
while IFS='=' read -r key val; do
|
||||
# Skip over lines containing comments.
|
||||
# (Lines starting with '#').
|
||||
[ "${key##\#*}" ] || continue
|
||||
|
||||
# '$key' stores the key.
|
||||
# '$val' stores the value.
|
||||
local "$key"="${val:1:-1}"
|
||||
done < "${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme"
|
||||
|
||||
# status
|
||||
set status "on"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue