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

Option/argument for execute non-shell application at start (like -e in urxvt/xterm) #12

Closed
r3lgar opened this issue Jul 20, 2018 · 4 comments

Comments

@r3lgar
Copy link
Contributor

r3lgar commented Jul 20, 2018

No description provided.

@endaaman
Copy link
Owner

@r3lgar

When you do $ tym --c:shell=/path/to/script, the script will be executed but the application of the terminal will be closed on event 'child-exited' of VTE. You can confirm this by following script.

#!/bin/bash
echo 'hello'
sleep 3

c.f. https://github.com/endaaman/tym/blob/master/src/tym.c#L43

This specification is needed as a terminal emulator because the window should be closed when we press Ctrl+D on our shell.

So I think you need an option like no-quit to not close the window when finished. How about you?

@r3lgar
Copy link
Contributor Author

r3lgar commented Jul 28, 2018

So I think you need an option like no-quit to not close the window when finished.

Not yet. ☺

tym --c:shell=/path/to/script

I'm a fool! Resolved.

@r3lgar
Copy link
Contributor Author

r3lgar commented Jul 28, 2018

tym --c:shell=/path/to/script

It doesn't work with options/arguments:

% tym --c:shell="alsamixer -g"

(tym:24820): GLib-GObject-WARNING **: 21:56:19.154: invalid cast from 'VteTerminal' to 'GtkWindow'

(tym:24820): Gtk-CRITICAL **: 21:56:19.154: gtk_window_set_title: assertion 'GTK_IS_WINDOW (window)' failed

(tym:24820): Gtk-CRITICAL **: 21:56:19.154: gtk_window_is_active: assertion 'GTK_IS_WINDOW (window)' failed

** (tym:24820): WARNING **: 21:56:19.199: vte spwan failed for: Failed to execute child process “alsamixer -g” (No such file or directory)
^C

It draws an empty window (without content).

And if I start application not inside the shell, I can't use aliases (which have options/arguments).

@endaaman
Copy link
Owner

endaaman commented Jul 29, 2018

Finding g_shell_parse_argv(), I could implement support for shell containing multi arguments at 9aca9dc

I was also in trouble about the problem so I feel good to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants