machineconfig 2.0__py3-none-any.whl → 2.2__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.

Files changed (253) hide show
  1. machineconfig/cluster/cloud_manager.py +0 -3
  2. machineconfig/cluster/data_transfer.py +0 -1
  3. machineconfig/cluster/file_manager.py +0 -1
  4. machineconfig/cluster/job_params.py +0 -3
  5. machineconfig/cluster/loader_runner.py +0 -3
  6. machineconfig/cluster/remote_machine.py +0 -1
  7. machineconfig/cluster/script_notify_upon_completion.py +0 -1
  8. machineconfig/cluster/sessions_managers/archive/create_zellij_template.py +5 -6
  9. machineconfig/cluster/sessions_managers/archive/session_managers.py +0 -1
  10. machineconfig/cluster/sessions_managers/enhanced_command_runner.py +17 -57
  11. machineconfig/cluster/sessions_managers/wt_local.py +36 -110
  12. machineconfig/cluster/sessions_managers/wt_local_manager.py +42 -112
  13. machineconfig/cluster/sessions_managers/wt_remote.py +23 -30
  14. machineconfig/cluster/sessions_managers/wt_remote_manager.py +20 -62
  15. machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +10 -15
  16. machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +27 -127
  17. machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +10 -43
  18. machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +22 -101
  19. machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +11 -39
  20. machineconfig/cluster/sessions_managers/zellij_local.py +49 -102
  21. machineconfig/cluster/sessions_managers/zellij_local_manager.py +34 -78
  22. machineconfig/cluster/sessions_managers/zellij_remote.py +17 -24
  23. machineconfig/cluster/sessions_managers/zellij_remote_manager.py +7 -13
  24. machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +4 -2
  25. machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +6 -6
  26. machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +18 -88
  27. machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +2 -6
  28. machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +12 -40
  29. machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +3 -2
  30. machineconfig/cluster/templates/cli_click.py +0 -1
  31. machineconfig/cluster/templates/cli_gooey.py +0 -2
  32. machineconfig/cluster/templates/cli_trogon.py +0 -1
  33. machineconfig/cluster/templates/run_cloud.py +0 -1
  34. machineconfig/cluster/templates/run_cluster.py +0 -1
  35. machineconfig/cluster/templates/run_remote.py +0 -1
  36. machineconfig/cluster/templates/utils.py +27 -46
  37. machineconfig/jobs/__pycache__/__init__.cpython-313.pyc +0 -0
  38. machineconfig/jobs/linux/msc/cli_agents.sh +16 -0
  39. machineconfig/jobs/python/check_installations.py +2 -1
  40. machineconfig/jobs/python/create_bootable_media.py +0 -2
  41. machineconfig/jobs/python/python_ve_symlink.py +9 -11
  42. machineconfig/jobs/python/tasks.py +0 -1
  43. machineconfig/jobs/python/vscode/api.py +5 -5
  44. machineconfig/jobs/python/vscode/link_ve.py +13 -14
  45. machineconfig/jobs/python/vscode/select_interpreter.py +21 -22
  46. machineconfig/jobs/python/vscode/sync_code.py +9 -13
  47. machineconfig/jobs/python_custom_installers/archive/ngrok.py +13 -13
  48. machineconfig/jobs/python_custom_installers/dev/aider.py +7 -15
  49. machineconfig/jobs/python_custom_installers/dev/alacritty.py +9 -18
  50. machineconfig/jobs/python_custom_installers/dev/brave.py +10 -19
  51. machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +8 -15
  52. machineconfig/jobs/python_custom_installers/dev/code.py +12 -32
  53. machineconfig/jobs/python_custom_installers/dev/cursor.py +3 -14
  54. machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +8 -7
  55. machineconfig/jobs/python_custom_installers/dev/espanso.py +15 -19
  56. machineconfig/jobs/python_custom_installers/dev/goes.py +5 -12
  57. machineconfig/jobs/python_custom_installers/dev/lvim.py +9 -17
  58. machineconfig/jobs/python_custom_installers/dev/nerdfont.py +12 -19
  59. machineconfig/jobs/python_custom_installers/dev/redis.py +12 -20
  60. machineconfig/jobs/python_custom_installers/dev/wezterm.py +12 -19
  61. machineconfig/jobs/python_custom_installers/dev/winget.py +5 -23
  62. machineconfig/jobs/python_custom_installers/docker.py +12 -21
  63. machineconfig/jobs/python_custom_installers/gh.py +11 -19
  64. machineconfig/jobs/python_custom_installers/hx.py +32 -16
  65. machineconfig/jobs/python_custom_installers/warp-cli.py +12 -20
  66. machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-313.pyc +0 -0
  67. machineconfig/jobs/python_generic_installers/config.json +1 -1
  68. machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-313.pyc +0 -0
  69. machineconfig/jobs/windows/archive/archive_pygraphviz.ps1 +1 -1
  70. machineconfig/jobs/windows/msc/cli_agents.bat +0 -0
  71. machineconfig/jobs/windows/msc/cli_agents.ps1 +0 -0
  72. machineconfig/jobs/windows/start_terminal.ps1 +1 -1
  73. machineconfig/profile/create.py +38 -26
  74. machineconfig/profile/create_hardlinks.py +29 -20
  75. machineconfig/profile/shell.py +56 -32
  76. machineconfig/scripts/__init__.py +0 -2
  77. machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
  78. machineconfig/scripts/cloud/init.sh +2 -2
  79. machineconfig/scripts/linux/checkout_versions +1 -1
  80. machineconfig/scripts/linux/choose_wezterm_theme +1 -1
  81. machineconfig/scripts/linux/cloud_copy +1 -1
  82. machineconfig/scripts/linux/cloud_manager +1 -1
  83. machineconfig/scripts/linux/cloud_mount +1 -1
  84. machineconfig/scripts/linux/cloud_repo_sync +1 -1
  85. machineconfig/scripts/linux/cloud_sync +1 -1
  86. machineconfig/scripts/linux/croshell +1 -1
  87. machineconfig/scripts/linux/devops +7 -7
  88. machineconfig/scripts/linux/fire +1 -1
  89. machineconfig/scripts/linux/fire_agents +3 -2
  90. machineconfig/scripts/linux/ftpx +1 -1
  91. machineconfig/scripts/linux/gh_models +1 -1
  92. machineconfig/scripts/linux/kill_process +1 -1
  93. machineconfig/scripts/linux/mcinit +1 -1
  94. machineconfig/scripts/linux/repos +1 -1
  95. machineconfig/scripts/linux/scheduler +1 -1
  96. machineconfig/scripts/linux/start_slidev +1 -1
  97. machineconfig/scripts/linux/start_terminals +1 -1
  98. machineconfig/scripts/linux/url2md +1 -1
  99. machineconfig/scripts/linux/warp-cli.sh +122 -0
  100. machineconfig/scripts/linux/wifi_conn +1 -1
  101. machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
  102. machineconfig/scripts/python/__pycache__/devops.cpython-313.pyc +0 -0
  103. machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-313.pyc +0 -0
  104. machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-313.pyc +0 -0
  105. machineconfig/scripts/python/__pycache__/fire_agents.cpython-313.pyc +0 -0
  106. machineconfig/scripts/python/ai/__init__.py +0 -0
  107. machineconfig/scripts/python/ai/generate_files.py +83 -0
  108. machineconfig/scripts/python/ai/instructions/python/dev.instructions.md +2 -2
  109. machineconfig/scripts/python/ai/mcinit.py +14 -7
  110. machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh +10 -5
  111. machineconfig/scripts/python/archive/tmate_conn.py +5 -5
  112. machineconfig/scripts/python/archive/tmate_start.py +7 -7
  113. machineconfig/scripts/python/choose_wezterm_theme.py +35 -32
  114. machineconfig/scripts/python/cloud_copy.py +23 -14
  115. machineconfig/scripts/python/cloud_mount.py +36 -24
  116. machineconfig/scripts/python/cloud_repo_sync.py +40 -27
  117. machineconfig/scripts/python/cloud_sync.py +4 -4
  118. machineconfig/scripts/python/croshell.py +40 -29
  119. machineconfig/scripts/python/devops.py +45 -27
  120. machineconfig/scripts/python/devops_add_identity.py +15 -25
  121. machineconfig/scripts/python/devops_add_ssh_key.py +8 -8
  122. machineconfig/scripts/python/devops_backup_retrieve.py +18 -16
  123. machineconfig/scripts/python/devops_devapps_install.py +25 -20
  124. machineconfig/scripts/python/devops_update_repos.py +232 -59
  125. machineconfig/scripts/python/dotfile.py +17 -15
  126. machineconfig/scripts/python/fire_agents.py +48 -22
  127. machineconfig/scripts/python/fire_jobs.py +93 -58
  128. machineconfig/scripts/python/ftpx.py +26 -15
  129. machineconfig/scripts/python/get_zellij_cmd.py +8 -7
  130. machineconfig/scripts/python/helpers/cloud_helpers.py +33 -28
  131. machineconfig/scripts/python/helpers/helpers2.py +27 -16
  132. machineconfig/scripts/python/helpers/helpers4.py +45 -32
  133. machineconfig/scripts/python/helpers/helpers5.py +1 -1
  134. machineconfig/scripts/python/helpers/repo_sync_helpers.py +32 -10
  135. machineconfig/scripts/python/mount_nfs.py +9 -16
  136. machineconfig/scripts/python/mount_nw_drive.py +10 -5
  137. machineconfig/scripts/python/mount_ssh.py +9 -7
  138. machineconfig/scripts/python/repos.py +216 -58
  139. machineconfig/scripts/python/snapshot.py +0 -1
  140. machineconfig/scripts/python/start_slidev.py +11 -6
  141. machineconfig/scripts/python/start_terminals.py +22 -16
  142. machineconfig/scripts/python/viewer_template.py +0 -1
  143. machineconfig/scripts/python/wifi_conn.py +49 -75
  144. machineconfig/scripts/python/wsl_windows_transfer.py +9 -7
  145. machineconfig/scripts/windows/checkout_version.ps1 +1 -3
  146. machineconfig/scripts/windows/choose_wezterm_theme.ps1 +1 -3
  147. machineconfig/scripts/windows/cloud_copy.ps1 +2 -6
  148. machineconfig/scripts/windows/cloud_manager.ps1 +1 -1
  149. machineconfig/scripts/windows/cloud_repo_sync.ps1 +1 -2
  150. machineconfig/scripts/windows/cloud_sync.ps1 +2 -2
  151. machineconfig/scripts/windows/croshell.ps1 +2 -2
  152. machineconfig/scripts/windows/devops.ps1 +1 -4
  153. machineconfig/scripts/windows/dotfile.ps1 +1 -3
  154. machineconfig/scripts/windows/fire.ps1 +1 -1
  155. machineconfig/scripts/windows/ftpx.ps1 +2 -2
  156. machineconfig/scripts/windows/gpt.ps1 +1 -1
  157. machineconfig/scripts/windows/kill_process.ps1 +1 -2
  158. machineconfig/scripts/windows/mcinit.ps1 +1 -1
  159. machineconfig/scripts/windows/mount_nfs.ps1 +1 -1
  160. machineconfig/scripts/windows/mount_ssh.ps1 +1 -1
  161. machineconfig/scripts/windows/pomodoro.ps1 +1 -1
  162. machineconfig/scripts/windows/py2exe.ps1 +1 -3
  163. machineconfig/scripts/windows/repos.ps1 +1 -1
  164. machineconfig/scripts/windows/scheduler.ps1 +1 -1
  165. machineconfig/scripts/windows/snapshot.ps1 +2 -2
  166. machineconfig/scripts/windows/start_slidev.ps1 +1 -1
  167. machineconfig/scripts/windows/start_terminals.ps1 +1 -1
  168. machineconfig/scripts/windows/wifi_conn.ps1 +1 -1
  169. machineconfig/scripts/windows/wsl_windows_transfer.ps1 +1 -3
  170. machineconfig/settings/lf/linux/lfrc +2 -1
  171. machineconfig/settings/linters/.ruff_cache/.gitignore +2 -0
  172. machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +1 -0
  173. machineconfig/settings/lvim/windows/archive/config_additional.lua +1 -1
  174. machineconfig/settings/svim/linux/init.toml +1 -1
  175. machineconfig/settings/svim/windows/init.toml +1 -1
  176. machineconfig/setup_linux/web_shortcuts/croshell.sh +3 -52
  177. machineconfig/setup_linux/web_shortcuts/interactive.sh +6 -6
  178. machineconfig/setup_linux/web_shortcuts/ssh.sh +0 -4
  179. machineconfig/setup_windows/web_shortcuts/all.ps1 +2 -2
  180. machineconfig/setup_windows/web_shortcuts/ascii_art.ps1 +1 -1
  181. machineconfig/setup_windows/web_shortcuts/croshell.ps1 +1 -1
  182. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +5 -5
  183. machineconfig/setup_windows/wt_and_pwsh/install_fonts.ps1 +51 -15
  184. machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +58 -13
  185. machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +45 -37
  186. machineconfig/utils/ai/generate_file_checklist.py +8 -10
  187. machineconfig/utils/ai/url2md.py +4 -2
  188. machineconfig/utils/cloud/onedrive/setup_oauth.py +1 -0
  189. machineconfig/utils/cloud/onedrive/transaction.py +63 -98
  190. machineconfig/utils/code.py +62 -41
  191. machineconfig/utils/installer.py +29 -35
  192. machineconfig/utils/installer_utils/installer_abc.py +11 -11
  193. machineconfig/utils/installer_utils/installer_class.py +155 -74
  194. machineconfig/utils/links.py +112 -31
  195. machineconfig/utils/notifications.py +211 -0
  196. machineconfig/utils/options.py +41 -42
  197. machineconfig/utils/path.py +13 -6
  198. machineconfig/utils/path_reduced.py +614 -311
  199. machineconfig/utils/procs.py +48 -42
  200. machineconfig/utils/scheduling.py +0 -1
  201. machineconfig/utils/source_of_truth.py +27 -0
  202. machineconfig/utils/ssh.py +146 -85
  203. machineconfig/utils/terminal.py +84 -37
  204. machineconfig/utils/upgrade_packages.py +91 -0
  205. machineconfig/utils/utils2.py +39 -50
  206. machineconfig/utils/utils5.py +195 -116
  207. machineconfig/utils/ve.py +13 -5
  208. {machineconfig-2.0.dist-info → machineconfig-2.2.dist-info}/METADATA +14 -13
  209. {machineconfig-2.0.dist-info → machineconfig-2.2.dist-info}/RECORD +212 -237
  210. machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
  211. machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
  212. machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
  213. machineconfig/jobs/python/archive/python_tools.txt +0 -12
  214. machineconfig/jobs/python/vscode/__pycache__/select_interpreter.cpython-311.pyc +0 -0
  215. machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
  216. machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
  217. machineconfig/jobs/python_generic_installers/update.py +0 -3
  218. machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
  219. machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
  220. machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
  221. machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
  222. machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
  223. machineconfig/scripts/linux/activate_ve +0 -87
  224. machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
  225. machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
  226. machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
  227. machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
  228. machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
  229. machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
  230. machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
  231. machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
  232. machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
  233. machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
  234. machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
  235. machineconfig/scripts/python/__pycache__/fire_jobs.cpython-313.pyc +0 -0
  236. machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-311.pyc +0 -0
  237. machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
  238. machineconfig/scripts/python/ai/__pycache__/init.cpython-311.pyc +0 -0
  239. machineconfig/scripts/python/ai/__pycache__/mcinit.cpython-311.pyc +0 -0
  240. machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
  241. machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
  242. machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
  243. machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
  244. machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
  245. machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-313.pyc +0 -0
  246. machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-311.pyc +0 -0
  247. machineconfig/scripts/windows/activate_ve.ps1 +0 -54
  248. machineconfig/setup_linux/web_shortcuts/all.sh +0 -48
  249. machineconfig/setup_linux/web_shortcuts/update_system.sh +0 -48
  250. machineconfig/utils/utils.py +0 -95
  251. /machineconfig/setup_linux/web_shortcuts/{tmp.sh → android.sh} +0 -0
  252. {machineconfig-2.0.dist-info → machineconfig-2.2.dist-info}/WHEEL +0 -0
  253. {machineconfig-2.0.dist-info → machineconfig-2.2.dist-info}/top_level.txt +0 -0
