Compare commits
83 Commits
osd-dev
...
970dfb4c1e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
970dfb4c1e | ||
|
|
4bef91eb1b | ||
|
|
cbce1614ff | ||
|
|
155085aae4 | ||
|
|
c198851d10 | ||
|
|
44d8948315 | ||
|
|
8e7c99edcf | ||
|
|
4eaf054c8a | ||
|
|
7c6c295eb8 | ||
|
|
b10c0d0bda | ||
|
|
73905e4066 | ||
|
|
4f23496458 | ||
|
|
6832bb64d0 | ||
|
|
501aea9cea | ||
|
|
ee48da8eaa | ||
|
|
b35293a9f0 | ||
|
|
4ee18f77e0 | ||
|
|
42b3c7d306 | ||
|
|
b1885f5463 | ||
|
|
db6a8c0de2 | ||
|
|
d0b359d475 | ||
|
|
97ed53041c | ||
|
|
59a00dbb6e | ||
|
|
84741f68ed | ||
|
|
36635268be | ||
|
|
cc5e1a21e3 | ||
|
|
558efec514 | ||
|
|
b789f4afe9 | ||
|
|
a3a021ee18 | ||
|
|
3c76055b05 | ||
|
|
f4e8efeb8f | ||
|
|
6aef629cc2 | ||
|
|
d80bca7f00 | ||
|
|
ab11fc8566 | ||
|
|
516f5cd88a | ||
|
|
866eed3a57 | ||
|
|
3438d019a9 | ||
|
|
108c9cefd7 | ||
|
|
766e6808b5 | ||
|
|
c84c63b0b8 | ||
|
|
56a36622c1 | ||
|
|
5715fd5577 | ||
|
|
25384cbd95 | ||
|
|
0cb372ee42 | ||
|
|
879f3fb0bf | ||
|
|
9b34237c99 | ||
|
|
185d2e20b5 | ||
|
|
44efe712fe | ||
|
|
c6e19f8633 | ||
|
|
f0f6f560c6 | ||
|
|
8fc1c62462 | ||
|
|
13a20f7783 | ||
|
|
8064928ba4 | ||
|
|
7950fdc252 | ||
|
|
64d163dc1a | ||
|
|
a9a135ca0b | ||
|
|
405a4637ee | ||
|
|
ad8fffcec7 | ||
|
|
89369e066d | ||
|
|
8ab6bd4bff | ||
|
|
1b89c295c3 | ||
|
|
b8ec75febe | ||
|
|
d23d3d65ec | ||
|
|
81f6289374 | ||
|
|
4ab866acef | ||
|
|
a4f14e33c8 | ||
|
|
856bcc9ee9 | ||
|
|
f13f3c71c7 | ||
|
|
5f287688d6 | ||
|
|
48dfbaa8ae | ||
|
|
43d96a7a3d | ||
|
|
64b1207b53 | ||
|
|
a7111acdc2 | ||
|
|
d3915d64e3 | ||
|
|
eb9d882449 | ||
|
|
2aab479968 | ||
|
|
e4af88ee68 | ||
|
|
4670ee5597 | ||
|
|
239e93905a | ||
|
|
f1455d03cd | ||
|
|
b07394fe05 | ||
|
|
cb9e5e3a95 | ||
|
|
5a7330a62e |
31
.aider.conf.yml
Normal file
31
.aider.conf.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#############
|
||||||
|
# Main model:
|
||||||
|
|
||||||
|
## Specify the model to use for the main chat
|
||||||
|
# model: oca/gpt5
|
||||||
|
model: oca/gpt-5.1-codex
|
||||||
|
|
||||||
|
|
||||||
|
## Enable/disable automatic acceptance of architect changes (default: True)
|
||||||
|
#auto-accept-architect: true
|
||||||
|
|
||||||
|
weak-model: oca/llama4
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Output settings:
|
||||||
|
|
||||||
|
## Use colors suitable for a dark terminal background (default: False)
|
||||||
|
dark-mode: true
|
||||||
|
|
||||||
|
## Enable/disable auto commit of LLM changes (default: True)
|
||||||
|
auto-commits: false
|
||||||
|
|
||||||
|
|
||||||
|
############
|
||||||
|
# Analytics:
|
||||||
|
|
||||||
|
## Enable/disable analytics for current session (default: random)
|
||||||
|
analytics: false
|
||||||
|
|
||||||
|
## Permanently disable analytics
|
||||||
|
analytics-disable: true
|
||||||
611
.codex/config.toml
Normal file
611
.codex/config.toml
Normal file
@@ -0,0 +1,611 @@
|
|||||||
|
# doc: https://developers.openai.com/codex/config-advanced
|
||||||
|
# https://developers.openai.com/codex/config-reference
|
||||||
|
|
||||||
|
# The API key is valid just for a week
|
||||||
|
# Generate API key:
|
||||||
|
# 1. Open https://apex.oraclecorp.com/pls/apex/r/oca/api-key/home and generate an API Key for yourself.
|
||||||
|
# 2. Press 'Copy Codex Environment Setup Command'
|
||||||
|
# 3. paste the command and run it
|
||||||
|
# #+begin_src bash
|
||||||
|
# echo <api_key> | codex login --with-api-key
|
||||||
|
# #+end_src
|
||||||
|
|
||||||
|
|
||||||
|
# model = "oca/gpt-5.1-codex-mini"
|
||||||
|
# profile = "gpt-5-1-codex-mini"
|
||||||
|
|
||||||
|
model = "gpt-5.4"
|
||||||
|
profile = "gpt-5-4"
|
||||||
|
|
||||||
|
|
||||||
|
web_search_request = true
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
sandbox_mode = "workspace-write"
|
||||||
|
|
||||||
|
|
||||||
|
[features]
|
||||||
|
multi_agent = true
|
||||||
|
|
||||||
|
[agents]
|
||||||
|
max_threads = 20
|
||||||
|
max_depth = 2
|
||||||
|
|
||||||
|
[tui]
|
||||||
|
alternate_screen = "always"
|
||||||
|
|
||||||
|
[sandbox_workspace_write]
|
||||||
|
network_access = true
|
||||||
|
writable_roots = [ "/Users/jetpac/.codex/skills" ]
|
||||||
|
|
||||||
|
[analytics]
|
||||||
|
enabled = false
|
||||||
|
|
||||||
|
|
||||||
|
[model_providers.oca-responses]
|
||||||
|
base_url = "https://code-internal.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm"
|
||||||
|
http_headers = { "client" = "codex-cli", "client-version" = "0" }
|
||||||
|
model = "gpt5"
|
||||||
|
name = "Oracle Code Assist Responses"
|
||||||
|
wire_api = "responses"
|
||||||
|
stream_max_retries = 20
|
||||||
|
request_max_retries = 20
|
||||||
|
|
||||||
|
|
||||||
|
[model_providers.oca-chat]
|
||||||
|
base_url = "https://code-internal.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm"
|
||||||
|
http_headers = { "client" = "codex-cli", "client-version" = "0" }
|
||||||
|
model = "gpt5"
|
||||||
|
name = "Oracle Code Assist Chat"
|
||||||
|
wire_api = "responses"
|
||||||
|
|
||||||
|
[profiles.grok-4]
|
||||||
|
model = "grok4"
|
||||||
|
model_provider = "oca-chat"
|
||||||
|
review_model = "grok4"
|
||||||
|
|
||||||
|
[profiles.grok-4-fast-reasoning]
|
||||||
|
model = "grok4-fast-reasoning"
|
||||||
|
model_provider = "oca-chat"
|
||||||
|
review_model = "grok4-fast-reasoning"
|
||||||
|
|
||||||
|
[profiles.grok-code-fast-1]
|
||||||
|
model = "grok-code-fast-1"
|
||||||
|
model_provider = "oca-chat"
|
||||||
|
review_model = "grok-code-fast-1"
|
||||||
|
[profiles.gpt-4-1]
|
||||||
|
model = "gpt-4.1"
|
||||||
|
model_provider = "oca-chat"
|
||||||
|
review_model = "gpt-4.1"
|
||||||
|
[profiles.gpt-5]
|
||||||
|
model = "gpt5"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt5"
|
||||||
|
[profiles.gpt-5-1]
|
||||||
|
model = "gpt-5.1"
|
||||||
|
model_provider = "oca-chat"
|
||||||
|
review_model = "gpt-5.1"
|
||||||
|
[profiles.gpt-5-2]
|
||||||
|
model = "gpt-5.2"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.2"
|
||||||
|
[profiles.gpt-5-codex]
|
||||||
|
model = "gpt-5-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
[profiles.gpt-5-1-codex-high]
|
||||||
|
model = "gpt-5.1-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.1-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "high"
|
||||||
|
[profiles.gpt-5-1-codex]
|
||||||
|
model = "gpt-5.1-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.1-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "medium"
|
||||||
|
|
||||||
|
[profiles.gpt-5-1-codex-mini]
|
||||||
|
model = "gpt-5.1-codex-mini"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.1-codex-mini"
|
||||||
|
personality = "pragmatic"
|
||||||
|
|
||||||
|
|
||||||
|
[profiles.gpt-5-2-codex-high]
|
||||||
|
model = "gpt-5.2-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.2-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "high"
|
||||||
|
[profiles.gpt-5-2-codex]
|
||||||
|
model = "gpt-5.2-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.2-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "medium"
|
||||||
|
[profiles.gpt-5-2-codex-mini]
|
||||||
|
model = "gpt-5.2-codex-mini"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.2-codex-mini"
|
||||||
|
personality = "pragmatic"
|
||||||
|
|
||||||
|
|
||||||
|
[profiles.gpt-5-3-codex]
|
||||||
|
model = "gpt-5.3-codex"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.3-codex"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "high"
|
||||||
|
|
||||||
|
[profiles.gpt-5-4]
|
||||||
|
model = "gpt-5.4"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.4"
|
||||||
|
personality = "pragmatic"
|
||||||
|
model_reasoning_effort = "high"
|
||||||
|
plan_mode_reasoning_effort = "high"
|
||||||
|
|
||||||
|
[profiles.gpt-5-4-pro]
|
||||||
|
model = "gpt-5.4-pro"
|
||||||
|
model_provider = "oca-responses"
|
||||||
|
review_model = "gpt-5.4"
|
||||||
|
personality = "pragmatic"
|
||||||
|
# model_reasoning_effort = "high"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[mcp_servers.playwright]
|
||||||
|
command = "/Users/jetpac/.codex/bin/playwright-mcp"
|
||||||
|
startup_timeout_sec = 30.0
|
||||||
|
PLAYWRIGHT_BROWSERS_PATH = "0"
|
||||||
|
|
||||||
|
[mcp_servers.playwright.tools.browser_navigate]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.playwright.tools.browser_resize]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
|
||||||
|
[mcp_servers.oci-kb]
|
||||||
|
command = "/Users/jetpac/.local/bin/ocikb-mcp-server"
|
||||||
|
#
|
||||||
|
# command = "uvx"
|
||||||
|
# args = ["--index", "https://artifactory.oci.oraclecorp.com/api/pypi/global-release-pypi/simple/", "--from", "oci-kb-mcp@latest", "ocikb-mcp-server"]
|
||||||
|
startup_timeout_sec = 30.0
|
||||||
|
|
||||||
|
[mcp_servers.oci-kb.tools.search]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oci-kb.tools.getDocument]
|
||||||
|
approval_mode = "approve"
|
||||||
|
## Adjust args if you need --browser=firefox, --headed, or custom launch flags.
|
||||||
|
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp]
|
||||||
|
command = "/Users/jetpac/bin/devops-mcp-wrapper.sh"
|
||||||
|
env_vars = ["OP_TOKEN", "OPERATOR_ACCESS_TOKEN"]
|
||||||
|
startup_timeout_sec = 180.0
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd]
|
||||||
|
command = "uvx"
|
||||||
|
args = [
|
||||||
|
"--default-index",
|
||||||
|
"https://artifactory.oci.oraclecorp.com/api/pypi/global-release-pypi/simple/",
|
||||||
|
"--from",
|
||||||
|
"mcp-shepherd-server",
|
||||||
|
"mcp-shepherd",
|
||||||
|
"--transport",
|
||||||
|
"stdio",
|
||||||
|
]
|
||||||
|
env_vars = ["OP_TOKEN", "OPERATOR_ACCESS_TOKEN", "SSH_AUTH_SOCK"]
|
||||||
|
startup_timeout_sec = 60.0
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.env]
|
||||||
|
MCP_SHEPHERD_AUTH_PROVIDER = "OP_TOKEN"
|
||||||
|
MCP_SHEPHERD_TOOL_PROFILE = "core"
|
||||||
|
MCP_SHEPHERD_MAX_REGISTERED_TOOLS = "128"
|
||||||
|
MCP_SHEPHERD_ENABLE_WRITES = "1"
|
||||||
|
MCP_SHEPHERD_TIMEOUT_SECONDS = "25"
|
||||||
|
UV_SKIP_WHEEL_FILENAME_CHECK = "1"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_list_releases]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_get_release]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_list_release_phases]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_list_flocks]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_list_execution_targets_for_flock]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_get_flock]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_list_flock_configs]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp_shepherd.tools.shepherd_get_flock_config]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_regions]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.list_shepherd_region_details]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.search_runbooks]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_runbook_projects]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_realms]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.search_phonebook]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_tenancy_by_name]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_shepherd_projects]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_shepherd_phase_execution_targets]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.devops_mcp.tools.get_release_details]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/bin"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/solaris-cluster/solaris/cluster"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/solaris-cluster"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/jenkins-study"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/userland-pipeline/solaris/userland/sru"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/.codex"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/q"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/event-horizon"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/ff"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/PRs/R2D2"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/userland-pipeline"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/overview"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/ips-tracker"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/ips-tracker"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr/tf"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/empty"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/nori"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/tenancy-creator/valentin/tenancy-creator"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/akidr/solaris/akidr/oci/scripts"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/emptydir"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/eee"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/testy"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/pepa"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/release-tools/release-tools"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/proxy"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/training"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/demo"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/codex-tools/MCPs/notmuch"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/review/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/people"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/python-code-analyzer"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/jenkins-test"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/jenkins-plugin"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/prs/desktop-image-builds"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/effe"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/PRs/ted"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/runbooks"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/ips-gate"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/PRs/dragos/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/codex/presso"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/limits/vmicp-limits-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/PRs/dragos/pr2/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/codex-tools"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/.ssh"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/qq"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/oc21-mfo/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/vlad_mutt_notmuch"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/var/tmp/deleteme/oci-desktop-service-shepherd"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/PycharmProjects/kucharka"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/review"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/kube"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/Users/jetpac/Documents/OSD/tartan-alarms"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/qqq"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[projects."/private/tmp/conf"]
|
||||||
|
trust_level = "trusted"
|
||||||
|
|
||||||
|
[mcp_servers.grt]
|
||||||
|
command = "/Users/jetpac/.codex/bin/grt-mcp"
|
||||||
|
startup_timeout_sec = 30
|
||||||
|
|
||||||
|
[mcp_servers.grt.tools."grt.search_entries"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.grt.tools."grt.get_entry"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.grt.tools."grt.get_rtis_by_target"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.webrti]
|
||||||
|
command = "/Users/jetpac/.codex/bin/webrti-mcp"
|
||||||
|
startup_timeout_sec = 30
|
||||||
|
|
||||||
|
[mcp_servers.webrti.tools."webrti.get_entry"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.webrti.tools."webrti.list_by_date"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.webrti.tools."webrti.get_repo_list"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb]
|
||||||
|
command = "/Users/jetpac/.codex/bin/bugdb-mcp"
|
||||||
|
startup_timeout_sec = 30
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_bug"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_comments"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_header_history"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_references"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_releases_affected"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_summary"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.search_bugs"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.bugdb.tools."bugdb.get_children"]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.central_confluence]
|
||||||
|
command = "uvx"
|
||||||
|
args = [
|
||||||
|
"--python", "3.12",
|
||||||
|
"--default-index", "https://artifactory.oci.oraclecorp.com/api/pypi/global-dev-pypi/simple",
|
||||||
|
"mcp-atlassian",
|
||||||
|
"--confluence-url", "https://confluence.oraclecorp.com/confluence",
|
||||||
|
"--confluence-use-web-session",
|
||||||
|
"--browser", "chrome",
|
||||||
|
]
|
||||||
|
startup_timeout_sec = 300
|
||||||
|
|
||||||
|
[mcp_servers.central_confluence.tools.confluence_get_page_children]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.central_confluence.tools.confluence_get_page]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.central_confluence.tools.confluence_search]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.notmuch]
|
||||||
|
command = "node"
|
||||||
|
args = ["/Users/jetpac/Documents/codex-tools/MCPs/notmuch/dist/index.js"]
|
||||||
|
startup_timeout_sec = 30
|
||||||
|
|
||||||
|
[mcp_servers.notmuch.tools.notmuch_search_threads]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.notmuch.tools.notmuch_get_thread]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.notmuch.tools.notmuch_get_message]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.notmuch.tools.notmuch_count_messages]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.notmuch.tools.notmuch_list_tags]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.vm]
|
||||||
|
command = "node"
|
||||||
|
args = ["/Users/jetpac/Documents/codex-tools/MCPs/vm/dist/index.js"]
|
||||||
|
startup_timeout_sec = 30
|
||||||
|
|
||||||
|
[mcp_servers.vm.tools.vm_list_machines]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.vm.tools.vm_get_machine_info]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.vm.tools.vm_guest_exec]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket]
|
||||||
|
command = "node"
|
||||||
|
args = ["/Users/jetpac/Documents/codex-tools/MCPs/bitbucket-mcp/build/index.js"]
|
||||||
|
env_vars = ["BITBUCKET_TOKEN"]
|
||||||
|
startup_timeout_sec = 60
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.env]
|
||||||
|
BITBUCKET_URL = "https://bitbucket.oci.oraclecorp.com"
|
||||||
|
BITBUCKET_ENABLE_READ_ONLY = "true"
|
||||||
|
BITBUCKET_ENABLE_SAFE_WRITE = "true"
|
||||||
|
MCP_PROJECT_DEFAULT = "ODAAS"
|
||||||
|
MCP_PROJECT_LIST = "ODAAS"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.list_projects]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.list_repositories]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.search]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_comments]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_reviews]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_activities]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_raw_pull_request_diff]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_file_content]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_pull_request]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.oracle-bitbucket.tools.get_diff]
|
||||||
|
approval_mode = "approve"
|
||||||
|
|
||||||
|
[mcp_servers.mcp-atlassian]
|
||||||
|
disabled = false
|
||||||
|
startup_timeout_sec = 90
|
||||||
|
type = "stdio"
|
||||||
|
command = "uvx"
|
||||||
|
args = ["--python=3.11", "mcp-atlassian"]
|
||||||
|
|
||||||
|
[mcp_servers.mcp-atlassian.env]
|
||||||
|
# Use "https://jira.oraclecorp.com/jira" if using non-OCI Jira token.
|
||||||
|
JIRA_URL = "https://jira.oci.oraclecorp.com/"
|
||||||
|
JIRA_USERNAME = "petr.nyc@oracle.com"
|
||||||
|
JIRA_PERSONAL_TOKEN = "MDM2MDg0OTkxNDE1OmRcmNouX2Uw1M3/riCygQz9ogos"
|
||||||
|
JIRA_SSL_VERIFY = "false"
|
||||||
|
READ_ONLY_MODE = "false"
|
||||||
@@ -1,28 +1,30 @@
|
|||||||
|
# man 5 alacritty
|
||||||
|
|
||||||
import = ["~/.config/alacritty/themes/themes/solarized_dark.toml"]
|
import = ["~/.config/alacritty/themes/themes/solarized_dark.toml"]
|
||||||
|
|
||||||
|
# list fonts on mac, part of font-config installed by brew
|
||||||
# [font.normal]
|
# $ fc-list
|
||||||
# # family = "MesloLGS NF"
|
# $ fc-list | grep 'family:' | less
|
||||||
# family = "MesloLGS Nerd Font Mono"
|
|
||||||
#
|
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
|
## MesloLGS font
|
||||||
normal.family = "MesloLGS Nerd Font Mono"
|
normal.family = "MesloLGS Nerd Font Mono"
|
||||||
bold.family = "MesloLGS Nerd Font Mono"
|
bold.family = "MesloLGS Nerd Font Mono"
|
||||||
italic.family = "MesloLGS Nerd Font Mono"
|
italic.family = "MesloLGS Nerd Font Mono"
|
||||||
bold_italic.family = "MesloLGS Nerd Font Mono"
|
bold_italic.family = "MesloLGS Nerd Font Mono"
|
||||||
size = 18
|
size = 18
|
||||||
offset.x = 1
|
offset.x = 1
|
||||||
|
# set apple font smoothing for alacritty:
|
||||||
|
# defaults write org.alacritty AppleFontSmoothing -int 0
|
||||||
|
|
||||||
|
# JetBrains Nerd font
|
||||||
# [window]
|
# normal.family = "JetBrainsMono NF"
|
||||||
# decorations = "none"
|
# bold.family = "JetBrainsMono NF SemiBold"
|
||||||
|
# italic.family = "JetBrainsMono NFM Thin"
|
||||||
# [window.padding]
|
# bold_italic.family = "JetBrainsMono NFM"
|
||||||
# x = 5
|
# size = 18
|
||||||
# y = 3
|
# offset.x = 1
|
||||||
|
# offset.y = 0
|
||||||
# window.dynamic_padding = true
|
|
||||||
|
|
||||||
[window]
|
[window]
|
||||||
dynamic_padding = true
|
dynamic_padding = true
|
||||||
@@ -30,14 +32,66 @@ padding.x = 5
|
|||||||
padding.y = 3
|
padding.y = 3
|
||||||
dimensions.columns = 89
|
dimensions.columns = 89
|
||||||
dimensions.lines = 41
|
dimensions.lines = 41
|
||||||
|
# trick for alt not displaying special characters
|
||||||
|
# https://github.com/alacritty/alacritty/issues/93#issuecomment-1428462339
|
||||||
|
option_as_alt = "OnlyLeft"
|
||||||
|
|
||||||
# decorations = "buttonless"
|
# decorations = "buttonless"
|
||||||
# decorations = "full"
|
# decorations = "full"
|
||||||
# decorations = "transparent"
|
# decorations = "transparent"
|
||||||
|
# decorations = "none"
|
||||||
startup_mode = "Windowed"
|
startup_mode = "Windowed"
|
||||||
|
|
||||||
|
dynamic_title = true
|
||||||
|
|
||||||
[scrolling]
|
[scrolling]
|
||||||
history = 20000
|
history = 20000
|
||||||
|
|
||||||
[selection]
|
[selection]
|
||||||
save_to_clipboard = true
|
save_to_clipboard = true
|
||||||
|
|
||||||
|
|
||||||
|
# key bidnings
|
||||||
|
# use xxd to find unicode codes of key presses
|
||||||
|
# use cat -v to find escape codes of various key combos
|
||||||
|
|
||||||
|
[keyboard]
|
||||||
|
bindings = [
|
||||||
|
# # tmux bindings
|
||||||
|
# # alt + <number> switches to window <number>
|
||||||
|
# { key = "1" , mods = "Option", chars = "\u0001\u0031" }, # C-a 1
|
||||||
|
# { key = "2" , mods = "Option", chars = "\u0001\u0032" }, # C-a 2
|
||||||
|
# { key = "3" , mods = "Option", chars = "\u0001\u0033" }, # C-a 3
|
||||||
|
# { key = "4" , mods = "Option", chars = "\u0001\u0034" }, # C-a 4
|
||||||
|
# { key = "5" , mods = "Option", chars = "\u0001\u0035" }, # C-a 5
|
||||||
|
# { key = "6" , mods = "Option", chars = "\u0001\u0036" }, # C-a 6
|
||||||
|
# { key = "7" , mods = "Option", chars = "\u0001\u0037" }, # C-a 7
|
||||||
|
# { key = "8" , mods = "Option", chars = "\u0001\u0038" }, # C-a 8
|
||||||
|
# { key = "9" , mods = "Option", chars = "\u0001\u0039" }, # C-a 9
|
||||||
|
# { key = "h" , mods = "Option", chars = "\u0001\u0068" }, # C-a left
|
||||||
|
# { key = "j" , mods = "Option", chars = "\u0001\u006a" }, # C-a down
|
||||||
|
# { key = "k" , mods = "Option", chars = "\u0001\u006b" }, # C-a up
|
||||||
|
# { key = "l" , mods = "Option", chars = "\u0001\u006c" }, # C-a right
|
||||||
|
|
||||||
|
# # for tmux resizing
|
||||||
|
# # option + command + <hjkl> for resizing
|
||||||
|
# { key = "k" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0041" }, # C-a C-up
|
||||||
|
# { key = "j" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0042" }, # C-a C-down
|
||||||
|
# { key = "l" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0043" }, # C-a C-right
|
||||||
|
# { key = "h" , mods = "Option|command", chars = "\u0001\u001b\u005b\u0031\u003b\u0035\u0044" }, # C-a C-left
|
||||||
|
|
||||||
|
# { key = "n" , mods = "Alt", chars = "\u0001\u006e" }, # alt+n -> C-a n
|
||||||
|
# { key = "p" , mods = "Alt", chars = "\u0001\u0070" }, # alt+p -> C-a p
|
||||||
|
|
||||||
|
{ key = "ArrowLeft", mods = "Command|Shift", action = "SelectPreviousTab" },
|
||||||
|
{ key = "ArrowRight", mods = "Command|Shift", action = "SelectNextTab" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
[cursor]
|
||||||
|
style.shape = "Block"
|
||||||
|
style.blinking = "Off"
|
||||||
|
|
||||||
|
[mouse]
|
||||||
|
# hide_when_typing = true
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"title": "Keyboard Brightness Adjustment",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"description": "command-f1 and f2 to adjust keyboard brightness",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "f1",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": [
|
||||||
|
"left_command"
|
||||||
|
],
|
||||||
|
"optional": [
|
||||||
|
"caps_lock"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "illumination_decrement"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "f2",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": [
|
||||||
|
"left_command"
|
||||||
|
],
|
||||||
|
"optional": [
|
||||||
|
"caps_lock"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "illumination_increment"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "command-f5 and f6 to adjust keyboard brightness, same keys as earlier macs",
|
||||||
|
"manipulators": [
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "f5",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": [
|
||||||
|
"left_command"
|
||||||
|
],
|
||||||
|
"optional": [
|
||||||
|
"caps_lock"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "illumination_decrement"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "basic",
|
||||||
|
"from": {
|
||||||
|
"key_code": "f6",
|
||||||
|
"modifiers": {
|
||||||
|
"mandatory": [
|
||||||
|
"left_command"
|
||||||
|
],
|
||||||
|
"optional": [
|
||||||
|
"caps_lock"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": [
|
||||||
|
{
|
||||||
|
"key_code": "illumination_increment"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
6934
.config/karabiner/assets/complex_modifications/1675361151.json
Normal file
6934
.config/karabiner/assets/complex_modifications/1675361151.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2520
.config/karabiner/karabiner.json
Normal file
2520
.config/karabiner/karabiner.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -84,10 +84,12 @@ editor_filesize_threshold=64M
|
|||||||
editor_stop_format_chars=-+*\\,.;:&>
|
editor_stop_format_chars=-+*\\,.;:&>
|
||||||
mcview_eof=
|
mcview_eof=
|
||||||
skin=solarized-dark-256color
|
skin=solarized-dark-256color
|
||||||
|
shell_directory_timeout=900
|
||||||
|
filepos_max_saved_entries=1024
|
||||||
|
|
||||||
[Layout]
|
[Layout]
|
||||||
output_lines=0
|
output_lines=0
|
||||||
left_panel_size=75
|
left_panel_size=86
|
||||||
top_panel_size=0
|
top_panel_size=0
|
||||||
message_visible=true
|
message_visible=true
|
||||||
keybar_visible=true
|
keybar_visible=true
|
||||||
@@ -114,6 +116,11 @@ clipboard_paste=
|
|||||||
base_color=
|
base_color=
|
||||||
xterm-256color=
|
xterm-256color=
|
||||||
color_terminals=
|
color_terminals=
|
||||||
|
alacritty=
|
||||||
|
xterm=
|
||||||
|
rxvt-256color=
|
||||||
|
screen-256color=
|
||||||
|
xterm-24bit=
|
||||||
|
|
||||||
[Panels]
|
[Panels]
|
||||||
show_mini_info=true
|
show_mini_info=true
|
||||||
@@ -139,7 +146,7 @@ select_flags=6
|
|||||||
simple_swap=false
|
simple_swap=false
|
||||||
|
|
||||||
[Panelize]
|
[Panelize]
|
||||||
|
Modified git files=git ls-files --modified
|
||||||
|
Find rejects after patching=find . -name \\*.rej -print
|
||||||
Find *.orig after patching=find . -name \\*.orig -print
|
Find *.orig after patching=find . -name \\*.orig -print
|
||||||
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
||||||
Find rejects after patching=find . -name \\*.rej -print
|
|
||||||
Modified git files=git ls-files --modified
|
|
||||||
|
|||||||
544
.config/zellij/config.kdl
Normal file
544
.config/zellij/config.kdl
Normal file
@@ -0,0 +1,544 @@
|
|||||||
|
keybinds clear-defaults=true {
|
||||||
|
locked {
|
||||||
|
bind "Ctrl Alt g" { SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
pane {
|
||||||
|
bind "left" { MoveFocus "left"; }
|
||||||
|
bind "down" { MoveFocus "down"; }
|
||||||
|
bind "up" { MoveFocus "up"; }
|
||||||
|
bind "right" { MoveFocus "right"; }
|
||||||
|
bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
|
||||||
|
bind "d" { NewPane "down"; SwitchToMode "normal"; }
|
||||||
|
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; }
|
||||||
|
bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; }
|
||||||
|
bind "h" { MoveFocus "left"; }
|
||||||
|
bind "i" { TogglePanePinned; SwitchToMode "normal"; }
|
||||||
|
bind "j" { MoveFocus "down"; }
|
||||||
|
bind "k" { MoveFocus "up"; }
|
||||||
|
bind "l" { MoveFocus "right"; }
|
||||||
|
bind "n" { NewPane; SwitchToMode "normal"; }
|
||||||
|
bind "p" { SwitchFocus; }
|
||||||
|
bind "Ctrl p" { SwitchToMode "normal"; }
|
||||||
|
bind "r" { NewPane "right"; SwitchToMode "normal"; }
|
||||||
|
bind "s" { NewPane "stacked"; SwitchToMode "normal"; }
|
||||||
|
bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; }
|
||||||
|
bind "z" { TogglePaneFrames; SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
tab {
|
||||||
|
bind "left" { GoToPreviousTab; }
|
||||||
|
bind "down" { GoToNextTab; }
|
||||||
|
bind "up" { GoToPreviousTab; }
|
||||||
|
bind "right" { GoToNextTab; }
|
||||||
|
bind "1" { GoToTab 1; SwitchToMode "normal"; }
|
||||||
|
bind "2" { GoToTab 2; SwitchToMode "normal"; }
|
||||||
|
bind "3" { GoToTab 3; SwitchToMode "normal"; }
|
||||||
|
bind "4" { GoToTab 4; SwitchToMode "normal"; }
|
||||||
|
bind "5" { GoToTab 5; SwitchToMode "normal"; }
|
||||||
|
bind "6" { GoToTab 6; SwitchToMode "normal"; }
|
||||||
|
bind "7" { GoToTab 7; SwitchToMode "normal"; }
|
||||||
|
bind "8" { GoToTab 8; SwitchToMode "normal"; }
|
||||||
|
bind "9" { GoToTab 9; SwitchToMode "normal"; }
|
||||||
|
bind "[" { BreakPaneLeft; SwitchToMode "normal"; }
|
||||||
|
bind "]" { BreakPaneRight; SwitchToMode "normal"; }
|
||||||
|
bind "b" { BreakPane; SwitchToMode "normal"; }
|
||||||
|
bind "h" { GoToPreviousTab; }
|
||||||
|
bind "j" { GoToNextTab; }
|
||||||
|
bind "k" { GoToPreviousTab; }
|
||||||
|
bind "l" { GoToNextTab; }
|
||||||
|
bind "n" { NewTab; SwitchToMode "normal"; }
|
||||||
|
bind "r" { SwitchToMode "renametab"; TabNameInput 0; }
|
||||||
|
bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; }
|
||||||
|
bind "Ctrl t" { SwitchToMode "normal"; }
|
||||||
|
bind "x" { CloseTab; SwitchToMode "normal"; }
|
||||||
|
bind "tab" { ToggleTab; }
|
||||||
|
}
|
||||||
|
resize {
|
||||||
|
bind "left" { Resize "Increase left"; }
|
||||||
|
bind "down" { Resize "Increase down"; }
|
||||||
|
bind "up" { Resize "Increase up"; }
|
||||||
|
bind "right" { Resize "Increase right"; }
|
||||||
|
bind "+" { Resize "Increase"; }
|
||||||
|
bind "-" { Resize "Decrease"; }
|
||||||
|
bind "=" { Resize "Increase"; }
|
||||||
|
bind "H" { Resize "Decrease left"; }
|
||||||
|
bind "J" { Resize "Decrease down"; }
|
||||||
|
bind "K" { Resize "Decrease up"; }
|
||||||
|
bind "L" { Resize "Decrease right"; }
|
||||||
|
bind "h" { Resize "Increase left"; }
|
||||||
|
bind "j" { Resize "Increase down"; }
|
||||||
|
bind "k" { Resize "Increase up"; }
|
||||||
|
bind "l" { Resize "Increase right"; }
|
||||||
|
bind "Ctrl n" { SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
move {
|
||||||
|
bind "Alt left" { MovePane "left"; }
|
||||||
|
bind "Alt down" { MovePane "down"; }
|
||||||
|
bind "Alt up" { MovePane "up"; }
|
||||||
|
bind "Alt right" { MovePane "right"; }
|
||||||
|
bind "h" { MovePane "left"; }
|
||||||
|
bind "Ctrl h" { SwitchToMode "normal"; }
|
||||||
|
bind "j" { MovePane "down"; }
|
||||||
|
bind "k" { MovePane "up"; }
|
||||||
|
bind "l" { MovePane "right"; }
|
||||||
|
bind "n" { MovePane; }
|
||||||
|
bind "p" { MovePaneBackwards; }
|
||||||
|
bind "tab" { MovePane; }
|
||||||
|
}
|
||||||
|
scroll {
|
||||||
|
bind "e" { EditScrollback; SwitchToMode "normal"; }
|
||||||
|
bind "s" { SwitchToMode "entersearch"; SearchInput 0; }
|
||||||
|
}
|
||||||
|
search {
|
||||||
|
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
||||||
|
bind "n" { Search "down"; }
|
||||||
|
bind "o" { SearchToggleOption "WholeWord"; }
|
||||||
|
bind "p" { Search "up"; }
|
||||||
|
bind "w" { SearchToggleOption "Wrap"; }
|
||||||
|
}
|
||||||
|
session {
|
||||||
|
bind "a" {
|
||||||
|
LaunchOrFocusPlugin "zellij:about" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
}
|
||||||
|
SwitchToMode "normal"
|
||||||
|
}
|
||||||
|
bind "c" {
|
||||||
|
LaunchOrFocusPlugin "configuration" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
}
|
||||||
|
SwitchToMode "normal"
|
||||||
|
}
|
||||||
|
bind "Ctrl o" { SwitchToMode "normal"; }
|
||||||
|
bind "p" {
|
||||||
|
LaunchOrFocusPlugin "plugin-manager" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
}
|
||||||
|
SwitchToMode "normal"
|
||||||
|
}
|
||||||
|
bind "s" {
|
||||||
|
LaunchOrFocusPlugin "zellij:share" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
}
|
||||||
|
SwitchToMode "normal"
|
||||||
|
}
|
||||||
|
bind "w" {
|
||||||
|
LaunchOrFocusPlugin "session-manager" {
|
||||||
|
floating true
|
||||||
|
move_to_focused_tab true
|
||||||
|
}
|
||||||
|
SwitchToMode "normal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shared_except "locked" {
|
||||||
|
// bind "Alt left" { MoveFocusOrTab "left"; }
|
||||||
|
bind "Alt down" { MoveFocus "down"; }
|
||||||
|
bind "Alt up" { MoveFocus "up"; }
|
||||||
|
// bind "Alt right" { MoveFocusOrTab "right"; }
|
||||||
|
bind "Alt +" { Resize "Increase"; }
|
||||||
|
bind "Alt -" { Resize "Decrease"; }
|
||||||
|
bind "Alt =" { Resize "Increase"; }
|
||||||
|
bind "Alt [" { PreviousSwapLayout; }
|
||||||
|
bind "Alt ]" { NextSwapLayout; }
|
||||||
|
bind "Alt f" { ToggleFloatingPanes; }
|
||||||
|
bind "Ctrl Alt g" { SwitchToMode "locked"; }
|
||||||
|
bind "Alt h" { MoveFocusOrTab "left"; }
|
||||||
|
bind "Alt i" { MoveTab "left"; }
|
||||||
|
bind "Alt j" { MoveFocus "down"; }
|
||||||
|
bind "Alt k" { MoveFocus "up"; }
|
||||||
|
bind "Alt l" { MoveFocusOrTab "right"; }
|
||||||
|
bind "Alt n" { NewPane; }
|
||||||
|
bind "Alt o" { MoveTab "right"; }
|
||||||
|
bind "Alt p" { TogglePaneInGroup; }
|
||||||
|
bind "Alt Shift p" { ToggleGroupMarking; }
|
||||||
|
bind "Ctrl q" { Quit; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "move" {
|
||||||
|
bind "Ctrl h" { SwitchToMode "move"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "session" {
|
||||||
|
bind "Ctrl o" { SwitchToMode "session"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "scroll" "search" "tmux" {
|
||||||
|
bind "Ctrl a" { SwitchToMode "tmux"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "scroll" "search" {
|
||||||
|
bind "Ctrl s" { SwitchToMode "scroll"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "tab" {
|
||||||
|
bind "Ctrl t" { SwitchToMode "tab"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "pane" {
|
||||||
|
bind "Ctrl p" { SwitchToMode "pane"; }
|
||||||
|
}
|
||||||
|
shared_except "locked" "resize" {
|
||||||
|
bind "Ctrl n" { SwitchToMode "resize"; }
|
||||||
|
}
|
||||||
|
shared_except "normal" "locked" "entersearch" {
|
||||||
|
bind "enter" { SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
shared_except "normal" "locked" "entersearch" "renametab" "renamepane" {
|
||||||
|
bind "esc" { SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
shared_among "pane" "tmux" {
|
||||||
|
bind "x" { CloseFocus; SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
shared_among "scroll" "search" {
|
||||||
|
bind "PageDown" { PageScrollDown; }
|
||||||
|
bind "PageUp" { PageScrollUp; }
|
||||||
|
bind "left" { PageScrollUp; }
|
||||||
|
bind "down" { ScrollDown; }
|
||||||
|
bind "up" { ScrollUp; }
|
||||||
|
bind "right" { PageScrollDown; }
|
||||||
|
bind "Ctrl b" { PageScrollUp; }
|
||||||
|
bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; }
|
||||||
|
bind "d" { HalfPageScrollDown; }
|
||||||
|
bind "Ctrl f" { PageScrollDown; }
|
||||||
|
bind "h" { PageScrollUp; }
|
||||||
|
bind "j" { ScrollDown; }
|
||||||
|
bind "k" { ScrollUp; }
|
||||||
|
bind "l" { PageScrollDown; }
|
||||||
|
bind "Ctrl s" { SwitchToMode "normal"; }
|
||||||
|
bind "u" { HalfPageScrollUp; }
|
||||||
|
}
|
||||||
|
entersearch {
|
||||||
|
bind "Ctrl c" { SwitchToMode "scroll"; }
|
||||||
|
bind "esc" { SwitchToMode "scroll"; }
|
||||||
|
bind "enter" { SwitchToMode "search"; }
|
||||||
|
}
|
||||||
|
renametab {
|
||||||
|
bind "esc" { UndoRenameTab; SwitchToMode "tab"; }
|
||||||
|
}
|
||||||
|
shared_among "renametab" "renamepane" {
|
||||||
|
bind "Ctrl c" { SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
renamepane {
|
||||||
|
bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
|
||||||
|
}
|
||||||
|
shared_among "session" "tmux" {
|
||||||
|
bind "d" { Detach; }
|
||||||
|
}
|
||||||
|
tmux {
|
||||||
|
bind "left" { MoveFocus "left"; SwitchToMode "normal"; }
|
||||||
|
bind "down" { MoveFocus "down"; SwitchToMode "normal"; }
|
||||||
|
bind "up" { MoveFocus "up"; SwitchToMode "normal"; }
|
||||||
|
bind "right" { MoveFocus "right"; SwitchToMode "normal"; }
|
||||||
|
bind "space" { NextSwapLayout; }
|
||||||
|
bind "\"" { NewPane "down"; SwitchToMode "normal"; }
|
||||||
|
bind "%" { NewPane "right"; SwitchToMode "normal"; }
|
||||||
|
bind "," { SwitchToMode "renametab"; }
|
||||||
|
bind "[" { SwitchToMode "scroll"; }
|
||||||
|
bind "Ctrl b" { Write 2; SwitchToMode "normal"; }
|
||||||
|
bind "c" { NewTab; SwitchToMode "normal"; }
|
||||||
|
bind "h" { MoveFocus "left"; SwitchToMode "normal"; }
|
||||||
|
bind "j" { MoveFocus "down"; SwitchToMode "normal"; }
|
||||||
|
bind "k" { MoveFocus "up"; SwitchToMode "normal"; }
|
||||||
|
bind "l" { MoveFocus "right"; SwitchToMode "normal"; }
|
||||||
|
bind "n" { GoToNextTab; SwitchToMode "normal"; }
|
||||||
|
bind "o" { FocusNextPane; }
|
||||||
|
bind "p" { GoToPreviousTab; SwitchToMode "normal"; }
|
||||||
|
bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
|
||||||
|
bind "1" { GoToTab 1; SwitchToMode "normal"; }
|
||||||
|
bind "2" { GoToTab 2; SwitchToMode "normal"; }
|
||||||
|
bind "3" { GoToTab 3; SwitchToMode "normal"; }
|
||||||
|
bind "4" { GoToTab 4; SwitchToMode "normal"; }
|
||||||
|
bind "5" { GoToTab 5; SwitchToMode "normal"; }
|
||||||
|
bind "6" { GoToTab 6; SwitchToMode "normal"; }
|
||||||
|
bind "7" { GoToTab 7; SwitchToMode "normal"; }
|
||||||
|
bind "8" { GoToTab 8; SwitchToMode "normal"; }
|
||||||
|
bind "9" { GoToTab 9; SwitchToMode "normal"; }
|
||||||
|
bind "-" { NewPane "down"; SwitchToMode "normal"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plugin aliases - can be used to change the implementation of Zellij
|
||||||
|
// changing these requires a restart to take effect
|
||||||
|
plugins {
|
||||||
|
about location="zellij:about"
|
||||||
|
compact-bar location="zellij:compact-bar"
|
||||||
|
configuration location="zellij:configuration"
|
||||||
|
filepicker location="zellij:strider" {
|
||||||
|
cwd "/"
|
||||||
|
}
|
||||||
|
plugin-manager location="zellij:plugin-manager"
|
||||||
|
session-manager location="zellij:session-manager"
|
||||||
|
status-bar location="zellij:status-bar"
|
||||||
|
strider location="zellij:strider"
|
||||||
|
tab-bar location="zellij:tab-bar"
|
||||||
|
welcome-screen location="zellij:session-manager" {
|
||||||
|
welcome_screen true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plugins to load in the background when a new session starts
|
||||||
|
// eg. "file:/path/to/my-plugin.wasm"
|
||||||
|
// eg. "https://example.com/my-plugin.wasm"
|
||||||
|
load_plugins {
|
||||||
|
}
|
||||||
|
web_client {
|
||||||
|
font "monospace"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use a simplified UI without special fonts (arrow glyphs)
|
||||||
|
// Options:
|
||||||
|
// - true
|
||||||
|
// - false (Default)
|
||||||
|
//
|
||||||
|
// simplified_ui true
|
||||||
|
|
||||||
|
// Choose the theme that is specified in the themes section.
|
||||||
|
// Default: default
|
||||||
|
//
|
||||||
|
// theme "dracula"
|
||||||
|
// theme "solarized-dark"
|
||||||
|
theme "nord"
|
||||||
|
|
||||||
|
// Choose the base input mode of zellij.
|
||||||
|
// Default: normal
|
||||||
|
//
|
||||||
|
// default_mode "locked"
|
||||||
|
|
||||||
|
// Choose the path to the default shell that zellij will use for opening new panes
|
||||||
|
// Default: $SHELL
|
||||||
|
//
|
||||||
|
// default_shell "fish"
|
||||||
|
|
||||||
|
// Choose the path to override cwd that zellij will use for opening new panes
|
||||||
|
//
|
||||||
|
// default_cwd "/tmp"
|
||||||
|
|
||||||
|
// The name of the default layout to load on startup
|
||||||
|
// Default: "default"
|
||||||
|
//
|
||||||
|
// default_layout "compact"
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for layouts
|
||||||
|
// (Requires restart)
|
||||||
|
//
|
||||||
|
// layout_dir "/tmp"
|
||||||
|
|
||||||
|
// The folder in which Zellij will look for themes
|
||||||
|
// (Requires restart)
|
||||||
|
//
|
||||||
|
// theme_dir "/tmp"
|
||||||
|
|
||||||
|
// Toggle enabling the mouse mode.
|
||||||
|
// On certain configurations, or terminals this could
|
||||||
|
// potentially interfere with copying text.
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
mouse_mode true
|
||||||
|
|
||||||
|
// Toggle having pane frames around the panes
|
||||||
|
// Options:
|
||||||
|
// - true (default, enabled)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
pane_frames false
|
||||||
|
|
||||||
|
// When attaching to an existing session with other users,
|
||||||
|
// should the session be mirrored (true)
|
||||||
|
// or should each user have their own cursor (false)
|
||||||
|
// (Requires restart)
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// mirror_session true
|
||||||
|
|
||||||
|
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||||
|
// eg. when terminal window with an active zellij session is closed
|
||||||
|
// (Requires restart)
|
||||||
|
// Options:
|
||||||
|
// - detach (Default)
|
||||||
|
// - quit
|
||||||
|
//
|
||||||
|
// on_force_close "quit"
|
||||||
|
|
||||||
|
// Configure the scroll back buffer size
|
||||||
|
// This is the number of lines zellij stores for each pane in the scroll back
|
||||||
|
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||||
|
// (Requires restart)
|
||||||
|
// Valid values: positive integers
|
||||||
|
// Default value: 10000
|
||||||
|
//
|
||||||
|
// scroll_buffer_size 10000
|
||||||
|
|
||||||
|
// Provide a command to execute when copying text. The text will be piped to
|
||||||
|
// the stdin of the program to perform the copy. This can be used with
|
||||||
|
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||||
|
// that will be used by default if this option is not set.
|
||||||
|
// Examples:
|
||||||
|
//
|
||||||
|
// copy_command "xclip -selection clipboard" // x11
|
||||||
|
// copy_command "wl-copy" // wayland
|
||||||
|
// copy_command "pbcopy" // osx
|
||||||
|
//
|
||||||
|
copy_command "pbcopy"
|
||||||
|
|
||||||
|
// Choose the destination for copied text
|
||||||
|
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||||
|
// Does not apply when using copy_command.
|
||||||
|
// Options:
|
||||||
|
// - system (default)
|
||||||
|
// - primary
|
||||||
|
//
|
||||||
|
// copy_clipboard "primary"
|
||||||
|
|
||||||
|
// Enable automatic copying (and clearing) of selection when releasing mouse
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// copy_on_select true
|
||||||
|
|
||||||
|
// Path to the default editor to use to edit pane scrollbuffer
|
||||||
|
// Default: $EDITOR or $VISUAL
|
||||||
|
scrollback_editor "/usr/bin/vim"
|
||||||
|
|
||||||
|
// A fixed name to always give the Zellij session.
|
||||||
|
// Consider also setting `attach_to_session true,`
|
||||||
|
// otherwise this will error if such a session exists.
|
||||||
|
// Default: <RANDOM>
|
||||||
|
//
|
||||||
|
// session_name "My singleton session"
|
||||||
|
|
||||||
|
// When `session_name` is provided, attaches to that session
|
||||||
|
// if it is already running or creates it otherwise.
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// attach_to_session true
|
||||||
|
|
||||||
|
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// auto_layout false
|
||||||
|
|
||||||
|
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
|
||||||
|
// Options:
|
||||||
|
// - true (default)
|
||||||
|
// - false
|
||||||
|
//
|
||||||
|
// session_serialization false
|
||||||
|
|
||||||
|
// Whether pane viewports are serialized along with the session, default is false
|
||||||
|
// Options:
|
||||||
|
// - true
|
||||||
|
// - false (default)
|
||||||
|
//
|
||||||
|
// serialize_pane_viewport false
|
||||||
|
|
||||||
|
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
|
||||||
|
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
|
||||||
|
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
|
||||||
|
//
|
||||||
|
// scrollback_lines_to_serialize 10000
|
||||||
|
|
||||||
|
// Enable or disable the rendering of styled and colored underlines (undercurl).
|
||||||
|
// May need to be disabled for certain unsupported terminals
|
||||||
|
// (Requires restart)
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// styled_underlines false
|
||||||
|
|
||||||
|
// How often in seconds sessions are serialized
|
||||||
|
//
|
||||||
|
// serialization_interval 10000
|
||||||
|
|
||||||
|
// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
|
||||||
|
// metadata info on this session)
|
||||||
|
// (Requires restart)
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// disable_session_metadata false
|
||||||
|
|
||||||
|
// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
|
||||||
|
// (Requires restart)
|
||||||
|
// Default: true (if the host terminal supports it)
|
||||||
|
//
|
||||||
|
// support_kitty_keyboard_protocol false
|
||||||
|
// Whether to make sure a local web server is running when a new Zellij session starts.
|
||||||
|
// This web server will allow creating new sessions and attaching to existing ones that have
|
||||||
|
// opted in to being shared in the browser.
|
||||||
|
// When enabled, navigate to http://127.0.0.1:8082
|
||||||
|
// (Requires restart)
|
||||||
|
//
|
||||||
|
// Note: a local web server can still be manually started from within a Zellij session or from the CLI.
|
||||||
|
// If this is not desired, one can use a version of Zellij compiled without
|
||||||
|
// `web_server_capability`
|
||||||
|
//
|
||||||
|
// Possible values:
|
||||||
|
// - true
|
||||||
|
// - false
|
||||||
|
// Default: false
|
||||||
|
//
|
||||||
|
// web_server false
|
||||||
|
// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is
|
||||||
|
// running (see the `web_server` option for more details).
|
||||||
|
// (Requires restart)
|
||||||
|
//
|
||||||
|
// Note: This is an administrative separation and not intended as a security measure.
|
||||||
|
//
|
||||||
|
// Possible values:
|
||||||
|
// - "on" (allow web sharing through the local web server if it
|
||||||
|
// is online)
|
||||||
|
// - "off" (do not allow web sharing unless sessions explicitly opt-in to it)
|
||||||
|
// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it)
|
||||||
|
// Default: "off"
|
||||||
|
//
|
||||||
|
// web_sharing "off"
|
||||||
|
// A path to a certificate file to be used when setting up the web client to serve the
|
||||||
|
// connection over HTTPs
|
||||||
|
//
|
||||||
|
// web_server_cert "/path/to/cert.pem"
|
||||||
|
// A path to a key file to be used when setting up the web client to serve the
|
||||||
|
// connection over HTTPs
|
||||||
|
//
|
||||||
|
// web_server_key "/path/to/key.pem"
|
||||||
|
/// Whether to enforce https connections to the web server when it is bound to localhost
|
||||||
|
/// (127.0.0.0/8)
|
||||||
|
///
|
||||||
|
/// Note: https is ALWAYS enforced when bound to non-local interfaces
|
||||||
|
///
|
||||||
|
/// Default: false
|
||||||
|
//
|
||||||
|
// enforce_https_for_localhost false
|
||||||
|
|
||||||
|
// Whether to stack panes when resizing beyond a certain size
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// stacked_resize false
|
||||||
|
|
||||||
|
// Whether to show tips on startup
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// show_startup_tips false
|
||||||
|
|
||||||
|
// Whether to show release notes on first version run
|
||||||
|
// Default: true
|
||||||
|
//
|
||||||
|
// show_release_notes false
|
||||||
|
|
||||||
|
// Whether to enable mouse hover effects and pane grouping functionality
|
||||||
|
// default is true
|
||||||
|
// advanced_mouse_actions false
|
||||||
|
|
||||||
|
// The ip address the web server should listen on when it starts
|
||||||
|
// Default: "127.0.0.1"
|
||||||
|
// (Requires restart)
|
||||||
|
// web_server_ip "127.0.0.1"
|
||||||
|
|
||||||
|
// The port the web server should listen on when it starts
|
||||||
|
// Default: 8082
|
||||||
|
// (Requires restart)
|
||||||
|
// web_server_port 8082
|
||||||
|
|
||||||
|
// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable)
|
||||||
|
// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT
|
||||||
|
// of this command will be used instead of the discovered RESURRECT_COMMAND
|
||||||
|
// can be useful for removing wrappers around commands
|
||||||
|
// Note: be sure to escape backslashes and similar characters properly
|
||||||
|
// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed <your_regex_here>"
|
||||||
12
.gitconfig
12
.gitconfig
@@ -8,7 +8,7 @@
|
|||||||
pager = less -FRX
|
pager = less -FRX
|
||||||
editor = vim
|
editor = vim
|
||||||
[alias]
|
[alias]
|
||||||
glog = log --graph --decorate --all
|
glog = log --graph --decorate
|
||||||
glogs = log --graph --stat
|
glogs = log --graph --stat
|
||||||
ci = commit
|
ci = commit
|
||||||
st = status
|
st = status
|
||||||
@@ -24,10 +24,12 @@
|
|||||||
# if no file is specified, show diff for all files in the changeset
|
# if no file is specified, show diff for all files in the changeset
|
||||||
diffc = "!f() { git diff ${1}^1 ${1} -- $2; }; f"
|
diffc = "!f() { git diff ${1}^1 ${1} -- $2; }; f"
|
||||||
vimdiffc = "!f() { git vimdiff ${1}^1 ${1} -- $2; }; f"
|
vimdiffc = "!f() { git vimdiff ${1}^1 ${1} -- $2; }; f"
|
||||||
|
cat = show
|
||||||
|
webui = !/Users/jetpac/.git-webui/release/libexec/git-core/git-webui
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Petr Nyc
|
name = Petr Nyc
|
||||||
email = jet.jetpac@gmail.com
|
email = petr.nyc@oracle.com
|
||||||
|
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
@@ -41,3 +43,9 @@
|
|||||||
; modulePath = /usr/lib/apache2/modules
|
; modulePath = /usr/lib/apache2/modules
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = master
|
defaultBranch = master
|
||||||
|
[webui]
|
||||||
|
autoupdate = true
|
||||||
|
; [color]
|
||||||
|
; ui = auto
|
||||||
|
[http]
|
||||||
|
sslVerify = false
|
||||||
|
|||||||
8
.hgrc
8
.hgrc
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
username =Petr Nyc <petr.nyc@oracle.com>
|
username =Petr Nyc <petr.nyc@oracle.com>
|
||||||
merge =
|
merge = vimdiff
|
||||||
|
|
||||||
[extensions]
|
[extensions]
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ vimdiff.premerge = keep
|
|||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
# glog
|
# glog
|
||||||
# g = !USER=$($HG showconfig ui.username); A=$( $HG log -r qbase..qtip --template '{rev}|' 2>/dev/null ); $HG glog --template "{rev}:{node|short} \033[33m{branch}\033[0m {phase} {author}\n{desc}\n\n" $@ | perl -pe 's/(^[| o@+-]+\d+:[0-9a-f]{12} \S+ (?!public))(\S+)(.*)/\1\033[31m\2\033[0m\3/; s/(\Q'"${USER//@/\\E\\@\\Q}"'\E)/\033[32m\1\033[0m\3/; s/(^[| o@+-]+)('${A:+(${A%|})}':[0-9a-f]{12})/\1\033[34m\2\033[0m/' 2>/dev/null | less -FRX
|
g = !USER=$($HG showconfig ui.username); A=$( $HG log -r qbase..qtip --template '{rev}|' 2>/dev/null ); $HG glog --template "{rev}:{node|short} \033[33m{branch}\033[0m {phase} {author}\n{desc}\n\n" $@ | perl -pe 's/(^[| o@+-]+\d+:[0-9a-f]{12} \S+ (?!public))(\S+)(.*)/\1\033[31m\2\033[0m\3/; s/(\Q'"${USER//@/\\E\\@\\Q}"'\E)/\033[32m\1\033[0m\3/; s/(^[| o@+-]+)('${A:+(${A%|})}':[0-9a-f]{12})/\1\033[34m\2\033[0m/' 2>/dev/null | less -FRX
|
||||||
|
|
||||||
# glog on branch
|
# glog on branch
|
||||||
gb = !$HG g -b . $@
|
gb = !$HG g -b . $@
|
||||||
@@ -57,8 +57,8 @@ he = !/bin/bash -O extglob -c '$HG --config extensions.histedit= help histedit 2
|
|||||||
d = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -c $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -c "$1";; esac; $HG diff ${@}' blah $@
|
d = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -c $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -c "$1";; esac; $HG diff ${@}' blah $@
|
||||||
|
|
||||||
# clever log (requires also the 'style' alias)
|
# clever log (requires also the 'style' alias)
|
||||||
# l = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -r $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -r "$1" ;; esac; $HG log -v --style <(hg style) ${@}' blah $@
|
l = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- -r $($HG parent --template '{rev}');; +([0-9])|$h$h$h) set -- -r "$1" ;; esac; $HG log -v --style <(hg style) ${@}' blah $@
|
||||||
# style = !echo $'changeset = \'changeset: {rev}:{node|short}\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n\'\nchangeset_quiet = \'{rev}:{node|short}\\\\n\'\nchangeset_verbose = \'\\\\n\\\\033[33mchangeset: {rev}:{node|short}\\\\033[0m\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\n\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nchangeset_debug = \'changeset: {rev}:{node}\\\\n{branches}{tags}{parents}{manifest}{extras}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nstart_files = \'files:\\\\n\'\nfile = \' {file}\\\\n\'\nend_files = \'\'\nstart_file_mods = \'\\\\033[34mmodified:\\\\033[0m\\\\n\'\nfile_mod = \' {file_mod}\\\\n\'\nend_file_mods = \'\'\nstart_file_adds = \'\\\\033[32madded:\\\\033[0m\\\\n\'\nfile_add = \' {file_add}\\\\n\'\nend_file_adds = \'\'\nstart_file_dels = \'\\\\033[31mremoved:\\\\033[0m\\\\n\'\nfile_del = \' {file_del}\\\\n\'\nend_file_dels = \'\'\nstart_file_copies = \'copied:\\\\n\'\nfile_copy = \' {name}\\\\n (from {source})\\\\n\'\nend_file_copies = \'\'\nparent = \'parent: {rev}:{node|formatnode}\\\\n\'\nmanifest = \'manifest: {rev}:{node}\\\\n\'\nbranch = \'branch: {branch}\\\\n\'\ntag = \'tag: {tag}\\\\n\'\nextra = \'extra: {key}={value|stringescape}\\\\n\''
|
style = !echo $'changeset = \'changeset: {rev}:{node|short}\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n\'\nchangeset_quiet = \'{rev}:{node|short}\\\\n\'\nchangeset_verbose = \'\\\\n\\\\033[33mchangeset: {rev}:{node|short}\\\\033[0m\\\\n{branches}{tags}{parents}user: {author}\\\\ndate: {date|date}\\\\n\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nchangeset_debug = \'changeset: {rev}:{node}\\\\n{branches}{tags}{parents}{manifest}{extras}user: {author}\\\\ndate: {date|date}\\\\ndescription:\\\\n\\\\t{desc|strip|tabindent}\\\\n\\\\n{file_mods}{file_adds}{file_dels}{file_copies}\\\\n\'\nstart_files = \'files:\\\\n\'\nfile = \' {file}\\\\n\'\nend_files = \'\'\nstart_file_mods = \'\\\\033[34mmodified:\\\\033[0m\\\\n\'\nfile_mod = \' {file_mod}\\\\n\'\nend_file_mods = \'\'\nstart_file_adds = \'\\\\033[32madded:\\\\033[0m\\\\n\'\nfile_add = \' {file_add}\\\\n\'\nend_file_adds = \'\'\nstart_file_dels = \'\\\\033[31mremoved:\\\\033[0m\\\\n\'\nfile_del = \' {file_del}\\\\n\'\nend_file_dels = \'\'\nstart_file_copies = \'copied:\\\\n\'\nfile_copy = \' {name}\\\\n (from {source})\\\\n\'\nend_file_copies = \'\'\nparent = \'parent: {rev}:{node|formatnode}\\\\n\'\nmanifest = \'manifest: {rev}:{node}\\\\n\'\nbranch = \'branch: {branch}\\\\n\'\ntag = \'tag: {tag}\\\\n\'\nextra = \'extra: {key}={value|stringescape}\\\\n\''
|
||||||
|
|
||||||
# status with paths relative to current directory
|
# status with paths relative to current directory
|
||||||
s = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- $($HG root) ;; +([0-9])|$h$h$h) set -- --rev "$1^:$1" ;; esac; $HG status ${@}' blah $@
|
s = !/bin/bash -O extglob -c 'h="[0-9a-f]"; h="$h$h$h$h"; case "${@}" in "") set -- $($HG root) ;; +([0-9])|$h$h$h) set -- --rev "$1^:$1" ;; esac; $HG status ${@}' blah $@
|
||||||
|
|||||||
2
.mailcap
Normal file
2
.mailcap
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# inspiration here: https://emacs.stackexchange.com/questions/63436/is-there-some-way-to-view-the-html-part-of-an-email-in-an-external-browser-or-as
|
||||||
|
text/html; open %s; nametemplate=%s.html
|
||||||
82
.notmuch-config
Normal file
82
.notmuch-config
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# .notmuch-config - Configuration file for the notmuch mail system
|
||||||
|
#
|
||||||
|
# For more information about notmuch, see https://notmuchmail.org
|
||||||
|
# Database configuration
|
||||||
|
#
|
||||||
|
# Supported values are 'mail_root' and 'path'. The recommended option
|
||||||
|
# is to set 'mail_root' to the directory where your mail currently exists
|
||||||
|
# and to where mail will be delivered in the future. Files should be
|
||||||
|
# individual email messages. By default notmuch will store its database
|
||||||
|
# in $XDG_DATA_HOME/notmuch; you can override this by setting 'path'.
|
||||||
|
# If only 'path' is set, this directory is for 'mail_root' and for
|
||||||
|
# the database location (in a subdirectory called ".notmuch").
|
||||||
|
#
|
||||||
|
[database]
|
||||||
|
path=/Users/jetpac/.mail
|
||||||
|
# User configuration
|
||||||
|
#
|
||||||
|
# Here is where you can let notmuch know how you would like to be
|
||||||
|
# addressed. Valid settings are
|
||||||
|
#
|
||||||
|
# name Your full name.
|
||||||
|
# primary_email Your primary email address.
|
||||||
|
# other_email A list (separated by ';') of other email addresses
|
||||||
|
# at which you receive email.
|
||||||
|
#
|
||||||
|
# Notmuch will use the various email addresses configured here when
|
||||||
|
# formatting replies. It will avoid including your own addresses in the
|
||||||
|
# recipient list of replies, and will set the From address based on the
|
||||||
|
# address to which the original email was addressed.
|
||||||
|
#
|
||||||
|
[user]
|
||||||
|
primary_email=petr.nyc@oracle.com
|
||||||
|
# Configuration for "notmuch new"
|
||||||
|
#
|
||||||
|
# The following options are supported here:
|
||||||
|
#
|
||||||
|
# tags A list (separated by ';') of the tags that will be
|
||||||
|
# added to all messages incorporated by "notmuch new".
|
||||||
|
#
|
||||||
|
# ignore A list (separated by ';') of file and directory names
|
||||||
|
# that will not be searched for messages by "notmuch new".
|
||||||
|
#
|
||||||
|
# NOTE: *Every* file/directory that goes by one of those
|
||||||
|
# names will be ignored, independent of its depth/location
|
||||||
|
# in the mail store.
|
||||||
|
#
|
||||||
|
[new]
|
||||||
|
ignore=.mbsyncstate;.uidvalidity;
|
||||||
|
tags=unread;inbox;new
|
||||||
|
# Search configuration
|
||||||
|
#
|
||||||
|
# The following option is supported here:
|
||||||
|
#
|
||||||
|
# exclude_tags
|
||||||
|
# A ;-separated list of tags that will be excluded from
|
||||||
|
# search results by default. Using an excluded tag in a
|
||||||
|
# query will override that exclusion.
|
||||||
|
#
|
||||||
|
[search]
|
||||||
|
# Maildir compatibility configuration
|
||||||
|
#
|
||||||
|
# The following option is supported here:
|
||||||
|
#
|
||||||
|
# synchronize_flags Valid values are true and false.
|
||||||
|
synchronize_flags=true
|
||||||
|
#
|
||||||
|
# If true, then the following maildir flags (in message filenames)
|
||||||
|
# will be synchronized with the corresponding notmuch tags:
|
||||||
|
#
|
||||||
|
# Flag Tag
|
||||||
|
# ---- -------
|
||||||
|
# D draft
|
||||||
|
# F flagged
|
||||||
|
# P passed
|
||||||
|
# R replied
|
||||||
|
# S unread (added when 'S' flag is not present)
|
||||||
|
#
|
||||||
|
# The "notmuch new" command will notice flag changes in filenames
|
||||||
|
# and update tags, while the "notmuch tag" and "notmuch restore"
|
||||||
|
# commands will notice tag changes and update flags in filenames
|
||||||
|
#
|
||||||
|
[maildir]
|
||||||
17
.p10k.zsh
17
.p10k.zsh
@@ -95,7 +95,7 @@
|
|||||||
vim_shell # vim shell indicator (:sh)
|
vim_shell # vim shell indicator (:sh)
|
||||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||||
# vpn_ip # virtual private network indicator
|
vpn_ip # virtual private network indicator
|
||||||
# load # CPU load
|
# load # CPU load
|
||||||
# disk_usage # disk usage
|
# disk_usage # disk usage
|
||||||
# ram # free RAM
|
# ram # free RAM
|
||||||
@@ -103,13 +103,14 @@
|
|||||||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||||
# cpu_arch # CPU architecture
|
cpu_arch # CPU architecture
|
||||||
|
battery
|
||||||
time # current time
|
time # current time
|
||||||
# =========================[ Line #2 ]=========================
|
# =========================[ Line #2 ]=========================
|
||||||
newline
|
newline
|
||||||
# ip # ip address and bandwidth usage for a specified network interface
|
# ip # ip address and bandwidth usage for a specified network interface
|
||||||
# public_ip # public IP address
|
# public_ip # public IP address
|
||||||
# proxy # system-wide http/https/ftp proxy
|
proxy # system-wide http/https/ftp proxy
|
||||||
# battery # internal battery
|
# battery # internal battery
|
||||||
# wifi # wifi speed
|
# wifi # wifi speed
|
||||||
# example # example user-defined segment (see prompt_example function below)
|
# example # example user-defined segment (see prompt_example function below)
|
||||||
@@ -539,9 +540,9 @@
|
|||||||
|
|
||||||
###################[ command_execution_time: duration of the last command ]###################
|
###################[ command_execution_time: duration of the last command ]###################
|
||||||
# Show duration of the last command if takes at least this many seconds.
|
# Show duration of the last command if takes at least this many seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0.1
|
||||||
# Show this many fractional digits. Zero means round to seconds.
|
# Show this many fractional digits. Zero means round to seconds.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=1
|
||||||
# Execution time color.
|
# Execution time color.
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
|
||||||
# Duration format: 1d 2h 3m 4s.
|
# Duration format: 1d 2h 3m 4s.
|
||||||
@@ -553,7 +554,7 @@
|
|||||||
|
|
||||||
#######################[ background_jobs: presence of background jobs ]#######################
|
#######################[ background_jobs: presence of background jobs ]#######################
|
||||||
# Don't show the number of background jobs.
|
# Don't show the number of background jobs.
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=true
|
||||||
# Background jobs color.
|
# Background jobs color.
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
|
||||||
# Custom icon.
|
# Custom icon.
|
||||||
@@ -990,7 +991,7 @@
|
|||||||
# Nvm color.
|
# Nvm color.
|
||||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
||||||
# Custom icon.
|
# Custom icon.
|
||||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
# typeset -g POWERLEVEL10K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||||
|
|
||||||
############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
|
############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
|
||||||
# Nodeenv color.
|
# Nodeenv color.
|
||||||
@@ -1536,7 +1537,7 @@
|
|||||||
# Battery pictograms going from low to high level of charge.
|
# Battery pictograms going from low to high level of charge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
|
typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
|
||||||
# Don't show the remaining time to charge/discharge.
|
# Don't show the remaining time to charge/discharge.
|
||||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=true
|
||||||
|
|
||||||
#####################################[ wifi: wifi speed ]#####################################
|
#####################################[ wifi: wifi speed ]#####################################
|
||||||
# WiFi color.
|
# WiFi color.
|
||||||
|
|||||||
15
.seeks.ccatc
Normal file
15
.seeks.ccatc
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[dep]
|
||||||
|
upgrade: ask
|
||||||
|
user_email: petr.nyc@oracle.com
|
||||||
|
|
||||||
|
[bitbucket]
|
||||||
|
username: pnyc
|
||||||
|
|
||||||
|
[templates]
|
||||||
|
project: CCATC
|
||||||
|
repo: ccatc-seeks
|
||||||
|
branch: main
|
||||||
|
vcs: SCM
|
||||||
|
scmrepo: ocid1.devopsrepository.oc1.phx.amaaaaaaw4vcxbyahrz7vgu4tdwdcfwd26e5fvmcoidmxrtmdvwyowqhi6rq
|
||||||
|
filepath: seeks_templates.conf
|
||||||
|
|
||||||
12
.seeks.odaas
Normal file
12
.seeks.odaas
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[dep]
|
||||||
|
upgrade: ask
|
||||||
|
user_email: petr.nyc@oracle.com
|
||||||
|
|
||||||
|
[bitbucket]
|
||||||
|
username: pnyc
|
||||||
|
|
||||||
|
[templates]
|
||||||
|
project: ODAAS
|
||||||
|
repo: cm_automation
|
||||||
|
branch: main
|
||||||
|
filepath: change_templates/seeks_templates.conf
|
||||||
1582
.spacemacs
Normal file
1582
.spacemacs
Normal file
File diff suppressed because it is too large
Load Diff
4
.ssh/config-scm
Normal file
4
.ssh/config-scm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Host oci*.private.devops.scmservice.*.oci.oracleiaas.com
|
||||||
|
User pnyc@bmc_operator_access
|
||||||
|
# IdentityAgent ~/.ssh/scm-agent.sock
|
||||||
|
AddKeysToAgent no
|
||||||
19
.ssh/config.oci
Normal file
19
.ssh/config.oci
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Include config-scm
|
||||||
|
Include ssh_configs/config
|
||||||
|
Include osd_configs/config
|
||||||
|
Include user
|
||||||
|
|
||||||
|
Host bitbucket.oci.oraclecorp.com
|
||||||
|
IdentityFile ~/.ssh/orabucket
|
||||||
|
HostkeyAlgorithms +ssh-rsa
|
||||||
|
PubkeyAcceptedAlgorithms +ssh-rsa
|
||||||
|
|
||||||
|
Host dabel dabel.us.oracle.com andel andel.us.oracle.com gates gates.us.oracle.com on10-patch.us.oracle.com
|
||||||
|
User pnyc
|
||||||
|
IdentityFile ~/.ssh/dabel.key
|
||||||
|
RequestTTY yes
|
||||||
|
|
||||||
|
Host codex.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
User pnyc
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
IdentitiesOnly yes
|
||||||
179
.ssh/config.solaris
Normal file
179
.ssh/config.solaris
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
# Include config-scm
|
||||||
|
|
||||||
|
|
||||||
|
Host *
|
||||||
|
# UseKeychain yes
|
||||||
|
AddKeysToAgent yes
|
||||||
|
ServerAliveInterval 300
|
||||||
|
ServerAliveCountMax 2
|
||||||
|
TCPKeepAlive no
|
||||||
|
HostkeyAlgorithms +ssh-rsa
|
||||||
|
PubkeyAcceptedAlgorithms +ssh-rsa
|
||||||
|
# User pnyc
|
||||||
|
|
||||||
|
|
||||||
|
Host *
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host 192.168.2.*
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host osd-fra
|
||||||
|
User desktopuser
|
||||||
|
HostName 100.109.60.126
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
Host codex.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
User pnyc
|
||||||
|
IdentitiesOnly ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host gitlab.com
|
||||||
|
User git
|
||||||
|
IdentityFile ~/.ssh/gitlab
|
||||||
|
|
||||||
|
Host solaris-reviews.us.oracle.com
|
||||||
|
User hg
|
||||||
|
IdentityFile ~/.ssh/id_phabricator
|
||||||
|
|
||||||
|
Host hetzner
|
||||||
|
HostName u444067.your-storagebox.de
|
||||||
|
User u444067
|
||||||
|
Port 23
|
||||||
|
IdentityFile ~/.ssh/id_hetzner
|
||||||
|
|
||||||
|
|
||||||
|
# for SCM
|
||||||
|
Host oci.private.devops.scmservice.us-phoenix-1.oci.oracleiaas.com
|
||||||
|
PKCS11Provider /Library/OpenSC/lib/opensc-pkcs11.so
|
||||||
|
User pnyc@bmc_operator_access
|
||||||
|
|
||||||
|
|
||||||
|
Host pnyc-ws pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
HostName pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
User opc
|
||||||
|
IdentityFile ~/.ssh/id_pnyc-ws
|
||||||
|
# ssh -i ./id_pnyc-ws opc@pnyc-ws.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
|
||||||
|
Host osdbld
|
||||||
|
HostName 100.73.219.187
|
||||||
|
User opc
|
||||||
|
IdentityFile ~/.ssh/id_nginxbuild
|
||||||
|
|
||||||
|
Host nginx-osd-dev
|
||||||
|
Hostname 100.106.197.175
|
||||||
|
User opc
|
||||||
|
IdentityFile ~/.ssh/osd-dev-pnyc
|
||||||
|
|
||||||
|
Host osd-calico-dev osd-calico-dev.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
Hostname osd-calico-dev.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
User opc
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
|
Host pnyc-sgd-build 100.73.219.105
|
||||||
|
Hostname 100.73.219.105
|
||||||
|
IdentityFile ~/.ssh/id_pnyc-ws
|
||||||
|
User opc
|
||||||
|
|
||||||
|
|
||||||
|
# private m1 mac
|
||||||
|
Host 192.168.2.81
|
||||||
|
User jetpac
|
||||||
|
IdentityFile /Users/jetpac/.ssh/id_mac_private
|
||||||
|
|
||||||
|
Host git.meinlschmidt.org
|
||||||
|
IdentityFile ~/.ssh/git.meinlschmidt.org
|
||||||
|
|
||||||
|
Host 192.168.2.1 gw gw.doma.jetpac.org
|
||||||
|
IdentityFile ~/.ssh/mikrotik
|
||||||
|
|
||||||
|
Host github.com
|
||||||
|
IdentityFile ~/.ssh/github.com
|
||||||
|
|
||||||
|
Host bitbucket.oci.oraclecorp.com
|
||||||
|
IdentityFile ~/.ssh/orabucket
|
||||||
|
HostkeyAlgorithms +ssh-rsa
|
||||||
|
PubkeyAcceptedAlgorithms +ssh-rsa
|
||||||
|
|
||||||
|
Host www.jetpac.org
|
||||||
|
IdentityFile ~/.ssh/id_ed25519.jetpac.org
|
||||||
|
User jetpac
|
||||||
|
|
||||||
|
|
||||||
|
Host dabel dabel.us.oracle.com andel andel.us.oracle.com gates gates.us.oracle.com re-userland-build-x01.us.oracle.com
|
||||||
|
User pnyc
|
||||||
|
IdentityFile ~/.ssh/dabel.key
|
||||||
|
RequestTTY yes
|
||||||
|
|
||||||
|
Host hubbins hubbins.us.oracle.com 10.134.7.102
|
||||||
|
User pnyc
|
||||||
|
|
||||||
|
Host tdabel
|
||||||
|
User pnyc
|
||||||
|
Hostname dabel.us.oracle.com
|
||||||
|
IdentityFile ~/.ssh/dabel.key
|
||||||
|
RequestTTY yes
|
||||||
|
RemoteCommand tmux new -A
|
||||||
|
|
||||||
|
Host utmfedora
|
||||||
|
Hostname 192.168.205.3
|
||||||
|
User jetpac
|
||||||
|
|
||||||
|
|
||||||
|
Host 100.106.196.204 pnyc-mrspatmore.webad1phx.solarisx86phx.oraclevcn.com pnyc-mrspatmore
|
||||||
|
User jetpac
|
||||||
|
Hostname 100.106.196.204
|
||||||
|
IdentityFile ~/.ssh/pnyc-mrspatmore
|
||||||
|
|
||||||
|
Host osd osd-dev-pnyc.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
IdentityFile ~/.ssh/osd-dev-pnyc
|
||||||
|
Hostname osd-dev-pnyc.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
user pnyc
|
||||||
|
|
||||||
|
Host osd-ol7 osd-dev-ol7.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
IdentityFile ~/.ssh/osd-dev-pnyc
|
||||||
|
Hostname osd-dev-ol7.webad1phx.solarisx86phx.oraclevcn.com
|
||||||
|
user pnyc
|
||||||
|
|
||||||
|
Host andel.us.oracle.com dabel.us.oracle.com gates.us.oracle.com
|
||||||
|
User pnyc
|
||||||
|
|
||||||
|
|
||||||
|
Host gitlocal
|
||||||
|
Hostname 127.0.0.1
|
||||||
|
Port 2200
|
||||||
|
|
||||||
|
Host oci-wireguard
|
||||||
|
Hostname 130.61.98.65
|
||||||
|
User ubuntu
|
||||||
|
IdentityFile ~/.ssh/id_ed25519_oci
|
||||||
|
|
||||||
|
Host libcurlbuild
|
||||||
|
Hostname led-build-mac.uk.oracle.com
|
||||||
|
User petrnyc
|
||||||
|
|
||||||
|
Host 192.168.2.72 homeassistant ha
|
||||||
|
Hostname 192.168.2.72
|
||||||
|
user hassio
|
||||||
|
IdentityFile ~/.ssh/jetpac01ha
|
||||||
|
|
||||||
|
Host adam-test
|
||||||
|
HostName 100.106.212.188
|
||||||
|
User opc
|
||||||
|
|
||||||
|
Host nori nori.commonsub.zsphx.oraclevcn.com
|
||||||
|
Hostname nori.commonsub.zsphx.oraclevcn.com
|
||||||
|
User opc
|
||||||
|
|
||||||
|
# Host operator-access-token.svc.ad1.r2 bastion*.oracleiaas.com
|
||||||
|
# Include ~/.ssh/ssh_configs/config
|
||||||
|
# User pnyc
|
||||||
|
|
||||||
|
# vim: tabstop=4 shiftwidth=4
|
||||||
|
#Include ~/.ssh/ssh_configs/config
|
||||||
|
#Include ~/.ssh/osd_configs/config
|
||||||
|
|
||||||
|
|
||||||
|
Include ossh_configs/*.ossh
|
||||||
|
Include ssh_configs/config
|
||||||
|
Include osd_configs/config
|
||||||
|
|
||||||
267
.ssh/scm-script.sh
Executable file
267
.ssh/scm-script.sh
Executable file
@@ -0,0 +1,267 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export SSH_SCM_AUTH_SOCK="$HOME/.ssh/scm-agent.sock"
|
||||||
|
SCRIPT_VERSION=1
|
||||||
|
|
||||||
|
# Starts the custom SSH agent.
|
||||||
|
start_scm_ssh_agent() {
|
||||||
|
# Check if the socket file exists
|
||||||
|
if [ -S "$SSH_SCM_AUTH_SOCK" ]; then
|
||||||
|
# If the socket exists, check if the SSH agent process is running
|
||||||
|
AGENT_PID=$(ps aux | grep $SSH_SCM_AUTH_SOCK | grep -v grep | head -1 | awk '{print $2}')
|
||||||
|
|
||||||
|
# If no associated process is found or the agent isn't running, start a new SSH agent
|
||||||
|
if [ -z "$AGENT_PID" ]; then
|
||||||
|
echo "Socket exists but no running agent, starting new SSH agent..."
|
||||||
|
rm $SSH_SCM_AUTH_SOCK
|
||||||
|
eval $(ssh-agent -a "$SSH_SCM_AUTH_SOCK")
|
||||||
|
else
|
||||||
|
# If the agent is already running, use the existing one
|
||||||
|
echo "SSH agent already running with PID: $AGENT_PID, using existing agent."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# If the socket doesn't exist, start a new SSH agent
|
||||||
|
echo "Socket doesn't exist, starting new SCM SSH agent..."
|
||||||
|
ssh-agent -a "$SSH_SCM_AUTH_SOCK"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stops the custom SSH agent.
|
||||||
|
stop_scm_ssh_agent() {
|
||||||
|
# Check if the socket file exists
|
||||||
|
if [ -S "$SSH_SCM_AUTH_SOCK" ]; then
|
||||||
|
# If the socket exists, check if the SSH agent process is running
|
||||||
|
AGENT_PID=$(ps aux | grep $SSH_SCM_AUTH_SOCK | grep -v grep | head -1 | awk '{print $2}')
|
||||||
|
|
||||||
|
# If no associated process is found or the agent isn't running, start a new SSH agent
|
||||||
|
if [ -z "$AGENT_PID" ]; then
|
||||||
|
echo "Socket exists but no running agent, removing the socket..."
|
||||||
|
rm $SSH_SCM_AUTH_SOCK
|
||||||
|
else
|
||||||
|
# If the agent is already running, use the existing one
|
||||||
|
echo "Killing SSH agent running with PID: $AGENT_PID ..."
|
||||||
|
SSH_AGENT_PID=$AGENT_PID ssh-agent -k
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# If the socket doesn't exist, start a new SSH agent
|
||||||
|
echo "Socket doesn't exist, nothing to do to stop SSH agent."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ssh_add() {
|
||||||
|
ssh_reset
|
||||||
|
}
|
||||||
|
|
||||||
|
ssh_reset() {
|
||||||
|
echo "Clearing and reloading the card..."
|
||||||
|
local providers=("/usr/local/lib/libykcs11.dylib" "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so")
|
||||||
|
|
||||||
|
if [[ -S "$SSH_SCM_AUTH_SOCK" ]]; then
|
||||||
|
SSH_AUTH_SOCK="$SSH_SCM_AUTH_SOCK" ssh-add -D
|
||||||
|
|
||||||
|
local provider_path="$1"
|
||||||
|
if [[ -z "$provider_path" ]]; then
|
||||||
|
for path in "${providers[@]}"; do
|
||||||
|
if [[ -e "$path" ]]; then
|
||||||
|
echo "Using provider '${provider_path}'"
|
||||||
|
SSH_AUTH_SOCK="$SSH_SCM_AUTH_SOCK" ssh-add -e "$path"
|
||||||
|
SSH_AUTH_SOCK="$SSH_SCM_AUTH_SOCK" ssh-add -s "$path"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [[ -e "$provider_path" ]]; then
|
||||||
|
SSH_AUTH_SOCK="$SSH_SCM_AUTH_SOCK" ssh-add -e "$provider_path"
|
||||||
|
SSH_AUTH_SOCK="$SSH_SCM_AUTH_SOCK" ssh-add -s "$provider_path"
|
||||||
|
else
|
||||||
|
echo "Invalid provider path: $provider_path"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
read -p "SSH agent socket not found at $sock_path. Continue with default SSH Agent (without SSH_AUTH_SOCK) or you may run 'start_agent' command to setup one? (y/n): " confirm
|
||||||
|
if [[ "$confirm" != "y" ]]; then
|
||||||
|
echo "Aborted."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ssh-add -D
|
||||||
|
|
||||||
|
local provider_path="$1"
|
||||||
|
if [[ -z "$provider_path" ]]; then
|
||||||
|
for path in "${providers[@]}"; do
|
||||||
|
if [[ -e "$path" ]]; then
|
||||||
|
ssh-add -e "$path"
|
||||||
|
ssh-add -s "$path"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
elif [[ -e "$provider_path" ]]; then
|
||||||
|
ssh-add -e "$provider_path"
|
||||||
|
ssh-add -s "$provider_path"
|
||||||
|
else
|
||||||
|
echo "Invalid provider path: $provider_path"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
local script_path="$HOME/.ssh/scm-script.sh"
|
||||||
|
mkdir -p "$HOME/.ssh"
|
||||||
|
chmod 700 $HOME/.ssh
|
||||||
|
cp "$0" "$script_path"
|
||||||
|
chmod +x "$script_path"
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
install_yubico_piv_tool_mac
|
||||||
|
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||||
|
install_yubico_piv_tool_linux
|
||||||
|
else
|
||||||
|
echo "Unsupported OS"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
local profile_file
|
||||||
|
if [[ $SHELL == "/bin/bash" ]]; then
|
||||||
|
profile_file="$HOME/.bashrc"
|
||||||
|
else
|
||||||
|
profile_file="$HOME/.zshrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -q "Include config-scm" "$HOME/.ssh/config"; then
|
||||||
|
|
||||||
|
cat <<< "Include config-scm
|
||||||
|
$(cat $HOME/.ssh/config)
|
||||||
|
" > $HOME/.ssh/config
|
||||||
|
|
||||||
|
cat > $HOME/.ssh/config-scm << EOF
|
||||||
|
Host oci*.private.devops.scmservice.*.oci.oracleiaas.com
|
||||||
|
User $(whoami)@bmc_operator_access
|
||||||
|
IdentityAgent $HOME/.ssh/scm-agent.sock
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -q "alias scm-ssh='$script_path'" "$profile_file"; then
|
||||||
|
echo "" >> "$profile_file"
|
||||||
|
echo "" >> "$profile_file"
|
||||||
|
echo "alias scm-ssh='$script_path'" >> "$profile_file"
|
||||||
|
echo "scm-ssh start_agent" >> "$profile_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "SCM script installed successfully. Please restart your terminal or run 'source $profile_file' to apply changes."
|
||||||
|
}
|
||||||
|
|
||||||
|
install_yubico_piv_tool_linux() {
|
||||||
|
local providers=("/usr/local/lib/libykcs11.dylib" "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so")
|
||||||
|
|
||||||
|
for path in "${providers[@]}"; do
|
||||||
|
if [[ -e "$path" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Automatic install not supported. Please install OpenSC or Yubico PIV Tool manually."
|
||||||
|
}
|
||||||
|
|
||||||
|
install_yubico_piv_tool_mac() {
|
||||||
|
local url="https://developers.yubico.com/yubico-piv-tool/Releases/yubico-piv-tool-latest-mac-universal.pkg"
|
||||||
|
local pkg_file="/tmp/yubico-piv-tool-latest-mac-universal.pkg"
|
||||||
|
local lib_path="/usr/local/lib/libykcs11.dylib"
|
||||||
|
|
||||||
|
if [[ -f $lib_path ]]; then
|
||||||
|
echo "Yubico PIV tool is already installed at $lib_path. Skipping..."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "Downloading Yubico PIV Tool..."
|
||||||
|
curl -L "$url" -o "$pkg_file"
|
||||||
|
|
||||||
|
if [[ ! -f "$pkg_file" ]]; then
|
||||||
|
echo "Download failed!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo "Installing Yubico PIV Tool... (sudo password might be required)"
|
||||||
|
|
||||||
|
if sudo installer -pkg "$pkg_file" -target /; then
|
||||||
|
echo "Installation of Yubico PIV Tool complete"
|
||||||
|
else
|
||||||
|
echo "Install failed"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
rm "$pkg_file"
|
||||||
|
|
||||||
|
echo "Verifying installation..."
|
||||||
|
|
||||||
|
if [[ -f "$lib_path" ]]; then
|
||||||
|
echo "Library $lib_path is present!"
|
||||||
|
else
|
||||||
|
echo "Library $lib_path is missing! Installation might be incomplete."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
scm_script_help() {
|
||||||
|
echo "Usage: $0 <command> [args...]"
|
||||||
|
echo "---------------------------"
|
||||||
|
echo "Commands:"
|
||||||
|
echo " start_agent - Starts the SCM ssh agent."
|
||||||
|
echo " stop_agent - Stops the SCM ssh agent."
|
||||||
|
echo " ssh_reset - Clears and reload the Yubikey to the agent."
|
||||||
|
echo " ssh_add - Alias to ssh_reset."
|
||||||
|
echo " install - Installs scm command by copying script to ~/.ssh/scm-script.sh and adding alias to the profile."
|
||||||
|
echo " install_yubico_piv_tool - Download and install Yubikey PIV tool"
|
||||||
|
echo " help - Displays this help message."
|
||||||
|
echo "---------------------------"
|
||||||
|
echo "Completed execution of SCM Script v${SCRIPT_VERSION}."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prevent execution when sourced in both bash and zsh
|
||||||
|
if [[ -n "$ZSH_VERSION" ]]; then
|
||||||
|
return # For zsh
|
||||||
|
elif [[ -n "$BASH_VERSION" && "${BASH_SOURCE[0]}" != "$0" ]]; then
|
||||||
|
return # For bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if at least one argument is provided
|
||||||
|
if [ "$#" -lt 1 ]; then
|
||||||
|
scm_script_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract the command
|
||||||
|
COMMAND="$1"
|
||||||
|
shift # Remove the first argument
|
||||||
|
|
||||||
|
# Execute the corresponding function
|
||||||
|
case "$COMMAND" in
|
||||||
|
start_agent)
|
||||||
|
start_scm_ssh_agent "$@"
|
||||||
|
;;
|
||||||
|
stop_agent)
|
||||||
|
stop_scm_ssh_agent "$@"
|
||||||
|
;;
|
||||||
|
ssh_reset)
|
||||||
|
ssh_reset "$@"
|
||||||
|
;;
|
||||||
|
ssh_add)
|
||||||
|
ssh_add "$@"
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
install "$@"
|
||||||
|
;;
|
||||||
|
install_yubico_piv_tool)
|
||||||
|
install_yubico_piv_tool "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid command. Use help."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
echo "Completed execution of SCM Script v${SCRIPT_VERSION}."
|
||||||
28
.tmux.conf
28
.tmux.conf
@@ -4,21 +4,19 @@ set -g @plugin 'tmux-plugins/tpm'
|
|||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sidebar'
|
set -g @plugin 'tmux-plugins/tmux-sidebar'
|
||||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-logging'
|
set -g @plugin 'tmux-plugins/tmux-logging'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-copycat' # not needed for tmux 3.1+
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
set -g @plugin 'tmux-plugins/tmux-resurrect' # https://github.com/tmux-plugins/tmux-resurrect
|
||||||
|
|
||||||
|
|
||||||
# https://github.com/tmux-plugins/tmux-resurrect
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
||||||
set -g @resurrect-capture-pane-contents 'on'
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
set -g @resurrect-processes 'ssh neomutt mbsync'
|
set -g @resurrect-processes 'ssh neomutt mbsync vim'
|
||||||
# https://github.com/tmux-plugins/tmux-continuum
|
set -g @plugin 'tmux-plugins/tmux-continuum' # https://github.com/tmux-plugins/tmux-continuum
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
||||||
|
|
||||||
set -g @plugin 'seebi/tmux-colors-solarized'
|
set -g @plugin 'seebi/tmux-colors-solarized'
|
||||||
|
|
||||||
|
# inspiration from https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
|
||||||
|
set -sg terminal-overrides ",*:RGB"
|
||||||
|
|
||||||
# too wild, some shortcuts like meta-tab/meta-number are nice though
|
# too wild, some shortcuts like meta-tab/meta-number are nice though
|
||||||
# set -g @plugin 'ek9/tmux-vim-bindings'
|
# set -g @plugin 'ek9/tmux-vim-bindings'
|
||||||
|
|
||||||
@@ -26,6 +24,10 @@ set -g @plugin 'seebi/tmux-colors-solarized'
|
|||||||
# set -g @colors-solarized 'light'
|
# set -g @colors-solarized 'light'
|
||||||
set -g @colors-solarized 'dark'
|
set -g @colors-solarized 'dark'
|
||||||
|
|
||||||
|
# this causes tmux to crash
|
||||||
|
# set-option -g mouse on
|
||||||
|
# set -g @plugin 'jaclu/tmux-menus'
|
||||||
|
|
||||||
|
|
||||||
# Change prefix to C-a
|
# Change prefix to C-a
|
||||||
# C-a hex value: 0x01
|
# C-a hex value: 0x01
|
||||||
@@ -69,7 +71,15 @@ set -g pane-base-index 1
|
|||||||
# tip from https://github.com/vim/vim/issues/3608
|
# tip from https://github.com/vim/vim/issues/3608
|
||||||
set -ag terminal-overrides ",xterm-256color:Tc"
|
set -ag terminal-overrides ",xterm-256color:Tc"
|
||||||
|
|
||||||
|
# synchronize panes
|
||||||
|
bind e setw synchronize-panes # ; tmux display "Sync #{?pane_synchronized,ON,OFF}"
|
||||||
|
|
||||||
|
|
||||||
# tpm install: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
# tpm install: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|
||||||
|
# test for https://unix.stackexchange.com/questions/480437/can-i-ask-tmux-to-immediately-exit-copy-mode-and-paste-the-content-when-i-yank
|
||||||
|
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
|
||||||
|
|
||||||
|
|||||||
35
.tridactylrc
Normal file
35
.tridactylrc
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
" General Settings
|
||||||
|
set update.lastchecktime 1755245204669
|
||||||
|
set update.nag true
|
||||||
|
set update.nagwait 7
|
||||||
|
set update.lastnaggedversion 1.14.0
|
||||||
|
set update.checkintervalsecs 86400
|
||||||
|
set configversion 2.0
|
||||||
|
set editorcmd '/opt/homebrew/bin/emacsclient'
|
||||||
|
set smoothscroll true
|
||||||
|
|
||||||
|
" pentadactyl-style tab switching
|
||||||
|
bind J tabnext
|
||||||
|
bind K tabprev
|
||||||
|
|
||||||
|
blacklistadd https://www.youtube.com/
|
||||||
|
blacklistadd https://127.0.0.1
|
||||||
|
blacklistadd http://127.0.0.1
|
||||||
|
blacklistadd https://login.us-phoenix-1.idp.mc1.oracleiaas.com/
|
||||||
|
blacklistadd https://jellyfin.cloud.jetpac.org
|
||||||
|
blacklistadd https://freshrss.cloud.jetpac.org
|
||||||
|
blacklistadd https://firefox.cloud.jetpac.org
|
||||||
|
" blacklistadd https://grt.us.oracle.com
|
||||||
|
" auto-contain
|
||||||
|
|
||||||
|
" tip from https://github.com/tridactyl/tridactyl/issues/1559
|
||||||
|
seturl youtube.com modeindicator false
|
||||||
|
|
||||||
|
" vim bind u back
|
||||||
|
" vim bind U undo
|
||||||
|
" vim bind Y clipboard yank
|
||||||
|
" vim u
|
||||||
|
" nbind <c-f>
|
||||||
|
|
||||||
|
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
|
||||||
|
" vim: set filetype=tridactyl
|
||||||
19
.vimrc
19
.vimrc
@@ -46,6 +46,7 @@ Plug 'bling/vim-bufferline'
|
|||||||
Plug 'tpope/vim-characterize'
|
Plug 'tpope/vim-characterize'
|
||||||
Plug 'tpope/vim-endwise'
|
Plug 'tpope/vim-endwise'
|
||||||
Plug 'doums/darcula' " pycharm scheme reproduction
|
Plug 'doums/darcula' " pycharm scheme reproduction
|
||||||
|
Plug 'hashivim/vim-terraform'
|
||||||
|
|
||||||
if s:usecopilot == 1
|
if s:usecopilot == 1
|
||||||
Plug 'github/copilot.vim', { 'on': 'Copilot' }
|
Plug 'github/copilot.vim', { 'on': 'Copilot' }
|
||||||
@@ -78,10 +79,10 @@ let g:syntastic_yaml_checkers = ['yamllint']
|
|||||||
" " https://vi.stackexchange.com/questions/10007/how-to-make-syntastic-include-sourced-files-for-bash-syntax-as-shellcheck-x
|
" " https://vi.stackexchange.com/questions/10007/how-to-make-syntastic-include-sourced-files-for-bash-syntax-as-shellcheck-x
|
||||||
" let g:syntastic_sh_shellcheck_args = "-x"
|
" let g:syntastic_sh_shellcheck_args = "-x"
|
||||||
|
|
||||||
" let g:syntastic_mode_map = {
|
let g:syntastic_mode_map = {
|
||||||
" \ "mode": "active",
|
\ "mode": "passive",
|
||||||
" \ "active_filetypes": [],
|
\ "active_filetypes": [ "bash" ],
|
||||||
" \ "passive_filetypes": ["sh, yaml"] }
|
\ "passive_filetypes": ["sh, yaml"] }
|
||||||
|
|
||||||
set modeline
|
set modeline
|
||||||
set modelines=5
|
set modelines=5
|
||||||
@@ -107,10 +108,20 @@ endif
|
|||||||
" solarized config
|
" solarized config
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set background=dark " or light
|
set background=dark " or light
|
||||||
|
|
||||||
" colorscheme solarized
|
" colorscheme solarized
|
||||||
colorscheme darcula
|
colorscheme darcula
|
||||||
|
|
||||||
|
" Check if the color scheme file is available before applying it
|
||||||
|
if exists("g:plugs['darcula']") && filereadable(expand("~/.vim/plugged/darcula/colors/darcula.vim"))
|
||||||
|
colorscheme darcula
|
||||||
|
endif
|
||||||
|
|
||||||
hi Visual term=reverse cterm=reverse guibg=Grey
|
hi Visual term=reverse cterm=reverse guibg=Grey
|
||||||
|
|
||||||
|
" open unfolded
|
||||||
|
set foldlevel=99
|
||||||
|
|
||||||
|
|
||||||
" copilot config
|
" copilot config
|
||||||
imap <silent> <C-j> <Plug>(copilot-next)
|
imap <silent> <C-j> <Plug>(copilot-next)
|
||||||
|
|||||||
4
.yamllint
Normal file
4
.yamllint
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
max: 200
|
||||||
|
allow-non-breakable-words: true
|
||||||
90
.zshenv
90
.zshenv
@@ -2,15 +2,40 @@ set -o vi
|
|||||||
|
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jetpac/work/flutter/bin:$HOME/.rd/bin:$HOME/bin:PATH
|
export PATH=/Users/jetpac/.asdf/shims/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jetpac/work/flutter/bin:$HOME/.rd/bin:$HOME/bin:$PATH:$HOME/.fzf/bin
|
||||||
|
|
||||||
|
# homebrew config
|
||||||
|
# output of brew shellenv
|
||||||
|
export HOMEBREW_PREFIX="/opt/homebrew";
|
||||||
|
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
|
||||||
|
export HOMEBREW_REPOSITORY="/opt/homebrew";
|
||||||
|
fpath[1,0]="/opt/homebrew/share/zsh/site-functions";
|
||||||
|
eval "$(/usr/bin/env PATH_HELPER_ROOT="/opt/homebrew" /usr/libexec/path_helper -s)"
|
||||||
|
[ -z "${MANPATH-}" ] || export MANPATH=":${MANPATH#:}";
|
||||||
|
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
alias oe='open /Applications/Emacs.app'
|
alias oe='open /Applications/Emacs.app'
|
||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME'
|
# Force mc to use bash for its subshell
|
||||||
|
alias mc='SHELL=/bin/bash mc'
|
||||||
|
|
||||||
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
alias -g N="2>&1 "
|
alias -g N="2>&1 "
|
||||||
|
alias pig='ping'
|
||||||
# export PATH=$HOME/.rd/bin
|
# export PATH=$HOME/.rd/bin
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# on speccy only
|
||||||
|
if [[ "$(hostname)" == "speccy" ]];
|
||||||
|
then
|
||||||
|
# defined via https://github.com/syl20bnr/spacemacs/wiki/Terminal
|
||||||
|
export TERM=xterm-24bit
|
||||||
|
alias ssh="TERM=xterm-256color ssh"
|
||||||
|
alias vi=te
|
||||||
|
alias vim=te
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# for gems installed in my home direcotry
|
# for gems installed in my home direcotry
|
||||||
# inspiration: https://guides.cocoapods.org/using/getting-started.html#installation
|
# inspiration: https://guides.cocoapods.org/using/getting-started.html#installation
|
||||||
@@ -67,4 +92,63 @@ export seznam6='2a02:598:2::1222'
|
|||||||
export OPENAI_API_KEY='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'
|
export OPENAI_API_KEY='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'
|
||||||
|
|
||||||
# for flutter
|
# for flutter
|
||||||
export PATH=$PATH:/Users/jetpac/Documents/flutter-dev-env/bin
|
# export PATH=$PATH:/Users/jetpac/Documents/flutter-dev-env/bin
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
# nvm initialization is commented out; it significantly slows down shell startup
|
||||||
|
# [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
|
||||||
|
#
|
||||||
|
|
||||||
|
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS='vi-forward-char'
|
||||||
|
#ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS='end-of-line'
|
||||||
|
#
|
||||||
|
# alias km='kubectl --kubeconfig /Users/jetpac/.kube.lenovo/config'
|
||||||
|
|
||||||
|
|
||||||
|
alias nextcloud-shell='k exec -n nextcloud deployments/nextcloud -c nextcloud -it -- runuser --user www-data bash'
|
||||||
|
alias nextcloud-shell-root='k exec -n nextcloud deployments/nextcloud -c nextcloud -it -- bash'
|
||||||
|
alias occ='k exec -n nextcloud deployments/nextcloud -c nextcloud -it -- runuser --user www-data /var/www/html/occ'
|
||||||
|
|
||||||
|
alias speech_to_text="$HOME/Downloads/whisper.cpp/convert_video_to_txt.sh"
|
||||||
|
|
||||||
|
|
||||||
|
if [ -f "/Users/jetpac/.local/bin/k9s" ]; then
|
||||||
|
alias k9s='/Users/jetpac/.local/bin/k9s --logoless'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# lh nodes function for kubectl
|
||||||
|
if [[ -n ${commands[kubectl]} ]]; then
|
||||||
|
lh_nodes() {
|
||||||
|
local ns="${1:-longhorn-system}"
|
||||||
|
kubectl -n "$ns" get nodes.longhorn.io -o yaml | \
|
||||||
|
yq eval '
|
||||||
|
.items[] |
|
||||||
|
{
|
||||||
|
"node": .metadata.name,
|
||||||
|
"allowScheduling": .spec.allowScheduling,
|
||||||
|
"disks": (
|
||||||
|
[ (.spec.disks // {}) | to_entries | .[] |
|
||||||
|
{
|
||||||
|
"diskName": .key,
|
||||||
|
"path": .value.path,
|
||||||
|
"allowScheduling": .value.allowScheduling,
|
||||||
|
"evictionRequested": .value.evictionRequested,
|
||||||
|
"storageReservedGiB": ((.value.storageReserved // 0) / 1073741824)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
),
|
||||||
|
"diskStatus": (
|
||||||
|
[ (.status.diskStatus // {}) | to_entries | .[] |
|
||||||
|
{
|
||||||
|
"diskName": .key,
|
||||||
|
"storageAvailableGiB": ((.value.storageAvailable // 0) / 1073741824),
|
||||||
|
"storageMaximumGiB": ((.value.storageMaximum // 0) / 1073741824),
|
||||||
|
"storageScheduledGiB":((.value.storageScheduled // 0) / 1073741824)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}'
|
||||||
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
alias scm-ssh='/Users/jetpac/.ssh/scm-script.sh'
|
||||||
|
|||||||
142
.zshrc
142
.zshrc
@@ -9,6 +9,30 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
|||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if not present, install zsh-syntax-highlighting plugin
|
||||||
|
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ];
|
||||||
|
then
|
||||||
|
cd "${HOME}/.oh-my-zsh/custom/plugins/"
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git &> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if not present, install zsh-completions plugin
|
||||||
|
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-completions" ];
|
||||||
|
then
|
||||||
|
cd "${HOME}/.oh-my-zsh/custom/plugins/"
|
||||||
|
git clone https://github.com/zsh-users/zsh-completions.git &> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if not present, install zsh-autosuggestions plugin
|
||||||
|
if [ ! -d "${HOME}/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ];
|
||||||
|
then
|
||||||
|
cd "${HOME}/.oh-my-zsh/custom/plugins/"
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions.git &> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# doesn't work well on remote hosts
|
# doesn't work well on remote hosts
|
||||||
# [[ -f .iterm2_shell_integration.zsh ]] && source .iterm2_shell_integration.zsh
|
# [[ -f .iterm2_shell_integration.zsh ]] && source .iterm2_shell_integration.zsh
|
||||||
|
|
||||||
@@ -53,7 +77,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
|||||||
# DISABLE_LS_COLORS="true"
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
# DISABLE_AUTO_TITLE="true"
|
DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to enable command auto-correction.
|
# Uncomment the following line to enable command auto-correction.
|
||||||
# ENABLE_CORRECTION="true"
|
# ENABLE_CORRECTION="true"
|
||||||
@@ -62,7 +86,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
|||||||
# You can also set it to another string to have that shown instead of the default red dots.
|
# You can also set it to another string to have that shown instead of the default red dots.
|
||||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
# Uncomment the following line if you want to disable marking untracked files
|
# Uncomment the following line if you want to disable marking untracked files
|
||||||
# under VCS as dirty. This makes repository status check for large repositories
|
# under VCS as dirty. This makes repository status check for large repositories
|
||||||
@@ -80,12 +104,51 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
|
|||||||
# Would you like to use another custom folder than $ZSH/custom?
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# if [ -f ". /opt/homebrew/opt/asdf/libexec/asdf.sh" ]; then
|
||||||
|
# source /opt/homebrew/opt/asdf/libexec/asdf.sh
|
||||||
|
# fi
|
||||||
|
|
||||||
# Which plugins would you like to load?
|
# Which plugins would you like to load?
|
||||||
# Standard plugins can be found in $ZSH/plugins/
|
# Standard plugins can be found in $ZSH/plugins/
|
||||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git rsync colorize colored-man-pages vi-mode common-aliases macos themes dircycle iterm2 docker docker-compose zsh-navigation-tools urltools history mercurial tmux )
|
plugins=(colorize colored-man-pages vi-mode common-aliases themes dircycle iterm2 zsh-navigation-tools urltools history zsh-syntax-highlighting zsh-autosuggestions web-search aliases)
|
||||||
|
|
||||||
|
cmd_plugins=(git rsync conda tmux docker docker-compose tmux kubectl helm terraform asdf brew emacs fzf asdf brew emacs)
|
||||||
|
|
||||||
|
# Add a plugin only if its command exists
|
||||||
|
add_plugin_if_command_exists() {
|
||||||
|
local cmd="$1"
|
||||||
|
if [[ -n ${commands[$cmd]} ]]; then
|
||||||
|
# Only append if not already in the plugins array
|
||||||
|
if (( ! ${plugins[(Ie)$cmd]} )); then
|
||||||
|
plugins+=("$cmd")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for cmd in $cmd_plugins; do
|
||||||
|
add_plugin_if_command_exists "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
|
# use mercurial plugin
|
||||||
|
if [[ -n ${commands[hg]} ]]; then
|
||||||
|
plugins+=("mercurial")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# use macos plugin
|
||||||
|
if [[ "$(uname -o)" == "Darwin" ]]; then
|
||||||
|
plugins+=("macos")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# use zoxide
|
||||||
|
if [[ -n ${commands[zoxide]} ]]; then
|
||||||
|
export FZF_DEFAULT_OPTS="--style full"
|
||||||
|
export _ZO_FZF_OPTS="--height ~90% --tmux bottom,70% --layout reverse"
|
||||||
|
eval "$(zoxide init --cmd cd zsh)"
|
||||||
|
fi
|
||||||
|
|
||||||
# colorize - adds ccat and cless
|
# colorize - adds ccat and cless
|
||||||
# common-aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/common-aliases
|
# common-aliases: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/common-aliases
|
||||||
# themes: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/themes
|
# themes: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/themes
|
||||||
@@ -164,14 +227,27 @@ fi
|
|||||||
# zsh history is too short
|
# zsh history is too short
|
||||||
# - https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh
|
# - https://unix.stackexchange.com/questions/273861/unlimited-history-in-zsh
|
||||||
|
|
||||||
HISTFILE=~/.zsh_history
|
|
||||||
|
# inspiration taken from yt video:
|
||||||
|
# https://youtu.be/ud7YxC33Z3w
|
||||||
HISTSIZE=999999999
|
HISTSIZE=999999999
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
SAVEHIST=$HISTSIZE
|
SAVEHIST=$HISTSIZE
|
||||||
|
HISTDUP=erase
|
||||||
|
setopt appendhistory
|
||||||
|
setopt sharehistory
|
||||||
|
setopt hist_ignore_space
|
||||||
|
setopt hist_ignore_all_dups
|
||||||
|
setopt hist_save_no_dups
|
||||||
|
setopt hist_ignore_dups
|
||||||
|
setopt hist_find_no_dups
|
||||||
|
setopt hist_reduce_blanks
|
||||||
|
bindkey '^p' history-search-backward
|
||||||
|
bindkey '^n' history-search-forward
|
||||||
|
# bindkey '^f' autosuggest-accept
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
|
||||||
|
|
||||||
|
|
||||||
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
|
|
||||||
export PATH="/Users/jetpac/.rd/bin:$PATH"
|
|
||||||
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)
|
|
||||||
|
|
||||||
# >>> conda initialize >>>
|
# >>> conda initialize >>>
|
||||||
# !! Contents within this block are managed by 'conda init' !!
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
@@ -188,11 +264,61 @@ fi
|
|||||||
unset __conda_setup
|
unset __conda_setup
|
||||||
# <<< conda initialize <<<
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
#### <BEGIN conda zsh completion>
|
||||||
|
# --- Enable conda autocompletion ---
|
||||||
|
if command -v conda &>/dev/null; then
|
||||||
|
# Ensure Conda hook is loaded
|
||||||
|
eval "$(conda shell.zsh hook)"
|
||||||
|
|
||||||
|
# Add Conda's completion functions to zsh's function path
|
||||||
|
_conda_zsh_completions_dir="$(conda info --base)/etc/profile.d"
|
||||||
|
if [ -d "$_conda_zsh_completions_dir" ]; then
|
||||||
|
fpath+=("$_conda_zsh_completions_dir")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
autoload -U compinit && compinit
|
||||||
|
#### <END conda zsh completion>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# export PATH="/opt/homebrew/bin:$PATH"
|
||||||
|
|
||||||
# for cocoapods
|
# for cocoapods
|
||||||
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
|
export PATH=/opt/homebrew/opt/ruby/bin:$PATH
|
||||||
export GEM_HOME=$HOME/.gem
|
export GEM_HOME=$HOME/.gem
|
||||||
export PATH=$GEM_HOME/bin:$HOME/.gem/ruby/3.3.0/bin:$PATH
|
export PATH=$GEM_HOME/bin:$HOME/.gem/ruby/3.3.0/bin:$PATH
|
||||||
|
|
||||||
|
# Generated for envman. Do not edit.
|
||||||
|
# [ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
||||||
|
|
||||||
|
|
||||||
|
# alias scm-ssh='/Users/jetpac/.ssh/scm-script.sh'
|
||||||
|
# scm-ssh start_agent
|
||||||
|
|
||||||
|
# export FZF_DEFAULT_OPTS="--style full --preview '/opt/homebrew/bin/pygmentize -g {}' --bind 'focus:transform-header:file --brief {}'"
|
||||||
|
|
||||||
|
# set to system ssh-agent
|
||||||
|
if command -v launchctl >/dev/null 2>&1; then
|
||||||
|
export SSH_AUTH_SOCK="$(launchctl getenv SSH_AUTH_SOCK)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
|
# zellij startup workaround:
|
||||||
|
# keep zellij aliases/functions while stripping the problematic runtime completion call.
|
||||||
|
_zellij_comp_src="$HOME/.config/zellij/comp.zsh"
|
||||||
|
_zellij_comp_safe="$HOME/.cache/zellij/comp.safe.zsh"
|
||||||
|
if [ -f "$_zellij_comp_src" ]; then
|
||||||
|
mkdir -p "${_zellij_comp_safe:h}"
|
||||||
|
if [ ! -f "$_zellij_comp_safe" ] || [ "$_zellij_comp_src" -nt "$_zellij_comp_safe" ]; then
|
||||||
|
sed '/^_zellij "\$@"$/d' "$_zellij_comp_src" > "$_zellij_comp_safe"
|
||||||
|
fi
|
||||||
|
source "$_zellij_comp_safe"
|
||||||
|
(( $+functions[compdef] )) && compdef _zellij zellij
|
||||||
|
fi
|
||||||
|
unset _zellij_comp_src _zellij_comp_safe
|
||||||
|
|
||||||
|
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
|
||||||
|
export PATH="/Users/jetpac/.rd/bin:$PATH"
|
||||||
|
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"Name": "Solarized Dark",
|
"Name": "Solarized Dark",
|
||||||
"Guid": "EAAE4823-98F2-4CF1-909C-E2C37013889C",
|
"Guid": "EAAE4823-98F2-4CF1-909C-E2C37013889C",
|
||||||
"Dynamic Profile Parent Name": "tmux keys",
|
"Dynamic Profile Parent Name": "tmux keys",
|
||||||
|
"Window Type": 12,
|
||||||
"Badge Color" : {
|
"Badge Color" : {
|
||||||
"Red Component" : 1,
|
"Red Component" : 1,
|
||||||
"Color Space" : "sRGB",
|
"Color Space" : "sRGB",
|
||||||
|
|||||||
@@ -89,12 +89,6 @@
|
|||||||
"Text" : "01 6c",
|
"Text" : "01 6c",
|
||||||
"Version" : 1
|
"Version" : 1
|
||||||
},
|
},
|
||||||
"0x6e-0x80000-0x2d" : {
|
|
||||||
"Action" : 11,
|
|
||||||
"Label" : "",
|
|
||||||
"Text" : "01 6e",
|
|
||||||
"Version" : 1
|
|
||||||
},
|
|
||||||
"0x70-0x80000-0x23" : {
|
"0x70-0x80000-0x23" : {
|
||||||
"Action" : 11,
|
"Action" : 11,
|
||||||
"Label" : "",
|
"Label" : "",
|
||||||
|
|||||||
21
README.org
21
README.org
@@ -1,6 +1,12 @@
|
|||||||
* How to set up this configuration
|
* How to set up this configuration
|
||||||
|
|
||||||
** basic setup
|
** Automated setup
|
||||||
|
|
||||||
|
#+begin_src sh
|
||||||
|
bash -c "$(curl -fsSL https://git.meinlschmidt.org/jetpac/dotfiles/raw/branch/main/bootstrap.sh)"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** manual setup
|
||||||
|
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
# for linux; ignore on other systems
|
# for linux; ignore on other systems
|
||||||
@@ -14,14 +20,17 @@
|
|||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
config config --local status.showUntrackedFiles no
|
config config --local status.showUntrackedFiles no
|
||||||
config checkout
|
config checkout
|
||||||
zsh
|
|
||||||
|
|
||||||
source ~/.proxies
|
source ~/.proxies
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended --skip-chsh --keep-zshrc"
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
|
vim +PlugInstall +qall
|
||||||
|
|
||||||
|
zsh
|
||||||
|
|
||||||
# run tmux, prefix + I installs all plugins (needs to have proxies set)
|
# run tmux, prefix + I installs all plugins (needs to have proxies set)
|
||||||
# run vim, :PlugInstall
|
# run vim, :PlugInstall
|
||||||
|
|
||||||
@@ -45,6 +54,12 @@ You can also download fonts like this:
|
|||||||
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
|
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Emacs
|
||||||
|
#+begin_src bash
|
||||||
|
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
|
||||||
|
#+end_src
|
||||||
|
Run Emacs and wait ~10 mins to download all packages
|
||||||
|
|
||||||
** tmux in User's home directory
|
** tmux in User's home directory
|
||||||
If you want to build tmux independend of other parts of the system, cut&paste from the code snippet below should do the trick.
|
If you want to build tmux independend of other parts of the system, cut&paste from the code snippet below should do the trick.
|
||||||
run export PATH=$HOME/usr/local:$PATH to pick up correct libraries and binaries
|
run export PATH=$HOME/usr/local:$PATH to pick up correct libraries and binaries
|
||||||
|
|||||||
6
bin/cluster_build_status
Executable file
6
bin/cluster_build_status
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/ksh
|
||||||
|
#
|
||||||
|
# Script to perform certain operations in the US, because I'm lazy :-)
|
||||||
|
#
|
||||||
|
|
||||||
|
ssh pnyc@scapen-cs11u4-1.us.oracle.com /home/pdmitche/bin/nightly_history.ksh $@
|
||||||
157
bin/codex-devops-auth.sh
Executable file
157
bin/codex-devops-auth.sh
Executable file
@@ -0,0 +1,157 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
PKCS11_LIB="${PKCS11_LIB:-/usr/local/lib/opensc-pkcs11.so}"
|
||||||
|
TOKEN_HOST="${TOKEN_HOST:-operator-access-token.svc.ad1.r2}"
|
||||||
|
SSH_CONFIG_FILE="${SSH_CONFIG_FILE:-$HOME/.ssh/config.oci}"
|
||||||
|
OCI_BIN="${OCI_BIN:-/opt/homebrew/bin/oci}"
|
||||||
|
OCI_SESSION_REGION="${OCI_SESSION_REGION:-us-chicago-1}"
|
||||||
|
OCI_PROFILE_NAME="${OCI_PROFILE_NAME:-DEFAULT}"
|
||||||
|
OCI_SESSION_VALIDATE_TIMEOUT_SECONDS="${OCI_SESSION_VALIDATE_TIMEOUT_SECONDS:-2}"
|
||||||
|
RESET_AGENT="${RESET_AGENT:-0}"
|
||||||
|
DEDICATED_AGENT_PID=""
|
||||||
|
DEDICATED_AGENT_SOCK=""
|
||||||
|
|
||||||
|
log() {
|
||||||
|
print -u2 -- "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
if [[ -n "${DEDICATED_AGENT_PID}" && -n "${DEDICATED_AGENT_SOCK}" ]]; then
|
||||||
|
SSH_AGENT_PID="${DEDICATED_AGENT_PID}" SSH_AUTH_SOCK="${DEDICATED_AGENT_SOCK}" ssh-agent -k >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_oci() {
|
||||||
|
"${OCI_BIN}" --profile "${OCI_PROFILE_NAME}" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve_timeout_bin() {
|
||||||
|
local candidate
|
||||||
|
|
||||||
|
for candidate in timeout gtimeout /opt/homebrew/bin/timeout /opt/homebrew/bin/gtimeout; do
|
||||||
|
if [[ "${candidate}" == /* ]]; then
|
||||||
|
if [[ -x "${candidate}" ]]; then
|
||||||
|
print -r -- "${candidate}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v "${candidate}" >/dev/null 2>&1; then
|
||||||
|
command -v "${candidate}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
get_validate_timeout_seconds() {
|
||||||
|
local timeout_seconds="${OCI_SESSION_VALIDATE_TIMEOUT_SECONDS}"
|
||||||
|
|
||||||
|
if [[ ! "${timeout_seconds}" =~ '^[0-9]+([.][0-9]+)?$' ]]; then
|
||||||
|
log "Warning: invalid OCI_SESSION_VALIDATE_TIMEOUT_SECONDS=${timeout_seconds}; using 2 seconds."
|
||||||
|
print -r -- "2"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
print -r -- "${timeout_seconds}"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_oci_with_timeout() {
|
||||||
|
local timeout_seconds="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
local timeout_bin
|
||||||
|
if ! timeout_bin="$(resolve_timeout_bin)"; then
|
||||||
|
log "Warning: no timeout binary found; running OCI command without a timeout."
|
||||||
|
run_oci "$@"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
"${timeout_bin}" "${timeout_seconds}" "${OCI_BIN}" --profile "${OCI_PROFILE_NAME}" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_oci_session() {
|
||||||
|
if [[ ! -x "${OCI_BIN}" ]]; then
|
||||||
|
print -u2 "OCI CLI not found or not executable: ${OCI_BIN}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local validate_timeout_seconds
|
||||||
|
validate_timeout_seconds="$(get_validate_timeout_seconds)"
|
||||||
|
|
||||||
|
set +e
|
||||||
|
run_oci_with_timeout "${validate_timeout_seconds}" session validate >/dev/null 2>&1
|
||||||
|
local validate_rc=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ ${validate_rc} -eq 0 ]]; then
|
||||||
|
log "OCI CLI session is already valid."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${validate_rc} -eq 124 ]]; then
|
||||||
|
log "OCI CLI session validation timed out after ${validate_timeout_seconds} seconds; treating session as invalid."
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "OCI CLI session is not valid; attempting refresh."
|
||||||
|
set +e
|
||||||
|
run_oci session refresh >/dev/null 2>&1
|
||||||
|
local refresh_rc=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ ${refresh_rc} -eq 0 ]]; then
|
||||||
|
log "OCI CLI session refresh succeeded."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Running OCI CLI session authenticate for ${OCI_SESSION_REGION} with profile ${OCI_PROFILE_NAME}."
|
||||||
|
"${OCI_BIN}" session authenticate --region "${OCI_SESSION_REGION}" --profile-name "${OCI_PROFILE_NAME}"
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_ssh_agent() {
|
||||||
|
log "Starting dedicated ssh-agent for Codex."
|
||||||
|
unset SSH_AUTH_SOCK SSH_AGENT_PID
|
||||||
|
eval "$(ssh-agent -s)" >/dev/null
|
||||||
|
DEDICATED_AGENT_PID="${SSH_AGENT_PID:-}"
|
||||||
|
DEDICATED_AGENT_SOCK="${SSH_AUTH_SOCK:-}"
|
||||||
|
}
|
||||||
|
|
||||||
|
add_pkcs11_provider() {
|
||||||
|
log "Loading PKCS#11 provider: ${PKCS11_LIB}"
|
||||||
|
ssh-add -s "${PKCS11_LIB}" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_agent() {
|
||||||
|
ensure_ssh_agent
|
||||||
|
add_pkcs11_provider
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ ! -f "${SSH_CONFIG_FILE}" ]]; then
|
||||||
|
print -u2 "SSH config file not found: ${SSH_CONFIG_FILE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${RESET_AGENT}" == "1" ]]; then
|
||||||
|
log "Resetting SSH agent on explicit request."
|
||||||
|
pkill -9 ssh-agent >/dev/null 2>&1 || true
|
||||||
|
pkill -9 ssh-pkcs11-helper >/dev/null 2>&1 || true
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
|
ensure_oci_session
|
||||||
|
|
||||||
|
prepare_agent
|
||||||
|
|
||||||
|
log "Refreshing OPERATOR_ACCESS_TOKEN from ${TOKEN_HOST} using ${SSH_CONFIG_FILE}"
|
||||||
|
export OPERATOR_ACCESS_TOKEN="$(ssh -F "${SSH_CONFIG_FILE}" "${TOKEN_HOST}" "generate --mode jwt")"
|
||||||
|
export OP_TOKEN="${OPERATOR_ACCESS_TOKEN}"
|
||||||
|
|
||||||
|
log "Using fresh OP_TOKEN for Codex and DevOps MCP."
|
||||||
|
|
||||||
|
/opt/homebrew/bin/codex "$@"
|
||||||
@@ -1,92 +1,334 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
set -e
|
set -eu
|
||||||
set -x
|
|
||||||
|
|
||||||
# function to get PARENT_WS as a parameter
|
SCRIPT_NAME=${0:t}
|
||||||
# default value is 'ssh://pnyc@dabel.us.oracle.com//workspace/pnyc/solaris-reviews/secure-integrate/userland11.4'
|
SCRIPT_DIR=${0:A:h}
|
||||||
#
|
|
||||||
|
|
||||||
if [[ -z $1 ]]; then
|
DEFAULT_PARENT_WS='ssh://pnyc@dabel.us.oracle.com//workspace/pnyc/solaris-reviews/on-sru'
|
||||||
PARENT_WS='ssh://pnyc@dabel.us.oracle.com//workspace/pnyc/solaris-reviews/secure-integrate/userland11.4'
|
DEFAULT_DEST_ROOT="${HOME}/PycharmProjects"
|
||||||
PARENT_WS='ssh://pnyc@dabel.us.oracle.com//workspace/pnyc/solaris-reviews/userland-pipeline'
|
DEFAULT_FOLDER_PREFIX='PetrN/'
|
||||||
else
|
DEFAULT_POINT_OF_CONTACT='petr.nyc@oracle.com'
|
||||||
PARENT_WS=$1
|
DEFAULT_SLACK_CHANNEL='@pnyc'
|
||||||
|
DEFAULT_PYTHON='/opt/homebrew/bin/python3.11'
|
||||||
|
OS_NAME="$(uname -s)"
|
||||||
|
|
||||||
|
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin${PATH:+:$PATH}"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<EOF
|
||||||
|
Usage: ${SCRIPT_NAME} [-r repo_url] [-d dest_dir] [-f folder_prefix] [-c point_of_contact] [-s slack_channel] [-p python_exe] [-j python_jenkins_path] [-h]
|
||||||
|
|
||||||
|
-r repo_url Mercurial repo URL to clone.
|
||||||
|
Default: ${DEFAULT_PARENT_WS}
|
||||||
|
-d dest_dir Local directory to clone into.
|
||||||
|
Default: ~/PycharmProjects/<repo_name>
|
||||||
|
-f folder_prefix Jenkins folder prefix.
|
||||||
|
Default: ${DEFAULT_FOLDER_PREFIX}
|
||||||
|
-c point_of_contact Contact email for generated config.
|
||||||
|
Default: ${DEFAULT_POINT_OF_CONTACT}
|
||||||
|
-s slack_channel Slack handle/channel for generated config.
|
||||||
|
Default: ${DEFAULT_SLACK_CHANNEL}
|
||||||
|
-p python_exe Python executable for virtualenv creation.
|
||||||
|
Default: ${DEFAULT_PYTHON}
|
||||||
|
-j python_jenkins_path Optional local checkout to inject into requirements.txt.
|
||||||
|
Default: disabled
|
||||||
|
-h Show this help text.
|
||||||
|
|
||||||
|
Environment overrides:
|
||||||
|
MRSHUGHES_PARENT_WS
|
||||||
|
MRSHUGHES_DEST_DIR
|
||||||
|
MRSHUGHES_FOLDER_PREFIX
|
||||||
|
MRSHUGHES_POINT_OF_CONTACT
|
||||||
|
MRSHUGHES_SLACK_CHANNEL
|
||||||
|
MRSHUGHES_PYTHON
|
||||||
|
MRSHUGHES_PYTHON_JENKINS_PATH
|
||||||
|
|
||||||
|
The script exits if dest_dir already exists.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
die() {
|
||||||
|
print -u2 -- "$@"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
require_command() {
|
||||||
|
command -v "$1" >/dev/null 2>&1 || die "Missing required command: $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve_executable() {
|
||||||
|
local executable=${~1}
|
||||||
|
|
||||||
|
if [[ "$executable" == */* ]]; then
|
||||||
|
[[ -x "$executable" ]] || die "Executable not found or not executable: $executable"
|
||||||
|
print -r -- "$executable"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remove trailing slash
|
command -v "$executable" >/dev/null 2>&1 || die "Command not found in PATH: $executable"
|
||||||
|
command -v "$executable"
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_proxy() {
|
||||||
|
local proxy_script="${SCRIPT_DIR}/proxy"
|
||||||
|
|
||||||
|
if [[ -f "$proxy_script" ]]; then
|
||||||
|
source "$proxy_script" off >/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_clone_identity_loaded() {
|
||||||
|
local ssh_host=$1
|
||||||
|
local identity_file
|
||||||
|
local identity_pub
|
||||||
|
|
||||||
|
identity_file=$(ssh -G "$ssh_host" 2>/dev/null | awk '/^identityfile / {print $2; exit}')
|
||||||
|
[[ -n "$identity_file" ]] || return
|
||||||
|
|
||||||
|
identity_file=${~identity_file}
|
||||||
|
identity_pub="${identity_file}.pub"
|
||||||
|
[[ -f "$identity_file" && -f "$identity_pub" ]] || return
|
||||||
|
|
||||||
|
if ssh-add -T "$identity_pub" >/dev/null 2>&1; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
print -- "Loading SSH identity for ${ssh_host}: ${identity_file}"
|
||||||
|
if [[ "$OS_NAME" == "Darwin" ]]; then
|
||||||
|
ssh-add --apple-use-keychain "$identity_file" >/dev/null
|
||||||
|
else
|
||||||
|
ssh-add "$identity_file" >/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
apply_python_jenkins_override() {
|
||||||
|
local checkout_path=$1
|
||||||
|
local tmp_requirements
|
||||||
|
|
||||||
|
tmp_requirements=$(mktemp)
|
||||||
|
sed -E "s|^git.*$|git+file://${checkout_path}|" requirements.txt > "$tmp_requirements"
|
||||||
|
/bin/mv "$tmp_requirements" requirements.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
yaml_escape() {
|
||||||
|
local value=$1
|
||||||
|
|
||||||
|
value=${value//\\/\\\\}
|
||||||
|
value=${value//\"/\\\"}
|
||||||
|
print -r -- "$value"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_yaml_key() {
|
||||||
|
local file=$1
|
||||||
|
local key=$2
|
||||||
|
local value
|
||||||
|
local tmp_file
|
||||||
|
|
||||||
|
value=$(yaml_escape "$3")
|
||||||
|
tmp_file=$(mktemp)
|
||||||
|
|
||||||
|
if ! awk -v key="$key" -v value="$value" '
|
||||||
|
$0 ~ "^[[:space:]]*" key ":[[:space:]]*" {
|
||||||
|
match($0, /^[[:space:]]*/)
|
||||||
|
print substr($0, 1, RLENGTH) key ": \"" value "\""
|
||||||
|
changed = 1
|
||||||
|
next
|
||||||
|
}
|
||||||
|
{ print }
|
||||||
|
END { exit changed ? 0 : 1 }
|
||||||
|
' "$file" > "$tmp_file"; then
|
||||||
|
/bin/rm -f "$tmp_file"
|
||||||
|
die "Expected key not found in ${file}: ${key}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
/bin/mv "$tmp_file" "$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
insert_yaml_key_after() {
|
||||||
|
local file=$1
|
||||||
|
local anchor=$2
|
||||||
|
local key=$3
|
||||||
|
local value
|
||||||
|
local tmp_file
|
||||||
|
|
||||||
|
value=$(yaml_escape "$4")
|
||||||
|
tmp_file=$(mktemp)
|
||||||
|
|
||||||
|
if ! awk -v anchor="$anchor" -v key="$key" -v value="$value" '
|
||||||
|
{
|
||||||
|
print
|
||||||
|
if (!inserted && $0 ~ "^[[:space:]]*" anchor ":[[:space:]]*") {
|
||||||
|
match($0, /^[[:space:]]*/)
|
||||||
|
print substr($0, 1, RLENGTH) key ": \"" value "\""
|
||||||
|
inserted = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END { exit inserted ? 0 : 1 }
|
||||||
|
' "$file" > "$tmp_file"; then
|
||||||
|
/bin/rm -f "$tmp_file"
|
||||||
|
die "Expected anchor not found in ${file}: ${anchor}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
/bin/mv "$tmp_file" "$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_defaults_devel() {
|
||||||
|
local file=$1
|
||||||
|
|
||||||
|
set_yaml_key "$file" script_dir_base "$SCRIPT_DIR_BASE"
|
||||||
|
if grep -Eq '^[[:space:]]*pipeline_workspace:[[:space:]]*' "$file"; then
|
||||||
|
set_yaml_key "$file" pipeline_workspace "$JENKINS_CLONE_FROM"
|
||||||
|
else
|
||||||
|
insert_yaml_key_after "$file" script_dir_base pipeline_workspace "$JENKINS_CLONE_FROM"
|
||||||
|
fi
|
||||||
|
set_yaml_key "$file" folder_prefix "$FOLDER_PREFIX"
|
||||||
|
set_yaml_key "$file" point_of_contact "$POINT_OF_CONTACT"
|
||||||
|
set_yaml_key "$file" slack_channel "$SLACK_CHANNEL"
|
||||||
|
}
|
||||||
|
|
||||||
|
find_lint_dir() {
|
||||||
|
if [[ -d "${DEST_DIR}/solaris/on/production" ]]; then
|
||||||
|
print -r -- "${DEST_DIR}/solaris/on/production"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "${DEST_DIR}/solaris/userland/sru" ]]; then
|
||||||
|
print -r -- "${DEST_DIR}/solaris/userland/sru"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
die "Unable to determine lint directory under ${DEST_DIR}/solaris"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_config() {
|
||||||
|
print -- "Parent workspace: ${PARENT_WS}"
|
||||||
|
print -- "Destination directory: ${DEST_DIR}"
|
||||||
|
print -- "Folder prefix: ${FOLDER_PREFIX}"
|
||||||
|
print -- "Point of contact: ${POINT_OF_CONTACT}"
|
||||||
|
print -- "Slack channel: ${SLACK_CHANNEL}"
|
||||||
|
print -- "Python executable: ${PYTHON_EXE}"
|
||||||
|
if [[ -n "$PYTHON_JENKINS_PATH" ]]; then
|
||||||
|
print -- "python-jenkins override: ${PYTHON_JENKINS_PATH}"
|
||||||
|
else
|
||||||
|
print -- "python-jenkins override: disabled"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
PARENT_WS="${MRSHUGHES_PARENT_WS:-$DEFAULT_PARENT_WS}"
|
||||||
|
DEST_DIR="${MRSHUGHES_DEST_DIR:-}"
|
||||||
|
FOLDER_PREFIX="${MRSHUGHES_FOLDER_PREFIX:-$DEFAULT_FOLDER_PREFIX}"
|
||||||
|
POINT_OF_CONTACT="${MRSHUGHES_POINT_OF_CONTACT:-$DEFAULT_POINT_OF_CONTACT}"
|
||||||
|
SLACK_CHANNEL="${MRSHUGHES_SLACK_CHANNEL:-$DEFAULT_SLACK_CHANNEL}"
|
||||||
|
PYTHON_EXE="${MRSHUGHES_PYTHON:-$DEFAULT_PYTHON}"
|
||||||
|
PYTHON_JENKINS_PATH="${MRSHUGHES_PYTHON_JENKINS_PATH:-}"
|
||||||
|
|
||||||
|
while getopts ":r:d:f:c:s:p:j:h" opt; do
|
||||||
|
case "$opt" in
|
||||||
|
r) PARENT_WS="$OPTARG" ;;
|
||||||
|
d) DEST_DIR="$OPTARG" ;;
|
||||||
|
f) FOLDER_PREFIX="$OPTARG" ;;
|
||||||
|
c) POINT_OF_CONTACT="$OPTARG" ;;
|
||||||
|
s) SLACK_CHANNEL="$OPTARG" ;;
|
||||||
|
p) PYTHON_EXE="$OPTARG" ;;
|
||||||
|
j) PYTHON_JENKINS_PATH="$OPTARG" ;;
|
||||||
|
h)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
:)
|
||||||
|
die "Missing argument for -$OPTARG"
|
||||||
|
;;
|
||||||
|
\?)
|
||||||
|
usage >&2
|
||||||
|
die "Unknown option: -$OPTARG"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
[[ $# -eq 0 ]] || die "Unexpected positional arguments: $*"
|
||||||
|
|
||||||
|
for command_name in hg awk sed mktemp grep make; do
|
||||||
|
require_command "$command_name"
|
||||||
|
done
|
||||||
|
|
||||||
PARENT_WS="${PARENT_WS%/}"
|
PARENT_WS="${PARENT_WS%/}"
|
||||||
|
REPO=${PARENT_WS##*/}
|
||||||
|
[[ -n "$DEST_DIR" ]] || DEST_DIR="${DEFAULT_DEST_ROOT}/${REPO}"
|
||||||
|
|
||||||
JENKINS_CLONE_FROM="ssh://${PARENT_WS##ssh://pnyc@}"
|
DEST_DIR=${~DEST_DIR:A}
|
||||||
FOLDER_PREFIX='PetrN/'
|
PYTHON_EXE=$(resolve_executable "$PYTHON_EXE")
|
||||||
POINT_OF_CONTACT='petr.nyc@oracle.com'
|
|
||||||
SLACK_CHANNEL='@pnyc'
|
|
||||||
DIR=$(pwd)
|
|
||||||
|
|
||||||
REPO=${PARENT_WS##*/} # userland11.4
|
if [[ -n "$PYTHON_JENKINS_PATH" ]]; then
|
||||||
SCRIPT_DIR_BASE=${PARENT_WS#*oracle.com/} # /workspace/pnyc/solaris-reviews/secure-integrate/userland11.4
|
PYTHON_JENKINS_PATH=${~PYTHON_JENKINS_PATH:A}
|
||||||
MV=/bin/mv
|
[[ -d "$PYTHON_JENKINS_PATH" ]] || die "Required directory not found: ${PYTHON_JENKINS_PATH}"
|
||||||
RM=/bin/rm
|
fi
|
||||||
CP=/bin/cp
|
|
||||||
CAT=/bin/cat
|
|
||||||
|
|
||||||
pwd
|
[[ ! -e "$DEST_DIR" ]] || die "Destination already exists: ${DEST_DIR}"
|
||||||
hg clone "$PARENT_WS"
|
|
||||||
pwd
|
|
||||||
cd "${DIR}/${REPO}"
|
|
||||||
pwd
|
|
||||||
|
|
||||||
source proxy on
|
JENKINS_CLONE_FROM=$PARENT_WS
|
||||||
$RM -rf venv
|
if [[ "$PARENT_WS" == ssh://* ]]; then
|
||||||
virtualenv -p /opt/homebrew/bin/python3.11 venv
|
JENKINS_CLONE_FROM="ssh://${${PARENT_WS#ssh://}#*@}"
|
||||||
source venv/bin/activate
|
ensure_clone_identity_loaded "${${PARENT_WS#ssh://}%%/*}"
|
||||||
pip install --upgrade pip
|
fi
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
echo '[alias]' >> .hg/hgrc
|
SCRIPT_DIR_BASE=$PARENT_WS
|
||||||
echo 'ci = ci -X Makefile.inc' >> .hg/hgrc
|
if [[ "$PARENT_WS" == *'//'* ]]; then
|
||||||
echo 'st = st -X Makefile.inc' >> .hg/hgrc
|
SCRIPT_DIR_BASE="/${PARENT_WS##*//}"
|
||||||
|
fi
|
||||||
|
|
||||||
tmpmake=$(mktemp)
|
print_config
|
||||||
sed 's:PYTHON3=python3.7:PYTHON3=python3.11:g' < Makefile.inc > "$tmpmake"
|
|
||||||
$MV "$tmpmake" Makefile.inc
|
|
||||||
|
|
||||||
|
print -- "Validating Mercurial access to ${PARENT_WS}"
|
||||||
|
hg identify "$PARENT_WS" >/dev/null
|
||||||
|
|
||||||
# set up pwd
|
print -- "Cloning ${PARENT_WS} into ${DEST_DIR}"
|
||||||
cd "${DIR}/${REPO}/common/etc"
|
mkdir -p "${DEST_DIR:h}"
|
||||||
$CP passwd.template passwd
|
hg clone "$PARENT_WS" "$DEST_DIR"
|
||||||
|
|
||||||
# set up dev defaults
|
cd "$DEST_DIR"
|
||||||
cd "${DIR}/${REPO}/common/jobs/"
|
|
||||||
cp defaults.devel.tmpl defaults.devel.yml
|
|
||||||
cp defaults.stage.tmpl defaults.stage.yml
|
|
||||||
|
|
||||||
$CAT > defaults_devel_patch <<- CATT
|
for required_path in \
|
||||||
9c9
|
requirements.txt \
|
||||||
< script_dir_base: "/workspace/pzahradn/jenkins/mrspatmore"
|
Makefile.inc \
|
||||||
---
|
common/tools/create_virtualenv \
|
||||||
> script_dir_base: "${SCRIPT_DIR_BASE=}"
|
common/etc/passwd.template \
|
||||||
11a12
|
common/jobs/defaults.devel.tmpl \
|
||||||
> pipeline_workspace: "${JENKINS_CLONE_FROM}"
|
common/jobs/defaults.stage.tmpl
|
||||||
14c15
|
do
|
||||||
< folder_prefix: "pez-" # Could be used to deploy the devel jobs to different jenkins folder
|
[[ -e "$required_path" ]] || die "Required path not found: ${DEST_DIR}/${required_path}"
|
||||||
---
|
done
|
||||||
> folder_prefix: "${FOLDER_PREFIX}" # Could be used to deploy the devel jobs to different jenkins folder
|
|
||||||
16c17
|
|
||||||
< point_of_contact: "petr.zahradnik@oracle.com"
|
|
||||||
---
|
|
||||||
> point_of_contact: "${POINT_OF_CONTACT}"
|
|
||||||
21c22
|
|
||||||
< slack_channel: "@pzahradn"
|
|
||||||
---
|
|
||||||
> slack_channel: "${SLACK_CHANNEL}"
|
|
||||||
CATT
|
|
||||||
|
|
||||||
|
[[ -x common/tools/create_virtualenv ]] || die "Required executable not found: ${DEST_DIR}/common/tools/create_virtualenv"
|
||||||
|
|
||||||
|
disable_proxy
|
||||||
|
/bin/rm -rf venv
|
||||||
|
|
||||||
patch -p0 defaults.devel.yml < defaults_devel_patch
|
if [[ -n "$PYTHON_JENKINS_PATH" ]]; then
|
||||||
|
print -- "Applying local python-jenkins override from ${PYTHON_JENKINS_PATH}"
|
||||||
|
apply_python_jenkins_override "$PYTHON_JENKINS_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
source proxy off
|
/usr/bin/env PATH="$PATH" /bin/bash -lc 'common/tools/create_virtualenv "$@"' bash "$PYTHON_EXE" requirements.txt venv
|
||||||
cd "${DIR}/${REPO}/solaris/userland/sru/"
|
|
||||||
make lint
|
|
||||||
|
|
||||||
|
{
|
||||||
|
print -- '[alias]'
|
||||||
|
print -- 'ci = ci -X Makefile.inc'
|
||||||
|
print -- 'st = st -X Makefile.inc'
|
||||||
|
} >> .hg/hgrc
|
||||||
|
|
||||||
|
tmp_makefile=$(mktemp)
|
||||||
|
sed 's:PYTHON3=python3.7:PYTHON3=python3.11:g' Makefile.inc > "$tmp_makefile"
|
||||||
|
/bin/mv "$tmp_makefile" Makefile.inc
|
||||||
|
|
||||||
|
/bin/cp common/etc/passwd.template common/etc/passwd
|
||||||
|
/bin/cp common/jobs/defaults.devel.tmpl common/jobs/defaults.devel.yml
|
||||||
|
/bin/cp common/jobs/defaults.stage.tmpl common/jobs/defaults.stage.yml
|
||||||
|
|
||||||
|
configure_defaults_devel common/jobs/defaults.devel.yml
|
||||||
|
|
||||||
|
LINT_DIR=$(find_lint_dir)
|
||||||
|
disable_proxy
|
||||||
|
cd "$LINT_DIR"
|
||||||
|
make FAKE_DEVEL_ENV=yes lint
|
||||||
|
|||||||
5
bin/deansi
Executable file
5
bin/deansi
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Remove ANSI escape sequences and ^M carriage return characters
|
||||||
|
|
||||||
|
perl -pe 's/\e\[[0-9;]*[mGKHF]//g; s/\r//g'
|
||||||
|
|
||||||
101
bin/lib/common.sh
Normal file
101
bin/lib/common.sh
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# common useful functions
|
||||||
|
|
||||||
|
w3m_safe() {
|
||||||
|
url="$1"
|
||||||
|
|
||||||
|
output=$(/opt/homebrew/bin/w3m "$url" -M -cols 400 -graph -dump 2>&1)
|
||||||
|
|
||||||
|
if echo "$output" | grep -q "Can't load"; then
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
echo "$output"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Returns:
|
||||||
|
# 0 = server reachable & remote command ran
|
||||||
|
# 1 = network/host-not-up-yet
|
||||||
|
# 2 = SSH auth failure (key needs passphrase / wrong key / agent locked) -> caller should abort
|
||||||
|
# 3 = host not found
|
||||||
|
is_server_up() {
|
||||||
|
local host err st err_lc
|
||||||
|
host=$1
|
||||||
|
|
||||||
|
# return 3 if the host does not exist
|
||||||
|
host "$host" 2>&1 > /dev/null || return 3
|
||||||
|
|
||||||
|
# Capture only stderr; do NOT use -q (it suppresses diagnostics we need to classify).
|
||||||
|
# Force English messages for stable matching.
|
||||||
|
err=$(LC_ALL=C /usr/bin/ssh \
|
||||||
|
-o BatchMode=yes \
|
||||||
|
-o PreferredAuthentications=publickey \
|
||||||
|
-o PubkeyAuthentication=yes \
|
||||||
|
-o PasswordAuthentication=no \
|
||||||
|
-o KbdInteractiveAuthentication=no \
|
||||||
|
-o NumberOfPasswordPrompts=0 \
|
||||||
|
-o ConnectTimeout=10 \
|
||||||
|
-o ServerAliveInterval=20 \
|
||||||
|
-o ServerAliveCountMax=3 \
|
||||||
|
-o ConnectionAttempts=1 \
|
||||||
|
-o StrictHostKeyChecking=no \
|
||||||
|
-o UserKnownHostsFile=/dev/null \
|
||||||
|
-o LogLevel=ERROR \
|
||||||
|
-n "$host" 'uname -n || hostname' 2>&1 >/dev/null)
|
||||||
|
st=$?
|
||||||
|
|
||||||
|
# Success
|
||||||
|
[ $st -eq 0 ] && return 0
|
||||||
|
|
||||||
|
# ssh uses 255 for any error; distinguish by stderr text
|
||||||
|
err_lc=$(printf '%s' "$err" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
|
case $err_lc in
|
||||||
|
# Common auth/passphrase/agent problems
|
||||||
|
*"permission denied"*|\
|
||||||
|
*"no supported authentication methods available"*|\
|
||||||
|
*"publickey authentication failed"*|\
|
||||||
|
*"too many authentication failures"*|\
|
||||||
|
*"sign_and_send_pubkey: signing failed"*|\
|
||||||
|
*"agent refused operation"*|\
|
||||||
|
*"agent admitted failure"*|\
|
||||||
|
*"bad permissions"*|\
|
||||||
|
*"enter passphrase"*)
|
||||||
|
printf 'FATAL: SSH authentication failed for "%s": %s\n' "$host" "$err" >&2
|
||||||
|
return 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Everything else looks like "not up yet" (timeout, DNS, connection refused/reset, kex read, etc.)
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_server_to_boot_up() {
|
||||||
|
local server rc
|
||||||
|
server=$1
|
||||||
|
while :; do
|
||||||
|
is_server_up "$server"
|
||||||
|
rc=$?
|
||||||
|
case $rc in
|
||||||
|
0)
|
||||||
|
printf '"%s" is up and running.\n' "$server"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
printf 'Aborting: SSH authentication failed for "%s" (key needs passphrase / wrong key / agent locked).\n' "$server" >&2
|
||||||
|
return 2
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
printf 'Aborting: Host not found.\n' "$server" >&2
|
||||||
|
return 3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf 'Server "%s" is not up\n' "$server"
|
||||||
|
sleep 10
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 tw=0 noet ft=sh:
|
||||||
45
bin/lib/logging.sh
Normal file
45
bin/lib/logging.sh
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# exec &> >(tee -a "${SYSLOG}")
|
||||||
|
# exec &> >(tee -a "${APPLOG}")
|
||||||
|
|
||||||
|
trap 'exit 1' HUP INT QUIT TERM
|
||||||
|
|
||||||
|
# trap 'on_error' EXIT
|
||||||
|
|
||||||
|
log::prefix() {
|
||||||
|
date=$(/opt/homebrew/bin/gdate '+%Y-%m-%d %H:%M:%S,%3N')
|
||||||
|
printf '%s %s\n' "${date}" "${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log::notice() {
|
||||||
|
log::info "==> ${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log::info() {
|
||||||
|
log::prefix "INFO ${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log::debug() {
|
||||||
|
log::prefix "DEBUG ${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log::warning() {
|
||||||
|
log::prefix "WARNING ${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
log::error() {
|
||||||
|
log::prefix "ERROR ${*}" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
log::fatal() {
|
||||||
|
reason="${1-Unknown or not specified}"
|
||||||
|
log::error "Fatal error. Reason: ${reason}"
|
||||||
|
kill -s TERM $$
|
||||||
|
}
|
||||||
|
|
||||||
|
on_error() {
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
log::fatal "Unhandled script failure"
|
||||||
|
fi
|
||||||
|
}
|
||||||
@@ -3,6 +3,14 @@
|
|||||||
# when the first positional command line parameter is 'on'
|
# when the first positional command line parameter is 'on'
|
||||||
# and unsets them when the first positional command line parameter is 'off'
|
# and unsets them when the first positional command line parameter is 'off'
|
||||||
#
|
#
|
||||||
|
# proxy locations are documented at:
|
||||||
|
# https://confluence.oraclecorp.com/confluence/pages/viewpage.action?spaceKey=CORPNET&title=Corporate+Proxy+Environment
|
||||||
|
#
|
||||||
|
# this will get the first defined proxy from the PAC file:
|
||||||
|
# WPAD=http://wpad.oraclecorp.com/wpad.dat
|
||||||
|
# L_PROXY=$(curl -s "$WPAD" | \
|
||||||
|
# grep 'proxies =' | sed -n 's/^[^"]*"\(.*\)".*/\1/p' | \
|
||||||
|
# tr ';' '\n' | grep 'PROXY' | head -1 | sed 's/PROXY //')
|
||||||
#
|
#
|
||||||
# usage:
|
# usage:
|
||||||
# source proxy off
|
# source proxy off
|
||||||
|
|||||||
492
bin/retag-email
Executable file
492
bin/retag-email
Executable file
@@ -0,0 +1,492 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#
|
||||||
|
# script to tag notmuch emails based on my preference
|
||||||
|
#
|
||||||
|
# inspired by https://forsooth.org/posts/email-in-spacemacs/index.html
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# tags: important solaris oci osd
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
notmuch tag +sent -unread 'folder:/[Ss]ent.*/'
|
||||||
|
|
||||||
|
notmuch tag +me to:petr.nyc@oracle.com
|
||||||
|
|
||||||
|
# idea for logic
|
||||||
|
# sort by projects, don't unset new/read tag
|
||||||
|
# at the very bottom, unset the new/read tag based on if I'm interested in the latest
|
||||||
|
# status for the project / logs for the project and so on - good for stepping for someone
|
||||||
|
|
||||||
|
# General sorting rules not specific to projects
|
||||||
|
################################################################################
|
||||||
|
notmuch tag +important -- \
|
||||||
|
tag:new AND "
|
||||||
|
(
|
||||||
|
subject:/[Cc]omplete.*[Tt]raining/ OR
|
||||||
|
subject:/.*Reminder:?/ OR
|
||||||
|
from:elanor.cz OR
|
||||||
|
from:payroll_cz OR
|
||||||
|
from:instructor.cz OR
|
||||||
|
subject:Expense Report Approval OR
|
||||||
|
subject:/[Aa]ction.[Nn]eeded/ OR
|
||||||
|
from:permissions.oci.oraclecloud.com
|
||||||
|
)"
|
||||||
|
notmuch tag +general \
|
||||||
|
tag:new AND "(
|
||||||
|
subject:'Oracle Open Roles' OR
|
||||||
|
from:tania.c.cortez OR
|
||||||
|
from:info@eduagroup.cz OR
|
||||||
|
subject:'FYI: Expense Reimbursement'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +calendar \
|
||||||
|
tag:new AND mimetype:text/calendar
|
||||||
|
|
||||||
|
|
||||||
|
# Solaris
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# general solaris
|
||||||
|
notmuch tag +solaris +logs +mrspatmore -- \
|
||||||
|
tag:new AND "(
|
||||||
|
subject:/.*BugDB.*release.deployment/ OR
|
||||||
|
subject:import/sig_ci/mercurial/mrspatmore OR
|
||||||
|
(from:vcap_admin_ww_grp AND subject:/WARNING:|INFO:/)
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +solaris +logs \
|
||||||
|
tag:new AND 'subject:Next IDR ID is'
|
||||||
|
notmuch tag +solaris \
|
||||||
|
tag:new AND "(
|
||||||
|
from:deirdre.williams@oracle.com AND subject:'Sustaining Meeting'
|
||||||
|
)"
|
||||||
|
|
||||||
|
# phabricator
|
||||||
|
notmuch tag +phabricator +logs -me \
|
||||||
|
tag:new AND \
|
||||||
|
from:noreply@scapen-phabricator.us.oracle.com
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru +on \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND
|
||||||
|
subject:/rONCLOSED|rONMAN|rONSRC/ and subject:/11.3/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru +userland \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND
|
||||||
|
subject:/\[Diffusion\].*rUSERLAND.*11\.3/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +userland -unread -inbox \
|
||||||
|
tag:new AND "(
|
||||||
|
from:mailman-owner@userland.us.oracle.com
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +s11u4-sru +userland \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND
|
||||||
|
subject:/\[Diffusion\].*rUSERLAND.*11\.4/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +mrspatmore \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND \
|
||||||
|
subject:/\[Diffusion\].*rMRSPATMORE/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +mrspatmore \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND \
|
||||||
|
subject:/\[Diffusion\].*rREJENKINSLIB/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +IPS \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:phabricator AND \
|
||||||
|
( ( subject:/\[Differential\]/ and body:REPOSITORY NEAR/1 rPKG ) OR
|
||||||
|
( subject:/\[Diffusion\]/ and body:COMMITS NEAR rPKG )
|
||||||
|
)
|
||||||
|
)"
|
||||||
|
|
||||||
|
# akidr
|
||||||
|
notmuch tag +akidr +logs -unread \
|
||||||
|
tag:new AND "(
|
||||||
|
from:vcap_admin_ww_grp AND
|
||||||
|
subject:'Docker with ARU uploadcli has been automatically frozen'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +akidr \
|
||||||
|
tag:new AND "(
|
||||||
|
to:'bot@artas' OR
|
||||||
|
from:'bot@artas' OR
|
||||||
|
to:'fishworks-gk_ww_grp@oracle.com' OR
|
||||||
|
subject:'PASS s11_4aksruidr' OR
|
||||||
|
subject:'Build started for AK IDR' OR
|
||||||
|
subject:'New AK IDR request for'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +akidr +logs -unread \
|
||||||
|
tag:new AND "(
|
||||||
|
from:'vcap_admin_ww_grp@oracle.com' AND \
|
||||||
|
subject:'ARU Uploads has been frozen for' AND \
|
||||||
|
subject:'this is a reminder please review'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +akidr +logs +important \
|
||||||
|
tag:new AND "(
|
||||||
|
(from:sig-devops_ww_grp OR from:adam.paul) AND \
|
||||||
|
subject:/8\.\8.*idr.*DC.*has.failed/
|
||||||
|
)"
|
||||||
|
|
||||||
|
|
||||||
|
# WebRTI
|
||||||
|
notmuch tag +webrti \
|
||||||
|
tag:new AND "(
|
||||||
|
body:Consolidation: AND
|
||||||
|
body:RTI: AND
|
||||||
|
subject:WebRTI:
|
||||||
|
)"
|
||||||
|
notmuch tag +important \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:webrti AND
|
||||||
|
to:petr.nyc and
|
||||||
|
subject:/NEED.APPROVAL.*WebRTI/
|
||||||
|
)"
|
||||||
|
|
||||||
|
|
||||||
|
# BugDB
|
||||||
|
notmuch tag +bugdb \
|
||||||
|
tag:new AND "(
|
||||||
|
from:ociapp-notifications and subject:/ER|Bug/
|
||||||
|
)"
|
||||||
|
|
||||||
|
# ON
|
||||||
|
notmuch tag +on tag:new AND "(tag:webrti AND body:Consolidation: NEAR/1 on"
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru tag:new AND "(tag:webrti AND tag:on AND body:Gates: S11.SRU.Sustaining)"
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru tag:new AND "(subject:/Solaris.*11.3.*[Rr]eleased/)"
|
||||||
|
notmuch tag +s11u4-sru tag:new AND "(subject:/Solaris.*11.4.*[Rr]eleased/)"
|
||||||
|
|
||||||
|
notmuch tag +s11u4-sru +logs +on \
|
||||||
|
tag:new and 'from:/root@sig-on-sru11-3-[xs]01/'
|
||||||
|
|
||||||
|
notmuch tag +s11u4-sru tag:new AND "(
|
||||||
|
tag:webrti AND tag:on AND body:Gates: 11.4-SRU
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +pushlog \
|
||||||
|
tag:new AND \
|
||||||
|
subject:'/export.on-gate.*push/'
|
||||||
|
|
||||||
|
notmuch tag +on +trunk \
|
||||||
|
tag:new AND "(
|
||||||
|
to:gk@hubbins OR to:gatekeeper@hubbins OR to:hg@hubbins OR
|
||||||
|
from:gatekeeper@hubbins
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +important \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:on and subject:error and (from:gatekeeper@hubbins or to:gatekeeper@hubbins)
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +important +s11u4-sru +on \
|
||||||
|
tag:new AND "(
|
||||||
|
from:sig-devops_ww_grp AND
|
||||||
|
subject:/INPUT.NEEDED.*11.4|s11u4_sust.*Ready.for/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +trunk \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:on AND tag:pushlog body:Branch: default
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru tag:new AND "(
|
||||||
|
tag:on AND tag:pushlog body:Branch: s11u3-sru
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +trunk +logs \
|
||||||
|
tag:new AND \
|
||||||
|
'(to:gk-builds@hubbins.us.oracle.com OR to:gk-splice-builds@hubbins.us.oracle.com) AND body:"Build summary"'
|
||||||
|
|
||||||
|
notmuch tag +on +trunk +logs -unread \
|
||||||
|
tag:new AND "(
|
||||||
|
from:noaccess AND
|
||||||
|
subject:/boston|eleven|hopper|on-gate-test|severin|smalls|stumpy|zero/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +trunk +jenkins tag:new AND to:gk-jenkins@hubbins.us.oracle.com
|
||||||
|
notmuch tag +on +trunk +logs \
|
||||||
|
tag:new AND "(
|
||||||
|
(to:gk@hubbins.us.oracle.com and subject:'zpool report for') OR
|
||||||
|
(to:on-parfait@hubbins and subject:'Parfait Differences')
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +s11u4-sru +logs +important \
|
||||||
|
tag:new AND "(
|
||||||
|
from:gk@hubbins.us.oracle.com AND
|
||||||
|
subject:'New SRU branch from trunk'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +trunk +s11u4-sru +s11u3-sru +logs +important \
|
||||||
|
tag:new AND subject:on-repo-hooks
|
||||||
|
|
||||||
|
notmuch tag +on +s11u4-sru +important +logs \
|
||||||
|
tag:new AND 'subject:/URGENT:.production.build-11.4.*/'
|
||||||
|
|
||||||
|
notmuch tag +on +pushlog \
|
||||||
|
tag:new AND to:hubbins AND 'subject:/.export\/on-gate.*push/'
|
||||||
|
|
||||||
|
notmuch tag +on +s11u4-sru +important +logs \
|
||||||
|
tag:new AND subject:"fail" AND subject:"Solaris_11/11.4/ON" AND subject:"11.4"
|
||||||
|
|
||||||
|
notmuch tag +on +s11u4-sru +important +logs \
|
||||||
|
tag:new AND subject:"fail" AND 'subject:/on-11u4-bld/'
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
tag:new AND "(
|
||||||
|
from:s11autoport_grp@oracle.com AND
|
||||||
|
(subject:'periodic GKAP push analysis') or subject:'GK Backport testing has completed'
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
"tag:new AND tag:inbox AND (subject:GKAP or subject:GKAB)"
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
"tag:new AND to:rpe_gk_backport_ww_grp and subject:/pass.*on11u4.*scapen/"
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
"tag:new AND from:blduser@bld.us.oracle.com AND to:rpe_gk_backport_ww_grp"
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
"tag:new AND from:rpe_sme_ww_grp AND NOT
|
||||||
|
(subject:/INTERIM.GK.Backport.*/ OR subject:/New.GK.backport.testing.has.started/ OR
|
||||||
|
subject:/^.*GK.Backport.testing.has.completed/ OR
|
||||||
|
subject:/INTERIM.GK.Backport.report.for/)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
tag:new AND from:rpe_sme_ww_grp@oracle.com AND subject:"/INTERIM.GK.Backport.report.for.GKAP_11.4.*/"
|
||||||
|
|
||||||
|
# notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
# "tag:new AND subject:/.*Build.*GKAB.*Completed/"
|
||||||
|
|
||||||
|
# notmuch tag +on +gkap +logs +s11u4-sru \
|
||||||
|
# "tag:new AND from:rpe_gk_backport_ww_grp AND (subject:pass or subject:successfull or subject:successful)"
|
||||||
|
|
||||||
|
|
||||||
|
notmuch tag +on +logs +s11u4-sru \
|
||||||
|
tag:new AND "(
|
||||||
|
subject:/on-gate.s11u4..*.packages.ready/ OR
|
||||||
|
subject:/pass:.*Solaris_11/11.4/ON/production.build-11.4.*/ OR
|
||||||
|
subject:/^pass.*11.4..*.11.4.*..on-11u4-bld-[xs]./
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +solaris +logs -unread \
|
||||||
|
tag:new AND 'subject:/\[\/var\/tmp\/repo_cache\/PKG\]/'
|
||||||
|
|
||||||
|
notmuch tag +on +important \
|
||||||
|
tag:new AND \
|
||||||
|
to:solaris_sru_gk_ww_grp AND \
|
||||||
|
subject:FAILED
|
||||||
|
|
||||||
|
# userland
|
||||||
|
notmuch tag +userland tag:new AND "subject:GATE OPEN" AND "from:solaris_sru_gk_ww_grp" AND body:userland
|
||||||
|
notmuch tag +userland tag:new AND tag:webrti AND "body:/Consolidation.*userland/"
|
||||||
|
notmuch tag +s11u4-sru tag:new AND tag:userland AND tag:webrti AND body:"/Gates:.*S11.4-SRU/"
|
||||||
|
notmuch tag +trunk tag:new AND tag:userland AND tag:webrti AND body:"/Gates:.*solaris-trunk/"
|
||||||
|
notmuch tag +userland tag:new AND to:userland-s11-sru-notify
|
||||||
|
notmuch tag +s11u3-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:userland AND \
|
||||||
|
subject:'push to s11u3-sru'
|
||||||
|
notmuch tag +s11u4-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:userland AND \
|
||||||
|
subject:'/.*push.to.s11u4_sust.*/'
|
||||||
|
|
||||||
|
|
||||||
|
# cluster
|
||||||
|
notmuch tag +cluster \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:webrti AND (body:Consolidation: sc-geo or body:Consolidation: suncluster) OR
|
||||||
|
subject:'SC4.4 SRU Nightly' OR from:'SC Build Engineering'
|
||||||
|
)"
|
||||||
|
notmuch tag +important \
|
||||||
|
tag:new AND \
|
||||||
|
tag:cluster and 'subject:/[Ff]ail/'
|
||||||
|
|
||||||
|
# IPS
|
||||||
|
notmuch tag +IPS \
|
||||||
|
tag:new AND \
|
||||||
|
subject:'[Differential]' AND body:'rPKG Solaris Image Packaging System'
|
||||||
|
|
||||||
|
# RE
|
||||||
|
notmuch tag +RE \
|
||||||
|
tag:new AND "(
|
||||||
|
to:solaris-re_us_grp OR
|
||||||
|
to:ips_tracker_support_ww_grp OR
|
||||||
|
from:ips_tracker_support_ww_grp
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:re AND \
|
||||||
|
'subject:/Oracle.Solaris.11\.3/'
|
||||||
|
|
||||||
|
notmuch tag +RE +s11u4-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:RE AND \
|
||||||
|
'subject:/.*IDRs.*s11_4sru.*/'
|
||||||
|
|
||||||
|
notmuch tag +s11u4-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:RE AND \
|
||||||
|
'subject:/RTI.*withdrawal.notification/' AND \
|
||||||
|
body:'11.4'
|
||||||
|
|
||||||
|
notmuch tag +s11u4-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:RE AND \
|
||||||
|
'subject:/S11.4.*repo.ready.for.testing/'
|
||||||
|
|
||||||
|
|
||||||
|
notmuch tag +s11u3-sru \
|
||||||
|
tag:new AND \
|
||||||
|
tag:RE AND \
|
||||||
|
'subject:/.*IDRs.*s11_3sru.*/'
|
||||||
|
|
||||||
|
notmuch tag +cluster \
|
||||||
|
tag:new AND \
|
||||||
|
tag:re AND \
|
||||||
|
'(subject:/.*IDRs.*cluster.*/ OR subject:/SRU.Build.Package.Profile.successfully.created.for.solariscluster.*/)'
|
||||||
|
|
||||||
|
notmuch tag +akidr \
|
||||||
|
tag:new AND \
|
||||||
|
tag:RE AND \
|
||||||
|
'subject:/.*Tracker.FYI.*IDR.*state.change/'
|
||||||
|
|
||||||
|
notmuch tag +RE s11u4-sru \
|
||||||
|
tag:new AND \
|
||||||
|
subject:'[Differential]' AND body:'Repository rRETRUNK Release Engineering Trunk Gate'
|
||||||
|
|
||||||
|
notmuch tag +RE +logs -unread \
|
||||||
|
tag:new AND "(
|
||||||
|
from:noaccess AND
|
||||||
|
subject:/ipkg[1-9]/
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +solaris \
|
||||||
|
tag:new AND "(
|
||||||
|
tag:akidr OR
|
||||||
|
tag:bugdb OR
|
||||||
|
tag:cluster OR
|
||||||
|
tag:IPS OR
|
||||||
|
tag:on OR
|
||||||
|
tag:phabricator OR
|
||||||
|
tag:RE OR
|
||||||
|
tag:trunk OR
|
||||||
|
tag:userland OR
|
||||||
|
tag:webrti
|
||||||
|
)"
|
||||||
|
|
||||||
|
# end of Solaris
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# OCI / OSD
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# seatch term to include in each search
|
||||||
|
# commented out for debugging
|
||||||
|
# ST='tag:new'
|
||||||
|
ST="date:1/1/2026.."
|
||||||
|
|
||||||
|
notmuch tag +osd \
|
||||||
|
"$ST" AND "(
|
||||||
|
to:osd-devops_ww_grp@oracle.com OR \
|
||||||
|
subject:[gbu confluence]
|
||||||
|
)"
|
||||||
|
|
||||||
|
notmuch tag +osd +brownbag \
|
||||||
|
"$ST" AND 'subject:/[Bb]rown.[Bb]ag/'
|
||||||
|
notmuch tag +deployment-ticket "$ST" AND tag:osd AND subject:"New OSD deployment ticket:"
|
||||||
|
notmuch tag +ocean-incident "$ST" AND tag:osd AND subject:"[Ocean Incident]"
|
||||||
|
notmuch tag +alarm "$ST" AND tag:osd AND subject:'Alarm: '
|
||||||
|
notmuch tag +osd "$ST" AND subject:'InfraCloud JIRA'
|
||||||
|
notmuch tag +osd +sgd \
|
||||||
|
"$ST" AND subject:'SGD'
|
||||||
|
notmuch tag +oci +announcement \
|
||||||
|
"$ST" AND subject:'A PSA'
|
||||||
|
# PRs for approval
|
||||||
|
notmuch tag +osd +PRs \
|
||||||
|
"$ST" AND subject:'ACTION REQUIRED - Peer approval needed for Change Request' AND \
|
||||||
|
body:'/Service Owner:.*Desktop as a Service/'
|
||||||
|
# PRs from other projects
|
||||||
|
notmuch tag +oci +CCAT-PRs \
|
||||||
|
"$ST" AND \
|
||||||
|
subject:'ACTION REQUIRED - Peer approval needed for Change Request' AND \
|
||||||
|
body:'/Service Owner:Compute Cloud at Customer/'
|
||||||
|
|
||||||
|
# OCI production regions
|
||||||
|
notmuch tag +oci +osd +important +region-ga \
|
||||||
|
"$ST" AND \
|
||||||
|
"from:/OCI-REGION-BUILD.*/"
|
||||||
|
|
||||||
|
# Change Freeze
|
||||||
|
notmuch tag +oci +important +changefreeze \
|
||||||
|
"$ST" AND \
|
||||||
|
"subject:/Oracle.Change.Management.Alert/"
|
||||||
|
|
||||||
|
|
||||||
|
# ODAAS Deployments Calendar
|
||||||
|
notmuch tag +osd +calendar \
|
||||||
|
"$ST" AND \
|
||||||
|
"subject:/\[confluence\].*created.a.new|updated.a.*event.in.the.*OSD.RE.Deployments.*calendar/"
|
||||||
|
|
||||||
|
# ODAAS PRs
|
||||||
|
notmuch tag +osd +PRs\
|
||||||
|
"$ST" AND \
|
||||||
|
"subject:/ODAAS\/.*Pull.request.*:/"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
notmuch tag +oci tag:new AND tag:osd
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# I don't want these in my focused inbox
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# passed logs for on trunk
|
||||||
|
notmuch tag -inbox -unread tag:on AND tag:trunk AND tag:logs AND subject:"pass"
|
||||||
|
|
||||||
|
# trunk RTIs,pushlog,jenkins logs
|
||||||
|
notmuch tag -inbox -unread tag:trunk and tag:webrti
|
||||||
|
notmuch tag -inbox -unread tag:on AND tag:trunk AND tag:pushlog
|
||||||
|
notmuch tag -inbox -unread tag:on AND tag:trunk AND tag:jenkins
|
||||||
|
|
||||||
|
# ON GKAP notifications
|
||||||
|
notmuch tag -inbox -unread tag:new AND tag:gkap AND tag:logs and not subject:failed
|
||||||
|
|
||||||
|
# osd ocean incidents, alarms
|
||||||
|
notmuch tag -inbox -unread tag:osd AND '(tag:ocean-incident or tag:alarm)'
|
||||||
|
|
||||||
|
|
||||||
|
# emails with subject:"REGION BUILD ALERT]" are important to watch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================================================
|
||||||
|
# the very last part of this - remove the new tag
|
||||||
|
notmuch tag -new tag:new
|
||||||
67
bin/ul11u4_build.sh
Executable file
67
bin/ul11u4_build.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0
|
||||||
|
|
||||||
|
BINDIR=$(dirname "$PRG")
|
||||||
|
typeset -r BINDIR
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
|
||||||
|
|
||||||
|
W3M=/opt/homebrew/bin/w3m
|
||||||
|
AWK=/usr/bin/awk
|
||||||
|
CURL=/usr/bin/curl
|
||||||
|
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
TARGET="${1-11.4.88.0.1.207.1}"
|
||||||
|
hg_branch="s11u4_sust_087"
|
||||||
|
log::info "TARGET:${TARGET}"
|
||||||
|
|
||||||
|
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}"
|
||||||
|
log::debug $URL
|
||||||
|
|
||||||
|
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1)
|
||||||
|
|
||||||
|
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF')
|
||||||
|
|
||||||
|
if [[ -z "$out" ]];
|
||||||
|
then
|
||||||
|
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
log::info "Starting build for for Ul11u4SRU"
|
||||||
|
log::info "Target: \"${TARGET}\""
|
||||||
|
|
||||||
|
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea'
|
||||||
|
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/'
|
||||||
|
|
||||||
|
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters"
|
||||||
|
|
||||||
|
log::info "Using '${JOB_URL}'"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
curl -X POST "${JOB_URL}" \
|
||||||
|
--user "pnyc:${JENKINS_TOKEN}" \
|
||||||
|
--data-urlencode "Build_Label=${TARGET}" \
|
||||||
|
--data-urlencode "hg_branch=${hg_branch}" \
|
||||||
|
--data-urlencode "hguser=petr.nyc@oracle.com" \
|
||||||
|
--data-urlencode "verbose=true" \
|
||||||
|
--data-urlencode "debug=true" \
|
||||||
|
--data-urlencode "scriptdir=./solaris/userland/sru/" \
|
||||||
|
--data-urlencode "do_check_sru_cbe=true" \
|
||||||
|
--data-urlencode "prepare_work_area=true" \
|
||||||
|
--data-urlencode "do_build=true" \
|
||||||
|
--data-urlencode "merge_repo=true" \
|
||||||
|
--data-urlencode "create_sparse_repo=true" \
|
||||||
|
--data-urlencode "check_incorporations=true" \
|
||||||
|
--data-urlencode "zip_sparse_repo=true" \
|
||||||
|
--data-urlencode "create_escrow=true" \
|
||||||
|
--data-urlencode "create_foss=true" \
|
||||||
|
--data-urlencode "integration_dryrun=false" \
|
||||||
|
--data-urlencode "confirm_before_ingegration=false" \
|
||||||
|
--data-urlencode "wait_for_dock_open=true" \
|
||||||
|
--data-urlencode "delivery=true"
|
||||||
|
|
||||||
|
log::info "The job will be started here:"
|
||||||
|
log::info " ${JOB_URL%%buildWith*}"
|
||||||
67
bin/ul11u4_delivery_and_integrate.sh
Executable file
67
bin/ul11u4_delivery_and_integrate.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0
|
||||||
|
|
||||||
|
BINDIR=$(dirname "$PRG")
|
||||||
|
typeset -r BINDIR
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
|
||||||
|
|
||||||
|
W3M=/opt/homebrew/bin/w3m
|
||||||
|
AWK=/usr/bin/awk
|
||||||
|
CURL=/usr/bin/curl
|
||||||
|
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
TARGET="${1-11.4.83.0.1.195.1}"
|
||||||
|
hg_branch="s11u4_sust_084"
|
||||||
|
log::info "TARGET:${TARGET}"
|
||||||
|
|
||||||
|
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}"
|
||||||
|
log::debug $URL
|
||||||
|
|
||||||
|
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1)
|
||||||
|
|
||||||
|
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF')
|
||||||
|
|
||||||
|
if [[ -z "$out" ]];
|
||||||
|
then
|
||||||
|
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
log::info "Starting build for for Ul11u4SRU"
|
||||||
|
log::info "Target: \"${TARGET}\""
|
||||||
|
|
||||||
|
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea'
|
||||||
|
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/'
|
||||||
|
|
||||||
|
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters"
|
||||||
|
|
||||||
|
log::info "Using '${JOB_URL}'"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
curl -X POST "${JOB_URL}" \
|
||||||
|
--user "pnyc:${JENKINS_TOKEN}" \
|
||||||
|
--data-urlencode "Build_Label=${TARGET}" \
|
||||||
|
--data-urlencode "hg_branch=${hg_branch}" \
|
||||||
|
--data-urlencode "hguser=petr.nyc@oracle.com" \
|
||||||
|
--data-urlencode "verbose=true" \
|
||||||
|
--data-urlencode "debug=true" \
|
||||||
|
--data-urlencode "scriptdir=./solaris/userland/sru/" \
|
||||||
|
--data-urlencode "do_check_sru_cbe=false" \
|
||||||
|
--data-urlencode "prepare_work_area=false" \
|
||||||
|
--data-urlencode "do_build=false" \
|
||||||
|
--data-urlencode "merge_repo=true" \
|
||||||
|
--data-urlencode "create_sparse_repo=true" \
|
||||||
|
--data-urlencode "check_incorporations=true" \
|
||||||
|
--data-urlencode "zip_sparse_repo=true" \
|
||||||
|
--data-urlencode "create_escrow=true" \
|
||||||
|
--data-urlencode "create_foss=true" \
|
||||||
|
--data-urlencode "integration_dryrun=false" \
|
||||||
|
--data-urlencode "confirm_before_ingegration=false" \
|
||||||
|
--data-urlencode "wait_for_dock_open=true" \
|
||||||
|
--data-urlencode "delivery=true"
|
||||||
|
|
||||||
|
log::info "The job will be started here:"
|
||||||
|
log::info " ${JOB_URL%%buildWith*}"
|
||||||
59
bin/ul11u4_gate_open.sh
Executable file
59
bin/ul11u4_gate_open.sh
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# set -x
|
||||||
|
|
||||||
|
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0
|
||||||
|
|
||||||
|
BINDIR=$(dirname "$PRG")
|
||||||
|
typeset -r BINDIR
|
||||||
|
|
||||||
|
W3M=/opt/homebrew/bin/w3m
|
||||||
|
AWK=/usr/bin/awk
|
||||||
|
CURL=/usr/bin/curl
|
||||||
|
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
|
||||||
|
TARGET="${1-11.4.88.0.1.207.1}"
|
||||||
|
|
||||||
|
log::info "TARGET:${TARGET}"
|
||||||
|
|
||||||
|
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=1&target=${TARGET}"
|
||||||
|
|
||||||
|
log::debug $URL
|
||||||
|
|
||||||
|
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1)
|
||||||
|
|
||||||
|
out=$(echo "$output" | awk '/^Details.*Consolidation/ {found=1; next} found')
|
||||||
|
|
||||||
|
if [[ -z "$out" ]];
|
||||||
|
then
|
||||||
|
# log::debug "output: ### $out ###"
|
||||||
|
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
log::info "Opening the gate for ${TARGET}"
|
||||||
|
|
||||||
|
log::debug "Starting gate open for Ul11u4SRU"
|
||||||
|
log::debug "Target: \"${TARGET}\""
|
||||||
|
|
||||||
|
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea'
|
||||||
|
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/'
|
||||||
|
|
||||||
|
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-gate-open-11.4/buildWithParameters"
|
||||||
|
|
||||||
|
log::info "Using '${JOB_URL}'"
|
||||||
|
|
||||||
|
$CURL -X POST "${JOB_URL}" \
|
||||||
|
--user "pnyc:${JENKINS_TOKEN}" \
|
||||||
|
--data-urlencode "Build_Label=${TARGET}" \
|
||||||
|
--data-urlencode "hguser=petr.nyc@oracle.com" \
|
||||||
|
--data-urlencode "dryrun=false" \
|
||||||
|
--data-urlencode "verbose=true" \
|
||||||
|
--data-urlencode "debug=true" \
|
||||||
|
--data-urlencode "scriptdir=./solaris/userland/sru/" \
|
||||||
|
--data-urlencode "do_gate_open=true"
|
||||||
|
|
||||||
|
log::info "The job will be started here:"
|
||||||
|
log::info " ${JOB_URL%%buildWith*}"
|
||||||
65
bin/ul11u4_integrate.sh
Executable file
65
bin/ul11u4_integrate.sh
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0
|
||||||
|
|
||||||
|
BINDIR=$(dirname "$PRG")
|
||||||
|
typeset -r BINDIR
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
|
||||||
|
|
||||||
|
W3M=/opt/homebrew/bin/w3m
|
||||||
|
AWK=/usr/bin/awk
|
||||||
|
CURL=/usr/bin/curl
|
||||||
|
|
||||||
|
source "${BINDIR}/lib/logging.sh"
|
||||||
|
TARGET="${1-11.4.83.0.1.195.1}"
|
||||||
|
log::info "TARGET:${TARGET}"
|
||||||
|
|
||||||
|
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}"
|
||||||
|
log::debug $URL
|
||||||
|
|
||||||
|
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1)
|
||||||
|
|
||||||
|
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF')
|
||||||
|
|
||||||
|
if [[ -z "$out" ]];
|
||||||
|
then
|
||||||
|
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
log::info "Starting build for for Ul11u4SRU"
|
||||||
|
log::info "Target: \"${TARGET}\""
|
||||||
|
|
||||||
|
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea'
|
||||||
|
JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/'
|
||||||
|
|
||||||
|
JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters"
|
||||||
|
|
||||||
|
log::info "Using '${JOB_URL}'"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
curl -X POST "${JOB_URL}" \
|
||||||
|
--user "pnyc:${JENKINS_TOKEN}" \
|
||||||
|
--data-urlencode "Build_Label=${TARGET}" \
|
||||||
|
--data-urlencode "hguser=petr.nyc@oracle.com" \
|
||||||
|
--data-urlencode "verbose=true" \
|
||||||
|
--data-urlencode "debug=true" \
|
||||||
|
--data-urlencode "scriptdir=./solaris/userland/sru/" \
|
||||||
|
--data-urlencode "do_check_sru_cbe=false" \
|
||||||
|
--data-urlencode "prepare_work_area=false" \
|
||||||
|
--data-urlencode "do_build=false" \
|
||||||
|
--data-urlencode "merge_repo=false" \
|
||||||
|
--data-urlencode "create_sparse_repo=false" \
|
||||||
|
--data-urlencode "check_incorporations=false" \
|
||||||
|
--data-urlencode "zip_sparse_repo=false" \
|
||||||
|
--data-urlencode "create_escrow=false" \
|
||||||
|
--data-urlencode "create_foss=false" \
|
||||||
|
--data-urlencode "integration_dryrun=false" \
|
||||||
|
--data-urlencode "confirm_before_ingegration=false" \
|
||||||
|
--data-urlencode "wait_for_dock_open=true" \
|
||||||
|
--data-urlencode "delivery=true"
|
||||||
|
|
||||||
|
log::info "The job will be started here:"
|
||||||
|
log::info " ${JOB_URL%%buildWith*}"
|
||||||
82
bootstrap.sh
Executable file
82
bootstrap.sh
Executable file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
check_installed() {
|
||||||
|
_pkgs=("$@")
|
||||||
|
all_installed=true
|
||||||
|
for pkg in "${_pkgs[@]}"; do
|
||||||
|
if ! command -v "$pkg" > /dev/null 2>&1; then
|
||||||
|
all_installed=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
$all_installed && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
install_packages() {
|
||||||
|
# List of packages to install
|
||||||
|
packages=(zsh git)
|
||||||
|
|
||||||
|
if ! check_installed "${packages[@]}"; then
|
||||||
|
# Determine which package manager is available
|
||||||
|
if check_installed apt; then
|
||||||
|
echo "Using apt to install packages..."
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y "${packages[@]}"
|
||||||
|
elif check_installed dnf; then
|
||||||
|
echo "Using dnf to install packages..."
|
||||||
|
sudo dnf install -y "${packages[@]}"
|
||||||
|
elif check_installed yum; then
|
||||||
|
echo "Using yum to install packages..."
|
||||||
|
sudo yum install -y "${packages[@]}"
|
||||||
|
elif check_installed brew; then
|
||||||
|
echo "Using Homebrew to install packages..."
|
||||||
|
brew install "${packages[@]}"
|
||||||
|
else
|
||||||
|
echo "No supported package manager found (apt, dnf, yum, brew)."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
clone_repos () {
|
||||||
|
git clone --bare https://git.meinlschmidt.org/jetpac/dotfiles.git ~/.cfg
|
||||||
|
# alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
|
git --git-dir=$HOME/.cfg config --local status.showUntrackedFiles no
|
||||||
|
git --git-dir=$HOME/.cfg --work-tree=$HOME checkout
|
||||||
|
|
||||||
|
|
||||||
|
# install oh-my-zsh
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > /tmp/install_ohmyzsh.sh
|
||||||
|
bash /tmp/install_ohmyzsh.sh --unattended --skip-chsh --keep-zshrc
|
||||||
|
|
||||||
|
# powerlevel10k
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
|
|
||||||
|
# tmux tpm plugin manager
|
||||||
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|
||||||
|
# plug for installing vim plugins
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_vim() {
|
||||||
|
vim +PlugInstall +qall
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_tmux() {
|
||||||
|
echo "run tmux, prefix + I installs all plugins (needs to have proxies set)"
|
||||||
|
echo "export proxies and run $HOME/.tmux/plugins/tpm/bin/install_plugins all"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Call the function to execute the installation
|
||||||
|
install_packages
|
||||||
|
clone_repos
|
||||||
|
configure_vim
|
||||||
|
configure_tmux
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# vim: foldmethod=marker:foldmarker={,}:expandtab:sw=4:ts=4:
|
||||||
Reference in New Issue
Block a user