diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2020-07-11 18:23:27 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2020-07-28 20:32:56 +0200 |
| commit | 7d52bae5cbb8416defe95fcccab4255b58dd7101 (patch) | |
| tree | 1584ff63b43304b14f50276478c868e86c986648 | |
| parent | c2516f02f6ec036647f65b10e80f556ab9a71aab (diff) | |
rc/x11: failure message when some external tools are missing
Addresses #3591
| -rw-r--r-- | rc/windowing/repl/x11.kak | 8 | ||||
| -rw-r--r-- | rc/windowing/x11.kak | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/rc/windowing/repl/x11.kak b/rc/windowing/repl/x11.kak index cd0214e4..5832dddc 100644 --- a/rc/windowing/repl/x11.kak +++ b/rc/windowing/repl/x11.kak @@ -23,9 +23,11 @@ define-command -docstring %{ }} define-command x11-send-text -docstring "send the selected text to the repl window" %{ - nop %sh{ - printf %s\\n "${kak_selection}" | xsel -i - xdotool search --name kak_repl_window key --clearmodifiers Shift+Insert + evaluate-commands %sh{ + printf %s\\n "${kak_selection}" | xsel -i || + echo 'fail x11-send-text: failed to run xsel, see *debug* buffer for details' && + xdotool search --name kak_repl_window key --clearmodifiers Shift+Insert || + echo 'fail x11-send-text: failed to run xdotool, see *debug* buffer for details' } } diff --git a/rc/windowing/x11.kak b/rc/windowing/x11.kak index 5e662683..b18f5d73 100644 --- a/rc/windowing/x11.kak +++ b/rc/windowing/x11.kak @@ -57,7 +57,8 @@ If no client is passed, then the current client is used' \ if [ $# -eq 1 ]; then printf "evaluate-commands -client '%s' focus" "$1" else - xdotool windowactivate $kak_client_env_WINDOWID > /dev/null + xdotool windowactivate $kak_client_env_WINDOWID > /dev/null || + echo 'fail failed to run x11-focus, see *debug* buffer for details' fi } } |
