Hi I built the following yakuake.sh script for yakuake start-up, most of it works however I’m unable to resize the terminals - I’m pretty new to this so any help or guidance really appreciated.
#!/bin/bash
# DEPENDENCIES
#Yakuake, cmatrix, neofetch, bpytop
#CONCEPT
#Have a drop down 'quake' like terminal which has a standard terminal on the left and bpytop on the right
# bpytop will appear to be overlaid on top of cmatrix giving a great visualization whilst also providing a great system monitor
# QDBusViewer was very useful in setting up this script
#This will create a split terminal as shown on diagram below.
#+--------------------------------+--------------------------------+
#|TerminalID=0 (runs neofetch) |TerminalID=1 (runs cmatrix) |
#| +--------------------------------+
#| |TerminalID=2 (runs bpytop) |
#| | |
#| | |
#| | |
#| | |
#| | |
#| | |
#+ +--------------------------------+
#| |TerminalID=3 (runs cmatrix) |
#+--------------------------------+--------------------------------+
# This line is needed in case Yakuake does not accept fcitx inputs.
#(don't know what this does - copied from example script)
/usr/bin/yakuake --im /usr/bin/fcitx --inputstyle onthespot &
# gives Yakuake a couple seconds before sending dbus commands
sleep 2
#set-up some variables
#set tab title
qdbus org.kde.yakuake /yakuake/tabs setTabTitle 0 "user"
#set-up terminal split design (see diagram above)
#split terminal into two left/right
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalLeftRight "0"
#Now split the RHS into 3 terminals
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalTopBottom "1"
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalTopBottom "2"
#now resize the right hand middle terminal to take up most the space (the next two lines don't work)
qdbus org.kde.yakuake /yakuake/sessions tryGrowTerminalTop "2" 250
qdbus org.kde.yakuake /yakuake/sessions tryGrowTerminalBottom "2" 200
#Now run applications
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 0 "neofetch"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 1 "cmatrix"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 2 "bpytop"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 3 "cmatrix"
[quote=“richarson, post:2, topic:799”]
On topic: try to use org.kde.yakuake.tryGrowTerminal(Bottom|Top) instead?
[/quote
Hi thanks for the suggestion, that doesn’t appear to be recognised, I can use
org.kde.yakuake.tryGrowTerminalBottom 2 20
without any errors appearing and can send it successfully using QDbusviewer but on further investigation in the script it I can see that small numbers <~20 (which should be pixels) doesn’t move the terminal window at all and larger numbers seem to complexly expand TerminalID 2 Terminals 1 and 3 are there but minimized to be invisible - my mouse can resize them so they cam bee seen.
So using qdbusviewer I can see that tryGrowTerminalTop is overloaded.
You can use it with just the terminalID or with the TerminalID and the pixels you want to move it the behavior im getting in the script is the behaviour without the second parameter, but I can’t work out how to correct the script so that it takes both the terminalID and the pixels to move
Hi, Thanks for trying this.
I copy & pasted your example, changed the TerminalID and I still have the same behavior, I.e. it expands the terminal completely in the appropriate direction.
i.e. qdbus org.kde.yakuake /yakuake/sessions tryGrowTerminalTop 2 100
fully expands terminal 2 to the top - i.e. it is ignoring the pixel parameter. If I run this command in QDBusViewer it expands as expected by 100px upwards
Odd, I se the duplicated tryGrowTerminalTop in qdbusviewer but from a terminal (either another yakuake tab or a konsole window) it works for me without issues.
But I never tried this method before, so it may be a bug? What version of yakuake are you using?
Ah so I might be getting somewhere, this also works for me in Yakuake terminal but not in the script
this is my script which I run at start-up
#!/bin/bash
# DEPENDENCIES
#Yakuake, cmatrix, neofetch, bpytop make sure all these work before installing this config file
#CONCEPT
#Have a drop down 'quake' terminal which has a standard terminal on the left and bpytop on the right
# BPYtop appears to be overlaid on top of cmatrix giving a great visualisation whilst also providing a great
# system monitor
# QDBusViewer was very useful in setting up this script
#This will create a split terminal as shown on diagram below.
#+--------------------------------+--------------------------------+
#|TerminalID=0 (runs neofetch) |TerminalID=1 (runs cmatrix) |
#| +--------------------------------+
#| |TerminalID=2 (runs bpytop) |
#| | |
#| | |
#| | |
#| | |
#| | |
#| | |
#+ +--------------------------------+
#| |TerminalID=3 (runs cmatrix) |
#+--------------------------------+--------------------------------+
# This line is needed in case Yakuake does not accept fcitx inputs.
#(don't know what this does - copied from example script)
/usr/bin/yakuake --im /usr/bin/fcitx --inputstyle onthespot &
# gives Yakuake a couple seconds before sending dbus commands
sleep 2
#set tab title
qdbus org.kde.yakuake /yakuake/tabs setTabTitle 0 "user"
#set-up terminal split design (see diagram above)
#split terminal into two left/right
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalLeftRight 0
#Now split the RHS into 3 terminals
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalTopBottom 1
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.splitTerminalTopBottom 2
#now resize the right hand middle terminal to take up most the space
qdbus org.kde.yakuake /yakuake/sessions tryGrowTerminalTop 2 100
qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.tryGrowTerminalBottom 2 200
#Now run applications
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 0 "neofetch"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 1 "cmatrix -u 9"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 2 "bpytop"
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal 3 "cmatrix -u 9"