Open OlaoluwaM opened 2 years ago
With a bit of guidance, I can work on this!!
Sure, you're looking for the getting started guide: https://github.com/Eugeny/tabby/blob/master/HACKING.md - and then to watch for newly added tabs and listen for their activity
event
GitHubA terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.
I am getting this issue when I try to build. Also, is it fine to use npm
for this project?
I run Linux btw, Fedora 35
Have you run yarn
first? No, it's not fine to use npm
here because specific dependencies are pinned in yarn.lock
.
Still getting the same error. I ran yarn
this time
I see in the HACKING.md
there are some packages to be installed for the Debian and Ubuntu distributions. Is this the case for other Linux distros like Fedora?
I keep getting errors when building and running tabby locally on Fedora 35. Am I missing something?
Does app/node_modules/rxjs
exist? Yes, for Fedora, you need to install the corresponding Fedora packages, but that's not related to your current error.
Yes!
Oh, it worked. I didn't know we had to run yarn
in both the root and app
folder
This what I got when invoking yarn start
Sorry! I've just found and fixed an error in install-deps.js
that prevented it from running automatically. Now you just need to run node ./scripts/build-native.js
to build the native modules.
No worries!
Now I am getting this when I run yarn
in the root directory, but the command still completes successfully
This is what I get when I try to run ./scripts/build-native.js
Lastly, plugins must be in angular correct?
You need to install the normal C++ toolchain (probably https://developer.fedoraproject.org/tech/languages/c/cpp_installation.html)
Plugins must be Angular modules, yes.
Fedora Developer Portal provides information for developers running Fedora on their workstation or virtual machines.
This happens when I run yarn
in the app dir
And now I get this when I run ./scripts/build-native.js
Have you installed libfontconfig-dev
? It's one of the requirements listed in https://github.com/Eugeny/tabby/blob/master/HACKING.md
GitHubA terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.
It's not in the fedora repository
It is, and if it weren't, that doesn't mean you can just skip it: https://fedora.pkgs.org/35/fedora-x86_64/fontconfig-devel-2.13.94-3.fc35.x86_64.rpm.html
Shoot, my bad seems like lib is a prefix for debian based distros, thanks for letting me know
Couldn't find the following
I checked both the https://fedora.pkgs.org/35 link and using the dnf search
command. I still get this when I run ./scripts/build-native.js
Am I missing something?
No, these aren't errors. If you're getting exitcode 0 at the end, you're good to go
Hmm, so I got it working, but I don't seem to have tabby
as a command
tabby
as a command is only available if you install it from the official .deb or .rpm - otherwise you must use the full path to the binary
Just a hint - if you're writing a plugin, you don't need the whole Tabby source tree - just install the binary release, clone the demo plugin and you're good to go.
I did install it using the .rpm
on the release page
True! Looks like it's missing - I'll look into it. You can use the full path(/opt/Tabby/tabby
instead)
Also, running yarn
in the plugin template directory errors out with a status code of 1, because of node-sass
This is part of the output. It's long. Is there a specific node version to use?
I found the issue. the node-sass
version in the tabby-clippy
repo is compatible with only node v15. https://www.npmjs.com/package/node-sass
npmWrapper around libsass
Can I update the deps of the tabby-clippy
plugin to the latest?
How do you use the AppService
. Sorry, I am new to angular (a react dev)
You just add them as constructor parameters: https://angular.io/guide/architecture-services#dependency-injection-di
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with Angular.
Thank you! So I got it working to the point where we are able to log out to the console when the active tab changes. However, I am a bit stuck. What I am trying to implement is the ability for a command to be run after a tab has been idle (no command is running on the foreground) for a specific amount of time, with said time being a user-specified input. Currently, there doesn't seem to be a way to get the amount of time that has passed while the tab has been idle, but there is a way to get the current process (assuming it only returns what's running on the foreground and not the background)
It requires a bit of polymorphism, but I am not familiar with how angular handles that or how to approach it in this plugin. Nevertheless, my thought for an implementation is to have an interval for the user-specified duration. Once the interval ends, check if the currently active tab is still idle (no foreground processes). If it is, clean up the interval and invoke whatever command the user-specified. When the tab is no longer idle, stop the command and revert things back to normal. If a user switches tabs for some reason, the plugin could either keep the command running on the previously active tab, or stop it in the previous tab and restart the idle-checking process on the new active tab. I think the latter may be better for resource utilization
Just use the activity$
event and a bit of RxJS:
tab.activity$.pipe(
filter(x => x),
debounceTime(10000)
).subscribe(() => console.log('no activity for 10s'))
tab.activity$.pipe( filter(x => x), debounceTime(10000) ).subscribe(() => console.log('no activity for 10s'))
Or I could do this... ๐
Just use the
activity$
event and a bit of RxJS:tab.activity$.pipe( filter(x => x), debounceTime(10000) ).subscribe(() => console.log('no activity for 10s'))
So I tried this but it doesn't work when there is a process running on the terminal like termdown
. Meaning, even if termdown is running, after 10s "no activity for 10s" is logged :/
Well, yes, activity$
refers to output being printed. You could check tab.getCurrentProcess()
whether there's still a process running.
Hmm, looks like getCurrentProcess()
keeps returning null. I checked the source and it looks like I will need to override it. How can I do that? Do I make the exported class in index.ts
a child of the BaseTabComponent class? Or create a separate child class for that?
That's weird, does the current process show up in the tab context menu? (it also uses getCurrentProcess()
). Also make sure you're actually checking for the current process when clicking the tab and not then attaching to the tab.
@OlaoluwaM hi,how is it going? I need that! thx
Is your feature request related to a problem? Please describe. No, my feature request is not related to any problems
Describe the solution you'd like A setting that allows for the configuration of what command to run after a specific amount of idle time (the amount of time where the terminal has not been in use) has passed. Alongside an option for setting the command to be run, like
cmatrix
or any cool/useful effectsDescribe alternatives you've considered Using a terminal multiplexer like tmux
Additional context To be frank, I am not even sure if this is a good idea since tabby is already a bit memory-intensive ๐