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

Add initial flatpak-spawn support #570

Merged
merged 3 commits into from
Mar 29, 2022
Merged
Changes from 1 commit
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
9 changes: 1 addition & 8 deletions terminatorlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,20 +407,13 @@ def update_config_to_cell_height(filename):

def get_flatpak_args(args, envv, cwd):
"""Contruct args to be executed via flatpak-spawn"""
import json
flatpak_args = None
shell = [args[0]]
env_args = ['--env={}'.format(env) for env in envv]
flatpak_spawn = [
"flatpak-spawn", "--host", "--watch-bus", "--forward-fd=1",
"--forward-fd=2", "--directory={}".format(cwd)
]
if len(args) == 2:
flatpak_args = flatpak_spawn + env_args + shell

# Support -x, -e, custom commands etc.
if len(args) > 2:
flatpak_args = flatpak_spawn + env_args + args[1:]
flatpak_args = flatpak_spawn + env_args + args
JayDoubleu marked this conversation as resolved.
Show resolved Hide resolved

dbg('returned flatpak args: %s' % flatpak_args)

Expand Down