commit cf6077ef8a574f8e0e673b639b0442f484c45f78 Author: finga Date: Thu Jul 13 14:24:30 2017 +0200 add files diff --git a/bin/em b/bin/em new file mode 100755 index 0000000..5bb64e0 --- /dev/null +++ b/bin/em @@ -0,0 +1,3 @@ +#!/bin/sh + +emacsclient -c -a "" diff --git a/bin/i3-sensible-editor b/bin/i3-sensible-editor new file mode 100755 index 0000000..e47a91a --- /dev/null +++ b/bin/i3-sensible-editor @@ -0,0 +1,16 @@ +#!/bin/sh +# +# This code is released in public domain by Han Boetes +# +# This script tries to exec an editor by trying some known editors if $EDITOR is +# not set. +# +# Distributions/packagers can enhance this script with a distribution-specific +# mechanism to find the preferred editor + +# Hopefully one of these is installed (no flamewars about preference please!): +for editor in $VISUAL $EDITOR em nano vim vi emacs pico qe mg jed gedit mc-edit; do + if which $editor > /dev/null 2>&1; then + exec $editor "$@" + fi +done diff --git a/bin/i3-sensible-terminal b/bin/i3-sensible-terminal new file mode 100755 index 0000000..949b1b5 --- /dev/null +++ b/bin/i3-sensible-terminal @@ -0,0 +1,11 @@ +#!/bin/sh +# +# This code is released in public domain by Han Boetes +# +# This script tries to exec a terminal emulator by trying some known terminal +# emulators. +for terminal in $TERMINAL urxvt x-terminal-emulator rxvt terminator Eterm aterm xterm gnome-terminal roxterm xfce4-terminal; do + if which $terminal > /dev/null 2>&1; then + exec $terminal "$@" + fi +done