mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
1 Commits
d346f5d522
...
revert-458
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2453ca6ea4 |
@@ -32,6 +32,7 @@ open_editor() {
|
|||||||
if [[ "$SCREENSHOT_EDITOR" == "satty" ]]; then
|
if [[ "$SCREENSHOT_EDITOR" == "satty" ]]; then
|
||||||
satty --filename "$filepath" \
|
satty --filename "$filepath" \
|
||||||
--output-filename "$filepath" \
|
--output-filename "$filepath" \
|
||||||
|
--early-exit \
|
||||||
--actions-on-enter save-to-clipboard \
|
--actions-on-enter save-to-clipboard \
|
||||||
--save-after-copy \
|
--save-after-copy \
|
||||||
--copy-command 'wl-copy'
|
--copy-command 'wl-copy'
|
||||||
@@ -52,15 +53,13 @@ get_rectangles() {
|
|||||||
# Select based on mode
|
# Select based on mode
|
||||||
case "$MODE" in
|
case "$MODE" in
|
||||||
region)
|
region)
|
||||||
wayfreeze &
|
wayfreeze & PID=$!
|
||||||
PID=$!
|
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(slurp 2>/dev/null)
|
SELECTION=$(slurp 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
;;
|
;;
|
||||||
windows)
|
windows)
|
||||||
wayfreeze &
|
wayfreeze & PID=$!
|
||||||
PID=$!
|
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
|
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
@@ -70,8 +69,7 @@ fullscreen)
|
|||||||
;;
|
;;
|
||||||
smart|*)
|
smart|*)
|
||||||
RECTS=$(get_rectangles)
|
RECTS=$(get_rectangles)
|
||||||
wayfreeze &
|
wayfreeze & PID=$!
|
||||||
PID=$!
|
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
|
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
@@ -111,7 +109,7 @@ if [[ $PROCESSING == "slurp" ]]; then
|
|||||||
wl-copy < "$FILEPATH"
|
wl-copy < "$FILEPATH"
|
||||||
|
|
||||||
(
|
(
|
||||||
ACTION=$(notify-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" -t 10000 -i "$FILEPATH" -A "default=edit")
|
ACTION=$(notify-send "Screenshot copied & saved" "Click to edit" -t 10000 -i "$FILEPATH" -A "default=edit")
|
||||||
[[ "$ACTION" == "default" ]] && open_editor "$FILEPATH"
|
[[ "$ACTION" == "default" ]] && open_editor "$FILEPATH"
|
||||||
) &
|
) &
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ fzf_args=(
|
|||||||
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
||||||
|
|
||||||
if [[ -n "$pkg_names" ]]; then
|
if [[ -n "$pkg_names" ]]; then
|
||||||
# Add aur/ prefix to each package name and convert to space-separated for yay
|
# Convert newline-separated selections to space-separated for yay
|
||||||
echo "$pkg_names" | sed 's/^/aur\//' | tr '\n' ' ' | xargs yay -S --noconfirm
|
echo "$pkg_names" | tr '\n' ' ' | xargs yay -S --noconfirm
|
||||||
sudo updatedb
|
sudo updatedb
|
||||||
omarchy-show-done
|
omarchy-show-done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user