From f0f6df63b64415d4591564c99f42362d1c526265 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 12 Apr 2024 17:49:36 -0400 Subject: Sixel previews with lf --- .config/lf/scope | 130 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 45 deletions(-) diff --git a/.config/lf/scope b/.config/lf/scope index cc55669..139a5af 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -1,56 +1,96 @@ #!/bin/sh -# File preview handler for lf. - set -C -f -IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" - -image() { - if [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then - printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG" - else - mediainfo "$6" - fi +IFS="$(printf '%b_' '\n')" +IFS="${IFS%_}" + +PREVIEW_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/lf" +PREVIEW_WIDTH=600 # px + +# TODO: Render in the original width when it's smaller than PREVIEW_WIDTH + +# PrefixGen: generates a hash prefix for the given file +# This is a unique identifier for the file to preview +PrefixGen() { + sha256sum "$(readlink -f "$1")" | cut -d' ' -f1 } -ifub() { - [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1 +# SuffixGen: generates a hash suffix for the given file +# This suffix is used to determine if the preview is outdated +SuffixGen() { + stat -Lc "%Y" "$1" } -# Note that the cache file name is a function of file information, meaning if -# an image appears in multiple places across the machine, it will not have to -# be regenerated once seen. +# Prevent recursive thumbnails (if the file ends in .six) +[ "${1##*.}" = "six" ] && cat "$1" && exit 1 case "$(file --dereference --brief --mime-type -- "$1")" in - image/avif) CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" - [ ! -f "$CACHE" ] && convert "$1" "$CACHE.jpg" - image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;; - image/vnd.djvu) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" - [ ! -f "$CACHE" ] && djvused "$1" -e 'select 1; save-page-with /dev/stdout' | convert -density 200 - "$CACHE.jpg" > /dev/null 2>&1 - image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;; - image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; - text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; - text/troff) man ./ "$1" | col -b ;; - text/* | */xml | application/json | application/x-ndjson) bat --terminal-width "$(($4-2))" -f "$1" ;; - audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; - video/* ) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" - [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 - image "$CACHE" "$2" "$3" "$4" "$5" "$1" - ;; - */pdf) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" - [ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE" - image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" - ;; - */epub+zip|*/mobi*) - CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" - [ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg" - image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" - ;; - application/*zip) atool --list -- "$1" ;; - *opendocument*) odt2txt "$1" ;; - application/pgp-encrypted) gpg -d -- "$1" ;; +text/html) + lynx -width="$4" -display_charset=utf-8 -dump "$1" + ;; +text/troff) + man ./ "$1" | col -b + ;; +text/* | */xml | application/json | application/x-ndjson) + bat --terminal-width "$(($4 - 2))" -f "$1" + ;; +audio/* | application/octet-stream) + mediainfo "$1" || exit 1 + ;; +image/vnd.djvu) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + djvused "$1" -e 'select 1; save-page-with /dev/stdout' | + convert djvu:- png:- | + img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +image/*) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + img2sixel -S -E size -q high -w $PREVIEW_WIDTH "$1" -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +*/pdf) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + pdftocairo -singlefile -scale-to-x $PREVIEW_WIDTH -scale-to-y -1 -png "$1" - | + img2sixel -S -E size -q high -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +video/*) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + # XXX: thumbnail seems to get re-generated every time the file is selected + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + ffmpegthumbnailer -i "$1" -s 0 -c png -f -o - | + img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +application/*zip) + atool --list -- "$1" + ;; +*opendocument*) + odt2txt "$1" + ;; +application/pgp-encrypted) + gpg -d -- "$1" + ;; esac + exit 1 -- cgit v1.2.3 From 27b33a3f9e87b9e582041c5740e5f95be43470fc Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 12 Apr 2024 18:36:52 -0400 Subject: old image previews cleaner script --- .local/bin/previewclean | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .local/bin/previewclean diff --git a/.local/bin/previewclean b/.local/bin/previewclean new file mode 100755 index 0000000..8b0a570 --- /dev/null +++ b/.local/bin/previewclean @@ -0,0 +1,10 @@ +#!/bin/sh + +threshold="200000" # 200 MB +previewdir="${XDG_CACHE_HOME:-$HOME/.cache}/lf" + +# Check if the total size of the preview directory exceeds the threshold +# and remove the last viewed file until it doesn't +while [ "$(du -s "$previewdir" | cut -f1)" -gt "$threshold" ]; do + rm -f "$(find "$previewdir" -type f -printf '%T+ %p\n' | sort | head -n1 | cut -d' ' -f2)" +done -- cgit v1.2.3 From 515235c97a0ffd05dd38e4444d34d05ce213777a Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 13 Apr 2024 09:58:22 -0400 Subject: Update scope previews --- .config/lf/scope | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/lf/scope b/.config/lf/scope index 139a5af..43a91f0 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -74,7 +74,6 @@ video/*) prefix="$(PrefixGen "$1")" suffix="$(SuffixGen "$1")" filename="$prefix-$suffix" - # XXX: thumbnail seems to get re-generated every time the file is selected [ ! -f "$PREVIEW_DIR/$filename.six" ] && { rm -f "$PREVIEW_DIR/$prefix-*" ffmpegthumbnailer -i "$1" -s 0 -c png -f -o - | -- cgit v1.2.3 From b91e290d6bfb333f064fa1abc7e5560cd25beff5 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 13 Apr 2024 17:40:33 -0400 Subject: General housekeeping --- .config/sxhkd/sxhkdrc | 8 ++++---- .config/xresources/workstation | 7 ------- .local/bin/lfub | 25 ------------------------- .local/bin/updatestatus | 2 +- .profile | 5 +++-- .xinitrc | 4 ++-- 6 files changed, 10 insertions(+), 41 deletions(-) delete mode 100644 .config/xresources/workstation delete mode 100755 .local/bin/lfub diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 51b03cb..14125d6 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -146,8 +146,11 @@ super + e XF86WLAN killall nmtui || dropdowntoggle network nmtui ## TUI Audio Mixer (pulsemixer) +super + shift + p + killall pulsemixer || dropdowntoggle audio pulsemixer +## Display selector (connect to projector/secondary monitor) super + p - killall pulsemixer || dropdowntoggle bluetooth pulsemixer + displayselect ## TODOs (orgmode-nvim) super + space dropdowntoggle orgmode nvim +"Neorg index" @@ -165,9 +168,6 @@ super + r ## Application Launcher super + d j4-dmenu-desktop -## Display Layout Selector -super + shift + d - displayselect ## Emoji & Font-Awesome Selector alt + grave emoji-copy diff --git a/.config/xresources/workstation b/.config/xresources/workstation deleted file mode 100644 index 2d6d9c9..0000000 --- a/.config/xresources/workstation +++ /dev/null @@ -1,7 +0,0 @@ -Xft.dpi: 96 -Xft.autohing: 0 -Xft.lcdfilter: lcddefault -Xft.hintstyle: hintfull -Xft.hinting: 1 -Xft.antialias: 1 -Xft.rgba: rgb diff --git a/.local/bin/lfub b/.local/bin/lfub deleted file mode 100755 index 43a7ef9..0000000 --- a/.local/bin/lfub +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# This is a wrapper script for lb that allows it to create image previews with -# ueberzug. This works in concert with the lf configuration file and the -# lf-cleaner script. - -set -e - -cleanup() { - exec 3>&- - rm "$FIFO_UEBERZUG" -} - -if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then - lf "$@" -else - [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf" - export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" - mkfifo "$FIFO_UEBERZUG" - ueberzug layer -s -p json <"$FIFO_UEBERZUG" & - exec 3>"$FIFO_UEBERZUG" - trap cleanup HUP INT QUIT TERM PWR EXIT - lf "$@" 3>&- - killall ueberzug >/dev/null 2>&1 -fi diff --git a/.local/bin/updatestatus b/.local/bin/updatestatus index aedbb84..7000608 100755 --- a/.local/bin/updatestatus +++ b/.local/bin/updatestatus @@ -4,7 +4,7 @@ time="$($1)" [ -z "$1" ] && time="5" # Prevent "no such file or directory" on 1st run -genlop -c >/tmp/genlop +clear && genlop -c >/tmp/genlop while true; do cat /tmp/genlop diff --git a/.profile b/.profile index 0055553..b86c829 100644 --- a/.profile +++ b/.profile @@ -19,13 +19,14 @@ export DISTRIB_ID=arch export DISTRIB_RELEASE=$(uname -r) export XDG_CONFIG_HOME=$HOME/.config export XDG_DATA_HOME=$HOME/.local/share +export XDG_CACHE_HOME=$HOME/.cache export R_PROFILE_USER=$HOME/.config/R/Rprofile export ZDOTDIR=$XDG_CONFIG_HOME/zsh export TEXMFHOME=$XDG_DATA_HOME/texmf export TEXSRC=$HOME/.local/src/sherbrooke-tex # Applications -export EDITOR=$(which nvim) +export EDITOR=/usr/bin/nvim export READER=/usr/bin/zathura export TERMINAL=/usr/local/bin/st export TERM=/usr/local/bin/st @@ -46,7 +47,7 @@ shortcutgen aliasgen # Import shortcut ENV variables -source "$HOME/.cache/env-shortcuts" +source "$XDG_CACHE_HOME/env-shortcuts" # Ensure XDG_RUNTIME_DIR is set if test -z "$XDG_RUNTIME_DIR"; then diff --git a/.xinitrc b/.xinitrc index c98de06..5e0df62 100644 --- a/.xinitrc +++ b/.xinitrc @@ -3,8 +3,8 @@ sxhkd & dunst & unclutter & picom -b & -echo us >$HOME/.cache/layout -xrdb -load $HOME/.Xresources +echo us >"$HOME/.cache/layout" +xrdb -load "$HOME/.Xresources" flashfocus -n 30 -t 150 -l never -o 0.75 -v ERROR & dwmblocks & remaps & -- cgit v1.2.3 From 3a3061d5dfe46d82d3fc90b1e7c919581b1f9662 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sat, 13 Apr 2024 17:43:43 -0400 Subject: Compile R flavoured LaTeX with xelatex (knitr) --- .local/bin/compiler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/compiler b/.local/bin/compiler index 220b4a9..e6a6db3 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -28,7 +28,7 @@ case "$file" in # *\.gd) groffdown "$file" | refer -PS -e "$REFERBIB" | groff -me -ms -kejpt -T pdf > "$base".pdf ;; *\.mom) refer -PS -e -p"$REFERBIB" "$file" | groff -mom -kejpt -T pdf >"$base".pdf ;; *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;; -*\.rnw) Rscript -e "knitr::knit2pdf('""$file""')" ;; +*\.rnw) Rscript -e "knitr::knit2pdf('""$file""',compiler='xelatex')" ;; *\.tex) textype "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *config.h) make && sudo make install ;; -- cgit v1.2.3 From 54aa168ae10bbbaac3c9c208ae29d7846bbc021e Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 21 Apr 2024 16:42:52 -0400 Subject: Add xlsx previews as csv to lf --- .config/lf/scope | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/lf/scope b/.config/lf/scope index 43a91f0..6614dad 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -84,6 +84,9 @@ video/*) application/*zip) atool --list -- "$1" ;; +*spreadsheetml.sheet) + xlsx2csv -s 1 "$1" | bat --terminal-width "$(($4 - 2))" -l 'csv' + ;; *opendocument*) odt2txt "$1" ;; -- cgit v1.2.3 From 3848e94ab860d87ae28acc0cf4e98487785c558f Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 21 Apr 2024 16:43:33 -0400 Subject: lf only starts as a single process (not a server) --- .config/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index ddee6ea..d0cd6a7 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -91,7 +91,7 @@ source $HOME/.cache/shell-vars lfcd () { tmp="$(mktemp -uq)" trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT - lfub -last-dir-path="$tmp" "$@" + lf -single -last-dir-path="$tmp" "$@" if [ -f "$tmp" ]; then dir="$(cat "$tmp")" [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" -- cgit v1.2.3 From 134390ef26224ecdd7a141125b854a584e201a3c Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 21 Apr 2024 19:42:23 -0400 Subject: Only hash paths for lf preview --- .config/lf/scope | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.config/lf/scope b/.config/lf/scope index 6614dad..f396519 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -12,7 +12,11 @@ PREVIEW_WIDTH=600 # px # PrefixGen: generates a hash prefix for the given file # This is a unique identifier for the file to preview PrefixGen() { - sha256sum "$(readlink -f "$1")" | cut -d' ' -f1 + # The file path is hashed instead of the file itself since large files + # can take a long time to hash and the file path is usually enough to + # uniquely identify the file. Also, the suffix is used to determine if + # the preview is outdated (which removes the need to hash the file). + readlink -f "$1" | sha256sum | cut -d' ' -f1 } # SuffixGen: generates a hash suffix for the given file @@ -44,7 +48,28 @@ image/vnd.djvu) [ ! -f "$PREVIEW_DIR/$filename.six" ] && { rm -f "$PREVIEW_DIR/$prefix-*" djvused "$1" -e 'select 1; save-page-with /dev/stdout' | - convert djvu:- png:- | + convert djvu:- ppm:- | + img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +image/webp) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + dwebp "$1" -tiff -o - | img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" + } + cat "$PREVIEW_DIR/$filename.six" + ;; +image/heic) + prefix="$(PrefixGen "$1")" + suffix="$(SuffixGen "$1")" + filename="$prefix-$suffix" + [ ! -f "$PREVIEW_DIR/$filename.six" ] && { + rm -f "$PREVIEW_DIR/$prefix-*" + convert "$1" ppm:- | img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" } cat "$PREVIEW_DIR/$filename.six" @@ -65,7 +90,7 @@ image/*) filename="$prefix-$suffix" [ ! -f "$PREVIEW_DIR/$filename.six" ] && { rm -f "$PREVIEW_DIR/$prefix-*" - pdftocairo -singlefile -scale-to-x $PREVIEW_WIDTH -scale-to-y -1 -png "$1" - | + pdftocairo -singlefile -scale-to-x $PREVIEW_WIDTH -scale-to-y -1 -jpeg "$1" - | img2sixel -S -E size -q high -o "$PREVIEW_DIR/$filename.six" } cat "$PREVIEW_DIR/$filename.six" @@ -76,7 +101,7 @@ video/*) filename="$prefix-$suffix" [ ! -f "$PREVIEW_DIR/$filename.six" ] && { rm -f "$PREVIEW_DIR/$prefix-*" - ffmpegthumbnailer -i "$1" -s 0 -c png -f -o - | + ffmpegthumbnailer -i "$1" -s 0 -c jpeg -f -o - | img2sixel -S -E size -q high -w $PREVIEW_WIDTH -o "$PREVIEW_DIR/$filename.six" } cat "$PREVIEW_DIR/$filename.six" -- cgit v1.2.3 From 7953328b33b92206d494afbf8207ff033788176a Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 21 Apr 2024 22:00:14 -0400 Subject: Matching colors for dwm & dmenu --- .Xresources | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.Xresources b/.Xresources index 5068056..76696db 100644 --- a/.Xresources +++ b/.Xresources @@ -41,6 +41,11 @@ ! No support for cursor text coloring; would be #1e232b. ! No support for bold coloring; would be #626a73. +dmenu.background: #1b1d1b +dmenu.foreground: #447a6c +dmenu.color11: #7d4b23 +dmenu.color0: #1b1d1b + !other *.alpha: 0.80 -- cgit v1.2.3 From 26ec2e5dc6e8c2369ecb34b642db546327a8b7dd Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 21 Apr 2024 23:35:51 -0400 Subject: Fix blocks spacing for dwmblocks scripts --- .local/bin/dwmbar/dwmb-eselect | 2 +- .local/bin/dwmbar/dwmb-layout | 2 +- .local/bin/dwmbar/dwmb-time | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.local/bin/dwmbar/dwmb-eselect b/.local/bin/dwmbar/dwmb-eselect index 2d83c8b..24372b4 100755 --- a/.local/bin/dwmbar/dwmb-eselect +++ b/.local/bin/dwmbar/dwmb-eselect @@ -1,6 +1,6 @@ #!/bin/sh -icon="" +icon="  " total="$(eselect news count all)" unread="$(eselect news count new)" diff --git a/.local/bin/dwmbar/dwmb-layout b/.local/bin/dwmbar/dwmb-layout index 9416a2e..1455398 100755 --- a/.local/bin/dwmbar/dwmb-layout +++ b/.local/bin/dwmbar/dwmb-layout @@ -1,3 +1,3 @@ #!/bin/sh -echo " $(cat $HOME/.cache/layout)" +echo "  $(cat "$HOME/.cache/layout")" diff --git a/.local/bin/dwmbar/dwmb-time b/.local/bin/dwmbar/dwmb-time index fc17227..bbd6585 100755 --- a/.local/bin/dwmbar/dwmb-time +++ b/.local/bin/dwmbar/dwmb-time @@ -1,4 +1,3 @@ #!/bin/sh date +"  %H:%M " - -- cgit v1.2.3