Go to file
Pierre Neidhardt baab2d5377 Mutt: Remove N/O flag with one key stroke 2015-10-17 09:28:49 +02:00
.asy Replace TikZ samples for Asymptote samples 2015-01-08 12:07:57 +01:00
.cmus cmus: Separate compilation artist and album_artist 2014-10-07 17:47:20 +02:00
.config sxiv: Fix 'orient' key handler 2015-10-14 15:35:24 +02:00
.emacs.d Emacs: Make cc-fmt work on region 2015-10-17 09:27:58 +02:00
.gnupg GPG: Init gpg.cong 2015-10-13 18:25:39 +02:00
.kbd keymaps: Remove frex 2015-09-23 13:26:25 +02:00
.local/share Reformat with tabs and more consistent style 2014-11-12 18:00:08 +01:00
.mutt Mutt: Remove N/O flag with one key stroke 2015-10-17 09:28:49 +02:00
.pkg pkg: Update 2015-10-15 17:55:27 +02:00
.scripts scripts/winefps: Refactor 2015-10-15 12:57:03 +02:00
.shell.d shell.d/funs_rc: Refactor 2015-10-15 14:31:30 +02:00
.texmf/tex Replace TikZ samples for Asymptote samples 2015-01-08 12:07:57 +01:00
.textadept Textadept: Package manager reads from a list of URI and updates/clones 2014-11-04 17:29:52 +01:00
.xkb xkb: Alt Gr + Space = nbsp 2015-09-04 10:20:00 +02:00
.Xresources Xresources: using primary selection instead of clipboard 2014-03-20 09:02:34 +01:00
.gitconfig gitconfig: Set xz archive format 2015-10-07 16:35:23 +02:00
.gitignore gitignore: Add log, tmp, and elpa 2014-03-13 15:51:28 +01:00
.gprc gprc: PARI/GP init file. 2013-06-17 17:29:04 +02:00
.profile profile: Fix systemd error reporting 2015-07-24 11:06:33 +02:00
.uncrustify.cfg uncrustify: Remove space between braces 2015-09-08 19:17:12 +02:00
.xinitrc Reformat with tabs and more consistent style 2014-11-12 18:00:08 +01:00
.xprofile Awesome: Remove mouse related settings, simplify use 2014-11-25 09:41:12 +01:00
.yaourtrc yaourt: Set non-forking editor (does not work) 2015-09-10 09:57:00 +02:00
.zshrc Reformat with tabs and more consistent style 2014-11-12 18:00:08 +01:00
README.md README: Move app list to home page 2015-10-12 19:45:39 +02:00

README.md

Unix Home Configuration

Author: P. Neidhardt

Overview

This repository contains scripts and configuration files for various Unix 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.

Most interesting parts include advanced configuration for Awesome, Emacs, Mutt, ranger, Zsh and some shell scripts.


Description

Awesome

  • Extra deps: Vicious (Linux only)

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.

This configuration is very version-sensitive, so make sure to use the latest build.

dwb

Some custom options, download location, search engines, plugins, etc. Custom "fast-forward" javascript.

Emacs

Emacs daemon is flawlessly integrated thanks to a small em script -- see the scripts folder. Unlike the terminal client, the graphical client does not return and spawns a new window. For these reasons the terminal client can prove useful in some contexts: Mutt, ranger bulkrename, git and dwb. I wrote a lot of Lisp helper functions and a custom theme with 256 colors, works for both text and graphical Emacs.

C-based modes: bindings to compile either from makefile or from a custom command if no makefile is found, formatting with Uncrustify, skeletons.

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.

Mutt

  • Compile options: IMAP and SMTP support.
  • Patch: sidebar.
  • Extra deps: antiword, ccrypt, fortune, sxiv, w3m.

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.

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.

Some customization: custom index view, good Emacs integration (see .emacs.d), custom theme (matches Emacs colors), various tweaks.

For universal terminal support, the colorset.sh script will check terminal capabilities and load colors appropriately.

URxvt has an URL support that works also for Mutt. For other terminals, you might consider using the 'urlview' plugin for Mutt.

Ranger

  • Extra deps: antiword, atool, highlight, img2txt, mediainfo, odt2txt, pdftotext, unrtf, w3m.

Custom bindings, file association, tweaked a few options, additional functions (mkcd, extracthere...).

Scripts

Probably the most interesting part here.

  • archive: simple tar wrapper to create archive for files and folders.

  • asciify: convert many non-ASCII characters to their nearest ASCII counterpart.

  • bsdman: read *BSD man pages.

  • crun: quick way to execute C files.

  • currency: currency converter.

  • dataindex: create index of hierarchies. Useful to keep track of folder content and structure.

  • ediff: diff with Emacs.

  • einfo: info viewer with Emacs.

  • elisp: Emacs Lisp interpreter using Emacs.

  • extract: simple tar wrapper to extract archives. Atool should be preferred if available.

  • git-*: some git helper functions for sync and so on.

  • homeinit: initialize a new home configuration, i.e. get needed files, create symlinks, etc.

  • imagemount: a CDEmu/fuseiso wrapper that creates/deletes virtual drives automatically.

  • mover: move and merge folder into destination.

  • netinit: network setup. Works with wpa_supplicant. May replace any network manager.

  • pac*: pacman helper functions.

  • pdf*: PDF manipulation, e.g. extract pages, compress, resize to A4.

  • pkggen: generate lists of installed with pacman, FreeBSD's pkg and tlmgr (TeX Live manager).

  • tc-video-*: batch conversion of any kind of videos. Using FFmpeg.

Shell

  • Target: POSIX shell, dash, zsh

Features: aliases, functions, shell options, etc. Most of the shell configuration is POSIX and works with dash.

TeX

Plain TeX macros, most importantly a partial UTF-8 support (taken from LaTeX). Plain TeX macros are in the '.texmf' folder. Some Asymptote functions.

URxvt

  • Extra deps: Muennich's perl extensions (keyboard-select, clipboard, url-matcher)

Custom font and colors, no scroll bar, url-matcher, clipboard, and keyboard-select.


Versioning

Git makes it possible to use your home folder as a git repo, thus versioning all files directly.

cd
git init
git remote add origin <repo>
git fetch
git branch master origin/master
git checkout master

Some applications will need extra dependencies other than the default ones. You might have a look at the lists in the .pkg/ folder to know what software I have ve been using.


Known issues

  • 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.