bemenu -> wmenu
This commit is contained in:
2
arch-user/bin/menu/horizontal.sh
Executable file
2
arch-user/bin/menu/horizontal.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
eval "wmenu $WMENU_HOPTS \"$@\""
|
||||
@@ -8,13 +8,13 @@
|
||||
#exec 2>/tmp/pinentry.log
|
||||
#set -x
|
||||
|
||||
############################### PATCH #################################
|
||||
. ~/.config/menu/env.sh
|
||||
#######################################################################
|
||||
|
||||
VERSION='1.0'
|
||||
FLAVOR='bash'
|
||||
|
||||
############################### PATCH #################################
|
||||
. ~/.config/bemenu/env.sh
|
||||
#######################################################################
|
||||
|
||||
keyinfo=''
|
||||
error=''
|
||||
timeout=0
|
||||
@@ -125,9 +125,8 @@ cmd_getpin()
|
||||
output="$(
|
||||
echo -n "|"
|
||||
############################### PATCH #################################
|
||||
bemenu \
|
||||
--password indicator \
|
||||
--prompt "${prompt:-$def_prompt}" \
|
||||
~/.local/bin/menu/horizontal.sh \
|
||||
-Pp "${prompt:-$def_prompt}" \
|
||||
</dev/null | tr -d '\n'
|
||||
ret=${PIPESTATUS[0]}
|
||||
# yad \
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)"
|
||||
rl_full="$(cat ~/.config/menu/*.runlist)"
|
||||
rl="$(echo "$rl_full" | cut -d' ' -f2-)"
|
||||
|
||||
inp="$(echo "$rl" | bemenu --prompt ">")"
|
||||
inp="$(echo "$rl" | ~/.local/bin/menu/vertical.sh -p ">")"
|
||||
[ -z "$inp" ] && exit 0
|
||||
eval "inp_arr=($inp)"
|
||||
|
||||
@@ -18,5 +18,5 @@ case "$exectr" in
|
||||
exec) exec $inp;;
|
||||
float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($inp)";;
|
||||
float-sh-keep) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "($inp); read -n1";;
|
||||
*) exec bash "$HOME/.local/bin/bemenu/run-$exectr.sh" "${inp_arr[@]}"
|
||||
*) exec bash "$HOME/.local/bin/menu/run-$exectr.sh" "${inp_arr[@]}"
|
||||
esac
|
||||
4
arch-user/bin/menu/vertical.sh
Executable file
4
arch-user/bin/menu/vertical.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
input=$(cat)
|
||||
lines=$(echo "$input" | wc -l)
|
||||
echo "$input" | eval "wmenu $WMENU_VOPTS -l $((lines < 50 ? lines : 50)) \"$@\""
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
out="$(printf '' | bemenu --prompt ':sway')"
|
||||
out="$(printf '' | ~/.local/bin/menu/horizontal.sh -p ':sway')"
|
||||
eval "executor_args=($out)"
|
||||
#shellcheck disable=SC2154
|
||||
sway "${executor_args[@]}"
|
||||
|
||||
@@ -41,7 +41,7 @@ formatted_list=$(echo "$window_list" | while IFS='|' read -r id app_id name work
|
||||
printf "%s%s%s %s %s\n" "$workspace" "$indicator" "$id" "$app_id" "$name"
|
||||
done)
|
||||
|
||||
selection=$(echo "$formatted_list" | bemenu --auto-select --width-factor 100 --prompt "/" --index "$(echo "$formatted_list" | awk 'substr($0,2,1)==">" {print NR-1}')" )
|
||||
selection=$(echo "$formatted_list" | ~/.local/bin/menu/vertical.sh -p "/")
|
||||
[ -z "$selection" ] && exit 0
|
||||
|
||||
window_id=$(echo "$selection" | sed -E 's/^...([0-9]+).*/\1/')
|
||||
|
||||
Reference in New Issue
Block a user