zdcthomas / dmux

A tmux workspace manager
MIT License
310 stars 6 forks source link

Add examples #16

Open DanielRivasMD opened 4 years ago

DanielRivasMD commented 4 years ago

Love the idea for this app. I cannot get it to run, though. Some examples would be great.

zdcthomas commented 4 years ago

totally, I can add more explicit usage instructions. I assume you were able to install dmux, what did you try usage-wise?

DanielRivasMD commented 4 years ago

I was (running on OSX through homebrew). I can even run it. However, I believe something is not correct with my commands because I input "dmux -P javascript", which through a fuzzy finder. But whichever directory I choose, I only get to windows, one default and one with the selected directory. Not entirely certain whether this behavior is due to my tmux.conf (I tried also with no tmux.conf but same result), my systems config or just using dmux inappropriately. I also tried some other options, but the result is pretty much the same (two windows every time). Cheers

zdcthomas commented 4 years ago

I see, so you have a javascript profile defined a dmux.conf.toml somewhere? what does that configuration file look like?

DanielRivasMD commented 4 years ago

I took this one that you have in the README:

layout = "5e09,281x67,0,0{133x67,0,0,17,147x67,134,0[147x33,134,0,18,147x33,134,34{73x33,134,34,136,73x33,208,34[73x16,208,34,164,73x16,208,51,165]}]}" session_name = "development" number_of_panes = 5 commands = ["nvim", "fish"]

[javascript] number_of_panes = 3 session_name = "frontend" commands = ["nvim", "fish", "yarn watch"]

zdcthomas commented 4 years ago

Hmm, I copied the javascript section into my config, and it was able to open up three panes, all with the correct commands. I ran dmux -P javascript

Where is your config file located?

DanielRivasMD commented 4 years ago

At $HOME. By the way, I am running tmux 3.1b, if that could be an issue

zdcthomas commented 4 years ago

out of curiosity, does it work when you move it to ~/config/dmux/ ?

DanielRivasMD commented 4 years ago

Just gave it a try. Didn't come through.

zdcthomas commented 4 years ago

Hmm, interesting, what's the file name?

fiskhest commented 4 years ago

Also seeing this. Have placed file at ~/.config/dmux/dmux.conf.toml:

layout = "55c2,199x23,0,0{99x23,0,0,146,99x23,100,0[99x11,100,0,147,99x11,100,12,149]}"
session_name = "misc"
number_of_panes = 3
commands = ["vim", "zsh"]

[python]
number_of_panes = 3
session_name = "root"
commands = ["vim", "zsh", "python"]

executing with ~/.cargo/bin/dmux -P python starts fzf and I can select a folder. A new window is created, with only one pane with its directory set to the selected folder.

if I move away the configuration file dmux fails to run with a backtrace:

.cargo/bin/dmux -P python
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: configuration property "python" not found', /home/johan/.cargo/registry/src/github.com-1ecc6299db9ec823/dmux-0.5.2/src/app.rs:189:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Running arch/zsh/tmux 3.1b

zdcthomas commented 4 years ago

Hmm, I'm unable to replicate that on my machine, what dmux version are you running?

fiskhest commented 4 years ago
❯ ~/.cargo/bin/dmux -V
dmux 0.5.2

In case it's of any use for you in understanding/replicating;

❯ fd --version
fd 8.1.1
❯ fzf --version
0.22.0
zdcthomas commented 4 years ago

Is this still happening on 0.6.1 ?

fiskhest commented 4 years ago
❯ .cargo/bin/dmux -V
dmux 0.6.1

The behavior is exactly the same as previously described. Launch dmux with a profile, select folder, a new window is created with that folder as root but no other settings from the profile are set.

I also tried launching dmux from the CLI with arguments not pointing to a profile or commands to execute(to rule out that the configuration for the profile, or the execution of my specific command(s) - are the culprit(s)). No change in behavior, session and window is created but the windows name is not apa (it is instead the name of the selected folder) and there is only one pane: .cargo/bin/dmux -p 3 -s test -w apa

Unsure if it's a mistake or not, but I can't see that 0.6.1 was pushed to crates.io ; I installed it manually from source.

zdcthomas commented 4 years ago

Hmm super interesting, are you still running on OsX?

zdcthomas commented 4 years ago

I've also published to cargo, so you should be able to pull down from there too

zdcthomas commented 4 years ago

Ok, I've been able to replicate, I will work it out soon

zdcthomas commented 4 years ago

Just to confirm you're seeing the right number of windows, the right session name, but the window name is wrong

fiskhest commented 4 years ago

Hmm super interesting, are you still running on OsX?

You might be confusing me for the original author, I never ran on OSX.

Just to confirm you're seeing the right number of windows, the right session name, but the window name is wrong

No. With the following command: .cargo/bin/dmux -p 3 -s test -w apa

A session is created with the name test (correct). A window inside session test is created. It's named as the selected folder(not apa from -w), and there is only one pane (not 3 from -p).

This is the exact same behavior I get from dmux -P python.

zdcthomas commented 4 years ago

Gotcha, I just pushed up 0.6.2 which should fix the window name issue, but i'm having a difficult time replicating the issue with one pane, but I'll keep testing it

fiskhest commented 4 years ago

Gotcha, I just pushed up 0.6.2 which should fix the window name issue, but i'm having a difficult time replicating the issue with one pane, but I'll keep testing it

Can confirm the window name issue is fixed. Is there anything I can do or information I can fetch to aide in reproducing the pane issue?

zdcthomas commented 4 years ago

I'm gonna add some option logging under a verbosity flag I think and then that might help us debug this more easily. I'll let you know when it's up