Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<br/>

Open new iTerm, Apple Terminal, Konsole, Gnome Terminal and Guake tabs from the command line.
Open new iTerm, Apple Terminal, Konsole, Yakuake, Gnome Terminal and Guake tabs from the command line.


## Install
Expand All @@ -34,7 +34,7 @@ $ tab [cmd] Open a new tab and execute CMD
$ tab [path] [cmd] ... You can prolly guess
$ tab [-s|--split] Split the current tab instead of opening a new tab
$ tab [-S|--split-horiz] Split the current tab horizontally.
(Splits are only supported in iTerm at this time)
(Splits are only supported in iTerm and Yakuake at this time)
```


Expand Down
12 changes: 12 additions & 0 deletions functions/tab.fish
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ Arguments:
case "apple_terminal"
tab.apple_terminal "$cdto" "$cmd"

case "yakuake"
if set -q splith
tab.yakuake.splith "$cdto" "$cmd"
else if set -q split
tab.yakuake.split "$cdto" "$cmd"
else
tab.yakuake "$cdto" "$cmd"
end

case "konsole"
tab.konsole "$cdto" "$cmd"

Expand Down Expand Up @@ -124,8 +133,11 @@ function __tab.term_program

case "*"
if [ "$KONSOLE_PROFILE_NAME" -o "$KONSOLE_DBUS_SERVICE" -o "$KONSOLE_DBUS_SESSION" -o "$KONSOLE_DBUS_WINDOW" ]
set is_yakuake (qdbus $KONSOLE_DBUS_SERVICE | grep yakuake)
if [ "$KATE_PID" ]
echo kate
else if test -n "$is_yakuake"
echo yakuake
else
echo konsole
end
Expand Down
11 changes: 11 additions & 0 deletions functions/tab.yakuake.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function tab.yakuake -a cdto cmd
qdbus org.kde.yakuake /yakuake/sessions addSession

if test -n "$cdto"
qdbus org.kde.yakuake /yakuake/sessions runCommand "cd $cdto"
end

if test -n "$cmd"
qdbus org.kde.yakuake /yakuake/sessions runCommand "$cmd"
end
end
11 changes: 11 additions & 0 deletions functions/tab.yakuake.split.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function tab.yakuake.split -a cdto cmd
qdbus org.kde.yakuake /yakuake/sessions splitSessionLeftRight $KONSOLE_DBUS_SESSION

if test -n "$cdto"
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION runCommand "cd $cdto"
end

if test -n "$cmd"
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION runCommand "$cmd"
end
end
11 changes: 11 additions & 0 deletions functions/tab.yakuake.splith.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function tab.yakuake.splith -a cdto cmd
qdbus org.kde.yakuake /yakuake/sessions splitSessionTopBottom $KONSOLE_DBUS_SESSION

if test -n "$cdto"
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION runCommand "cd $cdto"
end

if test -n "$cmd"
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION runCommand "$cmd"
end
end