diff --git a/.local/bin/scripts/emacstty b/.local/bin/scripts/emacstty index 1887a0a..0f3c4f3 100755 --- a/.local/bin/scripts/emacstty +++ b/.local/bin/scripts/emacstty @@ -1,6 +1,6 @@ #!/bin/sh # Emacs in the terminal -pgrep --full "emacs .*-daemon" >/dev/null || emacs --daemon +pgrep --full "emacs" >/dev/null || emacs --daemon emacsclient --create-frame --tty "$@" exit=$? stty sane diff --git a/.local/bin/scripts/vnctype b/.local/bin/scripts/vnctype index d4f210b..1c254bd 100755 --- a/.local/bin/scripts/vnctype +++ b/.local/bin/scripts/vnctype @@ -1,7 +1,12 @@ #!/bin/sh -e -# Type in NoVNC with german layout +# Type in NoVNC - from clipboard or interactively with german layout xdotool search --onlyvisible --classname Navigator windowactivate # Activate Firefox +if test $# -gt 0 +then setxkbmap de sleep 0.1 -xdotool type --delay 80ms --clearmodifiers "$@" +xdotool type --delay 80ms --clearmodifiers "${@:-$(xclip -sel clip -o)}" update-keyboard-layout >/dev/null +else +xdotool type --delay 80ms --clearmodifiers "${xclip -sel clip -o}" +fi