~cleaned up README
This commit is contained in:
115
Install.org
115
Install.org
@@ -1,115 +0,0 @@
|
|||||||
#+TITLE: Install
|
|
||||||
|
|
||||||
* Introduction
|
|
||||||
Each heading is a step in the install process.
|
|
||||||
Run each headings source code snippets as you progress through them.
|
|
||||||
Any snippets that have the tag =:optional:= can be avoided, and are likely extra functionality that you can use later on.
|
|
||||||
* Generate user directories
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :session *install-sh* :results none :tangle Install.sh
|
|
||||||
:END:
|
|
||||||
This makes some useful directories that are used by the system and/or by me.
|
|
||||||
I split these into two sections so at minimum you can install the system folders and generate the user folders if you wish.
|
|
||||||
** System folders
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
mkdir ~/.local;
|
|
||||||
mkdir ~/.local/src;
|
|
||||||
mkdir ~/.local/bin;
|
|
||||||
mkdir ~/.config;
|
|
||||||
#+END_SRC
|
|
||||||
** User folders :optional:
|
|
||||||
Firstly the essentials for a good user experience™
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
mkdir ~/Downloads ~/Pictures ~/Music;
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Then generate the other stuff that I use (mostly).
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
mkdir ~/Text;
|
|
||||||
mkdir ~/School;
|
|
||||||
mkdir ~/Code;
|
|
||||||
mkdir ~/Code/Learning;
|
|
||||||
mkdir ~/Code/Projects;
|
|
||||||
#+END_SRC
|
|
||||||
* Clone templates :optional:
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :session *install-sh* :results none :tangle Install.sh
|
|
||||||
:END:
|
|
||||||
These are templates coded by me (MIT licensed) which are basically boilerplate helpers for differing languages.
|
|
||||||
They allow me to quickly start coding up projects as they remove the hassle of setting the build system and source directories up manually.
|
|
||||||
They're cloned into =~/Code/Templates= not only so you can hack on them as you wish but also so you can generate templates even when offline just by copying the template you want and removing/replacing the '.git' directory in it.
|
|
||||||
|
|
||||||
Firstly you need the folders for the templates to be stored in, so =mkdir= them.
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
mkdir ~/Code;
|
|
||||||
mkdir ~/Code/Templates;
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Then clone the templates into the folder.
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
declare -a templates=("CTemplate" "CPPTemplate" "PythonTemplate"
|
|
||||||
"NodeTemplate" "ArduinoTemplate");
|
|
||||||
for template in ${templates[@]}; do
|
|
||||||
git clone https://github.com/odavep/$template ~/Code/Templates/$template;
|
|
||||||
done
|
|
||||||
#+END_SRC
|
|
||||||
* Managing modules
|
|
||||||
** What is stow?
|
|
||||||
GNU/Stow is a utility for symlinking folders (named as 'modules') to the home directory.
|
|
||||||
** How does stow work (roughly)?
|
|
||||||
Each module must be structure as if that module directory were to be mapped directly on to the home directory.
|
|
||||||
For example, the vim module which has only a vimrc file would be structured "~/Dotfiles/Vim/.vimrc" so that when it is stowed, the vimrc goes directly to "~/.vimrc"
|
|
||||||
This also means that if any files are already present that conflict with the module files, the stow will not work.
|
|
||||||
So make sure to clean up beforehand.
|
|
||||||
** Activating a module
|
|
||||||
Activating a module is as simple as just entering the dotfiles directory and entering 'stow <Module name>'.
|
|
||||||
This will symlink the contents of the internal directory to the home directory.
|
|
||||||
** Deleting a module
|
|
||||||
Deleting a module is a call to stow with the -d argument (i.e. 'stow -D <module name>').
|
|
||||||
This will delete the symlinks to all the files in the module, leaving the home directory clean of them.
|
|
||||||
** Activate all modules :optional:
|
|
||||||
Basically get all folders excluding the '.git' and '.' folder, then just stow them.
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
folders=`find . -maxdepth 1 -type 'd' -not -name '.git' -not -name '.'`;
|
|
||||||
|
|
||||||
# Symlink profiles
|
|
||||||
for pkg in $folders; do
|
|
||||||
echo "Stowing " $pkg;
|
|
||||||
stow $pkg
|
|
||||||
done
|
|
||||||
#+END_SRC
|
|
||||||
* Emacs support :optional:
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :session *install-el* :results none :tangle Install.el
|
|
||||||
:END:
|
|
||||||
** Get all modules in Dotfiles
|
|
||||||
The main function used to retrieve all the stowable modules in the Dotfiles directory.
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(defun +dotfiles-install/get-modules ()
|
|
||||||
"Get all modules in dotfiles directory"
|
|
||||||
(interactive)
|
|
||||||
(cdr
|
|
||||||
(reverse
|
|
||||||
(split-string
|
|
||||||
(shell-command-to-string "find ~/Dotfiles/ -maxdepth 1 -type 'd' -not -name '.git' -not -name '$USER/Dotfiles/'")
|
|
||||||
"\n"))))
|
|
||||||
(+dotfiles-install/get-modules)
|
|
||||||
#+END_SRC
|
|
||||||
** Install module
|
|
||||||
Little elisp snippet to stow a specific module in the Dotfiles folder using completing-read.
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(defun +dotfiles-install/install-module ()
|
|
||||||
(interactive)
|
|
||||||
(async-shell-command (format "stow %s" (completing-read "Stow module: " (+dotfiles-install/get-modules) nil t)) "*stow-output*" "*stow-error*"))
|
|
||||||
(+dotfiles-install/install-module)
|
|
||||||
#+END_SRC
|
|
||||||
** Delete module
|
|
||||||
Little elisp snippet to delete a stowed module in the Dotfiles folder using completing-read.
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(defun +dotfiles-install/delete-module ()
|
|
||||||
(interactive)
|
|
||||||
(async-shell-command
|
|
||||||
(format "stow -D %s" (completing-read "Delete module: " (+dotfiles-install/get-modules) nil t))
|
|
||||||
"*stow-output*" "*stow-error*"))
|
|
||||||
(+dotfiles-install/delete-module)
|
|
||||||
#+END_SRC
|
|
||||||
55
README.org
55
README.org
@@ -5,37 +5,30 @@
|
|||||||
* Introduction
|
* Introduction
|
||||||
My Dotfiles repository with configuration files for most of the
|
My Dotfiles repository with configuration files for most of the
|
||||||
applications I use on a daily basis.
|
applications I use on a daily basis.
|
||||||
* What do I use exactly?
|
|
||||||
- *[[https://www.gnu.org/software/emacs][Emacs]]* My premier editor, big bulky and beautiful
|
|
||||||
- *[[https://www.zsh.org/][ZSH]]* Shell program (objectively better than bash don't @ me)
|
|
||||||
- *[[https://st.suckless.org][Suckless terminal]]* Best terminal in the game: small, configurable and powerful
|
|
||||||
- *[[https://dwm.suckless.org][DWM]]* Yes I fell for the meme, but it's a great window manager and I
|
|
||||||
don't really need a lot of features
|
|
||||||
- *[[https://tools.suckless.org/dmenu][dmenu]]* Good launcher, fast and not gaudy
|
|
||||||
- *[[https://gitlab.com/dwt1/wallpapers][Wallpaper Collection]]* Fork of DistroTubes collection, with a few of
|
|
||||||
my own. Mostly his though lol.
|
|
||||||
* Install
|
* Install
|
||||||
Clone this into the =~/Dotfiles= directory, then use Install.org to install the
|
Clone this into the =~/Dotfiles= directory. Install Emacs. Win.
|
||||||
component(s) you want.
|
|
||||||
* Dependencies
|
|
||||||
|-----------------------+----------------+------------|
|
|
||||||
| Dependency | Version | Link |
|
|
||||||
|-----------------------+----------------+------------|
|
|
||||||
| Vim | 8 | [[https://www.vim.org/download.php][Vim]] |
|
|
||||||
| Emacs | 26.2+ | [[https://www.gnu.org/software/emacs/download.html][Emacs]] |
|
|
||||||
| Python | 3.6.8 and 2.7+ | [[https://www.python.org/downloads/][Python]] |
|
|
||||||
|-----------------------+----------------+------------|
|
|
||||||
|
|
||||||
Also a list of other stuff that I find cool:
|
** Installing Emacs
|
||||||
- clangd (C/C++ server)
|
I like a specific set of flags on my Emacs install. Prepackaged
|
||||||
- exctags
|
installs just won't cut it. Hence we're going to clone =emacs-27=
|
||||||
- pfetch
|
from GNU then compile it. Just run the following part:
|
||||||
- tmuxinator
|
|
||||||
* Project usage
|
|
||||||
Generate a template using emacs or the shell, run the startup and reset/delete
|
|
||||||
the .git folder. Then just start hacking at the code!
|
|
||||||
|
|
||||||
Use Emacs' compilation system if running no stdin programs or simple
|
#+begin_src sh
|
||||||
servers, otherwise use terminals (+ tmux if not running a tiling
|
cd .local/src/emacs;
|
||||||
window manager) for heavy servers because Emacs *will* slow down with
|
curl -LO http://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.gz
|
||||||
a heavy server running or eshell for this stdin based programs.
|
tar -xvf emacs-27.2.tar.gz .
|
||||||
|
./configure --with-xwidgets -with-threads --with-harfbuzz --with-jpeg --with-json --with-modules;
|
||||||
|
make;
|
||||||
|
sudo make install;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Currently used modules
|
||||||
|
- XServer
|
||||||
|
- vim
|
||||||
|
- Shell
|
||||||
|
- SystemD
|
||||||
|
- Emacs
|
||||||
|
- Mail
|
||||||
|
- mailcap
|
||||||
|
- Neovim
|
||||||
|
- ClangFormat
|
||||||
|
|||||||
Reference in New Issue
Block a user