Go to file
Pierre Neidhardt f433e11586 zsh: Remove all 2016-10-16 17:34:35 +05:30
.asy Replace TikZ samples for Asymptote samples 2015-01-08 12:07:57 +01:00
.cmus cmus: Add disc number to playlist display 2016-01-27 18:55:01 +11:00
.config fish: Sort completion with fzf 2016-10-16 17:34:35 +05:30
.emacs.d Emacs: Remove useless sh skeletons 2016-10-14 18:17:28 +05:30
.gnupg gnupg: Add newline at EOF 2016-10-13 16:56:44 +05:30
.kbd keymaps: Remove frex 2015-09-23 13:26:25 +02:00
.local/share/applications dwb: Remove forgotten leftover 2015-11-02 20:55:34 +01:00
.mpv mpv: Use xv by default 2016-04-07 12:11:05 +07:00
.mutt Mutt: Update account-example to 1.7 2016-10-13 18:30:31 +05:30
.pkglists zsh: Remove all 2016-10-16 17:34:35 +05:30
.scripts zsh: Remove all 2016-10-16 17:34:35 +05:30
.texmf/tex/latex texmf: Remove old plain TeX code 2016-10-13 18:56:20 +05:30
.xkb xkb: Add ø|Ø symbols 2015-11-07 09:58:58 +01:00
.Xresources zsh: Remove all 2016-10-16 17:34:35 +05:30
.bashrc zsh: Remove all 2016-10-16 17:34:35 +05:30
.gitconfig Remove 'tig' config 2016-06-09 14:50:26 +02:00
.gitignore zsh: Remove all 2016-10-16 17:34:35 +05:30
.gprc gprc: PARI/GP init file. 2013-06-17 17:29:04 +02:00
.profile zsh: Remove all 2016-10-16 17:34:35 +05:30
.uncrustify.cfg Uncrustify: Remove blank lines before/after '}'/'{' respectively 2016-06-11 16:40:21 +02:00
.xinitrc scripts: Move myip and webcam functions to separate scripts. Remove sx. 2016-10-13 16:56:44 +05:30
.xprofile profile: Overhaul, source bashrc, take udiskie and alsa from xprofile 2016-10-13 16:48:57 +05:30
README.md README: Reflect changes made with fish, omit less important stuff 2016-10-14 17:21:40 +05:30

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, only few modifications will be necessary.

Most interesting parts include advanced configuration for Awesome, Emacs, fish, Mutt, ranger, and some 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.

Emacs

See my Emacs pro-tips.

fish

fish's default configuration satisfies most of my need. I make intense use of fzf with custom functions and bindings, such as __fzf-select and __fzf-complete.

A few wrappers:

  • man: color and justify to window width.

  • ranger: synchronize ranger location with shell location on exit.

  • cd: keeps a bigger history and suppress duplicates. fish starts at last visited location.

I also have a fzf-cdhist-widget to go back to any location in just blink.

Mutt

  • Compile options: IMAP and SMTP support, 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 shrinks 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 from 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.

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

  • bsdman: read *BSD man pages.

  • crun: quick way to execute C files.

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

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

  • pac*: pacman helper functions.

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

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


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 programs I am 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 I assume no input file has newline, which is quite a strong assumption and not safe at all.