2013-10-18 21:12:00 +02:00
|
|
|
# Unix Home Configuration
|
2014-11-13 11:48:15 +01:00
|
|
|
### Author: P. Neidhardt
|
2012-06-18 12:04:02 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
## Overview
|
2013-01-12 10:18:41 +01:00
|
|
|
|
2013-07-04 10:37:06 +02:00
|
|
|
This repository contains scripts and configuration files for various Unix
|
2015-10-12 19:45:39 +02:00
|
|
|
programs. I tried hard to maintain universality: it should work anywhere (Arch
|
|
|
|
Linux, FreeBSD...), with whichever version of the programs. In the worst case,
|
|
|
|
very few modifications will be necessary.
|
2012-06-21 17:34:18 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Most interesting parts include advanced configuration for Awesome, Emacs, Mutt,
|
|
|
|
ranger, Zsh and some shell scripts.
|
2012-06-18 12:04:02 +02:00
|
|
|
|
2013-10-18 21:12:00 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2014-11-13 11:48:15 +01:00
|
|
|
## Description
|
|
|
|
|
|
|
|
### Awesome
|
2013-10-18 21:12:00 +02:00
|
|
|
|
|
|
|
* Extra deps: Vicious (Linux only)
|
2012-06-18 12:04:02 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Configuration is very close to the default one with some features removed
|
|
|
|
(bindings, mouse control, context menu). The main new feature is the status bar:
|
|
|
|
dynamic network speed (it checks for different interfaces), CPU speed, a battery
|
|
|
|
indicator that will not show up if no battery is detected, and sound volume. The
|
|
|
|
implementation is straightforward since I am using the Vicious plugin.
|
2012-06-18 12:04:02 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
This configuration is very version-sensitive, so make sure to use the latest
|
|
|
|
build.
|
2013-05-31 19:01:32 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
### Emacs
|
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Emacs daemon is flawlessly integrated thanks to a small _em_ script -- see the
|
2015-10-19 15:15:12 +02:00
|
|
|
scripts folder. _em_ forks and does not return. _emw_ and _emc_ (windowed and
|
|
|
|
console version respectively) return to their caller. This can be useful in some
|
|
|
|
contexts: Mutt, ranger bulkrename, git and web editing. The windowed version of
|
|
|
|
Emacs is not limited to terminal capabilities. The console version has the
|
|
|
|
advantage of not spawning a new window when already running in console.
|
|
|
|
|
|
|
|
I wrote a lot of Lisp helper functions and a custom theme with 256 colors, works
|
|
|
|
for both text and graphical Emacs.
|
2012-10-13 13:47:04 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
C-based modes: bindings to compile either from makefile or from a custom command
|
|
|
|
if no makefile is found, formatting with Uncrustify, skeletons.
|
2012-06-18 12:04:02 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
TeX and LaTeX full-featured environment: no AucTeX, itemize function, skeletons,
|
|
|
|
compilation with various engines and index support, external PDF view with
|
|
|
|
SyncTeX support, temp files clean function, PDF compression.
|
2014-11-13 11:48:15 +01:00
|
|
|
|
|
|
|
### Mutt
|
2013-10-18 21:12:00 +02:00
|
|
|
|
|
|
|
* Compile options: IMAP and SMTP support.
|
|
|
|
* Patch: sidebar.
|
|
|
|
* Extra deps: antiword, ccrypt, fortune, sxiv, w3m.
|
2012-07-09 18:39:55 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Support for multiple accounts with encrypted passwords. (Mutt will prompt for
|
|
|
|
the master password only once.) I use ccrypt for password management because it
|
|
|
|
is much simpler than gnupg.
|
2012-07-05 13:14:00 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
I use embedded IMAP and SMTP services which need appropriate compilation
|
|
|
|
options. Embedded IMAP does not need to store e-mails locally. To speed-up
|
|
|
|
e-mail queries, I cache them on disk. When the disk usage limit is reached, the
|
|
|
|
older cached e-mails are erased until the cache shrink below the limit again.
|
2012-07-05 13:14:00 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Some customization: custom index view, good Emacs integration (see .emacs.d),
|
2012-07-20 17:04:29 +02:00
|
|
|
custom theme (matches Emacs colors), various tweaks.
|
2012-06-21 17:34:18 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
For universal terminal support, the colorset.sh script will check terminal
|
|
|
|
capabilities and load colors appropriately.
|
2012-10-13 13:47:04 +02:00
|
|
|
|
2012-08-01 15:45:33 +02:00
|
|
|
URxvt has an URL support that works also for Mutt. For other terminals, you
|
|
|
|
might consider using the 'urlview' plugin for Mutt.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
### Ranger
|
2013-10-18 21:12:00 +02:00
|
|
|
|
|
|
|
* Extra deps: antiword, atool, highlight, img2txt, mediainfo, odt2txt, pdftotext,
|
2013-02-22 20:10:31 +01:00
|
|
|
unrtf, w3m.
|
2012-07-17 18:32:15 +02:00
|
|
|
|
2013-12-10 16:49:12 +01:00
|
|
|
Custom bindings, file association, tweaked a few options, additional functions
|
|
|
|
(mkcd, extracthere...).
|
2012-06-25 15:09:34 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
### Scripts
|
2012-08-01 15:45:33 +02:00
|
|
|
|
2013-05-31 19:01:32 +02:00
|
|
|
Probably the most interesting part here.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* archive: simple tar wrapper to create archive for files and folders.
|
2013-04-13 20:23:47 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* asciify: convert many non-ASCII characters to their nearest ASCII counterpart.
|
2013-04-13 20:23:47 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* bsdman: read *BSD man pages.
|
2014-02-14 01:49:50 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* crun: quick way to execute C files.
|
2013-05-31 19:01:32 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
* currency: currency converter.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* dataindex: create index of hierarchies. Useful to keep track of folder content
|
2014-02-14 01:49:50 +01:00
|
|
|
and structure.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* ediff: diff with Emacs.
|
2013-04-13 20:23:47 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* einfo: info viewer with Emacs.
|
2014-03-22 12:16:20 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* elisp: Emacs Lisp interpreter using Emacs.
|
2014-02-14 01:49:50 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* extract: simple tar wrapper to extract archives. Atool should be preferred if
|
2014-03-22 12:16:20 +01:00
|
|
|
available.
|
2013-04-13 20:23:47 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* git-*: some git helper functions for sync and so on.
|
2014-02-14 01:49:50 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* homeinit: initialize a new home configuration, i.e. get needed files, create
|
2013-05-31 19:01:32 +02:00
|
|
|
symlinks, etc.
|
2012-08-01 15:45:33 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* imagemount: a CDEmu/fuseiso wrapper that creates/deletes virtual drives
|
2014-03-22 12:16:20 +01:00
|
|
|
automatically.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* mover: move and merge folder into destination.
|
2014-03-22 12:16:20 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* netinit: network setup. Works with wpa_supplicant. May replace any network
|
2013-05-31 19:01:32 +02:00
|
|
|
manager.
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* pac*: pacman helper functions.
|
2014-03-22 12:16:20 +01:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* pdf*: PDF manipulation, e.g. extract pages, compress, resize to A4.
|
2013-05-31 19:01:32 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* pkggen: generate lists of installed with pacman, FreeBSD's pkg and tlmgr (TeX
|
2013-05-31 19:01:32 +02:00
|
|
|
Live manager).
|
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
* tc-video-*: batch conversion of any kind of videos. Using FFmpeg.
|
2012-08-01 15:45:33 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
### Shell
|
2013-10-18 21:12:00 +02:00
|
|
|
|
|
|
|
* Target: POSIX shell, dash, zsh
|
2012-06-25 15:09:34 +02:00
|
|
|
|
2015-10-12 19:45:39 +02:00
|
|
|
Features: aliases, functions, shell options, etc.
|
|
|
|
Most of the shell configuration is POSIX and works with dash.
|
2012-06-25 15:09:34 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
### TeX
|
2012-10-13 13:47:04 +02:00
|
|
|
|
2013-04-13 20:23:47 +02:00
|
|
|
Plain TeX macros, most importantly a partial UTF-8 support (taken from LaTeX).
|
2015-10-12 19:45:39 +02:00
|
|
|
Plain TeX macros are in the '.texmf' folder. Some Asymptote functions.
|
2014-11-13 11:48:15 +01:00
|
|
|
|
|
|
|
### URxvt
|
2013-10-18 21:12:00 +02:00
|
|
|
|
|
|
|
* Extra deps: Muennich's perl extensions (keyboard-select, clipboard, url-matcher)
|
2012-08-23 13:33:47 +02:00
|
|
|
|
|
|
|
Custom font and colors, no scroll bar, url-matcher, clipboard, and
|
|
|
|
keyboard-select.
|
2012-07-17 18:32:15 +02:00
|
|
|
|
2013-10-18 21:12:00 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2014-11-13 11:48:15 +01:00
|
|
|
## Versioning
|
2013-05-31 19:01:32 +02:00
|
|
|
|
|
|
|
Git makes it possible to use your home folder as a git repo, thus versioning
|
2014-11-13 11:48:15 +01:00
|
|
|
all files directly.
|
2013-05-31 19:01:32 +02:00
|
|
|
|
2014-11-13 11:48:15 +01:00
|
|
|
cd
|
|
|
|
git init
|
|
|
|
git remote add origin <repo>
|
|
|
|
git fetch
|
|
|
|
git branch master origin/master
|
|
|
|
git checkout master
|
2013-05-31 19:01:32 +02:00
|
|
|
|
|
|
|
Some applications will need extra dependencies other than the default ones. You
|
2015-10-12 19:45:39 +02:00
|
|
|
might have a look at the lists in the `.pkg/` folder to know what software I
|
|
|
|
have ve been using.
|
2013-05-31 19:01:32 +02:00
|
|
|
|
2013-10-18 21:12:00 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2014-11-13 11:48:15 +01:00
|
|
|
## Known issues
|
2013-10-27 20:24:40 +01:00
|
|
|
|
2013-11-01 20:32:07 +01:00
|
|
|
* All scripts take a strong point at being POSIX. However, there is no POSIX way
|
|
|
|
(at least to my knowledge) to execute a shell function on the result of a
|
|
|
|
'find'. Neither 'find' nor 'xargs' can execute shell functions. One solution
|
|
|
|
to this would be to call an external script, but then we lose all global
|
|
|
|
variables. For now we assume no input file has newline, which is quite a
|
|
|
|
strong assumption and not safe at all.
|