Compare commits
3 Commits
9c9448a446
...
a01f86a23c
| Author | SHA1 | Date | |
|---|---|---|---|
|
a01f86a23c
|
|||
|
fb2b84f00b
|
|||
|
de8ad39261
|
40
bin/ssh-menu
40
bin/ssh-menu
@@ -3,6 +3,7 @@
|
||||
# pick a host from ~/.ssh/config and every file it includes
|
||||
# ssh-menu connect to the selection
|
||||
# ssh-menu -s print the selection: "<host>" or "<host>\tluks" (ctrl-u)
|
||||
# ssh-menu -h show usage
|
||||
|
||||
# exported: the preview and the list reload run in child shells spawned by fzf
|
||||
export SSH_MENU_CONFIG="${SSH_MENU_CONFIG:-$HOME/.ssh/config}"
|
||||
@@ -17,6 +18,19 @@ export SSH_MENU_TIMEOUT="${SSH_MENU_TIMEOUT:-1}"
|
||||
export SSH_MENU_PROXY_TIMEOUT="${SSH_MENU_PROXY_TIMEOUT:-3}"
|
||||
[[ -d $SSH_MENU_CACHE ]] || mkdir -m 700 "$SSH_MENU_CACHE"
|
||||
|
||||
# fail early with one message instead of a cascade of command-not-found errors
|
||||
# from inside fzf's preview shells
|
||||
function _ssh_menu_require {
|
||||
local cmd missing=()
|
||||
for cmd in "$@"; do
|
||||
command -v "$cmd" >/dev/null 2>&1 || missing+=("$cmd")
|
||||
done
|
||||
if (( ${#missing[@]} > 0 )); then
|
||||
printf 'ssh-menu: missing required commands: %s\n' "${missing[*]}" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# config plus every file named on Include lines; globs expanded, relative
|
||||
# paths resolved against ~/.ssh, unreadable files skipped
|
||||
function _ssh_menu_files {
|
||||
@@ -339,9 +353,26 @@ function _ssh_menu_select {
|
||||
fi
|
||||
}
|
||||
|
||||
function _ssh_menu_usage {
|
||||
cat <<'EOF'
|
||||
usage: ssh-menu [-s | -h]
|
||||
|
||||
(no args) pick a host and ssh into it
|
||||
-s pick a host and print it ("<host>" or "<host>\tluks")
|
||||
-h show this help
|
||||
EOF
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
-s) _ssh_menu_select ;;
|
||||
*)
|
||||
-h | --help)
|
||||
_ssh_menu_usage
|
||||
;;
|
||||
-s)
|
||||
_ssh_menu_require fzf ssh awk timeout
|
||||
_ssh_menu_select
|
||||
;;
|
||||
"")
|
||||
_ssh_menu_require fzf ssh awk timeout
|
||||
IFS=$'\t' read -r host profile < <(_ssh_menu_select)
|
||||
[[ -z $host ]] && exit 0
|
||||
if [[ $profile == luks ]]; then
|
||||
@@ -350,4 +381,9 @@ case "${1:-}" in
|
||||
exec ssh "$host"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
printf 'ssh-menu: unknown argument: %s\n' "$1" >&2
|
||||
_ssh_menu_usage >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -24,12 +24,15 @@
|
||||
## Workflow
|
||||
- when redirected or interrupted, stop the current approach immediately and follow the new direction without explaining or defending it
|
||||
- focus on one goal per session; don't drift into unrelated improvements
|
||||
- implement changes directly; don't use sub-agents/Task for simple operations like renames, file moves, or single-file edits
|
||||
- use Task agents only for genuinely complex parallel exploration or research, not for straightforward implementation
|
||||
|
||||
## Comments
|
||||
- lowercase, no trailing punctuation
|
||||
- plain: `# descriptive but non-verbose comment`
|
||||
- keyword: `# KEYWORD:(@janezicmatej) descriptive but non-verbose comment`
|
||||
- keywords: WARN, FIX, NOTE, TODO, PERF, TEST, HACK
|
||||
- keyword comments must always include the `(@janezicmatej)` attribution
|
||||
|
||||
## Git
|
||||
- agents MUST commit with `--no-gpg-sign`
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"Bash(git remote get-url origin)"
|
||||
]
|
||||
},
|
||||
"model": "claude-fable-5-1[1m]",
|
||||
"model": "opus[1m]",
|
||||
"hooks": {},
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
|
||||
@@ -17,6 +17,9 @@ bindsym $mod+Shift+n exec makoctl dismiss --all
|
||||
# clipboard
|
||||
bindsym $mod+c exec cliphist list | fuzzel -d | cliphist decode | wl-copy
|
||||
|
||||
# output
|
||||
bindsym $mod+Shift+o exec ~/.config/sway/scripts/output-scale.sh toggle
|
||||
|
||||
# window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
@@ -123,3 +126,8 @@ mode "resize" {
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
mode "passthrough" {
|
||||
bindsym $mod+Shift+Escape mode "default"
|
||||
}
|
||||
bindsym $mod+Shift+Escape mode "passthrough"
|
||||
|
||||
@@ -5,15 +5,16 @@ for_window [tiling] border normal $border
|
||||
for_window [app_id="com.mitchellh.ghostty" title="fastfetch"] floating enable, focus, move position 50 50
|
||||
|
||||
# workspace assignment
|
||||
assign [app_id="google-chrome"] workspace 2
|
||||
assign [app_id="thunderbird"] workspace 3
|
||||
assign [app_id="Cider"] workspace 4
|
||||
assign [app_id=".*BoltLauncher.*"] workspace 5
|
||||
assign [class="net-runelite.*"] workspace 5
|
||||
assign [app_id="discord"] workspace 8
|
||||
assign [app_id="Slack"] workspace 8
|
||||
assign [app_id="org.telegram.desktop"] workspace 8
|
||||
assign [app_id="Rocket.Chat"] workspace 8
|
||||
# NOTE:(@janezicmatej) app_ids change casing and separators across packaging; matches are case-insensitive substrings
|
||||
assign [app_id="(?i)google-chrome"] workspace 2
|
||||
assign [app_id="(?i)thunderbird"] workspace 3
|
||||
assign [app_id="(?i)cider"] workspace 4
|
||||
assign [app_id="(?i)boltlauncher"] workspace 5
|
||||
assign [class="(?i)net-runelite"] workspace 5
|
||||
assign [app_id="(?i)discord"] workspace 8
|
||||
assign [app_id="(?i)slack"] workspace 8
|
||||
assign [app_id="(?i)telegram"] workspace 8
|
||||
assign [app_id="(?i)rocket.?chat"] workspace 8
|
||||
|
||||
# rules
|
||||
for_window [app_id="com.gabm.satty"] fullscreen enable
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# daemon
|
||||
exec mako
|
||||
exec nm-applet --indicator
|
||||
exec swayidle -w
|
||||
exec wlsunset -l 46.1 -L 14.5
|
||||
exec pkill -x wob; rm -f $wobs && mkfifo $wobs && tail -f $wobs | wob
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
output DP-7 resolution 2560x1440 position 2560,-1200
|
||||
output eDP-1 resolution 2560x1600@165Hz position 0,0 adaptive_sync on
|
||||
# bottom-aligned and adjacent to eDP-1 at scale 1
|
||||
# NOTE:(@janezicmatej) scripts/output-scale.sh recomputes both positions on scale change
|
||||
output DP-7 resolution 2560x1440 position 2560,160
|
||||
output eDP-1 resolution 2560x1600@165Hz position 0,0 scale 1 adaptive_sync on
|
||||
|
||||
Reference in New Issue
Block a user