imprv: set terminal title
This commit is contained in:
@@ -78,6 +78,9 @@ item_types = ["VJOURNAL", "VTODO"]
|
|||||||
|
|
||||||
You may also specify the location of the configuration file with the environment `CONFIGFILE`.
|
You may also specify the location of the configuration file with the environment `CONFIGFILE`.
|
||||||
|
|
||||||
|
By default, `fzf-vjour` sets a descriptive terminal title.
|
||||||
|
This can be bypassed by specyfing `SET_TERMINAL_TITLE="no"` in the configuration file.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
Use the default `fzf` keys to navigate your notes, e.g., `ctrl-j` and `ctrl-k` for going down/up in the list.
|
Use the default `fzf` keys to navigate your notes, e.g., `ctrl-j` and `ctrl-k` for going down/up in the list.
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Set terminal title
|
|
||||||
printf '\033]0;%s\007' "fzf-vjour | Journal, notes, and tasks"
|
|
||||||
|
|
||||||
# Always load functions
|
# Always load functions
|
||||||
# Helper functions
|
# Helper functions
|
||||||
. "sh/helper.sh"
|
. "sh/helper.sh"
|
||||||
@@ -122,6 +119,11 @@ if [ -n "${list_option:-}" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set terminal title
|
||||||
|
if [ "$SET_TERMINAL_TITLE" = "yes" ]; then
|
||||||
|
printf '\033]0;%s\007' "$TERMINAL_TITLE"
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
query=$(stripws "$query")
|
query=$(stripws "$query")
|
||||||
selection=$(
|
selection=$(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
CONFIGFILE="${CONFIGFILE:-$HOME/.config/fzf-vjour/config}"
|
CONFIGFILE="${CONFIGFILE:-$HOME/.config/fzf-vjour/config}"
|
||||||
|
export TERMINAL_TITLE="🗃️ fzf-vjour | Journal, notes, and tasks"
|
||||||
if [ ! -f "$CONFIGFILE" ]; then
|
if [ ! -f "$CONFIGFILE" ]; then
|
||||||
err "Configuration '$CONFIGFILE' not found."
|
err "Configuration '$CONFIGFILE' not found."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -14,9 +15,11 @@ if [ ! -d "$ROOT" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
SYNC_CMD="${SYNC_CMD:-}"
|
SYNC_CMD="${SYNC_CMD:-}"
|
||||||
|
SET_TERMINAL_TITLE="${SET_TERMINAL_TITLE:-yes}"
|
||||||
export ROOT
|
export ROOT
|
||||||
export SYNC_CMD
|
export SYNC_CMD
|
||||||
export COLLECTION_LABELS
|
export COLLECTION_LABELS
|
||||||
|
export SET_TERMINAL_TITLE
|
||||||
for i in $(seq 9); do
|
for i in $(seq 9); do
|
||||||
collection=$(printf "%s" "$COLLECTION_LABELS" | cut -d ';' -f "$i" | cut -d '=' -f 1)
|
collection=$(printf "%s" "$COLLECTION_LABELS" | cut -d ';' -f "$i" | cut -d '=' -f 1)
|
||||||
label=$(printf "%s" "$COLLECTION_LABELS" | cut -d ';' -f "$i" | cut -d '=' -f 2)
|
label=$(printf "%s" "$COLLECTION_LABELS" | cut -d ';' -f "$i" | cut -d '=' -f 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user