From 75f09ff8439f19970f2802c4f87baac7f386a8c1 Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:51:18 +0300 Subject: [PATCH] fix: allow it to work on read-only filesystems --- .gitignore | 4 ---- catppuccin.tmux | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 5dedc76..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +0,0 @@ -# Let's not store the selected theme in version control. This file is used to -# source theme variables locally in the main function rather than polluting the -# global variable namespace. -catppuccin-selected-theme.tmuxtheme diff --git a/catppuccin.tmux b/catppuccin.tmux index 47d06e9..f78366f 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -32,11 +32,8 @@ main() { # NOTE: Pulling in the selected theme by the theme that's being set as local # variables. - sed -E 's/^(.+=)/local \1/' \ - > "${PLUGIN_DIR}/catppuccin-selected-theme.tmuxtheme" \ - < "${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme" - - source "${PLUGIN_DIR}/catppuccin-selected-theme.tmuxtheme" + # shellcheck source=catppuccin-frappe.tmuxtheme + source /dev/stdin <<<"$(sed -e "/^[^#].*=/s/^/local /" "${PLUGIN_DIR}/catppuccin-${theme}.tmuxtheme")" # status set status "on"