Compare commits

...

4 Commits

Author SHA1 Message Date
David Heinemeier Hansson
b1af966819 Go straight to the new unified screenshot flow 2026-02-16 14:27:29 +01:00
David Heinemeier Hansson
e055358721 Add eff to open the result of the fuzzy find directly in your editor 2026-02-16 14:08:14 +01:00
David Heinemeier Hansson
8b6e2466a3 Add the tmux dev layout 2026-02-16 10:33:56 +01:00
David Heinemeier Hansson
560500d8ec Allow passthrough 2026-02-16 10:26:31 +01:00
4 changed files with 45 additions and 10 deletions

View File

@@ -99,21 +99,13 @@ show_trigger_menu() {
show_capture_menu() {
case $(menu "Capture" " Screenshot\n Screenrecord\n󰃉 Color") in
*Screenshot*) show_screenshot_menu ;;
*Screenshot*) omarchy-cmd-screenshot ;;
*Screenrecord*) show_screenrecord_menu ;;
*Color*) pkill hyprpicker || hyprpicker -a ;;
*) show_trigger_menu ;;
esac
}
show_screenshot_menu() {
case $(menu "Screenshot" " Snap with Editing\n Straight to Clipboard") in
*Editing*) omarchy-cmd-screenshot smart ;;
*Clipboard*) omarchy-cmd-screenshot smart clipboard ;;
*) show_capture_menu ;;
esac
}
get_webcam_list() {
v4l2-ctl --list-devices 2>/dev/null | while IFS= read -r line; do
if [[ "$line" != $'\t'* && -n "$line" ]]; then
@@ -148,7 +140,10 @@ show_screenrecord_menu() {
*"With desktop audio") omarchy-cmd-screenrecord --with-desktop-audio ;;
*"With desktop + microphone audio") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
*"With desktop + microphone audio + webcam")
local device=$(show_webcam_select_menu) || { back_to show_capture_menu; return; }
local device=$(show_webcam_select_menu) || {
back_to show_capture_menu
return
}
omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
;;
*) back_to show_capture_menu ;;

View File

@@ -60,6 +60,7 @@ set -g history-limit 50000
set -g escape-time 0
set -g focus-events on
set -g set-clipboard on
set -g allow-passthrough on
setw -g aggressive-resize on
set -g detach-on-destroy off

View File

@@ -7,6 +7,7 @@ if command -v eza &> /dev/null; then
fi
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
alias eff='$EDITOR $(ff)'
if command -v zoxide &> /dev/null; then
alias cd="zd"

View File

@@ -108,3 +108,41 @@ dip() {
lip() {
pgrep -af "ssh.*-L [0-9]+:localhost:[0-9]+" || echo "No active forwards"
}
# Create a tmux layout for dev with editor, ai, and terminal
tml() {
local current_dir="${PWD}"
local editor_pane ai_pane
local ai="$1"
# Get current pane ID (will become editor pane after splits)
editor_pane=$(tmux display-message -p '#{pane_id}')
# Split window vertically - top 90%, bottom 10%
tmux split-window -v -p 10 -c "$current_dir"
# Go back to top pane (editor_pane) and split it horizontally
tmux select-pane -t "$editor_pane"
tmux split-window -h -p 30 -c "$current_dir"
# After horizontal split, cursor is in the right pane (new pane)
# Get its ID and run ai there
ai_pane=$(tmux display-message -p '#{pane_id}')
tmux send-keys -t "$ai_pane" "$ai" C-m
# Run nvim in the left pane
tmux send-keys -t "$editor_pane" "$EDITOR ." C-m
# Select the nvim pane for focus
tmux select-pane -t "$editor_pane"
}
# Create a dev layout using tmux with editor, opencode, and terminal
nic() {
tml c
}
# Create a dev layout using tmux with editor, claude, and terminal
nicx() {
tml cx
}