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

Update FvwmCommand to allow multiple args. #514

Merged
merged 1 commit into from
Jun 2, 2021
Merged
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
8 changes: 4 additions & 4 deletions bin/FvwmCommand.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import json
# at this moment, that is all. It doesn't parse json structures yet, or anything
# fancy and new from FVWM3 new command processing interface.

def mflclnt(verbose, read_from_stdin, info, fvwm_socket):
def mflclnt(verbose, read_from_stdin, info, fvwm_socket, args):
# Create a unix domain socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

Expand Down Expand Up @@ -59,8 +59,8 @@ def mflclnt(verbose, read_from_stdin, info, fvwm_socket):
message = stdline.encode()
sock.sendall(message)
else:
message = sys.argv[-1].encode()
if sys.argv[0] is not sys.argv[-1]:
message = " ".join(args).encode()
if len(args) > 0:
sock.sendall(message)
if verbose:
print('Sent {!r}'.format(message) + " to FvwmMFL")
Expand Down Expand Up @@ -142,7 +142,7 @@ def main():
assert False, "unhandled option"

# Call out socket function finally.
mflclnt(verbose, read_from_stdin, info, fvwm_socket)
mflclnt(verbose, read_from_stdin, info, fvwm_socket, args)

if __name__ == "__main__":
main()
Expand Down