Skip to content

Commit 8a35364

Browse files
committed
profiles: Clean up CLI messages
Signed-off-by: Paulo Gomes <[email protected]>
1 parent b8fbf3e commit 8a35364

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/profiles/profiles.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ func Start(profile *types.Profile, cfg *types.Config) (err error) {
270270

271271
func containerRunning(name string) bool {
272272
args := fmt.Sprintf("ps -q -f name=%s", name)
273-
fmt.Println(args)
274273
cmd := execabs.Command(files.ContainerRunnerBinary, //nolint:gosec
275274
strings.Split(args, " ")...)
276275

@@ -510,6 +509,10 @@ func createNewDisplay(profile *types.Profile, display string) error {
510509
dockerArgs = append(dockerArgs, command)
511510
dockerArgs = append(dockerArgs, cArgs...)
512511

512+
fmt.Println(
513+
"INFO: For best experience use input grabber shortcuts:",
514+
grabberShortcut())
515+
513516
slog.Debug("exec: docker", "args", dockerArgs)
514517
cmd := execabs.Command(files.ContainerRunnerBinary, dockerArgs...) //nolint
515518

@@ -520,6 +523,14 @@ func createNewDisplay(profile *types.Profile, display string) error {
520523
return nil
521524
}
522525

526+
func grabberShortcut() string {
527+
if strings.EqualFold(os.Getenv("XDG_SESSION_TYPE"), "wayland") {
528+
return "<Super> + <Esc>"
529+
}
530+
531+
return "<Ctrl> + <Shift>"
532+
}
533+
523534
func setupRunUserDir(dir string) error {
524535
err := os.MkdirAll(dir, files.DirMode)
525536
if err != nil {

0 commit comments

Comments
 (0)