Scripts changed to use run-on-terminal
This commit is contained in:
parent
9ebaf37754
commit
f789840d17
3 changed files with 10 additions and 6 deletions
|
@ -32,8 +32,9 @@ if [ "$info" = "Yes" ]; then
|
|||
file="/tmp/change-pass$(date +%s)"
|
||||
echo "$contents_nopass" > "$file"
|
||||
cp "$file" "$file-copy"
|
||||
[ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR $file" || \
|
||||
$TERMINAL -e $EDITOR $file
|
||||
$TSCRIPTS/run-on-terminal.sh $EDITOR $file
|
||||
# [ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR $file" || \
|
||||
# $TERMINAL -e $EDITOR $file
|
||||
[ -z "$(cat $file)" ] && notify-send "Operation CANCELLED" && \
|
||||
rm "$file" "$file-copy" && exit 1
|
||||
[ -z "$(diff "$file" "$file-copy")" ] && notify-send "Operation CANCELLED" \
|
||||
|
|
|
@ -15,6 +15,7 @@ comments="$(pass show "$site" | sed '1d')"
|
|||
|
||||
notify-send "This terminal will close in 45 seconds"
|
||||
|
||||
$TSCRIPTS/run-on-terminal.sh $SCRIPTS/eval.sh "\"echo \"$comments\" && sleep 45\""
|
||||
[ -z "${TERMINAL##*termite*}" ] && \
|
||||
$TERMINAL -e "$SCRIPTS/eval.sh \"echo \\\"$comments\\\" && sleep 45\"" \
|
||||
|| $TERMINAL -e $SCRIPTS/eval.sh "echo \"$comments\" && sleep 45"
|
||||
|
|
|
@ -47,8 +47,9 @@ if [ "$generate" = "Yes" ]; then
|
|||
contents="$(pwgen -ysBv 15 -N 1)\n$contents"
|
||||
if [ "$comments" = "Yes" ]; then
|
||||
file="/tmp/comments$(date +%s)"
|
||||
[ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR \"$file\"" \
|
||||
|| $TERMINAL -e $EDITOR "$file"
|
||||
$TSCRIPTS/run-on-terminal.sh $EDITOR $file
|
||||
# [ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR \"$file\"" \
|
||||
# || $TERMINAL -e $EDITOR "$file"
|
||||
[ -z "$(cat $file)" ] && notify-send "Operation CANCELLED" && exit 1
|
||||
contents="$contents\ncomments: $(cat "$file")"
|
||||
rm "$file"
|
||||
|
@ -79,8 +80,9 @@ else
|
|||
contents="$passwd\n$contents"
|
||||
if [ "$comments" = "Yes" ]; then
|
||||
file="/tmp/comments$(date +%s)"
|
||||
[ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR \"$file\"" \
|
||||
|| $TERMINAL -e $EDITOR "$file"
|
||||
$TSCRIPTS/run-on-terminal.sh $EDITOR $file
|
||||
# [ -z "${TERMINAL##*termite*}" ] && $TERMINAL -e "$EDITOR \"$file\"" \
|
||||
# || $TERMINAL -e $EDITOR "$file"
|
||||
contents="$contents\ncomments: $(cat "$file")"
|
||||
[ -z "$(cat $file)" ] && notify-send "Operation CANCELLED" && exit 1
|
||||
rm "$file"
|
||||
|
|
Loading…
Reference in a new issue