machineconfig 6.82__py3-none-any.whl → 6.84__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/scripts/linux/mcfgs +1 -0
- machineconfig/scripts/linux/term +39 -0
- machineconfig/scripts/python/env_manager/path_manager_tui.py +1 -1
- machineconfig/scripts/python/helpers_devops/cli_config.py +1 -1
- machineconfig/scripts/python/helpers_devops/cli_self.py +3 -3
- machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py +1 -1
- machineconfig/scripts/python/nw/mount_nfs +1 -1
- machineconfig/scripts/python/terminal.py +81 -0
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
- machineconfig/scripts/windows/term.ps1 +0 -0
- machineconfig/settings/shells/bash/init.sh +2 -0
- machineconfig/settings/shells/pwsh/init.ps1 +1 -0
- machineconfig/setup_linux/web_shortcuts/interactive.sh +2 -1
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +2 -1
- machineconfig/utils/code.py +3 -1
- machineconfig/utils/options.py +12 -2
- machineconfig/utils/ssh.py +1 -1
- {machineconfig-6.82.dist-info → machineconfig-6.84.dist-info}/METADATA +1 -1
- {machineconfig-6.82.dist-info → machineconfig-6.84.dist-info}/RECORD +22 -21
- {machineconfig-6.82.dist-info → machineconfig-6.84.dist-info}/entry_points.txt +1 -0
- machineconfig/scripts/linux/other/share_smb +0 -1
- machineconfig/scripts/linux/z_ls +0 -104
- {machineconfig-6.82.dist-info → machineconfig-6.84.dist-info}/WHEEL +0 -0
- {machineconfig-6.82.dist-info → machineconfig-6.84.dist-info}/top_level.txt +0 -0
|
@@ -25,6 +25,7 @@ mcfg "$@"
|
|
|
25
25
|
|
|
26
26
|
if [[ -f "$OP_PROGRAM_PATH" ]]; then
|
|
27
27
|
printf "%b\n" "${GREEN}✅ Found op program:${RESET} ${OP_PROGRAM_PATH}"
|
|
28
|
+
bat --style=plain --paging=never "$OP_PROGRAM_PATH"
|
|
28
29
|
printf "%b\n" "${GREEN}▶ Running...${RESET}"
|
|
29
30
|
. "$OP_PROGRAM_PATH"
|
|
30
31
|
status=$?
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
#!/usr/bin/env bash
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
RANDOM_NAME=$(date +%s%N | sha256sum | head -c 16)
|
|
6
|
+
OP_DIR="$HOME/tmp_results/tmp_scripts/machineconfig"
|
|
7
|
+
OP_PROGRAM_PATH="$OP_DIR/${RANDOM_NAME}.sh"
|
|
8
|
+
export OP_PROGRAM_PATH
|
|
9
|
+
|
|
10
|
+
# ANSI color/style codes
|
|
11
|
+
BOLD="\033[1m"
|
|
12
|
+
RESET="\033[0m"
|
|
13
|
+
GREEN="\033[32m"
|
|
14
|
+
YELLOW="\033[33m"
|
|
15
|
+
BLUE="\033[34m"
|
|
16
|
+
RED="\033[31m"
|
|
17
|
+
|
|
18
|
+
timestamp=$(date -u +"%Y-%m-%d %H:%M:%SZ")
|
|
19
|
+
|
|
20
|
+
printf "%b\n" "${BOLD}${BLUE}🛠️ terminal — running term${RESET}"
|
|
21
|
+
printf "%b\n" "${BLUE}Timestamp:${RESET} ${timestamp}"
|
|
22
|
+
printf "%b\n" "${BLUE}Op program path:${RESET} ${OP_PROGRAM_PATH}"
|
|
23
|
+
|
|
24
|
+
terminal "$@"
|
|
25
|
+
|
|
26
|
+
if [[ -f "$OP_PROGRAM_PATH" ]]; then
|
|
27
|
+
printf "%b\n" "${GREEN}✅ Found op program:${RESET} ${OP_PROGRAM_PATH}"
|
|
28
|
+
bat --style=plain --paging=never "$OP_PROGRAM_PATH"
|
|
29
|
+
printf "%b\n" "${GREEN}▶ Running...${RESET}"
|
|
30
|
+
. "$OP_PROGRAM_PATH"
|
|
31
|
+
status=$?
|
|
32
|
+
if [[ $status -eq 0 ]]; then
|
|
33
|
+
printf "%b\n" "${GREEN}✅ Completed successfully (exit ${status})${RESET}"
|
|
34
|
+
else
|
|
35
|
+
printf "%b\n" "${YELLOW}⚠️ Program exited with status ${status}${RESET}"
|
|
36
|
+
fi
|
|
37
|
+
else
|
|
38
|
+
printf "%b\n" "${YELLOW}⚠️ No op program found at: ${OP_PROGRAM_PATH}${RESET}"
|
|
39
|
+
fi
|
|
@@ -46,7 +46,7 @@ def path():
|
|
|
46
46
|
uv_with = ["textual"]
|
|
47
47
|
uv_project_dir = None
|
|
48
48
|
if not Path.home().joinpath("code/machineconfig").exists():
|
|
49
|
-
uv_with.append("machineconfig>=6.
|
|
49
|
+
uv_with.append("machineconfig>=6.84")
|
|
50
50
|
else:
|
|
51
51
|
uv_project_dir = str(Path.home().joinpath("code/machineconfig"))
|
|
52
52
|
run_shell_script(get_uv_command_executing_python_script(python_script=path.read_text(encoding="utf-8"), uv_with=uv_with, uv_project_dir=uv_project_dir)[0])
|
|
@@ -41,9 +41,9 @@ def install(no_copy_assets: Annotated[bool, typer.Option("--no-assets-copy", "-n
|
|
|
41
41
|
else:
|
|
42
42
|
import platform
|
|
43
43
|
if platform.system() == "Windows":
|
|
44
|
-
run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=6.
|
|
44
|
+
run_shell_script(r"""& "$HOME\.local\bin\uv.exe" tool install --upgrade "machineconfig>=6.84" """)
|
|
45
45
|
else:
|
|
46
|
-
run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=6.
|
|
46
|
+
run_shell_script("""$HOME/.local/bin/uv tool install --upgrade "machineconfig>=6.84" """)
|
|
47
47
|
from machineconfig.profile.create_shell_profile import create_default_shell_profile
|
|
48
48
|
if not no_copy_assets:
|
|
49
49
|
create_default_shell_profile() # involves copying assets too
|
|
@@ -68,7 +68,7 @@ def navigate():
|
|
|
68
68
|
path = Path(navigator.__file__).resolve().parent.joinpath("devops_navigator.py")
|
|
69
69
|
from machineconfig.utils.code import run_shell_script
|
|
70
70
|
if Path.home().joinpath("code/machineconfig").exists(): executable = f"""--project "{str(Path.home().joinpath("code/machineconfig"))}" --with textual"""
|
|
71
|
-
else: executable = """--with "machineconfig>=6.
|
|
71
|
+
else: executable = """--with "machineconfig>=6.84,textual" """
|
|
72
72
|
run_shell_script(f"""uv run {executable} {path}""")
|
|
73
73
|
|
|
74
74
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# mkdir ~/data/local
|
|
6
6
|
# sudo mount -o nolock,noatime,nodiratime,proto=tcp,timeo=600,retrans=2,noac alex-p51s-5:/home/alex/data/local ./data/local
|
|
7
7
|
|
|
8
|
-
uv run --python 3.14 --with "machineconfig>=6.
|
|
8
|
+
uv run --python 3.14 --with "machineconfig>=6.84" python -m machineconfig.scripts.python.mount_nfs
|
|
9
9
|
# Check if remote server is reachable and share folder exists
|
|
10
10
|
if ! ping -c 1 "$remote_server" &> /dev/null; then
|
|
11
11
|
echo "💥 Error: Remote server $remote_server is not reachable."
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import typer
|
|
3
|
+
from typing import Annotated
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def strip_ansi_codes(text: str) -> str:
|
|
7
|
+
"""Remove ANSI color codes from text."""
|
|
8
|
+
import re
|
|
9
|
+
return re.sub(r'\x1b\[[0-9;]*[a-zA-Z]', '', text)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def choose_zellij_session():
|
|
13
|
+
cmd = "zellij list-sessions"
|
|
14
|
+
sessions: list[str] = subprocess.check_output(cmd, shell=True).decode().strip().split("\n")
|
|
15
|
+
sessions.sort(key=lambda s: "EXITED" in s)
|
|
16
|
+
if "current" in sessions:
|
|
17
|
+
print("Already in a Zellij session, avoiding nesting and exiting.")
|
|
18
|
+
raise typer.Exit()
|
|
19
|
+
if len(sessions) == 0:
|
|
20
|
+
print("No Zellij sessions found, creating a new one.")
|
|
21
|
+
result = """zellij --layout st2"""
|
|
22
|
+
elif len(sessions) == 1:
|
|
23
|
+
session = sessions[0].split(" [Created")[0]
|
|
24
|
+
print(f"Only one Zellij session found: {session}, attaching to it.")
|
|
25
|
+
result = f"zellij attach {session}"
|
|
26
|
+
else:
|
|
27
|
+
from machineconfig.utils.options import choose_from_options
|
|
28
|
+
session = choose_from_options(msg="Choose a Zellij session to attach to:", multi=False, options=sessions, fzf=True)
|
|
29
|
+
session = session.split(" [Created")[0]
|
|
30
|
+
result = f"zellij attach {session}"
|
|
31
|
+
from machineconfig.utils.code import exit_then_run_shell_script
|
|
32
|
+
exit_then_run_shell_script(result, strict=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def new_zellij_session(kill_all: Annotated[bool, typer.Option("--kill-all", "-k", help="Kill all existing Zellij sessions before creating a new one.", show_default=True)] = False):
|
|
36
|
+
cmd = """
|
|
37
|
+
zellij --layout st2
|
|
38
|
+
"""
|
|
39
|
+
if kill_all:
|
|
40
|
+
cmd = f"""zellij kill-sessions
|
|
41
|
+
{cmd}"""
|
|
42
|
+
from machineconfig.utils.code import exit_then_run_shell_script
|
|
43
|
+
exit_then_run_shell_script(cmd, strict=True)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def get_session_tabs() -> list[tuple[str, str]]:
|
|
47
|
+
cmd = "zellij list-sessions"
|
|
48
|
+
sessions: list[str] = subprocess.check_output(cmd, shell=True).decode().strip().split("\n")
|
|
49
|
+
sessions = [strip_ansi_codes(s) for s in sessions]
|
|
50
|
+
active_sessions = [s for s in sessions if "EXITED" not in s]
|
|
51
|
+
result: list[tuple[str, str]] = []
|
|
52
|
+
for session_line in active_sessions:
|
|
53
|
+
session_name = session_line.split(" [Created")[0].strip()
|
|
54
|
+
# Query tab names for the session
|
|
55
|
+
tab_cmd = f"zellij --session {session_name} action query-tab-names"
|
|
56
|
+
try:
|
|
57
|
+
tabs: list[str] = subprocess.check_output(tab_cmd, shell=True).decode().strip().split("\n")
|
|
58
|
+
for tab in tabs:
|
|
59
|
+
if tab.strip():
|
|
60
|
+
result.append((session_name, tab.strip()))
|
|
61
|
+
except subprocess.CalledProcessError:
|
|
62
|
+
# Skip if query fails
|
|
63
|
+
continue
|
|
64
|
+
print(result)
|
|
65
|
+
return result
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def main():
|
|
69
|
+
app = typer.Typer(help="🖥️ Terminal utilities", no_args_is_help=True, add_help_option=False)
|
|
70
|
+
app.command(name="choose-zellij-session", no_args_is_help=False, help="[c] Choose a Zellij session to attach to")(choose_zellij_session)
|
|
71
|
+
app.command(name="c", hidden=True, no_args_is_help=False, help="[c] Choose a Zellij session to attach to")(choose_zellij_session)
|
|
72
|
+
app.command(name="new-zellij-session", no_args_is_help=False, help="[n] new zellij session.")(new_zellij_session)
|
|
73
|
+
app.command(name="n", hidden=True, no_args_is_help=False, help="[n] new zellij session.")(new_zellij_session)
|
|
74
|
+
|
|
75
|
+
app.command(name="get-session-tabs", no_args_is_help=False, help="Get all Zellij session tabs.")(get_session_tabs)
|
|
76
|
+
app.command(name="gst", hidden=True, no_args_is_help=False, help="Get all Zellij session tabs.")(get_session_tabs)
|
|
77
|
+
app()
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
if __name__ == "__main__":
|
|
81
|
+
main()
|
|
@@ -7,7 +7,7 @@ $user = ''
|
|
|
7
7
|
$sharePath = ''
|
|
8
8
|
$driveLetter = ''
|
|
9
9
|
|
|
10
|
-
uv run --python 3.14 --with "machineconfig>=6.
|
|
10
|
+
uv run --python 3.14 --with "machineconfig>=6.84" python -m machineconfig.scripts.python.mount_ssh
|
|
11
11
|
|
|
12
12
|
net use T: \\sshfs.kr\$user@$host.local
|
|
13
13
|
# this worked: net use T: \\sshfs\alex@alex-p51s-5.local
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
. <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
|
|
3
3
|
mcfg() {
|
|
4
|
-
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=6.
|
|
4
|
+
"$HOME/.local/bin/uv" run --python 3.14 --with "machineconfig>=6.84" mcfg "$@"
|
|
5
5
|
}
|
|
6
6
|
alias d="mcfg devops"
|
|
7
7
|
alias c="mcfg cloud"
|
|
@@ -11,4 +11,5 @@ alias ff="mcfg ftpx"
|
|
|
11
11
|
alias f="mcfg fire"
|
|
12
12
|
alias rr="mcfg croshell"
|
|
13
13
|
alias u="mcfg utils"
|
|
14
|
+
alias t="mcfg terminal"
|
|
14
15
|
echo "mcfg command is now defined in this shell session."
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
iex (iwr "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/uv.ps1").Content
|
|
4
4
|
function mcfg {
|
|
5
|
-
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=6.
|
|
5
|
+
& "$HOME\.local\bin\uv.exe" run --python 3.14 --with "machineconfig>=6.84" mcfg $args
|
|
6
6
|
}
|
|
7
7
|
function d { mcfg devops @args }
|
|
8
8
|
function c { mcfg cloud @args }
|
|
@@ -12,4 +12,5 @@ function ff { mcfg ftpx @args }
|
|
|
12
12
|
function f { mcfg fire @args }
|
|
13
13
|
function rr { mcfg croshell @args }
|
|
14
14
|
function u { mcfg utils @args }
|
|
15
|
+
function t { mcfg terminal @args }
|
|
15
16
|
Write-Host "mcfg command aliases are now defined in this PowerShell session."
|
machineconfig/utils/code.py
CHANGED
|
@@ -103,9 +103,11 @@ def run_shell_script(script: str, display_script: bool = True, clean_env: bool =
|
|
|
103
103
|
return proc
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
def exit_then_run_shell_script(script: str):
|
|
106
|
+
def exit_then_run_shell_script(script: str, strict: bool = False):
|
|
107
107
|
import os
|
|
108
108
|
op_program_path = os.environ.get("OP_PROGRAM_PATH", None)
|
|
109
|
+
if strict and op_program_path is None:
|
|
110
|
+
raise ValueError("OP_PROGRAM_PATH environment variable is not set in strict mode.")
|
|
109
111
|
if op_program_path is not None:
|
|
110
112
|
op_program_path = Path(op_program_path)
|
|
111
113
|
op_program_path.parent.mkdir(parents=True, exist_ok=True)
|
machineconfig/utils/options.py
CHANGED
|
@@ -4,7 +4,14 @@ from rich.text import Text
|
|
|
4
4
|
from rich.panel import Panel
|
|
5
5
|
from rich.console import Console
|
|
6
6
|
import subprocess
|
|
7
|
-
from typing import Optional, Union, Iterable, overload, Literal
|
|
7
|
+
from typing import Optional, Union, Iterable, overload, Literal, cast
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# def strip_ansi_codes(text: str) -> str:
|
|
11
|
+
# """Remove ANSI color codes from text."""
|
|
12
|
+
# import re
|
|
13
|
+
# return re.sub(r'\x1b\[[0-9;]*[a-zA-Z]', '', text)
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
@overload
|
|
10
17
|
def choose_from_options[T](msg: str, options: Iterable[T], multi: Literal[False], custom_input: bool = False, header: str = "", tail: str = "", prompt: str = "", default: Optional[T] = None, fzf: bool = False) -> T: ...
|
|
@@ -22,17 +29,20 @@ def choose_from_options[T](msg: str, options: Iterable[T], multi: bool, custom_i
|
|
|
22
29
|
from pyfzf.pyfzf import FzfPrompt
|
|
23
30
|
fzf_prompt = FzfPrompt()
|
|
24
31
|
nl = "\n"
|
|
25
|
-
choice_string_multi: list[str] = fzf_prompt.prompt(choices=options_strings, fzf_options=("--multi" if multi else "") + f' --prompt "{prompt.replace(nl, " ")}" ') # --border-label={msg.replace(nl, ' ')}")
|
|
32
|
+
choice_string_multi: list[str] = fzf_prompt.prompt(choices=options_strings, fzf_options=("--multi" if multi else "") + f' --prompt "{prompt.replace(nl, " ")}" --ansi') # --border-label={msg.replace(nl, ' ')}")
|
|
26
33
|
# --border=rounded doens't work on older versions of fzf installed at Ubuntu 20.04
|
|
27
34
|
if not multi:
|
|
28
35
|
try:
|
|
29
36
|
choice_one_string = choice_string_multi[0]
|
|
37
|
+
if isinstance(list(options)[0], str): return cast(T, choice_one_string)
|
|
30
38
|
choice_idx = options_strings.index(choice_one_string)
|
|
31
39
|
return list(options)[choice_idx]
|
|
32
40
|
except IndexError as ie:
|
|
33
41
|
print(f"❌ Error: {options=}, {choice_string_multi=}")
|
|
34
42
|
print(f"🔍 Available choices: {choice_string_multi}")
|
|
35
43
|
raise ie
|
|
44
|
+
if isinstance(list(options)[0], str):
|
|
45
|
+
return cast(list[T], choice_string_multi)
|
|
36
46
|
choice_idx_s = [options_strings.index(x) for x in choice_string_multi]
|
|
37
47
|
return [list(options)[x] for x in choice_idx_s]
|
|
38
48
|
else:
|
machineconfig/utils/ssh.py
CHANGED
|
@@ -8,7 +8,7 @@ from machineconfig.utils.terminal import Response
|
|
|
8
8
|
from machineconfig.utils.accessories import pprint, randstr
|
|
9
9
|
from machineconfig.utils.meta import lambda_to_python_script
|
|
10
10
|
UV_RUN_CMD = "$HOME/.local/bin/uv run" if platform.system() != "Windows" else """& "$env:USERPROFILE/.local/bin/uv" run"""
|
|
11
|
-
MACHINECONFIG_VERSION = "machineconfig>=6.
|
|
11
|
+
MACHINECONFIG_VERSION = "machineconfig>=6.84"
|
|
12
12
|
DEFAULT_PICKLE_SUBDIR = "tmp_results/tmp_scripts/ssh"
|
|
13
13
|
|
|
14
14
|
class SSH:
|
|
@@ -106,13 +106,12 @@ machineconfig/scripts/linux/fzfag,sha256=x0rX7vM_YjKLZ822D2Xh0HdaTj5kR_gG3g_5_w6
|
|
|
106
106
|
machineconfig/scripts/linux/fzffg,sha256=jjeeyFkWmBbwH2taRqC3EOzZep2KR-ZYoI4UI-5kHqg,1090
|
|
107
107
|
machineconfig/scripts/linux/fzfg,sha256=ClGnJZUsIk4y0qs3W5iXGo-nd0FaqAHMsnh8uoXQFy8,1190
|
|
108
108
|
machineconfig/scripts/linux/fzfrga,sha256=xSdws6ae28ZXkkqz_uupZ0MYw_vxE2qpLT2DLS3WITM,460
|
|
109
|
-
machineconfig/scripts/linux/mcfgs,sha256=
|
|
109
|
+
machineconfig/scripts/linux/mcfgs,sha256=tjlIG2qEpmx1EuMBYflYcp6GfgiFgSj4OMOD-d94xio,1179
|
|
110
110
|
machineconfig/scripts/linux/skrg,sha256=JgQJGwxaChr148bDnpTB0rrqZMe2o2zGSDA9x_oUhWM,133
|
|
111
|
+
machineconfig/scripts/linux/term,sha256=CNPY8p6SitOmtOPKXPervPPabjJNYBerA12SHN_v7w4,1139
|
|
111
112
|
machineconfig/scripts/linux/warp-cli.sh,sha256=shFFZ9viet_DSEEHT8kxlGRHoJpO6o85pKYnc3rIkaA,3868
|
|
112
|
-
machineconfig/scripts/linux/z_ls,sha256=h5YJYfnJrmtLe4c2iKk5aZdaK_Zeaj3CpQX8SSr7fr0,3310
|
|
113
113
|
machineconfig/scripts/linux/other/share_cloud.sh,sha256=lIZrXiaOT11kzu4NFNTXvANhc2bMdSPDYD1-7XUO_C0,2027
|
|
114
114
|
machineconfig/scripts/linux/other/share_nfs,sha256=LDQZQ9TV7z2y7RtNHiO4Wb513MztyGjaAV-GzTGwUdc,1374
|
|
115
|
-
machineconfig/scripts/linux/other/share_smb,sha256=HZX8BKgMlS9JzkGIYnxTsPvoxEBBuVLVkqzR3pmGFGY,20
|
|
116
115
|
machineconfig/scripts/linux/other/start_docker,sha256=_yDN_PPqgzSUnPT7dmniMTpL4IfeeaGy1a2OL3IJlDU,525
|
|
117
116
|
machineconfig/scripts/linux/other/switch_ip,sha256=NQfeKMBSbFY3eP6M-BadD-TQo5qMP96DTp77KHk2tU8,613
|
|
118
117
|
machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -126,6 +125,7 @@ machineconfig/scripts/python/ftpx.py,sha256=A13hL_tDYfcsaK9PkshK-0lrUS6KPhPCtwqW
|
|
|
126
125
|
machineconfig/scripts/python/interactive.py,sha256=zt3g6nGKR_Y5A57UnR4Y5-JpLzrpnCOSaqU1bnaikK0,11666
|
|
127
126
|
machineconfig/scripts/python/mcfg.py,sha256=TB5lZDZDImGqX4_mMSEv4ZoFigIPA0RXn-9H2cmPS6g,2457
|
|
128
127
|
machineconfig/scripts/python/sessions.py,sha256=JfN8M7r7f8DkfiGJ4jz2NfXvABm90nOZJmLGxPgw_2M,9518
|
|
128
|
+
machineconfig/scripts/python/terminal.py,sha256=07TRB0yK-XB86s1EWUQdDv8m3uk6WzndMbqafd2EU0c,3562
|
|
129
129
|
machineconfig/scripts/python/utils.py,sha256=Pdk75UjapwE3gou-CMHtqqPhNhpPZP2t1Pm1LPbam-Y,3280
|
|
130
130
|
machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
131
131
|
machineconfig/scripts/python/ai/generate_files.py,sha256=VfjKdwgF8O6E4oiRtfWNliibLmmwGe7f9ld6wpOsXTw,14498
|
|
@@ -159,7 +159,7 @@ machineconfig/scripts/python/ai/solutions/opencode/opencode.json,sha256=nahHKRw1
|
|
|
159
159
|
machineconfig/scripts/python/ai/solutions/opencode/opencode.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
160
160
|
machineconfig/scripts/python/env_manager/__init__.py,sha256=E4LAHbU1wo2dLjE36ntv8U7QNTe8TasujUAYK9SLvWk,6
|
|
161
161
|
machineconfig/scripts/python/env_manager/path_manager_backend.py,sha256=ZVGlGJALhg7zNABDdwXxL7MFbL2BXPebObipXSLGbic,1552
|
|
162
|
-
machineconfig/scripts/python/env_manager/path_manager_tui.py,sha256
|
|
162
|
+
machineconfig/scripts/python/env_manager/path_manager_tui.py,sha256=EX4BuxWG8wdAdwILgwfxwI6VMZpjfWxArSXJgwQfsNE,6932
|
|
163
163
|
machineconfig/scripts/python/helpers_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
164
164
|
machineconfig/scripts/python/helpers_cloud/cloud_copy.py,sha256=OV1w3ajFVFs6FJytjIPOntYB_aW2ywGohKi73V4Dm2Y,8691
|
|
165
165
|
machineconfig/scripts/python/helpers_cloud/cloud_helpers.py,sha256=GA-bxXouUmknk9fyQAsPT-Xl3RG9-yBed71a2tu9Pig,4914
|
|
@@ -175,12 +175,12 @@ machineconfig/scripts/python/helpers_croshell/start_slidev.py,sha256=HfJReOusTPh
|
|
|
175
175
|
machineconfig/scripts/python/helpers_croshell/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
|
|
176
176
|
machineconfig/scripts/python/helpers_croshell/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
|
|
177
177
|
machineconfig/scripts/python/helpers_devops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
178
|
-
machineconfig/scripts/python/helpers_devops/cli_config.py,sha256=
|
|
178
|
+
machineconfig/scripts/python/helpers_devops/cli_config.py,sha256=9nyOc-twOdyvnK1imdmpMI2DMHCPQIJAFtAwoksB45I,7218
|
|
179
179
|
machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py,sha256=fluxRtD6hlbh131_RmeKr2Dy8tZpeC4H9-wp2sYt0dM,2486
|
|
180
180
|
machineconfig/scripts/python/helpers_devops/cli_data.py,sha256=79Xvx7YnbueruEnl69hrDg2AhVxf_zCUdlVcKfeMGyQ,1774
|
|
181
181
|
machineconfig/scripts/python/helpers_devops/cli_nw.py,sha256=B5Xa9pV5MdC4vPo3EmKaHvNMlThsY3c5F92YPE5j3rI,4176
|
|
182
182
|
machineconfig/scripts/python/helpers_devops/cli_repos.py,sha256=Xwkv1adqHZvTfRSPWiqSK3PZ1XADyx3llw_YkbxaKyE,12505
|
|
183
|
-
machineconfig/scripts/python/helpers_devops/cli_self.py,sha256=
|
|
183
|
+
machineconfig/scripts/python/helpers_devops/cli_self.py,sha256=yq0nS7ukWDDCAzvuI-Znf87n2fU9tsHnsG0NDHY_MN8,6225
|
|
184
184
|
machineconfig/scripts/python/helpers_devops/cli_share_server.py,sha256=q9pFJ6AxPuygMr3onMNOKEuuQHbVE_6Qoyo7xRT5FX0,4196
|
|
185
185
|
machineconfig/scripts/python/helpers_devops/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
|
|
186
186
|
machineconfig/scripts/python/helpers_devops/cli_utils.py,sha256=KGIU1uTWC4g3kvBBkGrM-TtmcR8V1jTxVMGKXDSLnLA,10183
|
|
@@ -222,7 +222,7 @@ machineconfig/scripts/python/helpers_navigator/search_bar.py,sha256=kDi8Jhxap8wd
|
|
|
222
222
|
machineconfig/scripts/python/helpers_repos/action.py,sha256=8je051kpGZ7A_GRsQyWKhPZ8xVW7tSm4bnPu6VjxaXk,9755
|
|
223
223
|
machineconfig/scripts/python/helpers_repos/action_helper.py,sha256=XRCtkGkNrxauqUd9qkxtfJt02Mx2gejSYDLL0jyWn24,6176
|
|
224
224
|
machineconfig/scripts/python/helpers_repos/clone.py,sha256=UULEG5xJuXlPGU0nqXH6U45jA9DOFqLw8B4iPytCwOQ,5471
|
|
225
|
-
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=
|
|
225
|
+
machineconfig/scripts/python/helpers_repos/cloud_repo_sync.py,sha256=rB9qr8cqg4iMy94ty_Ev8Mc2FsKLBr0ZwJno-MsgZAA,10450
|
|
226
226
|
machineconfig/scripts/python/helpers_repos/count_lines.py,sha256=Q5c7b-DxvTlQmljoic7niTuiAVyFlwYvkVQ7uRJHiTo,16009
|
|
227
227
|
machineconfig/scripts/python/helpers_repos/count_lines_frontend.py,sha256=vSDtrF4829jziwp6WZmGt9G8MJ9jY4hfXqtf0vhkYSE,607
|
|
228
228
|
machineconfig/scripts/python/helpers_repos/entrypoint.py,sha256=WYEFGUJp9HWImlFjbs_hiFZrUqM_KEYm5VvSUjWd04I,2810
|
|
@@ -238,7 +238,7 @@ machineconfig/scripts/python/nw/add_ssh_key.py,sha256=9JLmWu8pE7PAL5VuCFd19iVEdC
|
|
|
238
238
|
machineconfig/scripts/python/nw/devops_add_identity.py,sha256=aPjcHbTLhxYwWYcandyAHdwuO15ZBu3fB82u6bI0tMQ,3773
|
|
239
239
|
machineconfig/scripts/python/nw/devops_add_ssh_key.py,sha256=CkIl85hZLtG9k7yXLSzqi88YrilHV4hIUWHAPBwxWjw,8922
|
|
240
240
|
machineconfig/scripts/python/nw/mount_drive,sha256=zemKofv7hOmRN_V3qK0q580GkfWw3VdikyVVQyiu8j8,3514
|
|
241
|
-
machineconfig/scripts/python/nw/mount_nfs,sha256=
|
|
241
|
+
machineconfig/scripts/python/nw/mount_nfs,sha256=MOBehvwbM5G-6Z454lFWcxajUmnppkAwd-UCcL0gYJ8,1855
|
|
242
242
|
machineconfig/scripts/python/nw/mount_nfs.py,sha256=lOMDY4RS7tx8gsCazVR5tNNwFbaRyO2PJlnwBCDQgCM,3573
|
|
243
243
|
machineconfig/scripts/python/nw/mount_nw_drive,sha256=BqjGBCbwe5ZAsZDO3L0zHhh_gJfZy1CYOcqXA4Y-WkQ,2262
|
|
244
244
|
machineconfig/scripts/python/nw/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkuliVpPV5_uBTVVhXtjQ,1550
|
|
@@ -253,10 +253,11 @@ machineconfig/scripts/windows/fzfb.ps1,sha256=Bmngm2aY8hnPa3iKAOK6EPDYdKzGLUc81w
|
|
|
253
253
|
machineconfig/scripts/windows/fzfg.ps1,sha256=CHJbMrMuZePd4dxwIwz3g4XWAEmWmckuX-Nrx2xgRkg,27
|
|
254
254
|
machineconfig/scripts/windows/fzfrga.bat,sha256=rU_KBMO6ii2EZ0akMnmDk9vpuhKSUZqkV0o8a8ywXcM,488
|
|
255
255
|
machineconfig/scripts/windows/mcfgs.ps1,sha256=uuK5pEz38D3_SOjfhbvkDT8Kt4I62YhNzkExlW8VSps,577
|
|
256
|
+
machineconfig/scripts/windows/term.ps1,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
256
257
|
machineconfig/scripts/windows/mounts/mount_nfs.ps1,sha256=XrAdzpxE6a4OccSmWJ7YWHJTnsZK8uXnFE5j9GOPA20,2026
|
|
257
258
|
machineconfig/scripts/windows/mounts/mount_nw.ps1,sha256=puxcfZc3ZCJerm8pj8OZGVoTYkhzp-h7oV-MrksSqIE,454
|
|
258
259
|
machineconfig/scripts/windows/mounts/mount_smb.ps1,sha256=PzYWpIO9BpwXjdWlUQL9pnMRnOGNSkxfh4bHukJFme8,69
|
|
259
|
-
machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=
|
|
260
|
+
machineconfig/scripts/windows/mounts/mount_ssh.ps1,sha256=ldmxaQcjVhrwy9YlY57sQSOtEzXkJw5FIOTRneZzSWU,322
|
|
260
261
|
machineconfig/scripts/windows/mounts/share_cloud.cmd,sha256=exD7JCdxw2LqVjw2MKCYHbVZlEqmelXtwnATng-dhJ4,1028
|
|
261
262
|
machineconfig/scripts/windows/mounts/share_smb.ps1,sha256=U7x8ULYSjbgzTtiHNSKQuTaZ_apilDvkGV5Xm5hXk5M,384
|
|
262
263
|
machineconfig/scripts/windows/mounts/unlock_bitlocker.ps1,sha256=Wv-SLscdckV-1mG3p82VXKPY9zW3hgkRmcLUXIZ1daE,253
|
|
@@ -327,7 +328,7 @@ machineconfig/settings/rofi/config.rasi,sha256=nDX5B8wdXQYF1fwiOTBRJUI4l_gQbYaLa
|
|
|
327
328
|
machineconfig/settings/rofi/config_default.rasi,sha256=rTfKnC-bZuWX1l-lWQACCUOE1ShhkfykAxtXX9PlQHE,4694
|
|
328
329
|
machineconfig/settings/shells/alacritty/alacritty.toml,sha256=EbL-2Y4QunW1pvRWB2yuLCw8MMPONheJr5LFoWRieUQ,871
|
|
329
330
|
machineconfig/settings/shells/alacritty/alacritty.yml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
330
|
-
machineconfig/settings/shells/bash/init.sh,sha256=
|
|
331
|
+
machineconfig/settings/shells/bash/init.sh,sha256=JiZ6UUar6nmNiu9-sMemYnxIF6pjVlqxBMwKKq8hu9o,2709
|
|
331
332
|
machineconfig/settings/shells/hyper/.hyper.js,sha256=h-HqeYlvPvPD4Ee7828Cxo87uVkzbMGJFqXTZIWoegw,8884
|
|
332
333
|
machineconfig/settings/shells/ipy/profiles/default/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
334
|
machineconfig/settings/shells/ipy/profiles/default/startup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -335,7 +336,7 @@ machineconfig/settings/shells/ipy/profiles/default/startup/playext.py,sha256=OJ3
|
|
|
335
336
|
machineconfig/settings/shells/kitty/kitty.conf,sha256=lDdx-dUX3jbKGb3BkS2f2TOpmgGiS-CI-_-lFvhD5A4,52870
|
|
336
337
|
machineconfig/settings/shells/nushell/config.nu,sha256=xtko80MPteDXuOJmwJHNFhXmfHT6fIBfmTgsF29GiEc,748
|
|
337
338
|
machineconfig/settings/shells/nushell/env.nu,sha256=4VmaXb-qP6qnMD5TPzkXMLFNlB5QC4l9HEzCvXZE2GQ,315
|
|
338
|
-
machineconfig/settings/shells/pwsh/init.ps1,sha256=
|
|
339
|
+
machineconfig/settings/shells/pwsh/init.ps1,sha256=5DfRhHt8kMSh74JbW4ALJOH6NRa_MlRgG34ouew7qsc,2000
|
|
339
340
|
machineconfig/settings/shells/pwsh/profile.ps1,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
340
341
|
machineconfig/settings/shells/starship/starship.toml,sha256=5rQTY7ZpKnrnhgu2Y9OJKUYMz5lPLIftO1p1VRuVZwQ,1150
|
|
341
342
|
machineconfig/settings/shells/vtm/settings.xml,sha256=5TNXd-i0eUGo2w3tuhY9aOkwoJdqih8_HO_U6uL2Dts,18262
|
|
@@ -373,7 +374,7 @@ machineconfig/setup_linux/others/cli_installation.sh,sha256=gVvszYZJgKPRJx2SEaE3
|
|
|
373
374
|
machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh,sha256=F5dbg0n9RHsKGPn8fIdZMn3p0RrHEkb8rWBGsdVGbus,1207
|
|
374
375
|
machineconfig/setup_linux/ssh/openssh_all.sh,sha256=3dg6HEUFbHQOzLfSAtzK_D_GB8rGCCp_aBnxNdnidVc,824
|
|
375
376
|
machineconfig/setup_linux/ssh/openssh_wsl.sh,sha256=1eeRGrloVB34K5z8yWVUMG5b9pV-WBfHgV9jqXiYgCQ,1398
|
|
376
|
-
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=
|
|
377
|
+
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=90vbyrktpMWaQw1NzqK9yzgDvKGUlU9nNbOAaYoMYsw,488
|
|
377
378
|
machineconfig/setup_mac/__init__.py,sha256=Q1waupi5vCBroLqc8Rtnw69_7jLnm2Cs7_zH_GSZgMs,616
|
|
378
379
|
machineconfig/setup_mac/apps.sh,sha256=R0N6fBwLCzwy4qAormyMerXXXrHazibSkY6NrNOpTQU,2772
|
|
379
380
|
machineconfig/setup_mac/uv.sh,sha256=CSN8oCBKS-LK1vJJqYOhAMcrouTf4Q_F3cpplc_ddMA,1157
|
|
@@ -387,25 +388,25 @@ machineconfig/setup_windows/others/power_options.ps1,sha256=c7Hn94jBD5GWF29CxMhm
|
|
|
387
388
|
machineconfig/setup_windows/ssh/add-sshkey.ps1,sha256=qfPdqCpd9KP3VhH4ifsUm1Xvec7c0QVl4Wt8JIAm9HQ,1653
|
|
388
389
|
machineconfig/setup_windows/ssh/add_identity.ps1,sha256=b8ZXpmNUSw3IMYvqSY7ClpdWPG39FS7MefoWnRhWN2U,506
|
|
389
390
|
machineconfig/setup_windows/ssh/openssh-server.ps1,sha256=OMlYQdvuJQNxF5EILLPizB6BZAT3jAmDsv1WcVVxpFQ,2529
|
|
390
|
-
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=
|
|
391
|
+
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=iOpIYEwkXw5RuxT6-vBfWe-KVklKuADn2jP3DkWV3QU,616
|
|
391
392
|
machineconfig/setup_windows/wt_and_pwsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
392
393
|
machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=ogxJnwpdcpH7N6dFJu95UCNoGYirZKQho_3X0F_hmXs,6791
|
|
393
394
|
machineconfig/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
394
395
|
machineconfig/utils/accessories.py,sha256=Rs8R0GUb2Ub6YimkgXHnI02CShS5BKlrZdCigVxfPlk,4339
|
|
395
|
-
machineconfig/utils/code.py,sha256=
|
|
396
|
+
machineconfig/utils/code.py,sha256=QpSBeeX1wbZ3UUaOz7BTVNtp5VqHpSU0FxkfNy_NIY8,5650
|
|
396
397
|
machineconfig/utils/installer.py,sha256=UzI_DtTcKbgvkAkWkNLAPUtx-RVqITHCpvZyLiCpD9g,10377
|
|
397
398
|
machineconfig/utils/io.py,sha256=4dSieoqZO8Vvi4vW8lLoITDHBvmFp4dtl3kyeZHQ6Co,2528
|
|
398
399
|
machineconfig/utils/links.py,sha256=KM6vIn3hag9FYEzLSHP5MAM9tU_RStw2mCq2_OvmmZA,23672
|
|
399
400
|
machineconfig/utils/meta.py,sha256=RXbq3_DSFAFNAEt9GjWqP2TjCWUs0v7gAkKCgRpdwO8,9853
|
|
400
401
|
machineconfig/utils/notifications.py,sha256=tuXIudcip0tEioG-bm8BbLr3FMDve4f6BktlznBhKxM,9013
|
|
401
|
-
machineconfig/utils/options.py,sha256=
|
|
402
|
+
machineconfig/utils/options.py,sha256=VWYx3EKJxIp-CJ8gDGYdjclKSc1tMUhyrC8v3seeneo,7447
|
|
402
403
|
machineconfig/utils/path_extended.py,sha256=WyJwoHnXdvSQQJ-yrxTX78FpqYmgVeKDYpNEB9UsRck,53223
|
|
403
404
|
machineconfig/utils/path_helper.py,sha256=0e3Xh3BAEv27oqcezNeVLHJllGmLEgLH4T1l90m-650,8014
|
|
404
405
|
machineconfig/utils/procs.py,sha256=YPA_vEYQGwPd_o_Lc6nOTBo5BrB1tSs8PJ42XiGpenM,10957
|
|
405
406
|
machineconfig/utils/scheduler.py,sha256=fguwvINyaupOxdU5Uadyxalh_jXTXDzt0ioEgjEOKcM,14705
|
|
406
407
|
machineconfig/utils/scheduling.py,sha256=6x5zLA7sY5gohrEtN6zGrXIqNFasMoyBfwLcOjrjiME,11109
|
|
407
408
|
machineconfig/utils/source_of_truth.py,sha256=ZAnCRltiM07ig--P6g9_6nEAvNFC4X4ERFTVcvpIYsE,764
|
|
408
|
-
machineconfig/utils/ssh.py,sha256
|
|
409
|
+
machineconfig/utils/ssh.py,sha256=-w9b6kbJfCEJjTepS9sfDJ8MToY_m1OeU2-ZxDXSR_A,39009
|
|
409
410
|
machineconfig/utils/terminal.py,sha256=VDgsjTjBmMGgZN0YIc0pJ8YksLDrBtiXON1EThy7_is,4264
|
|
410
411
|
machineconfig/utils/tst.py,sha256=6u1GI49NdcpxH2BYGAusNfY5q9G_ytCGVzFM5b6HYpM,674
|
|
411
412
|
machineconfig/utils/upgrade_packages.py,sha256=TCohwiwc0btSsInOloxDVuk5i88yc1vBK8RZcoMWoUw,3425
|
|
@@ -434,8 +435,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
|
|
|
434
435
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
435
436
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
436
437
|
machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
437
|
-
machineconfig-6.
|
|
438
|
-
machineconfig-6.
|
|
439
|
-
machineconfig-6.
|
|
440
|
-
machineconfig-6.
|
|
441
|
-
machineconfig-6.
|
|
438
|
+
machineconfig-6.84.dist-info/METADATA,sha256=72Q2T1CT1wbWoqzrp9P4nHz42XroVZ3W7TSsyxnrYj8,2928
|
|
439
|
+
machineconfig-6.84.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
440
|
+
machineconfig-6.84.dist-info/entry_points.txt,sha256=uf_ZPJa02_y3Fw5Z7m22cq7PwxhYd1QV2FfPNZTl_dQ,519
|
|
441
|
+
machineconfig-6.84.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
442
|
+
machineconfig-6.84.dist-info/RECORD,,
|
|
@@ -7,4 +7,5 @@ fire = machineconfig.scripts.python.fire_jobs:main
|
|
|
7
7
|
ftpx = machineconfig.scripts.python.ftpx:main
|
|
8
8
|
mcfg = machineconfig.scripts.python.mcfg:main
|
|
9
9
|
sessions = machineconfig.scripts.python.sessions:main
|
|
10
|
+
terminal = machineconfig.scripts.python.terminal:main
|
|
10
11
|
utils = machineconfig.scripts.python.utils:main
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
machineconfig/scripts/linux/z_ls
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# if variable zellij is not set, then set it to /$HOME/.local/bin/zellij
|
|
4
|
-
if [ -z "$zellij" ]; then
|
|
5
|
-
# zellij="$HOME/.local/bin/zellij"
|
|
6
|
-
PATH="$HOME/.local/bin:$PATH"
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
# adopted from https://zellij.dev/documentation/integration.html
|
|
10
|
-
ZJ_SESSIONS=$(zellij list-sessions)
|
|
11
|
-
# echo "$ZJ_SESSIONS"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
attach=false
|
|
15
|
-
|
|
16
|
-
while (( "$#" )); do
|
|
17
|
-
case "$1" in
|
|
18
|
-
--attach)
|
|
19
|
-
attach=true
|
|
20
|
-
shift
|
|
21
|
-
;;
|
|
22
|
-
*)
|
|
23
|
-
shift
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
done
|
|
27
|
-
|
|
28
|
-
if $attach; then
|
|
29
|
-
echo "attached"
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
NO_SESSIONS=$(echo "${ZJ_SESSIONS}" | wc -l)
|
|
34
|
-
# if ZJ_SESSIONS is empty, then set NO_SESSIONS to 0
|
|
35
|
-
if [ -z "${ZJ_SESSIONS}" ]; then
|
|
36
|
-
NO_SESSIONS=0
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
# check whether the string "(current)" is in ZJ_SESSIONS
|
|
40
|
-
if [[ "${ZJ_SESSIONS}" == *"(current)"* ]]; then
|
|
41
|
-
# if so, then we are in a zellijsession
|
|
42
|
-
echo "already inside a session, existing."
|
|
43
|
-
COMMANDS=$(ls $HOME/.config/machineconfig/settings/zellij/commands)
|
|
44
|
-
# fzf the results
|
|
45
|
-
res="$(echo -e "${COMMANDS}" | fzf --ansi)"
|
|
46
|
-
# run the bash fiZJ_SESSIONSle chosen
|
|
47
|
-
bash $HOME/.config/machineconfig/settings/zellij/commands/$res
|
|
48
|
-
|
|
49
|
-
else # ==> we are not in a zellijsession
|
|
50
|
-
if [ "${NO_SESSIONS}" -ge 1 ]; then # sessions do exist
|
|
51
|
-
|
|
52
|
-
# remove sessions that have 'EXITED' in them
|
|
53
|
-
ZJ_SESSIONS=$(echo -e "${ZJ_SESSIONS}" | grep -v "EXITED")
|
|
54
|
-
|
|
55
|
-
echo "zj_sessions:$ZJ_SESSIONS:end of zj_sessions"
|
|
56
|
-
|
|
57
|
-
# if the result has only 1 line in it and $attach is raised, then attach to it and exit the if statement and the script
|
|
58
|
-
NO_SESSIONS=$(echo "${ZJ_SESSIONS}" | wc -l)
|
|
59
|
-
|
|
60
|
-
echo "NO_SESSIONS: $NO_SESSIONS"
|
|
61
|
-
|
|
62
|
-
# if ZJ_SESSIONS is empty, then set NO_SESSIONS to 0
|
|
63
|
-
if [ -z "${ZJ_SESSIONS}" ]; then
|
|
64
|
-
NO_SESSIONS=0
|
|
65
|
-
zellij --layout st2
|
|
66
|
-
exit 0
|
|
67
|
-
fi
|
|
68
|
-
echo "NO_SESSIONS: $NO_SESSIONS"
|
|
69
|
-
|
|
70
|
-
if [ "${NO_SESSIONS}" -eq 1 ] && $attach; then
|
|
71
|
-
chosen_session=$(echo -e "${ZJ_SESSIONS}" | cut -d' ' -f1)
|
|
72
|
-
# remove the ansi colors from chosen_session
|
|
73
|
-
chosen_session=$(echo $chosen_session | sed 's/\x1b\[[0-9;]*m//g')
|
|
74
|
-
# echo "attaching to $chosen_session exclusively."
|
|
75
|
-
zellij attach "$chosen_session"
|
|
76
|
-
exit 0
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
# add my options to the list of sessions
|
|
80
|
-
# if number of sessions is zero, then exclude ZJ_SESSIONS from the fzf options
|
|
81
|
-
if [ "${NO_SESSIONS}" -eq 0 ]; then
|
|
82
|
-
ZJ_SESSIONS="new_session\nkill_all_and_create_fresh_one\nexit_zellij"
|
|
83
|
-
else
|
|
84
|
-
ZJ_SESSIONS="$ZJ_SESSIONS\nnew_session\nkill_all_and_create_fresh_one\nexit_zellij"
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
|
-
res="$(echo -e "${ZJ_SESSIONS}" | fzf --ansi)"
|
|
88
|
-
# split `res` at the first space, and take the first element
|
|
89
|
-
res=$(echo $res | cut -d' ' -f1)
|
|
90
|
-
if [ "${res}" = "exit_zellij" ]; then
|
|
91
|
-
echo "existing zellij."
|
|
92
|
-
elif [ "${res}" = "new_session" ]; then
|
|
93
|
-
zellij --layout st2 # can't specify name here. I can call it "main" only if it is the first, otherwise name conflict! also, can't use attach -c syntax because layout can't be specified.
|
|
94
|
-
elif [ "${res}" = "kill_all_and_create_fresh_one" ]; then
|
|
95
|
-
zellij ka -y
|
|
96
|
-
zellij --layout st2
|
|
97
|
-
else
|
|
98
|
-
zellij attach $res # options --mirror-session false
|
|
99
|
-
fi
|
|
100
|
-
else # no sessions, create one called main
|
|
101
|
-
zellij --layout st2
|
|
102
|
-
fi
|
|
103
|
-
|
|
104
|
-
fi
|
|
File without changes
|
|
File without changes
|