zsh,vm-list,karabiner,ghostty
This commit is contained in:
parent
b8e96240ab
commit
0df5ff3199
@ -13,7 +13,8 @@
|
|||||||
# Optional:
|
# Optional:
|
||||||
# --no-tmux -> skips attaching to tmux session
|
# --no-tmux -> skips attaching to tmux session
|
||||||
|
|
||||||
skip_tmux=0
|
# TMP: Tmux will be disabled (switch to 0 to enable it again)
|
||||||
|
skip_tmux=1
|
||||||
|
|
||||||
# Check for --no-tmux flag
|
# Check for --no-tmux flag
|
||||||
if [[ "$1" == "--no-tmux" ]]; then
|
if [[ "$1" == "--no-tmux" ]]; then
|
||||||
@ -22,6 +23,8 @@ if [[ "$1" == "--no-tmux" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
full="$1"
|
full="$1"
|
||||||
|
shift # remove host from args
|
||||||
|
|
||||||
user="$USER"
|
user="$USER"
|
||||||
host="$full"
|
host="$full"
|
||||||
|
|
||||||
@ -54,7 +57,7 @@ case "$host" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Build SSH command safely using an array
|
# Build SSH command safely using an array
|
||||||
ssh_cmd=(ssh -t)
|
ssh_cmd=(ssh -tt)
|
||||||
|
|
||||||
# Include identity file if needed
|
# Include identity file if needed
|
||||||
[[ -n "$ssh_identity" ]] && ssh_cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes)
|
[[ -n "$ssh_identity" ]] && ssh_cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes)
|
||||||
@ -63,7 +66,12 @@ ssh_cmd=(ssh -t)
|
|||||||
ssh_cmd+=("$user@$ssh_host")
|
ssh_cmd+=("$user@$ssh_host")
|
||||||
|
|
||||||
# Add tmux session unless skipped
|
# Add tmux session unless skipped
|
||||||
[[ $skip_tmux -eq 0 ]] && ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session")
|
if [[ $skip_tmux -eq 0 ]]; then
|
||||||
|
ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session")
|
||||||
|
else
|
||||||
|
# Pass through any extra args user supplied
|
||||||
|
ssh_cmd+=("$@")
|
||||||
|
fi
|
||||||
|
|
||||||
# Replace current shell with SSH command
|
# Replace current shell with SSH command
|
||||||
# echo "Executing: ${ssh_cmd[*]}" >&2
|
# echo "Executing: ${ssh_cmd[*]}" >&2
|
||||||
|
|||||||
11
config/macos/bin/vm-switch-daemon
Executable file
11
config/macos/bin/vm-switch-daemon
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
file=/tmp/vm-switch.txt
|
||||||
|
|
||||||
|
# Ensure the file exists
|
||||||
|
touch "$file"
|
||||||
|
|
||||||
|
echo "Listening on $file ..."
|
||||||
|
tail -n0 -F "$file" | while read vm; do
|
||||||
|
[ -n "$vm" ] && echo "Switch requested: $vm" && ~/bin/work "$vm" &
|
||||||
|
done
|
||||||
|
|
||||||
3
config/macos/bin/vmlist-sync
Executable file
3
config/macos/bin/vmlist-sync
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
orbctl list > /tmp/vmlist.txt
|
||||||
|
|
||||||
10
config/macos/bin/work
Executable file
10
config/macos/bin/work
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Usage: work <vm>
|
||||||
|
vm="$1"
|
||||||
|
if [ -z "$vm" ]; then
|
||||||
|
echo "Usage: work <vm>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec vm "${vm}-orb"
|
||||||
|
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"global": { "show_in_menu_bar": false },
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": { "is_keyboard": true },
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "non_us_backslash" },
|
||||||
|
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 49164,
|
||||||
|
"vendor_id": 7276
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_command" },
|
||||||
|
"to": [{ "key_code": "left_option" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_option" },
|
||||||
|
"to": [{ "key_code": "left_command" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Default profile",
|
||||||
|
"selected": true,
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "caps_lock" },
|
||||||
|
"to": [{ "key_code": "left_control" }]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -26,6 +26,14 @@
|
|||||||
{
|
{
|
||||||
"from": { "key_code": "left_option" },
|
"from": { "key_code": "left_option" },
|
||||||
"to": [{ "key_code": "left_command" }]
|
"to": [{ "key_code": "left_command" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": { "key_code": "escape" },
|
||||||
|
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "escape" }]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,49 +1,42 @@
|
|||||||
theme = catppuccin-latte
|
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
term = "xterm-256color"
|
term = xterm-256color
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
font-family = "JetBrains Mono NL"
|
font-family = "Maple Mono NF"
|
||||||
font-size = 14
|
#font-size = 14
|
||||||
font-thicken = true
|
font-thicken = true
|
||||||
|
#font-thicken-strength = 2
|
||||||
# Cell width (affects letter spacing)
|
adjust-box-thickness = 2
|
||||||
# adjust-cell-width = -1
|
|
||||||
# adjust-cell-height = -1
|
|
||||||
# adjust-font-baseline = -1
|
|
||||||
|
|
||||||
# Cursor
|
|
||||||
cursor-style-blink = false
|
|
||||||
cursor-style = block
|
|
||||||
shell-integration-features = no-cursor
|
|
||||||
|
|
||||||
# Icon
|
|
||||||
# macos-icon = custom-style
|
|
||||||
# macos-icon-frame = plastic
|
|
||||||
# macos-icon-ghost-color = cba6f7
|
|
||||||
# macos-icon-screen-color = 181825
|
|
||||||
|
|
||||||
# Window
|
# Window
|
||||||
#background = #181818
|
window-padding-x = 0
|
||||||
#background = #000000
|
window-padding-y = 0
|
||||||
#window-theme = dark
|
window-height = 50
|
||||||
window-width = 100
|
window-width = 120
|
||||||
window-height = 26
|
window-step-resize = true
|
||||||
window-padding-x = 4
|
window-padding-balance = false
|
||||||
window-padding-y = 2
|
# window-padding-color = extend
|
||||||
# window-colorspace = display-p3
|
|
||||||
# macos-titlebar-style = native
|
|
||||||
#macos-titlebar-style = transparent
|
|
||||||
|
|
||||||
|
# Icon
|
||||||
|
macos-icon = custom
|
||||||
|
|
||||||
# Resize by row
|
# Cursor
|
||||||
#window-step-resize = true
|
cursor-style = block
|
||||||
#window-padding-balance = true
|
cursor-style-blink = false
|
||||||
|
mouse-hide-while-typing = true
|
||||||
# Background
|
shell-integration-features = no-cursor
|
||||||
# background-opacity = 1
|
|
||||||
# background-blur-radius = 0
|
|
||||||
|
|
||||||
|
# Font/Cell quality
|
||||||
|
window-colorspace = srgb
|
||||||
|
alpha-blending = linear-corrected
|
||||||
|
macos-titlebar-style = native
|
||||||
|
|
||||||
|
adjust-cell-width = -1
|
||||||
|
#adjust-cell-height = -2
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
background = #eeeeee
|
||||||
|
foreground = #434343
|
||||||
|
window-theme = auto
|
||||||
|
background-opacity = 1
|
||||||
|
background-blur = false
|
||||||
|
|||||||
@ -6,11 +6,10 @@ autoload -U down-line-or-beginning-search
|
|||||||
zle -N up-line-or-beginning-search
|
zle -N up-line-or-beginning-search
|
||||||
zle -N down-line-or-beginning-search
|
zle -N down-line-or-beginning-search
|
||||||
|
|
||||||
# -----------------------------
|
|
||||||
# Bind keys for history search
|
|
||||||
# -----------------------------
|
|
||||||
bindkey '^[[A' up-line-or-beginning-search
|
bindkey '^[[A' up-line-or-beginning-search
|
||||||
bindkey '^[OA' up-line-or-beginning-search
|
bindkey '^[OA' up-line-or-beginning-search
|
||||||
bindkey '^[[B' down-line-or-beginning-search
|
bindkey '^[[B' down-line-or-beginning-search
|
||||||
bindkey '^[OB' down-line-or-beginning-search
|
bindkey '^[OB' down-line-or-beginning-search
|
||||||
|
|
||||||
|
bindkey '^U' backward-kill-line
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user