slack-term icon indicating copy to clipboard operation
slack-term copied to clipboard

Support multiple teams

Open amitizle opened this issue 8 years ago • 14 comments

Very cool app, thanks for that!

A feature request; support multiple teams

amitizle avatar Nov 01 '16 16:11 amitizle

Thanks, glad you like it!

This is possible, however you need to get a slack token for each team and create separate config files. Then you can start the application with the following command:

$ slack-term -config [path-to-config-file]

Create some nice aliases for the different teams and you're done.

jpbruinsslot avatar Nov 01 '16 16:11 jpbruinsslot

Thanks :)

I meant, same functionality in the official Slack application. (Reference)

Maybe something like;

$ slack-term -config [team-1-config] -config [team-2-config]

And then switching teams with a keyboard shortcut, in the official app it is done with Cmd + T.

amitizle avatar Nov 01 '16 17:11 amitizle

Since the config file is JSON it should be doable with a single config file, the file will just have to be turned into an array (would probably break backwards compatibility with older configs though).

This would be a useful feature either way.

vendion avatar Nov 30 '16 15:11 vendion

👍 This sounds good

RWOverdijk avatar Dec 11 '17 09:12 RWOverdijk

Meanwhile, you could write a little script that opens multiple tabs with the teams you like. I have done one for my Linux Mint Mate environment like so: https://gist.github.com/nud3l/324ba40fe87cbfea180c436e98e4cc1e

For gnome, you could use the gnome-terminal. Likewise for other environments. I purposely did not use my default terminal, which is terminator. For some reason, the creation of new tabs did not really work there.

nud3l avatar May 02 '18 05:05 nud3l

This is what I do and it seems to work pretty well for me. I just have a folder, ~/.slack-term/, that has a bunch of json files with the connection tokens and a tmux pane gets opened for each slack team. I also have it update slack-term because why not.

https://gist.github.com/mynameisfiber/85e9d5471317075bbb8109bc0e68d53b

mynameisfiber avatar Nov 05 '18 00:11 mynameisfiber

Nice @mynameisfiber. Good idea.

amitizle avatar Nov 06 '18 11:11 amitizle

How about a single config file and different sub-configs for each team? That way you don't have a ton of files to maintain, and a change to a single global config value doesn't have to be re-written in a ton of config files.

Something along the lines of this approach (disclaimer: my PR)? If you like, I'll try a PR here :)

For example,

{
    "workspaces": {
        "workspace1": {
            "slack_token": "XXX",
        },
        "workspace2": {
            "slack_token": "XXX",
        }
    },
    // the rest of the config, as exists now
}

And then invoke with slack-term workspace1.

(First explained here) https://github.com/bkanber/Slackadaisical/pull/11#issuecomment-368538917

j6k4m8 avatar Nov 12 '18 16:11 j6k4m8

@j6k4m8 that looks good, just wondering if things like notify and mention will go under each workspace?

amitizle avatar Nov 12 '18 22:11 amitizle

what do you think of each workspace dictionary having the priority to override the global, otherwise global options are used?

On Mon, Nov 12, 2018, 7:47 PM Amit Goldberg [email protected] wrote:

@j6k4m8 https://github.com/j6k4m8 that looks good, just wondering if things like notify and mention will go under each workspace?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erroneousboat/slack-term/issues/46#issuecomment-438058712, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqVBySvX1YvCF0jKQ1hNJDFb-0iYrvRks5uufywgaJpZM4KmT5l .

j6k4m8 avatar Nov 13 '18 02:11 j6k4m8

Yeah that sounds great. IMO it's better to have one file with the config.

The precedence of the config is a nice touch to that 👍

amitizle avatar Nov 13 '18 10:11 amitizle

Pull-request'd! :D

j6k4m8 avatar Nov 18 '18 21:11 j6k4m8

Hi folks, necro bump, did this ever get resolved one way or another?

AlexChalk avatar Nov 06 '20 15:11 AlexChalk

#169 is still outstanding, unfortunately

j6k4m8 avatar Nov 06 '20 15:11 j6k4m8