jerdna-regeiz / splitmind

Split information output of pwndbg output
MIT License
178 stars 26 forks source link

can't set size #12

Closed nxwbxdy closed 8 months ago

nxwbxdy commented 8 months ago

I probably am just too incompetent to read the docs but i can't set the size of some windows. It works, when i don't provide the size. I assume tmux can't take the argument.

error:

size missing
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/home/l466l/splitmind/splitmind/mind.py", line 37, in right
    self.last = self.splitter.right(*args, of=of or self.last, display=display, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/l466l/splitmind/splitmind/splitter/tmux.py", line 147, in right
    return self.split("-h",  *args, target=of, display=display, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/l466l/splitmind/splitmind/splitter/tmux.py", line 137, in split
    split = tmux_split(*args, target=target, display=display, cmd=cmd or self.cmd,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/l466l/splitmind/splitmind/splitter/tmux.py", line 42, in tmux_split
    res = check_output('tmux split-window -P -d -F'.split(" ")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['tmux', 'split-window', '-P', '-d', '-F', '#{pane_id}:#{pane_tty}', '-h', '-p', '60', '/bin/cat -']' returned non-zero exit status 1.
/home/l466l/.gdbinit:16: Error in sourced command file:
Error while executing Python code.

config:

source /usr/share/pwndbg/gdbinit.py

source /home/l466l/splitmind/gdbinit.py
python

(splitmind.Mind() \
    .right(display="disasm", size="60%") \
    .below(of="main", display="stack") \
    .below(display="backtrace") \
    .below(of="disasm", display="regs") \
    .show("legend", on="disasm") \
).build()
end
nxwbxdy commented 8 months ago

it works without the % sign but i think it's intended to be also used with the % sign like in some examples. Also i use a fresh compiled tmux version next-3.5

Techno-Fox commented 8 months ago

I can concur that I am also have this issue.

danielepintore commented 8 months ago

Yes you are right apparently the -p option in tmux was deprecated in version 3.1, probably they removed the option in the latest release, i've created a pull request solving the issue #13