update i3-sensible-* (Thanks Han)

next
Michael Stapelberg 2011-12-29 00:01:49 +01:00
parent 27c442c9c1
commit ac3541c28c
8 changed files with 58 additions and 48 deletions

View File

@ -1,14 +1,12 @@
## Description: Document Debian-specific x-terminal-emulator in the manpage.
## Origin/Author: Michael Stapelberg
Index: i3-4.1/man/i3-sensible-terminal.man
Index: i3-4.1.1/man/i3-sensible-terminal.man
===================================================================
--- i3-4.1.orig/man/i3-sensible-terminal.man 2011-11-11 22:38:06.508025537 +0000
+++ i3-4.1/man/i3-sensible-terminal.man 2011-11-11 22:38:04.752994892 +0000
--- i3-4.1.1.orig/man/i3-sensible-terminal.man 2011-12-28 23:56:55.487581000 +0100
+++ i3-4.1.1/man/i3-sensible-terminal.man 2011-12-28 23:57:06.725802633 +0100
@@ -22,6 +22,7 @@
It tries to start one of the following (in that order):
* $TERMINAL (this is a non-standard variable)
+* x-terminal-emulator (only on Debian)
* xterm
+* x-terminal-emulator
* urxvt
* rxvt
* terminator

View File

@ -1,21 +1,17 @@
## Description: Use Debian-specific x-terminal-emulator in i3-sensible-terminal
## Origin/Author: Michael Stapelberg
--- a/i3-sensible-terminal.O 2011-11-11 22:03:52.414218386 +0000
+++ b/i3-sensible-terminal 2011-11-11 22:04:38.372020210 +0000
@@ -1,13 +1,11 @@
#!/bin/sh
Index: i3-4.1.1/i3-sensible-terminal
===================================================================
--- i3-4.1.1.orig/i3-sensible-terminal 2011-12-28 23:51:52.455610236 +0100
+++ i3-4.1.1/i3-sensible-terminal 2011-12-28 23:52:00.826775027 +0100
@@ -4,11 +4,7 @@
#
# This script tries to exec a terminal emulator by trying some known terminal
# emulators.
-#
-# Distributions/packagers should enhance this script with a
-# distribution-specific mechanism to find the preferred terminal emulator. On
-# Debian, there is the x-terminal-emulator symlink for example.
-# Please don't touch the first line, though:
[ -n "$TERMINAL" ] && which $TERMINAL >/dev/null && exec $TERMINAL "$@"
+# Debian-specific: use x-terminal-emulator
+which x-terminal-emulator >/dev/null && exec x-terminal-emulator "$@"
+
# Hopefully one of these is installed:
which xterm >/dev/null && exec xterm "$@"
which urxvt >/dev/null && exec urxvt "$@"
-for terminal in $TERMINAL urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm; do
+for terminal in $TERMINAL x-terminal-emulator urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm; do
if which $terminal > /dev/null 2>&1; then
exec $terminal "$@"
fi

View File

@ -1,14 +1,16 @@
#!/bin/sh
#
# This code is released in public domain by Han Boetes <han@mijncomputer.nl>
#
# 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 pager.
[ -n "$VISUAL" ] && which $VISUAL >/dev/null && exec $VISUAL "$@"
[ -n "$EDITOR" ] && which $EDITOR >/dev/null && exec $EDITOR "$@"
# 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!):
which nano >/dev/null && exec nano "$@"
which vim >/dev/null && exec vim "$@"
which vi >/dev/null && exec vi "$@"
which emacs >/dev/null && exec emacs "$@"
for editor in $VISUAL $EDITOR nano vim vi emacs pico qe mg jed gedit mc-edit; do
if which $editor > /dev/null 2>&1; then
exec $editor "$@"
fi
done

View File

@ -1,15 +1,18 @@
#!/bin/sh
#
# This code is released in public domain by Han Boetes <han@mijncomputer.nl>
# This script tries to exec a pager by trying some known pagers if $PAGER is
# not set.
#
# Distributions/packagers can enhance this script with a
# distribution-specific mechanism to find the preferred pager.
[ -n "$PAGER" ] && which $PAGER >/dev/null && exec $PAGER "$@"
# Hopefully one of these is installed:
which most >/dev/null && exec most "$@"
which less >/dev/null && exec less "$@"
# we don't use 'more' because it will exit if the file is 'too short'
# If no pager is installed, try an editor
exec i3-sensible-editor "$@"
# Hopefully one of these is installed (no flamewars about preference please!):
# We don't use 'more' because it will exit if the file is too short.
# Worst case scenario we'll open the file in your editor.
for pager in $PAGER less most w3m i3-sensible-editor; do
if which $pager > /dev/null 2>&1; then
exec $pager "$@"
fi
done

View File

@ -1,15 +1,15 @@
#!/bin/sh
#
# This code is released in public domain by Han Boetes <han@mijncomputer.nl>
#
# This script tries to exec a terminal emulator by trying some known terminal
# emulators.
#
# Distributions/packagers should enhance this script with a
# distribution-specific mechanism to find the preferred terminal emulator. On
# Debian, there is the x-terminal-emulator symlink for example.
# Please don't touch the first line, though:
[ -n "$TERMINAL" ] && which $TERMINAL >/dev/null && exec $TERMINAL "$@"
# Hopefully one of these is installed:
which xterm >/dev/null && exec xterm "$@"
which urxvt >/dev/null && exec urxvt "$@"
which rxvt >/dev/null && exec rxvt "$@"
which roxterm >/dev/null && exec roxterm "$@"
for terminal in $TERMINAL urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm; do
if which $terminal > /dev/null 2>&1; then
exec $terminal "$@"
fi
done

View File

@ -23,6 +23,12 @@ It tries to start one of the following (in that order):
* vim
* vi
* emacs
* pico
* qe
* mg
* jed
* gedit
* mc-edit
Please dont complain about the order: If the user has any preference, he will
have $VISUAL or $EDITOR set.

View File

@ -18,8 +18,9 @@ i3-sensible-pager is used by i3-nagbar(1) when you click on the view button.
It tries to start one of the following (in that order):
* $PAGER
* most
* less
* most
* w3m
* i3-sensible-editor(1)
Please dont complain about the order: If the user has any preference, he will

View File

@ -22,9 +22,13 @@ is appropriate for the distribution.
It tries to start one of the following (in that order):
* $TERMINAL (this is a non-standard variable)
* xterm
* urxvt
* rxvt
* terminator
* Eterm
* aterm
* xterm
* gnome-terminal
* roxterm
Please dont complain about the order: If the user has any preference, he will