machineconfig 7.98__py3-none-any.whl → 8.61__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.
- machineconfig/cluster/remote/run_cluster.py +1 -1
- machineconfig/cluster/remote/run_remote.py +1 -1
- machineconfig/cluster/sessions_managers/utils/maker.py +10 -8
- machineconfig/cluster/sessions_managers/wt_local.py +1 -1
- machineconfig/cluster/sessions_managers/wt_local_manager.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local.py +1 -1
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -1
- machineconfig/jobs/installer/checks/check_installations.py +133 -0
- machineconfig/jobs/installer/checks/install_utils.py +132 -0
- machineconfig/jobs/installer/checks/report_utils.py +39 -0
- machineconfig/jobs/installer/checks/vt_utils.py +89 -0
- machineconfig/jobs/installer/installer_data.json +271 -152
- machineconfig/jobs/installer/linux_scripts/docker.sh +6 -9
- machineconfig/jobs/installer/package_groups.py +11 -9
- machineconfig/jobs/installer/{custom → python_scripts}/boxes.py +1 -2
- machineconfig/jobs/installer/{custom_dev → python_scripts}/brave.py +1 -1
- machineconfig/jobs/installer/{custom_dev → python_scripts}/code.py +10 -8
- machineconfig/jobs/installer/{custom → python_scripts}/hx.py +30 -13
- machineconfig/jobs/installer/{custom_dev → python_scripts}/nerdfont.py +1 -1
- machineconfig/jobs/installer/{custom_dev → python_scripts}/nerfont_windows_helper.py +6 -5
- machineconfig/jobs/installer/{custom_dev → python_scripts}/sysabc.py +28 -43
- machineconfig/jobs/installer/{custom_dev → python_scripts}/wezterm.py +1 -1
- machineconfig/jobs/installer/{custom → python_scripts}/yazi.py +39 -19
- machineconfig/jobs/scripts/powershell_scripts/cmatrix.ps1 +52 -0
- machineconfig/jobs/scripts_dynamic/a.py +428 -0
- machineconfig/logger.py +1 -1
- machineconfig/profile/create_helper.py +21 -10
- machineconfig/profile/create_links.py +77 -20
- machineconfig/profile/create_links_export.py +63 -58
- machineconfig/profile/create_shell_profile.py +14 -0
- machineconfig/profile/mapper_data.toml +45 -0
- machineconfig/profile/mapper_dotfiles.toml +249 -0
- machineconfig/scripts/python/agents.py +76 -171
- machineconfig/scripts/python/ai/initai.py +3 -1
- machineconfig/scripts/python/ai/scripts/__init__.py +1 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1 +2 -0
- machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +8 -6
- machineconfig/scripts/python/ai/solutions/claude/claude.py +1 -1
- machineconfig/scripts/python/ai/solutions/cline/cline.py +1 -1
- machineconfig/scripts/python/ai/solutions/copilot/github_copilot.py +1 -1
- machineconfig/scripts/python/ai/solutions/copilot/instructions/python/dev.instructions.md +29 -0
- machineconfig/scripts/python/ai/solutions/crush/crush.py +1 -1
- machineconfig/scripts/python/ai/solutions/cursor/cursors.py +1 -1
- machineconfig/scripts/python/ai/solutions/gemini/gemini.py +1 -1
- machineconfig/scripts/python/ai/solutions/gemini/settings.json +3 -0
- machineconfig/scripts/python/ai/{solutions → utils}/generic.py +2 -15
- machineconfig/scripts/python/ai/utils/vscode_tasks.py +6 -3
- machineconfig/scripts/python/cloud.py +58 -11
- machineconfig/scripts/python/croshell.py +4 -155
- machineconfig/scripts/python/devops.py +57 -38
- machineconfig/scripts/python/devops_navigator.py +17 -3
- machineconfig/scripts/python/fire_jobs.py +10 -193
- machineconfig/scripts/python/ftpx.py +5 -224
- machineconfig/scripts/python/graph/cli_graph.json +8743 -0
- machineconfig/scripts/python/{env_manager → helper_env}/path_manager_tui.py +2 -2
- machineconfig/scripts/python/{env_manager → helpers/helper_env}/env_manager_tui.py +1 -1
- machineconfig/scripts/python/helpers/helper_env/path_manager_tui.py +228 -0
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_cursor_agents.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_gemini.py +1 -1
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_qwen.py +1 -1
- machineconfig/scripts/python/helpers/helpers_agents/agents_impl.py +168 -0
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_launch.py +10 -7
- machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/aichat/config.yaml +5 -0
- machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/aider/.aider.conf.yml +2 -0
- machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/copilot/config.yml +1 -0
- machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/crush/crush.json +10 -0
- machineconfig/scripts/python/helpers/helpers_agents/privacy/configs/gemini/settings.json +12 -0
- machineconfig/scripts/python/helpers/helpers_agents/privacy/privacy.py +109 -0
- machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.sh +3 -1
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_copy.py +6 -6
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_mount.py +10 -5
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_sync.py +4 -4
- machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers2.py +1 -1
- machineconfig/scripts/python/helpers/helpers_croshell/croshell_impl.py +229 -0
- machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/scheduler.py +4 -4
- machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/start_slidev.py +7 -6
- machineconfig/scripts/python/helpers/helpers_devops/backup_config.py +149 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_backup_retrieve.py +262 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_config.py +130 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_config_dotfile.py +274 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_config_mount.py +77 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_data.py +71 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_nw.py +285 -0
- machineconfig/scripts/python/helpers/helpers_devops/cli_repos.py +274 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_self.py +84 -33
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_file.py +44 -30
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_server.py +26 -43
- machineconfig/scripts/python/helpers/helpers_devops/cli_share_temp.py +69 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/cli_share_terminal.py +12 -6
- machineconfig/scripts/python/helpers/helpers_devops/cli_ssh.py +167 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_status.py +12 -6
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/devops_update_repos.py +1 -1
- machineconfig/scripts/python/{interactive.py → helpers/helpers_devops/interactive.py} +64 -50
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/commands.py +25 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/device_entry.py +17 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/devices.py +17 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/linux.py +103 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/macos.py +100 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/selection.py +47 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/utils.py +28 -0
- machineconfig/scripts/python/helpers/helpers_devops/mount_helpers/windows.py +91 -0
- machineconfig/scripts/python/helpers/helpers_devops/run_script.py +197 -0
- machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.ps1 +41 -0
- machineconfig/scripts/python/helpers/helpers_devops/themes/choose_starship_theme.sh +48 -0
- machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_wezterm_theme.py +3 -3
- machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/file_wrangler.py +1 -0
- machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_args_helper.py +1 -0
- machineconfig/scripts/python/helpers/helpers_fire_command/fire_jobs_impl.py +233 -0
- machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/fire_jobs_route_helper.py +3 -3
- machineconfig/scripts/python/helpers/helpers_fire_command/fire_jobs_streamlit_helper.py +0 -0
- machineconfig/scripts/python/helpers/helpers_msearch/msearch_impl.py +248 -0
- machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_linux/fzfg +4 -3
- machineconfig/scripts/python/helpers/helpers_msearch/scripts_linux/search_with_context.sh +48 -0
- machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/scripts_windows/fzfg.ps1 +2 -7
- machineconfig/scripts/python/helpers/helpers_navigator/__init__.py +20 -0
- machineconfig/scripts/python/helpers/helpers_navigator/cli_graph_loader.py +234 -0
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/command_builder.py +61 -13
- machineconfig/scripts/python/helpers/helpers_navigator/command_detail.py +153 -0
- machineconfig/scripts/python/helpers/helpers_navigator/command_tree.py +45 -0
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/data_models.py +18 -11
- machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/main_app.py +5 -5
- machineconfig/scripts/python/helpers/helpers_network/__init__.py +0 -0
- machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/address.py +52 -10
- machineconfig/scripts/python/helpers/helpers_network/address_switch.py +78 -0
- machineconfig/scripts/python/helpers/helpers_network/ftpx_impl.py +276 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/__init__.py +0 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_identity.py +73 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_key_windows.py +23 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_add_ssh_key.py +169 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_cloud_init.py +33 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_linux.py +338 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_linux_utils.py +35 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_windows.py +245 -0
- machineconfig/scripts/python/helpers/helpers_network/ssh/ssh_debug_windows_utils.py +34 -0
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action.py +3 -3
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/action_helper.py +3 -3
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/cloud_repo_sync.py +120 -37
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/grource.py +3 -2
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/record.py +33 -13
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_2.py +63 -19
- machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/update.py +0 -6
- machineconfig/scripts/python/helpers/helpers_search/script_help.py +81 -0
- machineconfig/scripts/python/helpers/helpers_sessions/__init__.py +0 -0
- machineconfig/scripts/python/helpers/helpers_sessions/attach_impl.py +87 -0
- machineconfig/scripts/python/helpers/helpers_sessions/sessions_impl.py +114 -0
- machineconfig/scripts/python/{helpers_sessions → helpers/helpers_sessions}/sessions_multiprocess.py +1 -2
- machineconfig/scripts/python/helpers/helpers_sessions/utils.py +69 -0
- machineconfig/scripts/python/{helpers_utils → helpers/helpers_utils}/download.py +1 -1
- machineconfig/scripts/python/{helpers_devops/cli_utils.py → helpers/helpers_utils/pdf.py} +2 -2
- machineconfig/scripts/python/{helpers_utils/path.py → helpers/helpers_utils/python.py} +65 -40
- machineconfig/scripts/python/helpers/helpers_utils/specs.py +246 -0
- machineconfig/scripts/python/mcfg_entry.py +126 -48
- machineconfig/scripts/python/msearch.py +16 -61
- machineconfig/scripts/python/sessions.py +137 -191
- machineconfig/scripts/python/utils.py +104 -24
- machineconfig/settings/atuin/config.toml +294 -0
- machineconfig/settings/atuin/themes/catppuccin-mocha-mauve.toml +12 -0
- machineconfig/settings/linters/.ruff.toml +2 -1
- machineconfig/settings/mprocs/windows/mprocs.yaml +2 -2
- machineconfig/settings/shells/bash/init.sh +6 -10
- machineconfig/settings/shells/nushell/config.nu +23 -1
- machineconfig/settings/shells/nushell/env.nu +22 -48
- machineconfig/settings/shells/nushell/init.nu +64 -240
- machineconfig/settings/shells/pwsh/init.ps1 +71 -5
- machineconfig/settings/shells/pwsh/search_pwsh_history.ps1 +99 -0
- machineconfig/settings/shells/wezterm/wezterm.lua +4 -0
- machineconfig/settings/shells/wt/settings.json +31 -37
- machineconfig/settings/shells/zsh/init.sh +25 -5
- machineconfig/settings/television/cable_unix/bash-history.toml +1 -1
- machineconfig/settings/television/cable_windows/pwsh-history.toml +1 -1
- machineconfig/settings/tv/config.toml +234 -0
- machineconfig/settings/tv/themes/catppuccin-mocha-sky.toml +22 -0
- machineconfig/settings/wsl/.wslconfig +5 -30
- machineconfig/settings/wt/__init__.py +0 -0
- machineconfig/settings/yazi/yazi_linux.toml +18 -8
- machineconfig/settings/zellij/__init__.py +0 -0
- machineconfig/settings/zellij/config.kdl +0 -295
- machineconfig/settings/zellij/layouts/__init__.py +0 -0
- machineconfig/settings/zellij/layouts/st.kdl +39 -9
- machineconfig/settings/zellij/layouts/st2.kdl +6 -2
- machineconfig/setup_linux/__init__.py +0 -1
- machineconfig/setup_linux/apps_desktop.sh +8 -27
- machineconfig/setup_linux/web_shortcuts/interactive.sh +10 -10
- machineconfig/setup_linux/web_shortcuts/live_from_github.sh +3 -0
- machineconfig/setup_mac/__init__.py +0 -2
- machineconfig/setup_windows/__init__.py +2 -5
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +14 -13
- machineconfig/setup_windows/web_shortcuts/live_from_github.ps1 +4 -3
- machineconfig/setup_windows/web_shortcuts/quick_init.ps1 +3 -3
- machineconfig/type_hinting/sql/__init__.py +1 -0
- machineconfig/type_hinting/sql/base.py +216 -0
- machineconfig/type_hinting/sql/core_schema.py +64 -0
- machineconfig/type_hinting/sql/core_schema_typeddict.py +41 -0
- machineconfig/type_hinting/sql/typeddict_codegen.py +222 -0
- machineconfig/type_hinting/typedict/__init__.py +1 -0
- machineconfig/type_hinting/typedict/ast_utils.py +130 -0
- machineconfig/type_hinting/typedict/generator_helpers.py +319 -0
- machineconfig/type_hinting/typedict/generators.py +231 -0
- machineconfig/type_hinting/typedict/polars_schema.py +24 -0
- machineconfig/type_hinting/typedict/polars_schema_typeddict.py +63 -0
- machineconfig/utils/accessories.py +24 -0
- machineconfig/utils/code.py +78 -33
- machineconfig/utils/files/ascii_art.py +10 -14
- machineconfig/utils/files/headers.py +3 -5
- machineconfig/utils/files/read.py +8 -1
- machineconfig/utils/installer_utils/github_release_bulk.py +11 -91
- machineconfig/utils/installer_utils/github_release_scraper.py +99 -0
- machineconfig/utils/installer_utils/install_from_url.py +1 -1
- machineconfig/utils/installer_utils/installer_class.py +12 -4
- machineconfig/utils/installer_utils/installer_cli.py +7 -17
- machineconfig/utils/installer_utils/installer_helper.py +52 -36
- machineconfig/utils/installer_utils/installer_locator_utils.py +15 -25
- machineconfig/utils/installer_utils/installer_runner.py +4 -4
- machineconfig/utils/io.py +25 -8
- machineconfig/utils/meta.py +6 -4
- machineconfig/utils/options.py +49 -19
- machineconfig/utils/options_utils/__init__.py +0 -0
- machineconfig/utils/options_utils/options_tv_linux.py +211 -0
- machineconfig/utils/options_utils/options_tv_windows.py +88 -0
- machineconfig/utils/options_utils/tv_options.py +37 -0
- machineconfig/utils/path_extended.py +8 -7
- machineconfig/utils/procs.py +35 -27
- machineconfig/utils/scheduler.py +8 -2
- machineconfig/utils/schemas/fire_agents/fire_agents_input.py +1 -1
- machineconfig/utils/schemas/layouts/layout_types.py +10 -0
- machineconfig/utils/source_of_truth.py +7 -1
- machineconfig/utils/ssh.py +73 -23
- machineconfig/utils/ssh_utils/abc.py +1 -1
- machineconfig/utils/ssh_utils/copy_from_here.py +19 -14
- machineconfig/utils/ssh_utils/copy_to_here.py +2 -1
- machineconfig/utils/ssh_utils/utils.py +23 -7
- machineconfig/utils/ssh_utils/wsl.py +107 -170
- machineconfig/utils/ssh_utils/wsl_helper.py +217 -0
- machineconfig/utils/upgrade_packages.py +4 -8
- {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/METADATA +30 -23
- machineconfig-8.61.dist-info/RECORD +539 -0
- {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/entry_points.txt +0 -1
- machineconfig/jobs/installer/check_installations.py +0 -248
- machineconfig/profile/backup.toml +0 -49
- machineconfig/profile/mapper.toml +0 -263
- machineconfig/scripts/linux/other/share_cloud.sh +0 -64
- machineconfig/scripts/linux/other/share_nfs +0 -49
- machineconfig/scripts/linux/other/start_docker +0 -23
- machineconfig/scripts/linux/other/switch_ip +0 -20
- machineconfig/scripts/python/helpers/run_py_script.py +0 -79
- machineconfig/scripts/python/helpers/tmp_py_scripts/a.py +0 -26
- machineconfig/scripts/python/helpers_devops/cli_config.py +0 -105
- machineconfig/scripts/python/helpers_devops/cli_config_dotfile.py +0 -89
- machineconfig/scripts/python/helpers_devops/cli_data.py +0 -25
- machineconfig/scripts/python/helpers_devops/cli_nw.py +0 -214
- machineconfig/scripts/python/helpers_devops/cli_repos.py +0 -215
- machineconfig/scripts/python/helpers_devops/devops_backup_retrieve.py +0 -80
- machineconfig/scripts/python/helpers_devops/themes/choose_starship_theme.bash +0 -3
- machineconfig/scripts/python/helpers_navigator/__init__.py +0 -20
- machineconfig/scripts/python/helpers_navigator/command_detail.py +0 -44
- machineconfig/scripts/python/helpers_navigator/command_tree.py +0 -620
- machineconfig/scripts/python/helpers_network/devops_add_identity.py +0 -82
- machineconfig/scripts/python/helpers_network/devops_add_ssh_key.py +0 -153
- machineconfig/scripts/python/helpers_network/mount_drive +0 -128
- machineconfig/scripts/python/helpers_network/mount_nfs +0 -49
- machineconfig/scripts/python/helpers_network/mount_nfs.py +0 -85
- machineconfig/scripts/python/helpers_network/mount_nw_drive +0 -61
- machineconfig/scripts/python/helpers_network/mount_nw_drive.py +0 -48
- machineconfig/scripts/python/helpers_network/mount_smb +0 -3
- machineconfig/scripts/python/helpers_network/mount_ssh.py +0 -64
- machineconfig/scripts/python/helpers_network/ssh_debug_linux.py +0 -391
- machineconfig/scripts/python/helpers_network/ssh_debug_windows.py +0 -338
- machineconfig/scripts/python/helpers_network/wsl_windows_transfer.py +0 -67
- machineconfig/scripts/python/helpers_repos/entrypoint.py +0 -77
- machineconfig/scripts/python/terminal.py +0 -133
- machineconfig/scripts/windows/mounts/Restore-ThunderbirdProfile.ps1 +0 -92
- machineconfig/scripts/windows/mounts/mount_nfs.ps1 +0 -42
- machineconfig/scripts/windows/mounts/mount_nw.ps1 +0 -9
- machineconfig/scripts/windows/mounts/mount_smb.ps1 +0 -2
- machineconfig/scripts/windows/mounts/mount_ssh.ps1 +0 -13
- machineconfig/scripts/windows/mounts/share_cloud.cmd +0 -34
- machineconfig/scripts/windows/mounts/share_smb.ps1 +0 -16
- machineconfig/settings/zellij/config.orig.kdl +0 -295
- machineconfig/setup_linux/others/android.sh +0 -2
- machineconfig/setup_linux/others/mint_keyboard_shortcuts.sh +0 -30
- machineconfig/setup_linux/ssh/openssh_all.sh +0 -25
- machineconfig/setup_linux/ssh/openssh_wsl.sh +0 -38
- machineconfig/setup_mac/ssh/openssh_setup.sh +0 -114
- machineconfig/setup_windows/others/docker.ps1 +0 -7
- machineconfig/setup_windows/others/obs.ps1 +0 -4
- machineconfig/setup_windows/others/power_options.ps1 +0 -7
- machineconfig/setup_windows/ssh/add-sshkey.ps1 +0 -29
- machineconfig/setup_windows/ssh/add_identity.ps1 +0 -11
- machineconfig/setup_windows/ssh/openssh-server.ps1 +0 -37
- machineconfig/setup_windows/ssh/openssh-server_add_key.ps1 +0 -7
- machineconfig/setup_windows/ssh/openssh-server_copy-ssh-id.ps1 +0 -14
- machineconfig/utils/options_tv.py +0 -119
- machineconfig/utils/tst.py +0 -20
- machineconfig-7.98.dist-info/RECORD +0 -504
- /machineconfig/{jobs/installer/custom_dev → cluster/sessions_managers/wt_utils/examples}/__init__.py +0 -0
- /machineconfig/{scripts/python/helpers_agents → jobs/installer/checks}/__init__.py +0 -0
- /machineconfig/{scripts/python/helpers_agents/agentic_frameworks → jobs/installer/python_scripts}/__init__.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/alacritty.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/bypass_paywall.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/cloudflare_warp_cli.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/cursor.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/dubdb_adbc.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/espanso.py +0 -0
- /machineconfig/jobs/installer/{custom → python_scripts}/gh.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/goes.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/lvim.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/redis.py +0 -0
- /machineconfig/jobs/installer/{custom_dev → python_scripts}/winget.py +0 -0
- /machineconfig/jobs/{installer/linux_scripts → scripts/bash_scripts}/lid.sh +0 -0
- /machineconfig/{scripts/windows/mounts → jobs/scripts/powershell_scripts}/unlock_bitlocker.ps1 +0 -0
- /machineconfig/scripts/python/ai/{solutions/_shared.py → utils/shared.py} +0 -0
- /machineconfig/scripts/python/{helpers_cloud → graph}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers}/__init__.py +0 -0
- /machineconfig/scripts/python/{env_manager → helpers/helper_env}/__init__.py +0 -0
- /machineconfig/scripts/python/{env_manager → helpers/helper_env}/path_manager_backend.py +0 -0
- /machineconfig/scripts/python/{helpers_devops → helpers/helpers_agents}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_devops/themes → helpers/helpers_agents/agentic_frameworks}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/agentic_frameworks/fire_crush.json +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_help_search.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_helper_types.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/fire_agents_load_balancer.py +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/prompt.txt +0 -0
- /machineconfig/scripts/python/{helpers_agents → helpers/helpers_agents}/templates/template.ps1 +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_cloud}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/cloud_helpers.py +0 -0
- /machineconfig/scripts/python/{helpers_cloud → helpers/helpers_cloud}/helpers5.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_croshell}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/crosh.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/pomodoro.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer.py +0 -0
- /machineconfig/scripts/python/{helpers_croshell → helpers/helpers_croshell}/viewer_template.py +0 -0
- /machineconfig/scripts/python/{helpers_sessions → helpers/helpers_devops}/__init__.py +0 -0
- /machineconfig/{setup_windows/wt_and_pwsh → scripts/python/helpers/helpers_devops/mount_helpers}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_devops/themes/choose_starship_theme.ps1 → helpers/helpers_devops/themes/__init__.py} +0 -0
- /machineconfig/scripts/python/{helpers_devops → helpers/helpers_devops}/themes/choose_pwsh_theme.ps1 +0 -0
- /machineconfig/scripts/python/{helpers_fire_command/f.py → helpers/helpers_fire_command/__init__.py} +0 -0
- /machineconfig/scripts/python/{helpers_fire_command → helpers/helpers_fire_command}/cloud_manager.py +0 -0
- /machineconfig/scripts/python/{helpers_fire_command/fire_jobs_streamlit_helper.py → helpers/helpers_fire_command/f.py} +0 -0
- /machineconfig/scripts/python/{helpers_msearch → helpers/helpers_msearch}/__init__.py +0 -0
- /machineconfig/scripts/python/{helpers_navigator → helpers/helpers_navigator}/search_bar.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/onetimeshare.py +0 -0
- /machineconfig/scripts/python/{helpers_network → helpers/helpers_network}/wifi_conn.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/clone.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/repo_analyzer_1.py +0 -0
- /machineconfig/scripts/python/{helpers_repos → helpers/helpers_repos}/sync.py +0 -0
- /machineconfig/scripts/python/helpers/{ast_search.py → helpers_search/ast_search.py} +0 -0
- /machineconfig/scripts/python/helpers/{qr_code.py → helpers_search/qr_code.py} +0 -0
- /machineconfig/scripts/python/helpers/{repo_rag.py → helpers_search/repo_rag.py} +0 -0
- /machineconfig/scripts/python/helpers/{symantic_search.py → helpers_search/symantic_search.py} +0 -0
- /machineconfig/{setup_windows/wt_and_pwsh → settings/wt}/set_wt_settings.py +0 -0
- {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/WHEEL +0 -0
- {machineconfig-7.98.dist-info → machineconfig-8.61.dist-info}/top_level.txt +0 -0
|
@@ -1,80 +1,59 @@
|
|
|
1
1
|
# machineconfig Nushell initialization
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
| default ($env.
|
|
6
|
-
|
|
3
|
+
# Cross-platform home directory helper
|
|
4
|
+
def get_home []: nothing -> string {
|
|
5
|
+
$env.HOME? | default ($env.USERPROFILE? | default $nu.home-path)
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
def
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
mkdir $dir
|
|
12
|
-
} catch {
|
|
13
|
-
null
|
|
14
|
-
}
|
|
15
|
-
}
|
|
8
|
+
def get_config_root []: nothing -> string {
|
|
9
|
+
$env.CONFIG_ROOT? | default ((get_home) | path join ".config" "machineconfig")
|
|
16
10
|
}
|
|
17
11
|
|
|
18
|
-
def
|
|
19
|
-
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| default (
|
|
24
|
-
$env.TMP?
|
|
25
|
-
| default "/tmp"
|
|
26
|
-
)
|
|
27
|
-
)
|
|
28
|
-
)
|
|
12
|
+
def ensure_directory [dir: string] {
|
|
13
|
+
if not ($dir | path exists) {
|
|
14
|
+
try { mkdir $dir } catch { }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
29
17
|
|
|
18
|
+
def temp_file [prefix: string, suffix: string]: nothing -> string {
|
|
19
|
+
let base_dir = ($env.TMPDIR? | default ($env.TEMP? | default ($env.TMP? | default "/tmp")))
|
|
30
20
|
ensure_directory $base_dir
|
|
31
|
-
|
|
32
21
|
let token = (random uuid | str replace "-" "" | str substring 0..16)
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
$path
|
|
22
|
+
let file_path = ($base_dir | path join $"($prefix)($token)($suffix)")
|
|
23
|
+
"" | save --force $file_path
|
|
24
|
+
$file_path
|
|
38
25
|
}
|
|
39
26
|
|
|
40
|
-
export def wrap_in_shell_script [command: string ...args: string]
|
|
41
|
-
let op_dir = (
|
|
27
|
+
export def wrap_in_shell_script [command: string, ...args: string] {
|
|
28
|
+
let op_dir = ((get_home) | path join "tmp_results" "tmp_scripts" "machineconfig")
|
|
42
29
|
ensure_directory $op_dir
|
|
43
|
-
|
|
44
30
|
let random_name = (random uuid | str replace "-" "" | str substring 0..16)
|
|
45
31
|
let op_program_path = ($op_dir | path join $"($random_name).sh")
|
|
46
|
-
let timestamp = (date now
|
|
32
|
+
let timestamp = (date now | format date "%Y-%m-%d %H:%M:%SZ")
|
|
47
33
|
|
|
48
34
|
print $"machineconfig: running ($command) at ($timestamp)"
|
|
49
35
|
print $"machineconfig: op program path ($op_program_path)"
|
|
50
36
|
|
|
51
|
-
let run_status =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
} catch {
|
|
58
|
-
1
|
|
59
|
-
}
|
|
60
|
-
)
|
|
37
|
+
let run_status = try {
|
|
38
|
+
with-env { OP_PROGRAM_PATH: $op_program_path } { ^$command ...$args }
|
|
39
|
+
0
|
|
40
|
+
} catch {
|
|
41
|
+
1
|
|
42
|
+
}
|
|
61
43
|
|
|
62
44
|
if ($op_program_path | path exists) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
run-external bat "--style=plain" "--paging=never" $op_program_path
|
|
45
|
+
if (which bat | is-not-empty) {
|
|
46
|
+
^bat "--style=plain" "--paging=never" $op_program_path
|
|
66
47
|
} else {
|
|
67
48
|
print (open --raw $op_program_path)
|
|
68
49
|
}
|
|
69
50
|
|
|
70
|
-
let follow_status =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
)
|
|
51
|
+
let follow_status = try {
|
|
52
|
+
^bash $op_program_path
|
|
53
|
+
0
|
|
54
|
+
} catch {
|
|
55
|
+
1
|
|
56
|
+
}
|
|
78
57
|
|
|
79
58
|
if $follow_status == 0 {
|
|
80
59
|
print $"machineconfig: completed ($command)"
|
|
@@ -88,99 +67,54 @@ export def wrap_in_shell_script [command: string ...args: string] -> nothing {
|
|
|
88
67
|
}
|
|
89
68
|
}
|
|
90
69
|
|
|
91
|
-
export def br [...args: string]
|
|
70
|
+
export def --env br [...args: string] {
|
|
92
71
|
let cmd_file = (temp_file "broot-" ".cmd")
|
|
93
|
-
|
|
94
|
-
try {
|
|
95
|
-
run-external broot "--outcmd" $cmd_file ...$args
|
|
96
|
-
} catch {
|
|
97
|
-
if ($cmd_file | path exists) {
|
|
98
|
-
rm $cmd_file
|
|
99
|
-
}
|
|
100
|
-
return
|
|
101
|
-
}
|
|
102
|
-
|
|
72
|
+
try { ^broot "--outcmd" $cmd_file ...$args } catch { rm --force $cmd_file; return }
|
|
103
73
|
if ($cmd_file | path exists) {
|
|
104
74
|
let command_text = (open --raw $cmd_file | str trim)
|
|
105
|
-
rm $cmd_file
|
|
106
|
-
|
|
75
|
+
rm --force $cmd_file
|
|
107
76
|
if ($command_text | str length) > 0 {
|
|
108
|
-
let parsed_cd =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| first
|
|
114
|
-
} catch {
|
|
115
|
-
null
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
if $parsed_cd != null {
|
|
120
|
-
if ($parsed_cd | str length) > 0 {
|
|
121
|
-
cd $parsed_cd
|
|
122
|
-
}
|
|
77
|
+
let parsed_cd = try {
|
|
78
|
+
$command_text | parse "cd \"{path}\"" | get path | first
|
|
79
|
+
} catch { null }
|
|
80
|
+
if $parsed_cd != null and ($parsed_cd | str length) > 0 {
|
|
81
|
+
cd $parsed_cd
|
|
123
82
|
} else {
|
|
124
|
-
try {
|
|
125
|
-
run-external nu "-c" $command_text
|
|
126
|
-
} catch {
|
|
127
|
-
null
|
|
128
|
-
}
|
|
83
|
+
try { nu -c $command_text } catch { }
|
|
129
84
|
}
|
|
130
85
|
}
|
|
131
86
|
}
|
|
132
87
|
}
|
|
133
88
|
|
|
134
|
-
export def lfcd [...args: string]
|
|
89
|
+
export def --env lfcd [...args: string] {
|
|
135
90
|
let tmp = (temp_file "lf-" ".tmp")
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
run-external lf $"--last-dir-path=$tmp" ...$args
|
|
139
|
-
} catch {
|
|
140
|
-
null
|
|
141
|
-
}
|
|
142
|
-
|
|
91
|
+
try { ^lf $"--last-dir-path=($tmp)" ...$args } catch { }
|
|
143
92
|
if ($tmp | path exists) {
|
|
144
93
|
let dir = (open --raw $tmp | str trim)
|
|
145
|
-
rm $tmp
|
|
146
|
-
|
|
147
|
-
if (($dir | str length) > 0) and ($dir | path exists) {
|
|
94
|
+
rm --force $tmp
|
|
95
|
+
if ($dir | str length) > 0 and ($dir | path exists) {
|
|
148
96
|
cd $dir
|
|
149
97
|
}
|
|
150
98
|
}
|
|
151
99
|
}
|
|
152
100
|
|
|
153
|
-
export def y [...args: string]
|
|
101
|
+
export def --env y [...args: string] {
|
|
154
102
|
let tmp = (temp_file "yazi-" ".tmp")
|
|
155
|
-
|
|
156
|
-
try {
|
|
157
|
-
run-external yazi ...$args $"--cwd-file=$tmp"
|
|
158
|
-
} catch {
|
|
159
|
-
null
|
|
160
|
-
}
|
|
161
|
-
|
|
103
|
+
try { ^yazi ...$args $"--cwd-file=($tmp)" } catch { }
|
|
162
104
|
if ($tmp | path exists) {
|
|
163
105
|
let dir = (open --raw $tmp | str trim)
|
|
164
|
-
rm $tmp
|
|
165
|
-
|
|
166
|
-
if (($dir | str length) > 0) and ($dir | path exists) {
|
|
106
|
+
rm --force $tmp
|
|
107
|
+
if ($dir | str length) > 0 and ($dir | path exists) {
|
|
167
108
|
cd $dir
|
|
168
109
|
}
|
|
169
110
|
}
|
|
170
111
|
}
|
|
171
112
|
|
|
172
|
-
export def
|
|
173
|
-
let result =
|
|
174
|
-
try {
|
|
175
|
-
run-external tere ...$args | complete
|
|
176
|
-
} catch {
|
|
177
|
-
null
|
|
178
|
-
}
|
|
179
|
-
)
|
|
180
|
-
|
|
113
|
+
export def --env tere_cd [...args: string] {
|
|
114
|
+
let result = try { ^tere ...$args | complete } catch { null }
|
|
181
115
|
if $result != null {
|
|
182
116
|
let dest = ($result.stdout | str trim)
|
|
183
|
-
if (
|
|
117
|
+
if ($dest | str length) > 0 and ($dest | path exists) {
|
|
184
118
|
cd $dest
|
|
185
119
|
}
|
|
186
120
|
}
|
|
@@ -188,127 +122,17 @@ export def tere [...args: string] -> nothing {
|
|
|
188
122
|
|
|
189
123
|
export alias lf = lfcd
|
|
190
124
|
|
|
191
|
-
export def d [...args: string]
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export def
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export def
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export def s [...args: string] -> nothing {
|
|
204
|
-
wrap_in_shell_script "sessions" ...$args
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export def fx [...args: string] -> nothing {
|
|
208
|
-
wrap_in_shell_script "ftpx" ...$args
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export def f [...args: string] -> nothing {
|
|
212
|
-
wrap_in_shell_script "fire" ...$args
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export def r [...args: string] -> nothing {
|
|
216
|
-
wrap_in_shell_script "croshell" ...$args
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export def u [...args: string] -> nothing {
|
|
220
|
-
wrap_in_shell_script "utils" ...$args
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export def t [...args: string] -> nothing {
|
|
224
|
-
wrap_in_shell_script "terminal" ...$args
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export def ms [...args: string] -> nothing {
|
|
228
|
-
wrap_in_shell_script "msearch" ...$args
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export def x [...args: string] -> nothing {
|
|
232
|
-
wrap_in_shell_script "explore" ...$args
|
|
233
|
-
}
|
|
125
|
+
export def d [...args: string] { wrap_in_shell_script "devops" ...$args }
|
|
126
|
+
export def c [...args: string] { wrap_in_shell_script "cloud" ...$args }
|
|
127
|
+
export def a [...args: string] { wrap_in_shell_script "agents" ...$args }
|
|
128
|
+
export def s [...args: string] { wrap_in_shell_script "sessions" ...$args }
|
|
129
|
+
export def fx [...args: string] { wrap_in_shell_script "ftpx" ...$args }
|
|
130
|
+
export def f [...args: string] { wrap_in_shell_script "fire" ...$args }
|
|
131
|
+
export def r [...args: string] { wrap_in_shell_script "croshell" ...$args }
|
|
132
|
+
export def u [...args: string] { wrap_in_shell_script "utils" ...$args }
|
|
133
|
+
export def t [...args: string] { wrap_in_shell_script "terminal" ...$args }
|
|
134
|
+
export def ms [...args: string] { wrap_in_shell_script "msearch" ...$args }
|
|
135
|
+
export def x [...args: string] { wrap_in_shell_script "explore" ...$args }
|
|
234
136
|
|
|
235
137
|
export alias l = lsd -la
|
|
236
138
|
|
|
237
|
-
let starship_cache_dir = ($env.HOME | path join ".cache" "starship")
|
|
238
|
-
if (((which starship) | length) > 0) {
|
|
239
|
-
ensure_directory $starship_cache_dir
|
|
240
|
-
let starship_init = ($starship_cache_dir | path join "init.nu")
|
|
241
|
-
|
|
242
|
-
try {
|
|
243
|
-
starship init nu | save --force $starship_init
|
|
244
|
-
} catch {
|
|
245
|
-
try {
|
|
246
|
-
starship init nu | save $starship_init
|
|
247
|
-
} catch {
|
|
248
|
-
null
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
try {
|
|
253
|
-
source $starship_init
|
|
254
|
-
} catch {
|
|
255
|
-
null
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
try {
|
|
259
|
-
use $starship_init starship
|
|
260
|
-
} catch {
|
|
261
|
-
null
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
let zoxide_init = ($env.HOME | path join ".zoxide.nu")
|
|
266
|
-
if (((which zoxide) | length) > 0) {
|
|
267
|
-
try {
|
|
268
|
-
zoxide init nushell | save --force $zoxide_init
|
|
269
|
-
} catch {
|
|
270
|
-
try {
|
|
271
|
-
zoxide init nushell | save $zoxide_init
|
|
272
|
-
} catch {
|
|
273
|
-
null
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
try {
|
|
278
|
-
source $zoxide_init
|
|
279
|
-
} catch {
|
|
280
|
-
null
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
let mcfly_cache_dir = ($env.HOME | path join ".cache" "mcfly")
|
|
285
|
-
if (((which mcfly) | length) > 0) {
|
|
286
|
-
ensure_directory $mcfly_cache_dir
|
|
287
|
-
let mcfly_init = ($mcfly_cache_dir | path join "init.nu")
|
|
288
|
-
|
|
289
|
-
try {
|
|
290
|
-
mcfly init nu | save --force $mcfly_init
|
|
291
|
-
} catch {
|
|
292
|
-
try {
|
|
293
|
-
mcfly init nu | save $mcfly_init
|
|
294
|
-
} catch {
|
|
295
|
-
null
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
try {
|
|
300
|
-
source $mcfly_init
|
|
301
|
-
} catch {
|
|
302
|
-
null
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
let user_init = ($env.HOME | path join "dotfiles" "machineconfig" "init_nu.nu")
|
|
307
|
-
if ($user_init | path exists) {
|
|
308
|
-
try {
|
|
309
|
-
source $user_init
|
|
310
|
-
} catch {
|
|
311
|
-
null
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
@@ -16,12 +16,14 @@ function Add-ToPathIfNotAlready {
|
|
|
16
16
|
|
|
17
17
|
Add-ToPathIfNotAlready -Directories @(
|
|
18
18
|
"$HOME\.local\bin",
|
|
19
|
+
"$HOME\.bun\bin",
|
|
19
20
|
"$CONFIG_ROOT\scripts",
|
|
20
21
|
"$HOME\dotfiles\scripts\windows",
|
|
21
22
|
"C:\Program Files (x86)\GnuWin32\bin",
|
|
22
23
|
"C:\Program Files\CodeBlocks\MinGW\bin",
|
|
23
24
|
"C:\Program Files\nu\bin",
|
|
24
|
-
"C:\Program Files\Graphviz\bin"
|
|
25
|
+
"C:\Program Files\Graphviz\bin",
|
|
26
|
+
"C:\Program Files\7-Zip"
|
|
25
27
|
)
|
|
26
28
|
|
|
27
29
|
# sources ================================================================
|
|
@@ -34,15 +36,15 @@ if (Test-Path "$CONFIG_ROOT\scripts\wrap_mcfg.ps1") {
|
|
|
34
36
|
|
|
35
37
|
function lsdla { lsd -la }
|
|
36
38
|
Set-Alias -Name l -Value lsdla -Option AllScope
|
|
39
|
+
|
|
37
40
|
function d { wrap_in_shell_script devops $args }
|
|
38
41
|
function c { wrap_in_shell_script cloud $args }
|
|
39
42
|
function a { wrap_in_shell_script agents $args }
|
|
40
|
-
function sx { wrap_in_shell_script sessions $args }
|
|
41
43
|
function fx { wrap_in_shell_script ftpx $args }
|
|
44
|
+
function s { wrap_in_shell_script sessions $args }
|
|
42
45
|
function f { wrap_in_shell_script fire $args }
|
|
43
46
|
function rr { wrap_in_shell_script croshell $args }
|
|
44
47
|
function u { wrap_in_shell_script utils $args }
|
|
45
|
-
function t { wrap_in_shell_script terminal $args }
|
|
46
48
|
function ms { wrap_in_shell_script msearch $args }
|
|
47
49
|
|
|
48
50
|
}
|
|
@@ -53,16 +55,20 @@ else {
|
|
|
53
55
|
function d { devops $args }
|
|
54
56
|
function c { cloud $args }
|
|
55
57
|
function a { agents $args }
|
|
56
|
-
function
|
|
58
|
+
function s { sessions $args }
|
|
57
59
|
function fx { ftpx $args }
|
|
58
60
|
function f { fire $args }
|
|
59
61
|
function rr { croshell $args }
|
|
60
62
|
function u { utils $args }
|
|
61
|
-
function t { terminal $args }
|
|
62
63
|
function ms { msearch $args }
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
|
|
67
|
+
# Use bun as node if available
|
|
68
|
+
if (Test-Path "$HOME\.bun\bin\bun.exe") {
|
|
69
|
+
Set-Alias -Name node -Value "$HOME\.bun\bin\bun.exe" -Option AllScope
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
|
|
67
73
|
# sources end
|
|
68
74
|
|
|
@@ -100,3 +106,63 @@ try {
|
|
|
100
106
|
catch {
|
|
101
107
|
# Do nothing
|
|
102
108
|
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# history search =====================================================
|
|
112
|
+
|
|
113
|
+
if (Get-Command atuin -ErrorAction SilentlyContinue) {
|
|
114
|
+
try {
|
|
115
|
+
Invoke-Expression (& atuin init powershell | Out-String)
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
# Do nothing
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
elseif (Get-Command mcfly -ErrorAction SilentlyContinue) {
|
|
122
|
+
try {
|
|
123
|
+
Invoke-Expression (& mcfly init powershell | Out-String)
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
# Do nothing
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
try {
|
|
131
|
+
Import-Module PSReadLine -ErrorAction Stop | Out-Null
|
|
132
|
+
Set-PSReadLineKeyHandler -Chord Ctrl+r -ScriptBlock {
|
|
133
|
+
param($key, $arg)
|
|
134
|
+
|
|
135
|
+
$buffer = $null
|
|
136
|
+
$cursor = 0
|
|
137
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$buffer, [ref]$cursor) } catch { }
|
|
138
|
+
|
|
139
|
+
$selected = $null
|
|
140
|
+
try {
|
|
141
|
+
[Console]::WriteLine()
|
|
142
|
+
$selected = (& tv pwsh-history 2>$null | Select-Object -First 1)
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
$selected = $null
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if ([string]::IsNullOrWhiteSpace($selected)) {
|
|
149
|
+
return
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
$selected = $selected.TrimEnd("`r", "`n")
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
$existingLen = if ($null -eq $buffer) { 0 } else { $buffer.Length }
|
|
156
|
+
[Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $existingLen, $selected)
|
|
157
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::SetCursorPosition($selected.Length) } catch { }
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::Insert($selected) } catch { }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
# Do nothing
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
function Register-TvFuzzyHistoryKeyHandler {
|
|
2
|
+
[CmdletBinding()]
|
|
3
|
+
param(
|
|
4
|
+
[string]$Chord = "Ctrl+r",
|
|
5
|
+
[string]$Channel = "pwsh-history"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
Import-Module PSReadLine -ErrorAction Stop | Out-Null
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$handler = {
|
|
16
|
+
param($key, $arg)
|
|
17
|
+
|
|
18
|
+
$tvCmd = Get-Command tv -ErrorAction SilentlyContinue
|
|
19
|
+
if ($null -eq $tvCmd) {
|
|
20
|
+
try {
|
|
21
|
+
[Microsoft.PowerShell.PSConsoleReadLine]::ReverseSearchHistory($key, $arg)
|
|
22
|
+
return
|
|
23
|
+
} catch { }
|
|
24
|
+
try {
|
|
25
|
+
[Microsoft.PowerShell.PSConsoleReadLine]::ReverseSearchHistory()
|
|
26
|
+
return
|
|
27
|
+
} catch { }
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$buffer = $null
|
|
32
|
+
$cursor = 0
|
|
33
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$buffer, [ref]$cursor) } catch { }
|
|
34
|
+
|
|
35
|
+
$currentPrompt = ""
|
|
36
|
+
if (-not [string]::IsNullOrEmpty($buffer)) {
|
|
37
|
+
if ($cursor -lt 0) { $cursor = 0 }
|
|
38
|
+
elseif ($cursor -gt $buffer.Length) { $cursor = $buffer.Length }
|
|
39
|
+
$currentPrompt = $buffer.Substring(0, $cursor)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$tvQuery = $currentPrompt
|
|
43
|
+
if (-not [string]::IsNullOrEmpty($tvQuery) -and ($tvQuery -match "[\r\n]")) {
|
|
44
|
+
$parts = $tvQuery -split "\r?\n"
|
|
45
|
+
$tvQuery = $parts[-1]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
$selected = $null
|
|
49
|
+
$attempts = @(
|
|
50
|
+
@($Channel, "--input", $tvQuery, "--inline"),
|
|
51
|
+
@($Channel, "--input", $tvQuery),
|
|
52
|
+
@($Channel, "--inline"),
|
|
53
|
+
@($Channel)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
$originalCursorPosition = $null
|
|
57
|
+
try { $originalCursorPosition = $Host.UI.RawUI.CursorPosition } catch { }
|
|
58
|
+
try { [Console]::WriteLine() } catch { }
|
|
59
|
+
|
|
60
|
+
foreach ($tvArgs in $attempts) {
|
|
61
|
+
$out = $null
|
|
62
|
+
try { $out = & tv @tvArgs 2>$null } catch { $out = $null }
|
|
63
|
+
if ($null -ne $out) {
|
|
64
|
+
$selected = ($out | Select-Object -First 1)
|
|
65
|
+
if (-not [string]::IsNullOrWhiteSpace($selected)) {
|
|
66
|
+
break
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if ($null -ne $originalCursorPosition) {
|
|
72
|
+
try { $Host.UI.RawUI.CursorPosition = $originalCursorPosition } catch { }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if ([string]::IsNullOrWhiteSpace($selected)) {
|
|
76
|
+
return
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
$selected = $selected.TrimEnd("`r", "`n")
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
$existingLen = if ($null -eq $buffer) { 0 } else { $buffer.Length }
|
|
83
|
+
[Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $existingLen, $selected)
|
|
84
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::SetCursorPosition($selected.Length) } catch { }
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
try { [Microsoft.PowerShell.PSConsoleReadLine]::Insert($selected) } catch { }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
Set-PSReadLineKeyHandler -Chord $Chord -BriefDescription "TvHistory" -Description "Fuzzy search history (tv)" -ScriptBlock $handler.GetNewClosure() -ErrorAction Stop
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
Register-TvFuzzyHistoryKeyHandler
|
|
@@ -158,6 +158,10 @@ config.inactive_pane_hsb = {
|
|
|
158
158
|
|
|
159
159
|
-- config.ime_preedit_rendering = 'System'
|
|
160
160
|
config.enable_tab_bar = false
|
|
161
|
+
config.hide_tab_bar_if_only_one_tab = true
|
|
162
|
+
config.use_fancy_tab_bar = false
|
|
163
|
+
config.show_tabs_in_tab_bar = true
|
|
164
|
+
config.show_new_tab_button_in_tab_bar = false
|
|
161
165
|
config.window_background_opacity = 0.98
|
|
162
166
|
config.text_background_opacity = 1.0
|
|
163
167
|
config.enable_scroll_bar = true
|