tibirna / qgit

Official git repository for QGit.
Other
171 stars 66 forks source link

Changing default terminal #126

Closed bunyamintamar closed 1 year ago

bunyamintamar commented 1 year ago

I want to be able to use gnome terminal instead of default terminal. Because the default terminal does not allow the user to type commands

tibirna commented 1 year ago

I'm not sure I understand. Please indicate which terminal you are refering to? Which part of the QGit UI should be replaced with the gnome terminal?

bunyamintamar commented 1 year ago

QGit's default terminal (for user script at Actions menu) does not allow user input. I think it would be nice to be able to use an external terminal.

SubOptimal commented 1 year ago

@tibirna Following as demonstration

Assume you define an action as

read value
echo $value

The execution will stuck, as the QGit action window does not allow any user input.

@bunyamintamar A possible solution would be to use a GUI input dialog.

value=$(zenity --entry)
echo "the value is: ${value}"

image

image

tibirna commented 1 year ago

@SubOptimal @bunyamintamar the 'Action' feature is not designed to be a full fledged shell interpreter. It is just meant to create simple scripts that are ran in a detached shell and then the output displayed in a text widget, which is not a terminal (it only reuses the desktop's standard terminal icon in the window title bar).

@bunyamintamar as described, the intention of 'Action' is not to provide a terminal, but you can actually start one by simply including it in an 'Action' script. You can choose whichever you want and I guess you could pass commands to it as indicated in that terminal's manual.

@SubOptimal to allow for edit boxes, follow the tip printed at the bottom of the 'Actions' dialog: image Just include %lineedit:title=defaultvalue% at the appropriate place in your command. The input-ed value will replace the %..% token.

SubOptimal commented 1 year ago

@tibirna Thanks for the hint. I have not taken this into account. :facepalm:

To have a similar behavior like my zenity example. The following action code work as expected.

value="%lineedit:enter value=defaults%"
echo "the value is: ${value}"

Is there some other documentation about those features than inputdialog.h#L9

tibirna commented 1 year ago

Minimal documentation exists in the QGit Handbook that you can access from the 'Help' menu. That one displays the content of the README.adoc file (of which you are already aware).

Thanks Cristian

On Wed, Aug 24, 2022 at 4:56 PM Frank Dietrich @.***> wrote:

@tibirna https://github.com/tibirna Thanks for the hint. I have not taken this into account. 🤦

To have a similar behavior like my zenity example. The following action code work as expected.

value="%lineedit:enter value=defaults%"

echo "the value is: ${value}"

Is there some other documentation about those features than inputdialog.h#L9 https://github.com/tibirna/qgit/blob/master/src/inputdialog.h#L9

— Reply to this email directly, view it on GitHub https://github.com/tibirna/qgit/issues/126#issuecomment-1226327011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJOWDS6ILJ7QK6ZPBSSDMTV22EBHANCNFSM54GMNPJQ . You are receiving this because you were mentioned.Message ID: @.***>

bunyamintamar commented 1 year ago

Thanks for the hint

bunyamintamar commented 1 year ago

Thanks for the hint