mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
4 Commits
463417a281
...
b1af966819
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1af966819 | ||
|
|
e055358721 | ||
|
|
8b6e2466a3 | ||
|
|
560500d8ec |
@@ -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 ;;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user