Change Return to KP_Enter

This commit is contained in:
Digital Studium 2024-04-06 18:00:07 +03:00
parent 04b2f868b1
commit 1247d9ba54
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
1.10
1.11

4
k
View File

@ -16,7 +16,7 @@ if [ "$resource" = "Pods" ]; then
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose action for $pod in $namespace" 10 40 0 "Logs" 1 "Describe pod" 2 "Exec -it" 3 "Delete pod" 4)
fi
if [ ! -z "$action" ]; then
xdotool type --delay 0 "kubectl -n $namespace ${action,,} $pod" && xdotool key --delay 0 Return
xdotool type --delay 0 "kubectl -n $namespace ${action,,} $pod" && xdotool key --delay 0 KP_Enter
fi
elif [ "$resource" = "Services" ]; then
svc=$(kubectl -n $namespace get svc --no-headers | awk '{ print $1 }' | fzf --multi --cycle --reverse --preview "kubectl get svc -n $namespace {1} -o yaml")
@ -24,7 +24,7 @@ elif [ "$resource" = "Services" ]; then
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose action for $pod in $namespace" 10 40 0 "Get endpoints" 1 "Edit service" 2)
fi
if [ ! -z "$action" ]; then
xdotool type --delay 0 "kubectl -n $namespace ${action,,} $svc" && xdotool key --delay 0 Return
xdotool type --delay 0 "kubectl -n $namespace ${action,,} $svc" && xdotool key --delay 0 KP_Enter
fi
fi

2
r
View File

@ -1,4 +1,4 @@
#!/bin/bash
trap 'clear' SIGINT
setxkbmap
cat ~/.aliases.txt | fzf | cut -d : -f 2- | sed s/\ // | (stty -F /dev/tty -echo; xargs -0 -I _ xdotool type --delay 0 _; stty -F /dev/tty echo) && xdotool key Return
cat ~/.aliases.txt | fzf | cut -d : -f 2- | sed s/\ // | (stty -F /dev/tty -echo; xargs -0 -I _ xdotool type --delay 0 _; stty -F /dev/tty echo) && xdotool key KP_Enter