bemenu -> wmenu
This commit is contained in:
		| @@ -27,7 +27,7 @@ PACKAGES=( | |||||||
| 	neomutt telegram-desktop # communication | 	neomutt telegram-desktop # communication | ||||||
| 	 | 	 | ||||||
| 	greetd sway swaybg swayidle # desktop basic | 	greetd sway swaybg swayidle # desktop basic | ||||||
| 	alacritty bemenu-wayland i3blocks mako libnotify # terminals, ui | 	alacritty wmenu i3blocks mako libnotify # terminals, ui | ||||||
| 	wev wl-clipboard wtype slurp grim # interaction | 	wev wl-clipboard wtype slurp grim # interaction | ||||||
| 	ttf-roboto ttf-roboto-mono otf-font-awesome # fonts | 	ttf-roboto ttf-roboto-mono otf-font-awesome # fonts | ||||||
| 	kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes | 	kvantum kvantum-qt5 kvantum-theme-materia materia-gtk-theme # themes | ||||||
|   | |||||||
							
								
								
									
										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 | #exec 2>/tmp/pinentry.log | ||||||
| #set -x | #set -x | ||||||
| 
 | 
 | ||||||
|  | ############################### PATCH ################################# | ||||||
|  | . ~/.config/menu/env.sh | ||||||
|  | ####################################################################### | ||||||
|  | 
 | ||||||
| VERSION='1.0' | VERSION='1.0' | ||||||
| FLAVOR='bash' | FLAVOR='bash' | ||||||
| 
 | 
 | ||||||
| ############################### PATCH ################################# |  | ||||||
| . ~/.config/bemenu/env.sh |  | ||||||
| ####################################################################### |  | ||||||
| 
 |  | ||||||
| keyinfo='' | keyinfo='' | ||||||
| error='' | error='' | ||||||
| timeout=0 | timeout=0 | ||||||
| @@ -125,9 +125,8 @@ cmd_getpin() | |||||||
| 	output="$( | 	output="$( | ||||||
| 		echo -n "|" | 		echo -n "|" | ||||||
| ############################### PATCH ################################# | ############################### PATCH ################################# | ||||||
| 		bemenu \ | 		~/.local/bin/menu/horizontal.sh \ | ||||||
| 			--password indicator \ | 			-Pp "${prompt:-$def_prompt}" \ | ||||||
| 			--prompt "${prompt:-$def_prompt}" \ |  | ||||||
| 			</dev/null | tr -d '\n' | 			</dev/null | tr -d '\n' | ||||||
| 		ret=${PIPESTATUS[0]} | 		ret=${PIPESTATUS[0]} | ||||||
| #		yad \ | #		yad \ | ||||||
| @@ -1,9 +1,9 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| 
 | 
 | ||||||
| rl_full="$(cat "$HOME/.config/bemenu/"*.runlist)" | rl_full="$(cat ~/.config/menu/*.runlist)" | ||||||
| rl="$(echo "$rl_full" | cut -d' ' -f2-)" | 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 | [ -z "$inp" ] && exit 0 | ||||||
| eval "inp_arr=($inp)" | eval "inp_arr=($inp)" | ||||||
| 
 | 
 | ||||||
| @@ -18,5 +18,5 @@ case "$exectr" in | |||||||
| 	exec) exec $inp;; | 	exec) exec $inp;; | ||||||
| 	float-sh) exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "$SHELL" -c "($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";; | 	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 | 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 | #!/bin/bash | ||||||
|  |  | ||||||
| out="$(printf '' | bemenu --prompt ':sway')" | out="$(printf '' | ~/.local/bin/menu/horizontal.sh -p ':sway')" | ||||||
| eval "executor_args=($out)" | eval "executor_args=($out)" | ||||||
| #shellcheck disable=SC2154 | #shellcheck disable=SC2154 | ||||||
| sway "${executor_args[@]}" | 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" |     printf "%s%s%s %s %s\n" "$workspace" "$indicator" "$id" "$app_id" "$name" | ||||||
| done) | 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 | [ -z "$selection" ] && exit 0 | ||||||
|  |  | ||||||
| window_id=$(echo "$selection" | sed -E 's/^...([0-9]+).*/\1/') | window_id=$(echo "$selection" | sed -E 's/^...([0-9]+).*/\1/') | ||||||
|   | |||||||
| @@ -1,24 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
| export BEMENU_OPTS="\ |  | ||||||
| --ignorecase \ |  | ||||||
| --width-factor 0.5 \ |  | ||||||
| --fn \"{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}\" \ |  | ||||||
| --list 500 \ |  | ||||||
| --border 2 \ |  | ||||||
| --scrollbar autohide \ |  | ||||||
| --border-radius 4 \ |  | ||||||
| --bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --nb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --ab #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --hb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --fb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --tb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ |  | ||||||
| --nf #{{ .theme.color.fg }} \ |  | ||||||
| --af #{{ .theme.color.fg }} \ |  | ||||||
| --cf #{{ .theme.color.fg }} \ |  | ||||||
| --hf #{{ .theme.color.fg_accent }} \ |  | ||||||
| --tf #{{ .theme.color.fg_accent }} \ |  | ||||||
| --ff #{{ .theme.color.fg_accent }} \ |  | ||||||
| " |  | ||||||
| @@ -1 +1 @@ | |||||||
| pinentry-program ~/.local/bin/bemenu/pinentry.sh | pinentry-program ~/.local/bin/menu/pinentry.sh | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								arch-user/config/menu/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								arch-user/config/menu/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | export WMENU_VOPTS="\ | ||||||
|  | -i \ | ||||||
|  | -f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \ | ||||||
|  | -n {{ .theme.color.fg }} -N {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ | ||||||
|  | -m {{ .theme.color.fg_accent }} -M {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ | ||||||
|  | -s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ | ||||||
|  | " | ||||||
|  | export WMENU_HOPTS="\ | ||||||
|  | -i \ | ||||||
|  | -f '{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}' \ | ||||||
|  | -n {{ .theme.color.fg }} -N {{ .theme.color.bg }} \ | ||||||
|  | -m {{ .theme.color.fg_accent }} -M {{ .theme.color.bg }} \ | ||||||
|  | -s {{ .theme.color.fg_accent }} -S {{ .theme.color.bg }} \ | ||||||
|  | " | ||||||
| @@ -25,6 +25,8 @@ set keymap vi-command | |||||||
| "n":backward-char | "n":backward-char | ||||||
| "\C-n":backward-char | "\C-n":backward-char | ||||||
| # e -> k (reverse swap) | # e -> k (reverse swap) | ||||||
|  | set keymap vi-insert | ||||||
|  | "\C-e":"\C-j" | ||||||
| set keymap vi-command | set keymap vi-command | ||||||
| "e":previous-history | "e":previous-history | ||||||
| "\C-e":kill-line | "\C-e":kill-line | ||||||
|   | |||||||
| @@ -188,11 +188,11 @@ bindsym --to-code { | |||||||
| 	XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks | 	XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks | ||||||
| 	XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks | 	XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks | ||||||
| 	XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks | 	XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks | ||||||
| 	XF86Calculator exec .local/bin/bemenu/run-calc.sh calc tui | 	XF86Calculator exec .local/bin/menu/run-calc.sh calc tui | ||||||
| 	# basic scripts | 	# basic scripts | ||||||
| 	$mod+Return exec alacritty msg create-window | 	$mod+Return exec alacritty msg create-window | ||||||
| 	$mod+Colon exec ~/.local/bin/sway/command-mode.sh | 	$mod+Colon exec ~/.local/bin/sway/command-mode.sh | ||||||
| 	$mod+Space exec ~/.local/bin/bemenu/run.sh | 	$mod+Space exec ~/.local/bin/menu/run.sh | ||||||
| } | } | ||||||
| ############################################## | ############################################## | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ mkdir -p "${USER_DIRS[@]}" | |||||||
| ########## scripts ############# | ########## scripts ############# | ||||||
| cp -rf bin/* ~/.local/bin | cp -rf bin/* ~/.local/bin | ||||||
|  |  | ||||||
| LN_EXCLUDE_DIRS=(i3blocks bemenu sway) | LN_EXCLUDE_DIRS=(i3blocks menu sway) | ||||||
|  |  | ||||||
| ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} " | ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} " | ||||||
| for sdir in bin/*; do | for sdir in bin/*; do | ||||||
| @@ -93,5 +93,6 @@ export IS_COMPAT=0 | |||||||
| ############################### | ############################### | ||||||
|  |  | ||||||
| swaymsg reload || true | swaymsg reload || true | ||||||
|  | . ~/.profile | ||||||
|  |  | ||||||
| echo ok | echo ok | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user