Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import functionality from #118 #119

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extrakto_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def has_single_pane(self):

def get_next_mode(self, next):
if next == "initial":
return self.modes_list[0]
return os.environ.get("extrakto_inital_mode", self.modes_list[0])
else:
return self.next_mode[next]

Expand Down
7 changes: 6 additions & 1 deletion scripts/open.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if [ "$split_direction" = "a" ]; then
fi
fi

extrakto_inital_mode="$2"
if [ "$split_direction" = "p" ]; then
popup_size=$(get_option "@extrakto_popup_size" "90%")
popup_width=$(echo $popup_size | cut -d',' -f1)
Expand All @@ -35,11 +36,15 @@ if [ "$split_direction" = "p" ]; then
-h "${popup_height:-${popup_width}}" \
-x "${popup_x}" \
-y "${popup_y:-$popup_x}" \
-e extrakto_inital_mode="${extrakto_inital_mode}" \
-E "${extrakto} ${pane_id} popup"
rc=$?
done
exit $rc
else
split_size=$(get_option "@extrakto_split_size" 7)
tmux split-window -${split_direction} -l ${split_size} "tmux setw remain-on-exit off; ${extrakto} ${pane_id} split"
tmux split-window \
-${split_direction} \
-e extrakto_inital_mode="${extrakto_inital_mode}" \
-l ${split_size} "tmux setw remain-on-exit off; ${extrakto} ${pane_id} split"
fi
Loading