OSDN Git Service

add instantterminalhelp
authorpaperbenni <paperbenni@gmail.com>
Thu, 11 Jun 2020 15:05:11 +0000 (17:05 +0200)
committerpaperbenni <paperbenni@gmail.com>
Thu, 11 Jun 2020 15:05:11 +0000 (17:05 +0200)
autostart.sh
programs/instantterminalhelp [new file with mode: 0644]

index 4e014b7..13a2aae 100755 (executable)
@@ -271,7 +271,7 @@ fi
 # displays message user opens the terminal for the first time
 if ! iconf -i nohelp; then
        if ! grep -q 'instantterminalhelp' ~/.zshrc; then
-               echo "instantterminalhelp" >>~/.zshrc
+               echo '[[ $- == *i* ]] && instantterminalhelp' >>~/.zshrc
        fi
 fi
 
diff --git a/programs/instantterminalhelp b/programs/instantterminalhelp
new file mode 100644 (file)
index 0000000..8594e74
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# first time help message when opening the terminal
+
+echo "Welcome
+> instantOS is using the st terminal emulator and tmux terminal multiplexer
+> Because of this, some things work differently
+> selecting text is done with Shift + Left mouse button
+> Copy Paste is Ctrl + Shift + C/V
+> Font size is set with Ctrl + +/-
+> Confituration is done with Xresources or rolling your own st build
+OK
+Don't show again" | imenu -l >/tmp/helpmsg
+
+if grep '^Don' /tmp/helpmsg; then
+    sed -i 's/.*instanttermhelp.*//g' ~/.zshrc
+    iconf -i nohelp 1
+fi