Compare commits
2 Commits
6b1d53f65d
...
36bd56bcc4
| Author | SHA1 | Date | |
|---|---|---|---|
| 36bd56bcc4 | |||
| 78ce7dac48 |
@ -21,7 +21,7 @@ commands = defaultdict(list)
|
|||||||
|
|
||||||
all_tty = [p.pane_tty for p in srv.panes]
|
all_tty = [p.pane_tty for p in srv.panes]
|
||||||
|
|
||||||
cmd = f"-t {' -t '.join(all_tty)} -o pid:10 -o tty:10 -o command -ww -f"
|
cmd = f"-t {' -t '.join(all_tty)} -o pid:10 -o tty:10 -o command -ww" # -f
|
||||||
|
|
||||||
sh_commands = sh.ps(cmd.split(' ')).stdout.decode().strip().split("\n")
|
sh_commands = sh.ps(cmd.split(' ')).stdout.decode().strip().split("\n")
|
||||||
|
|
||||||
@ -55,7 +55,10 @@ def format_pane(pane):
|
|||||||
else:
|
else:
|
||||||
cmd = {"pid": "-", "command": "*command not found*"}
|
cmd = {"pid": "-", "command": "*command not found*"}
|
||||||
|
|
||||||
return [f"{pane.pane_tty}: [Sess:{pane.session_name}, Win:{pane.window_name}] (cwd:{pane.pane_current_path.replace('/home/legrems/', '~/')}): {cmd['command']}"]
|
path = pane.pane_current_path.replace("/home/legrems/Documents/Arcanite", "~/D/A")
|
||||||
|
path = path.replace("/home/legrems/Documents", "~/D")
|
||||||
|
path = path.replace("/home/legrems", "~")
|
||||||
|
return [f"{pane.pane_tty}: [{pane.session_name}: {pane.window_name}, {path}]: {cmd['command']}"]
|
||||||
|
|
||||||
|
|
||||||
panes = []
|
panes = []
|
||||||
|
|||||||
@ -12,6 +12,7 @@ folders = [
|
|||||||
"~/Documents/PolyLAN/",
|
"~/Documents/PolyLAN/",
|
||||||
"~/Documents/Python/",
|
"~/Documents/Python/",
|
||||||
"~/Documents/",
|
"~/Documents/",
|
||||||
|
"~/Documents/Games/Minecraft/modded/",
|
||||||
]
|
]
|
||||||
|
|
||||||
available_folders = sh.find(*[Path(f).expanduser() for f in folders] + "-mindepth 1 -maxdepth 1 -type d".split(" ")).strip().split("\n")
|
available_folders = sh.find(*[Path(f).expanduser() for f in folders] + "-mindepth 1 -maxdepth 1 -type d".split(" ")).strip().split("\n")
|
||||||
|
|||||||
@ -106,7 +106,7 @@ for selected_group in selections:
|
|||||||
if not servers:
|
if not servers:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
window_name = get_window_name(info["section"])
|
window_name = get_window_name(selected_group)
|
||||||
if windows := active_session.windows.filter(name=window_name):
|
if windows := active_session.windows.filter(name=window_name):
|
||||||
windows[0].select()
|
windows[0].select()
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user