spmenu should always spawn at the top
This commit is contained in:
parent
0239a92010
commit
0b8050b538
|
@ -35,11 +35,11 @@ function trigger_sigusr1() {
|
||||||
}
|
}
|
||||||
function dmenu_copy() {
|
function dmenu_copy() {
|
||||||
trigger_sigusr1
|
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() {
|
function dmenu_type() {
|
||||||
trigger_sigusr1
|
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() {
|
function pipe_combine() {
|
||||||
trigger_sigusr1
|
trigger_sigusr1
|
||||||
|
|
|
@ -6,6 +6,6 @@ trap 'rm -f "$tmpfile"' 0 1 15
|
||||||
sed -n "w $tmpfile"
|
sed -n "w $tmpfile"
|
||||||
sed -i 's/\x0//g' "$tmpfile"
|
sed -i 's/\x0//g' "$tmpfile"
|
||||||
ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)"
|
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')"
|
eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
|
||||||
awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard
|
awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard
|
||||||
|
|
|
@ -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
|
[ -z "$EMOJISEL" ] && exit
|
||||||
printf "%s" "$EMOJISEL" | xclip -selection clipboard && notify-send "$EMOJISEL copied to clipboard."
|
printf "%s" "$EMOJISEL" | xclip -selection clipboard && notify-send "$EMOJISEL copied to clipboard."
|
||||||
|
|
|
@ -5,7 +5,7 @@ esac
|
||||||
|
|
||||||
command -v xdg-open > /dev/null && BROWSER="xdg-open"
|
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
|
case "$1" in
|
||||||
"") $BROWSER $URL ;;
|
"") $BROWSER $URL ;;
|
||||||
|
|
Loading…
Reference in a new issue