@@ -1,12 +0,0 @@
1
-
2
- revChatGPT # talk to gpt from terminal
3
- you-get # download content from internet with CLI
4
- pydot # additionally required by tensorflow to plot a model
5
- pyinstaller
6
- glance
7
-
8
-
9
- # pip install python-lsp-server
10
- # pip install --user pylint
11
- # pip install --user yapf
12
- # pip install --user isort
@@ -1,87 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- CONFIG_PATH=$HOME/.config/machineconfig/default_ve
4
-
5
- # check below if VIRTUAL_ENV is set
6
- if [ -z "$VIRTUAL_ENV" ]; then # no active ve ==> activate one.
7
- if [ -z "$1" ]; then # nothing passed, activate default
8
-
9
- if [ -f ./.ve_path ]; then # check if there is a .ve_path file in the current directory
10
- name=$(cat ./.ve_path) # if yes, use it
11
- # replace ~ with $HOME
12
- name="${name/#\~/$HOME}"
13
- source "$name/bin/activate"
14
- elif [ -f $CONFIG_PATH ]; then # check if there is a default ve stored in ~/.machineconfog/default_ve
15
- name=$(cat $CONFIG_PATH) # if yes, use it
16
- source "$name/bin/activate"
17
- else # no default ve found, using ve and setting it as default
18
- name="ve"
19
- source ~/venvs/$name/bin/activate
20
- mkdir ~/.config/machineconfig -p || true
21
- if [ -n "$VIRTUAL_ENV" ]; then
22
- echo $VIRTUAL_ENV > $CONFIG_PATH
23
- else
24
- echo "āŒ No virtual environment active, cant echo it to $CONFIG_PATH"
25
- fi
26
- fi
27
-
28
- else
29
- name=$1
30
- source ~/venvs/$name/bin/activate
31
- fi
32
-
33
- if [ $? -eq 0 ]; then
34
- echo "āœ… Activated Virtual Environment $VIRTUAL_ENV "
35
- fi
36
-
37
- else # there is an active_ve already.
38
- if [ -n "$1" ] && [ "$HOME/venvs/$1" != "$VIRTUAL_ENV" ]; then # check if $1 is passed, if yes, activate it
39
- echo "šŸ”» Deactivating virtual environment $VIRTUAL_ENV "
40
-
41
- # if command -v deactivate >/dev/null 2>&1; then
42
- # deactivate
43
- # fi
44
- if command -v deactivate >/dev/null 2>&1; then
45
- DEACTIVATE_PATH=$(command -v deactivate)
46
- if [[ $DEACTIVATE_PATH != *"ms-python"* ]]; then
47
- deactivate
48
- fi
49
- fi
50
-
51
- name=$1
52
- source ~/venvs/$name/bin/activate
53
-
54
- if [ $? -eq 0 ]; then
55
- echo "āœ… Activated virtual environment $VIRTUAL_ENV "
56
- fi
57
-
58
- else # user didn't pass anything.
59
-
60
- if [ -f ./.ve_path ]; then # check if there is a .ve_path file in the current directory
61
- name=$(cat ./.ve_path) # if yes, use it
62
- name="${name/#\~/$HOME}" # replace ~ with $HOME
63
-
64
- if [ "$name" = "$VIRTUAL_ENV" ]; then
65
- echo "āš ļø Virtual environment $VIRTUAL_ENV already active"
66
- else
67
- echo "šŸ”» Deactivating virtual environment $VIRTUAL_ENV "
68
- source "$name/bin/activate"
69
- echo "āœ… Activated Virtual Environment $VIRTUAL_ENV "
70
- fi
71
-
72
- else
73
- echo "āš ļø Virtual environment $VIRTUAL_ENV already active"
74
- fi
75
-
76
- fi
77
-
78
- # check if default is not defined, if so, define it as $VIRTUAL_ENV
79
- if [ ! -f $CONFIG_PATH ]; then
80
- mkdir ~/.config/machineconfig -p || true
81
- if [ -n "$VIRTUAL_ENV" ]; then
82
- echo $VIRTUAL_ENV > $CONFIG_PATH
83
- else
84
- echo "āŒ No virtual environment active, cannot echo it to $CONFIG_PATH"
85
- fi
86
- fi
87
- fi
@@ -1,54 +0,0 @@
1
-
2
- $CONFIG_PATH = "$env:USERPROFILE\.config\machineconfig\default_ve"
3
-
4
- if (!$env:VIRTUAL_ENV)
5
- { # no ve activated ==> activate one.
6
- if (!$args[0]) { # nothing passed. >> use defaults
7
-
8
- if (Test-Path ".\.ve_path") {
9
- $name = Get-Content "./.ve_path" # use default file it exists
10
- & "$name\Scripts\Activate.ps1"
11
- }
12
- elseif (Test-Path $CONFIG_PATH) {
13
- $name = Get-Content $CONFIG_PATH # use default file it exists
14
- & "$name\Scripts\Activate.ps1"
15
- }
16
- else { # no default file. >> use default name
17
- $name = "ve"
18
- mkdir $env:USERPROFILE\.config\machineconfig -ErrorAction SilentlyContinue
19
- "$env:USERPROFILE\venvs\$name" > $CONFIG_PATH
20
- & "$env:USERPROFILE\venvs\$name\Scripts\Activate.ps1"
21
- }
22
-
23
- }
24
- else {
25
- $name = $args[0]
26
- & "$env:USERPROFILE\venvs\$name\Scripts\Activate.ps1"
27
- }
28
-
29
- if ($?) { Write-Host "`u{2705} Activated virtual environment $env:VIRTUAL_ENV" }
30
-
31
- }
32
-
33
- else {
34
-
35
- # if $args[0] is passed, it's a new ve to activate
36
- # echo "$env:USERPROFILE\venvs\$args"
37
- $ve_name = $args[0]
38
- if ($args[0] -and "$env:VIRTUAL_ENV" -ne "$env:USERPROFILE\venvs\$ve_name") {
39
- Write-Output "`u{1F53B} Deactivating virtual environment $env:VIRTUAL_ENV"
40
- deactivate -ErrorAction SilentlyContinue
41
- $name = $args[0]
42
- & "$env:USERPROFILE\venvs\$name\Scripts\Activate.ps1"
43
- if ($?) { Write-Host "`u{2705} Activated virtual environment $env:VIRTUAL_ENV " }
44
- }
45
- else {
46
- Write-Host "`u{26A0} Virtual environment '$env:VIRTUAL_ENV' is already activated "
47
- }
48
-
49
- if (!(Test-Path $CONFIG_PATH)) {
50
- New-Item -ItemType Directory -Path $env:USERPROFILE\.config\machineconfig -ErrorAction SilentlyContinue
51
- $env:VIRTUAL_ENV > $CONFIG_PATH
52
- }
53
- }
54
-
@@ -1,48 +0,0 @@
1
- #!/usr/bin/bash
2
- #=======================================================================
3
- # 🌐 WEB SHORTCUTS MASTER SCRIPT
4
- #=======================================================================
5
- # This script provides quick access to installation scripts via web
6
-
7
- echo """#=======================================================================
8
- šŸ“š AVAILABLE INSTALLATION OPTIONS | Web-based installers
9
- #=======================================================================
10
-
11
- Choose from the following installation options:
12
- """
13
-
14
- echo """#=======================================================================
15
- šŸ“¦ SYSTEM APPLICATIONS | Basic system applications
16
- #=======================================================================
17
-
18
- # To install system applications, run:
19
- # curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/apps.sh | bash
20
- """
21
-
22
- echo """#=======================================================================
23
- šŸ PYTHON ENVIRONMENT | Virtual environment setup
24
- #=======================================================================
25
-
26
- Setting up Python virtual environment...
27
- """
28
- curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/ve.sh | bash
29
-
30
- echo """#=======================================================================
31
- šŸ”„ CODE REPOSITORIES | Cloning project repositories
32
- #=======================================================================
33
-
34
- Setting up code repositories...
35
- """
36
- curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/repos.sh | bash
37
-
38
- echo """#=======================================================================
39
- āš™ļø DEVELOPMENT TOOLS | Developer applications
40
- #=======================================================================
41
-
42
- # To install development applications, run:
43
- # source <(sudo cat ~/code/machineconfig/src/machineconfig/setup_linux/devapps.sh)
44
-
45
- #=======================================================================
46
- āœ… INSTALLATION COMPLETE | Basic environment setup finished
47
- #=======================================================================
48
- """
@@ -1,48 +0,0 @@
1
- #!/usr/bin/bash
2
- #=======================================================================
3
- # šŸ”„ SYSTEM UPDATE SCRIPT
4
- #=======================================================================
5
- # This script provides methods to update Ubuntu system and kernel
6
-
7
- echo """#=======================================================================
8
- šŸ”„ SYSTEM UPGRADE OPTIONS | Ubuntu system maintenance
9
- #=======================================================================
10
- """
11
-
12
- echo """#=======================================================================
13
- šŸ“¦ UBUNTU DISTRIBUTION UPGRADE | Full system version upgrade
14
- #=======================================================================
15
-
16
- āš ļø This will upgrade Ubuntu to the next available release
17
- Edit /etc/update-manager/release-upgrades to configure upgrade behavior
18
- """
19
- # Uncomment the line below to actually run the upgrade
20
- # do-release-upgrade
21
-
22
- echo """#=======================================================================
23
- šŸ”§ KERNEL UPDATE | Installing the latest Linux kernel
24
- #=======================================================================
25
-
26
- šŸ“„ Downloading Ubuntu mainline kernel installation script...
27
- """
28
- wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
29
-
30
- echo """šŸ› ļø Installing script to system path...
31
- """
32
- sudo install ubuntu-mainline-kernel.sh /usr/local/bin/
33
-
34
- echo """šŸ” Checking available kernel versions...
35
- """
36
- sudo ubuntu-mainline-kernel.sh -c
37
-
38
- echo """ā³ Installing the latest kernel (this may take several minutes)...
39
- """
40
- sudo ubuntu-mainline-kernel.sh -i -y
41
-
42
- echo """#=======================================================================
43
- āœ… UPDATE COMPLETE | System upgrade finished
44
- #=======================================================================
45
-
46
- āš ļø IMPORTANT: A system reboot is required to use the new kernel
47
- To reboot now, run: sudo reboot
48
- """
@@ -1,95 +0,0 @@
1
- """
2
- Utils
3
- """
4
-
5
- from machineconfig.utils.path_reduced import P as PathExtended
6
- import machineconfig
7
- from machineconfig.utils.options import check_tool_exists, choose_cloud_interactively, choose_multiple_options, choose_one_option, choose_ssh_host, display_options
8
- from rich.console import Console
9
- from rich.panel import Panel
10
- from machineconfig.utils.links import build_links, symlink_copy, symlink_func
11
- from machineconfig.utils.code import get_shell_script_executing_python_file, get_shell_file_executing_python_script, write_shell_script_to_default_program_path, print_code, PROGRAM_PATH
12
- from machineconfig.utils.path import sanitize_path, match_file_name
13
-
14
- # Split into multiple assignments to fix incompatible tuple sizes
15
- _ = get_shell_script_executing_python_file, get_shell_file_executing_python_script, print_code, PROGRAM_PATH, display_options, write_shell_script_to_default_program_path
16
- _ = build_links
17
- _ = symlink_copy
18
- _ = symlink_func
19
- _ = check_tool_exists
20
- _ = choose_cloud_interactively
21
- _ = choose_multiple_options
22
- _ = choose_one_option
23
- _ = choose_ssh_host
24
- _ = sanitize_path
25
- _ = match_file_name
26
-
27
-
28
- LIBRARY_ROOT = PathExtended(machineconfig.__file__).resolve().parent # .replace(str(PathExtended.home()).lower(), PathExtended.home().str)
29
- REPO_ROOT = LIBRARY_ROOT.parent.parent
30
- CONFIG_PATH = PathExtended.home().joinpath(".config/machineconfig")
31
- INSTALL_VERSION_ROOT = CONFIG_PATH.joinpath("cli_tools_installers/versions")
32
- INSTALL_TMP_DIR = PathExtended.home().joinpath("tmp_results", "tmp_installers")
33
- DEFAULTS_PATH = PathExtended.home().joinpath("dotfiles/machineconfig/defaults.ini")
34
-
35
-
36
- # def get_latest_version(url: str) -> None:
37
- # # not yet used, consider, using it.
38
- # import requests
39
- # import json
40
- # url = f"https://api.github.com/repos/{url.split('github.com/')[1]}/releases/latest"
41
- # # Replace {owner} and {repo} with the actual owner and repository name
42
- # response = requests.get(url, timeout=10)
43
- # if response.status_code == 200:
44
- # data = json.loads(response.text)
45
- # latest_version = data["tag_name"]
46
- # print(f"\nšŸ“¦ VERSION INFO | Latest release: {latest_version}\n")
47
- # else: print(f"\nāŒ ERROR | API request failed: {response.status_code}\n")
48
-
49
-
50
-
51
-
52
- def check_dotfiles_version_is_beyond(commit_dtm: str, update: bool) -> bool:
53
- dotfiles_path = str(PathExtended.home().joinpath("dotfiles"))
54
- from git import Repo
55
- repo = Repo(path=dotfiles_path)
56
- last_commit = repo.head.commit
57
- dtm = last_commit.committed_datetime
58
- from datetime import datetime # make it tz unaware
59
- dtm = datetime(dtm.year, dtm.month, dtm.day, dtm.hour, dtm.minute, dtm.second)
60
- res = dtm > datetime.fromisoformat(commit_dtm)
61
- if res is False and update is True:
62
- console = Console()
63
- console.print(Panel(f"šŸ”„ UPDATE REQUIRED | Updating dotfiles because {dtm} < {datetime.fromisoformat(commit_dtm)}", border_style="bold blue", expand=False))
64
- from machineconfig.scripts.python.cloud_repo_sync import main
65
- main(cloud=None, path=dotfiles_path)
66
- return res
67
-
68
- def wait_for_jobs_to_finish(root: PathExtended, pattern: str, wait_for_n_jobs: int, max_wait_minutes: float) -> bool:
69
- wait_finished: bool=False
70
- import time
71
- t0 = time.time()
72
- while not wait_finished:
73
- parts = root.search(pattern, folders=False, r=False)
74
- counter = len(parts)
75
- if counter == wait_for_n_jobs:
76
- wait_finished = True
77
- console = Console()
78
- console.print(Panel(f"āœ… JOB COMPLETE | {counter} Jobs finished successfully. Exiting.", border_style="bold blue", expand=False))
79
- return True
80
- if (time.time() - t0) > 60 * max_wait_minutes:
81
- console = Console()
82
- console.print(Panel(f"ā±ļø TIMEOUT | Waited for {max_wait_minutes} minutes. Exiting.", border_style="bold blue", expand=False))
83
- return False
84
- print(f"""
85
- ā³ PROGRESS | {counter}/{wait_for_n_jobs} jobs finished. Waiting for {wait_for_n_jobs - counter} more jobs to complete, sleeping for 60 seconds.
86
- """)
87
- time.sleep(60)
88
- return False
89
-
90
-
91
-
92
- if __name__ == '__main__':
93
- # import typer
94
- # typer.run(check_tool_exists)
95
- pass