I tend to use Yakuake to launch a program like btop or htop so I have a flyout system monitor whenever I want. Yakuake is already set up to autostart, but I want it to open a tab with btop every time I start Yakuake. How can I do this?
You can create a new profile, set it as default for Yakuake, and change the profile’s start command to /usr/bin/htop for example.
Great idea @rodrigopedra !
Hm, this solution seems less than ideal. I can’t find a way to make a new session with anything other than btop.
Is there some way that I can make Yakuake start up with one session that runs btop and then a second session that is just an empty shell?
You can make a script that checks if btop is running, if it is not, launch it, if it is, launch /usr/bin/bash instead.
Something like this:
#!/bin/bash
if pidof -q "/usr/bin/btop";
then
/usr/bin/bash
else
/usr/bin/btop
fi;
Save this script somewhere, I put mine in my ~/bin, and don’t forget to make it executable:
chmod u+x ~/bin/yakuake-shell.sh
Then, on your yakuake’s profile, make this script the start command.
Thank you this helped me so much!
I had to change it a bit to make it work for me:
#!/bin/bash
if pidof -q btop >/dev/null; then
/usr/bin/bash
else
/snap/bin/btop
fi