Bug 446920

Summary: [Feature Reequest] Open directory in yakuake from commandline
Product: [Applications] yakuake Reporter: martinandersen <martinandersen3d>
Component: generalAssignee: Eike Hein <hein>
Status: REPORTED ---    
Severity: normal CC: kde.matchbook814, kristen, tdhj744ra03u
Priority: NOR    
Version First Reported In: 21.11.80   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description martinandersen 2021-12-13 10:09:15 UTC
It should be possible for other programs, to tell yakuake to open in a specific directory, when a yakuake sesseion is allready running.

From a CLI, it should be possible to extend the yakuake CLI parameters:

```
-t, --new-tab   <path>                Open folders in new tab of last window (default)
-r, --reuse-tab <path>                Open folder in current tab of last used window
-p, --profile   <profilename>         Start a new tab, with profile by name
```

Test Case A:
 1. Start yakuake
 2. from another terminal write: yakuake -t "~/Documents"
 3. yakuake opens a new tab in "~/Documents"

Test Case B:
 1. Start yakuake
 2. from another terminal write: yakuake -r "~/Documents"
 3. yakuake opens "~/Documents" and reuse the current tab

Test Case C:
 1. Start yakuake
 2. from another terminal write: yakuake -p "MyFzfProfile" "~/Documents"
 3. yakuake opens a new tab in "~/Documents", with the yakuake profile called "MyFzfProfile"
Comment 1 Kristen McWilliam 2024-05-29 15:26:28 UTC
Try the dbus interface. For example, using qdbus from another terminal...


Open/close:

qdbus org.kde.yakuake /yakuake/window toggleWindowState


Change the directory of the active tab to /etc:

qdbus org.kde.yakuake /yakuake/sessions runCommand "cd /etc"


Open a new tab and change its location to /usr:

qdbus org.kde.yakuake /yakuake/sessions addSession && qdbus org.kde.yakuake /yakuake/sessions runCommand "cd /usr"