zsh/rc.os/Arch.zsh

17 lines
819 B
Bash
Raw Normal View History

2018-03-16 12:02:58 +01:00
open_new_tab () {
if [[ -x `which guake` ]]; then
guake --new-tab=DUMB --rename-tab=$2 --execute-command=" command $* && logout; read; logout"
elif [[ -x `which yakuake` ]]; then
if [ "`qdbus org.kde.yakuake /yakuake/MainWindow_1 org.freedesktop.DBus.Properties.Get com.trolltech.Qt.QWidget visible`" = "false" ];then
qdbus org.kde.yakuake /yakuake/window toggleWindowState
fi
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.addSession>/dev/null
qdbus org.kde.yakuake /yakuake/tabs org.kde.yakuake.setTabTitle "`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId`" "$2">/dev/null
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.runCommand " command $* && exit; read; exit">/dev/null
else
command $*
fi
}
[ -x /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh