spmenu should always spawn at the top

This commit is contained in:
speedie 2023-06-25 22:17:35 +02:00
parent 0239a92010
commit 0b8050b538
4 changed files with 5 additions and 5 deletions

View file

@ -35,11 +35,11 @@ function trigger_sigusr1() {
}
function dmenu_copy() {
trigger_sigusr1
cat $BUFFER_FILE | $RUNLAUNCHER -l 10 -i -w $(xdotool getactivewindow) -p 'Screen Copy' | sed 's/↵/\n/g' | xclip -i
cat $BUFFER_FILE | $RUNLAUNCHER -t -l 10 -i -w $(xdotool getactivewindow) -p 'Screen Copy' | sed 's/↵/\n/g' | xclip -i
}
function dmenu_type() {
trigger_sigusr1
cat $BUFFER_FILE | $RUNLAUNCHER -l 10 -i -w $(xdotool getactivewindow) -p 'Screen Type' | sed 's/↵/\n/g' | xargs -IC xdotool type --delay 0 "C"
cat $BUFFER_FILE | $RUNLAUNCHER -t -l 10 -i -w $(xdotool getactivewindow) -p 'Screen Type' | sed 's/↵/\n/g' | xargs -IC xdotool type --delay 0 "C"
}
function pipe_combine() {
trigger_sigusr1

View file

@ -6,6 +6,6 @@ trap 'rm -f "$tmpfile"' 0 1 15
sed -n "w $tmpfile"
sed -i 's/\x0//g' "$tmpfile"
ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)"
chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | $RUNLAUNCHER -p "Copy which command's output?" -na -i -l 10 -w $WINDOWID -g 1 | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | $RUNLAUNCHER -p "Copy which command's output?" -na -i -l 10 -w $WINDOWID -g 1 -t | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard

View file

@ -1658,6 +1658,6 @@ printf "\
"
}
EMOJISEL="$(printf "%s" "$(EMOJILIST)" | $RUNLAUNCHER -l 5 -na -w $WINDOWID -p 'Pick an emoji: ' | awk '{ print $1 }')"
EMOJISEL="$(printf "%s" "$(EMOJILIST)" | $RUNLAUNCHER -t -l 5 -na -w $WINDOWID -p 'Pick an emoji: ' | awk '{ print $1 }')"
[ -z "$EMOJISEL" ] && exit
printf "%s" "$EMOJISEL" | xclip -selection clipboard && notify-send "$EMOJISEL copied to clipboard."

View file

@ -5,7 +5,7 @@ esac
command -v xdg-open > /dev/null && BROWSER="xdg-open"
URL=$(st_xurls | grep http | awk '!_[$1]++' | $RUNLAUNCHER -l 10 -w $WINDOWID -g 1 -p 'Open:' -na)
URL=$(st_xurls | grep http | awk '!_[$1]++' | $RUNLAUNCHER -t -l 10 -w $WINDOWID -g 1 -p 'Open:' -na)
case "$1" in
"") $BROWSER $URL ;;