From 813df737fd6c5e73dde897bf1278f2986f907347 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Fri, 5 Nov 2021 09:47:57 +0800 Subject: [PATCH] rename home to nixhome --- config-debian.sh | 4 ++-- config-home.sh | 16 ++++++++-------- {home => nixhome}/.bash_logout | 0 {home => nixhome}/.bash_profile | 0 {home => nixhome}/.bashrc | 0 {home => nixhome}/.cshrc | 0 {home => nixhome}/.emacs | 6 +++--- {home => nixhome}/.emacs.lisp/undo-tree.el | 0 {home => nixhome}/.emacs.lisp/web-beautify.el | 0 {home => nixhome}/.gitignore | 0 {home => nixhome}/.profile | 0 11 files changed, 13 insertions(+), 13 deletions(-) rename {home => nixhome}/.bash_logout (100%) rename {home => nixhome}/.bash_profile (100%) rename {home => nixhome}/.bashrc (100%) rename {home => nixhome}/.cshrc (100%) rename {home => nixhome}/.emacs (96%) rename {home => nixhome}/.emacs.lisp/undo-tree.el (100%) rename {home => nixhome}/.emacs.lisp/web-beautify.el (100%) rename {home => nixhome}/.gitignore (100%) rename {home => nixhome}/.profile (100%) diff --git a/config-debian.sh b/config-debian.sh index 0397fff..d146ab7 100755 --- a/config-debian.sh +++ b/config-debian.sh @@ -35,7 +35,7 @@ fi echo echo "<<< Configure root home" -source /faronear/fon/sysconfig/config-home.sh /faronear/fon/sysconfig/home +source /faronear/fon/sysconfig/config-home.sh /faronear/fon/sysconfig/nixhome echo echo "<<< Change root password" @@ -51,7 +51,7 @@ chmod 700 /home/$NewUser echo echo "<<< Configure $NewUser home" -source /faronear/fon/sysconfig/config-home.sh /faronear/fon/sysconfig/home /home/$NewUser +source /faronear/fon/sysconfig/config-home.sh /faronear/fon/sysconfig/nixhome /home/$NewUser echo # Debian 10 default to /bin/sh diff --git a/config-home.sh b/config-home.sh index 4ce4dc1..5ce030a 100755 --- a/config-home.sh +++ b/config-home.sh @@ -6,19 +6,19 @@ then else echo "Usage: setup.sh [Config-Source-Path] [User-Home-Path]" echo "---------------------------------------------" - read -p "Enter config source path (leave blank for [Users/luk.lu]/faronear/fon/sysconfig/home) >> " SourcePath + read -p "Enter config source path (leave blank for [Users/luk.lu]/faronear/fon/sysconfig/nixhome) >> " SourcePath if [ ! $SourcePath ] then - echo "Use default source path: [Users/luk.lu]/faronear/fon/sysconfig/home" - if [ -d /faronear/fon/sysconfig/home ] + echo "Use default source path: [Users/luk.lu]/faronear/fon/sysconfig/nixhome" + if [ -d /faronear/fon/sysconfig/nixhome ] then - SourcePath=/faronear/fon/sysconfig/home + SourcePath=/faronear/fon/sysconfig/nixhome else - if [ -d /Users/luk.lu/faronear/fon/sysconfig/home ] + if [ -d /Users/luk.lu/faronear/fon/sysconfig/nixhome ] then - SourcePath=/Users/luk.lu/faronear/fon/sysconfig/home + SourcePath=/Users/luk.lu/faronear/fon/sysconfig/nixhome else - SourcePath=`pwd`/home + SourcePath=`pwd`/nixhome fi fi fi @@ -35,7 +35,7 @@ if [ ! -d $SourcePath ] then echo "!!! Not existing $SourcePath, please try again" else - echo "Copy home scripts from $SourcePath" + echo "Copy nixhome scripts from $SourcePath" pushd $HomePath echo "---------------------------------------------" homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore" diff --git a/home/.bash_logout b/nixhome/.bash_logout similarity index 100% rename from home/.bash_logout rename to nixhome/.bash_logout diff --git a/home/.bash_profile b/nixhome/.bash_profile similarity index 100% rename from home/.bash_profile rename to nixhome/.bash_profile diff --git a/home/.bashrc b/nixhome/.bashrc similarity index 100% rename from home/.bashrc rename to nixhome/.bashrc diff --git a/home/.cshrc b/nixhome/.cshrc similarity index 100% rename from home/.cshrc rename to nixhome/.cshrc diff --git a/home/.emacs b/nixhome/.emacs similarity index 96% rename from home/.emacs rename to nixhome/.emacs index e78b891..304c033 100644 --- a/home/.emacs +++ b/nixhome/.emacs @@ -96,10 +96,10 @@ (setq scroll-conservatively 1) ;; destop auto-saving: +(load "desktop") (desktop-load-default) - -;; desktop auto-reloading when startup: -; (desktop-read) +(desktop-read) ; desktop auto-reloading when startup +(add-hook 'kill-emacs-hook '(lambda()(desktop-save "~/"))) ;当emacs退出时保存 ~/desktop 文件记录状态 ;; set scroll-bar-mode: ;(hscroll-global-mode t) diff --git a/home/.emacs.lisp/undo-tree.el b/nixhome/.emacs.lisp/undo-tree.el similarity index 100% rename from home/.emacs.lisp/undo-tree.el rename to nixhome/.emacs.lisp/undo-tree.el diff --git a/home/.emacs.lisp/web-beautify.el b/nixhome/.emacs.lisp/web-beautify.el similarity index 100% rename from home/.emacs.lisp/web-beautify.el rename to nixhome/.emacs.lisp/web-beautify.el diff --git a/home/.gitignore b/nixhome/.gitignore similarity index 100% rename from home/.gitignore rename to nixhome/.gitignore diff --git a/home/.profile b/nixhome/.profile similarity index 100% rename from home/.profile rename to nixhome/.profile