dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

My personal dotfiles - GNU stow version

  • Dotfiles [[file:.assets/neofetch.png]]

This repository contains my personal dotfiles managed with [[http://www.gnu.org/software/stow/][GNU stow]]. I made some additions heavily inspired by [[https://github.com/xero/dotfiles][xero's dotfiles.]]

The main reason I chose [[http://www.gnu.org/software/stow/][GNU stow]] is it's minimal dependencies. I used homesick before but it requires ruby. Choosing GNU stow made moving to Gentoo much easier and faster. On the other hand, a lot of nice commands, especially the track command, are missing.

This repo is not meant to be used verbatim. These are my personal dotfiles and they only work for my setup. But if you are crafting your own dotfiles, you might find one or two interesting things in here.

Features:

  • [[http://www.alsa-project.org/][alsa]] config to set my soundcard (hardware dependent)
  • [[https://dunst-project.org/][dunst]] notification daemon config
  • [[https://www.gnu.org/software/emacs/][Emacs]] configuration using [[http://spacemacs.org/][Spacemacs]]
  • Fonts
  • fun shell scripts
  • Gentoo management scripts
  • [[https://git-scm.com/][git]] configuration
  • [[https://www.gtk.org/][gtk]] configuration to set the theme
  • [[http://hisham.hm/htop/][htop]] configuration
  • [[https://i3wm.org/][i3]] tiling window manager configuration which makes heavy use of modes
  • [[https://rybczak.net/ncmpcpp/][ncmpcpp]] ncurses mpd client configuration
  • [[https://notmuchmail.org/][notmuch]] for mail
  • [[http://parcellite.sourceforge.net/][parcellite]] clipboard manager configuration
  • [[https://github.com/jaagr/polybar][polybar]] status-bar configuration
  • [[https://docs.python.org/2/library/pdb.html][pdb]] python debugger configuration
  • browser startpage
  • [[https://tmux.github.io/][tmux]] terminal multiplexer configuration
  • [[https://github.com/streamlink/streamlink-twitch-gui][steamlink-twitch-gui]] configuration
  • wallpapers
  • [[https://www.x.org/wiki/][x11]] =startx= and =.Xresources= script for [[http://software.schmorp.de/pkg/rxvt-unicode.html][urxvt]] and [[https://davedavenport.github.io/rofi/][rofi]]
  • [[https://www.freedesktop.org/wiki/Software/xdg-utils/][xdg]] configuration for mimetypes and user directories
  • [[https://www.x.org/archive/current/doc/man/man1/xmodmap.1.xhtml][xmodmap]] configuration to make =Cap Lock= a second =Ctrl= key
  • [[http://www.zsh.org/][zsh]] configuration using [[https://github.com/zplug/zplug][zplug]]

This repo deprecates: [[https://github.com/storax/storaxcastle][storaxcastle]] [[https://github.com/storax/emacs-castle][emacs-castle]] [[https://github.com/storax/zsh-castle][zsh-castle]] [[https://github.com/storax/i3-castle][i3-castle]]

** Installation [[http://www.gnu.org/software/stow/][GNU stow]] is very easy to use. For each directory in this repo, you simply call:

#+BEGIN_SRC sh :exports code stow -t ~/ -D #+END_SRC

I added a simple script to automate most of the required steps. #+BEGIN_SRC sh :exports code ./install.zsh #+END_SRC

** Packages Here is some little documentation about each package. *** emacs The main features:

  • [[http://spacemacs.org/][spacemacs]] with vim bindings.
  • [[https://github.com/emacs-helm/helm][helm]] over [[https://github.com/abo-abo/swiper][ivy]] because =helm= has a couple of advanced features that are quite nice. Although I have to say =ivy= looks very good but so far there was no reason to change.
  • [[https://github.com/magit/magit][magit]] completely replaces the git commandline interface or any other GUI.
  • [[http://orgmode.org/][org-mode]] for taking notes, and organizing. Agendas etc have been configured but I rarely use it anymore.
  • [[https://github.com/bbatsov/zenburn-emacs][zenburn]]: I like low contrast themes and this on of the best.
  • =python= has the most configuration because it is my main programming language.
  • some 'advanced' [[https://github.com/joaotavora/yasnippet][yasnippets]]
  • [[https://notmuchmail.org/][notmuch]] for mail
  • icons for dired/helm-find-file/modes/...
  • [[https://github.com/areina/helm-dash][helm-dash]] for browsing documentation

I've written some emacs plugins that I sometimes use (or use at work):

  • [[https://github.com/storax/org-tfl][org-tfl]]: Transport for London meets org-mode
  • [[https://github.com/storax/emaci][emaci]]: A silly CI-server inside emacs
  • [[https://github.com/storax/lame][lame]]: Manual task streamlining **** Python I use the spacemacs python layer with a couple of customizations. Running tests has been customized to run tests at point/module/project with tox and pdb.

The GUD interface has been extended. There is support for setting breakpoints at point, printing variables/region and a couple helm sources for navigating breakpoints etc. Most of the pdb functions are accessible via keybindings. It's not as good as [[https://github.com/inducer/pudb][pudb]] but I like it as I can stay in emacs and browse files with all my keybindings and settings.

*** i3 My i3 config is simple but I love it.

Startscreen: [[file:.assets/startscreen.jpg]]

Rofi run menu: [[file:.assets/rofi.png]] **** Requirements

  • =urxvt= as a terminal emulator
  • =feh= for wallpapers
  • =rofi= for dmenu and window selection
  • [[https://github.com/seamus-45/roficlip][roficlip]] for clipboard selection
  • =i3lock= for screensaver/lock screen
  • =ncmpcpp= for starting the music client
  • =mpc= for controlling the =mpd= media player daemon
  • =alsa-utils= for controlling the volume
  • =xbacklight= for controlling the display brightness
  • =unclutter= to hide the mouse after a period of inactivity
  • =gnome-settings-daemon=
  • =compton= as a composite manager to render transparency
  • =polybar= as a statusbar replacement
  • =xautolock= for activating i3lock
  • =xset= for setting display sleep mode **** Keybindings The keybindings rely heavily on modes. The default mode only has one keybinding =AltR= (as in the right =ALT= key) configured to enter the main mode. You can always go back to the default mode with =ESC= or =SPC=

I chose this setup because I mostly have to press one key at a time. =SPC= is always in reach, so quitting is really fast and becomes part of the muscle memory really fast.

=Backspace= will always go to the parent mode. =Escape= will always go to the default mode.

For moving =i= =j= =k= =l= is used in multiple contexts.

=F-12= is bound in default mode and switches to my 'quiet place'. It is the startscreen shown above, which is a transparent urxvt terminal. I was a big fan of dropdown consoles. When they are semitransparent you can type while reading something. But I now use this only for certain actions. In other cases I quickly open a new terminal side by side the browser/other application. ***** Main mode To enter the main mode press =AltR=. This gives you quick access to switch focus and workspaces. Other modes can be entered from here. | Key | Action | |---------+--------------------------| | =i j k l= | focus up/left/down/right | | =0-9= | switch workspace | | =Return= | open terminal | | =d= | rofi run mode | | =Q= | quit application | | =;= | i3-message | | =c= | roficlip | | =f= | focus mode | | =m= | move mode | | =r= | resize mode | | =t= | layout mode | | x | system mode | | w | workspace mode | ***** Focus mode Mode focus changing keybindings | Key | Action | |---------+-------------------------------| | =i j k l= | focus up/left/down/right | | =0-9= | switch workspace | | =p= | focus parent | | =c= | focus child | | =f= | toggle between floating focus | | =d= | rofi window mode | | =Tab= | next workspace | | =S-Tab= | previous workspace | | =m= | move mode | ***** Move mode Move windows | Key | Action | |---------+-------------------------| | =i j k l= | move up/left/down/right | | =0-9= | move to workspace | | =t= | floating toggle | | =f= | focus mode | ***** Resize mode Resize windows | Key | Action | |---------+----------------------------| | =i j k l= | resize window in direction | | =f= | fullscreen | | =h= | hide | | =s= | show | ***** Layout mode Change layouts | Key | Action | |---------+--------------------------| | =i j k l= | focus up/left/down/right | | =p= | focus parent | | =c= | focus child | | =f= | fullscreen | | =d= | default layout | | =h= | horizontal split | | =v= | vertical split | | =s= | stacking | | =w= | tabbed | | =e= | toggle split | | =t= | floating toggle | | =m= | move mode | ***** Workspace mode Manage workspaces | Key | Action | |-------+----------------------| | =r= | rename workspace | | =Tab= | next workspace | | =S-Tab= | previous workspace | | =d= | rofi workspaces mode | | =0-9= | swith to workspace | ***** System mode | Key | Action | |-----+------------------| | =e= | exit mode | | =s= | sound mode | | =d= | display mode | | =l= | lock | | =r= | restart i3 | | =c= | reload i3 config | ***** Exit mode | Key | Action | |-----+-----------| | =l= | lock | | =e= | logout | | =h= | hibernate | | =R= | reboot | | =P= | shutdown | ***** Sound mode | Key | Action | |-----+---------------| | =i= | volume up | | =k= | volume down | | =m= | mute | | =s= | ncmpcpp | | =p= | play/pause | | =j= | previous song | | =l= | next song | ***** Display mode | Key | Action | |-----+-----------------| | =i= | brightness up | | =k= | brightness down | **** Credits This config is heavily inspired by [[https://github.com/syl20bnr/i3ci][syl20bnr's config]]. It helped me a lot putting this together. *** notmuch [[https://notmuchmail.org/][notmuch]] is my email system of choice. It is very fast, has good Emacs integration and nice plugins. For sending emails I use [[http://msmtp.sourceforge.net/][msmtp]] and for receiving email [[http://isync.sourceforge.net/][isync]]. I won't post the config files for those, as they contain sensitive information. Notmuch uses a tagging system instead, which is fast and powerful.

I lost my old notmuch config, so for now the tagging is quite basic. **** Requirements

  • notmuch
  • isync
  • msmtp
  • recode **** Notifications I have a cronjob that runs every 10 minutes and checks for new mails. Checking for new mails will also notify in case of unread mails. To set it up edit your crontab: #+BEGIN_SRC sh crontab -e #+END_SRC Add the following line to it: #+BEGIN_SRC sh */30 * * * * /bin/zsh -c "export DISPLAY=:0; notmuch new" > /dev/null 2>&1 #+END_SRC This calls the notify script =notmuch/bin/notmuch-notify=. Edit this file for custom searches. *** polybar [[file:.assets/polybar2.jpg]] With active =i3= mode: [[file:.assets/polybar.jpg]]

From left to right:

  • workspaces
  • i3 mode line
  • mpd status
  • download/upload speed
  • wifi connectivity
  • CPU usage
  • temperature
  • volume
  • battery
  • brightness
  • date/time
  • tray icons *** tmux [[file:.assets/tmux.jpg]]

I mostly use the [[https://github.com/tmux-plugins/tpm][Tmux Plugin Manager]] with a bunch of plugins:

  • [[https://github.com/tmux-plugins/tmux-sensible][tmux-sensible]]: Basic tmux settings everyone can agree on.
  • [[https://github.com/tmux-plugins/tmux-prefix-highlight][tmux-prefix-highlight]]: Plugin that highlights when you press tmux prefix key Plugin that highlights when you press tmux prefix key.
  • [[https://github.com/tmux-plugins/tmux-resurrect][tmux-resurrect]]: Persists tmux environment across system restarts.
  • [[https://github.com/tmux-plugins/tmux-continuum][tmux-continuum]]: Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
  • [[https://github.com/tmux-plugins/tmux-sessionist][tmux-sessionist]]: Lightweight tmux utils for manipulating sessions.
  • [[https://github.com/tmux-plugins/tmux-pain-control][tmux-pain-control]]: Standard pane key-bindings for tmux.
  • [[https://github.com/tmux-plugins/tmux-yank][tmux-yank]]: Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin. *** zsh [[file:.assets/zshprompt.jpg]]

For [[http://www.zsh.org/][zsh]] I migrated from [[https://github.com/zsh-users/antigen][antigen]] to [[https://github.com/zplug/zplug][zplug]]. The installation is completely automated. At the moment I use these plugins: #+BEGIN_SRC sh :exports both zplug list #+END_SRC

#+RESULTS: #+BEGIN_EXAMPLE plugins/cp => from:"oh-my-zsh" zsh-users/zaw => none zsh-users/zsh-completions => none plugins/python => from:"oh-my-zsh" themes/kphoen => as:"theme", from:"oh-my-zsh" plugins/pip => from:"oh-my-zsh" plugins/dirhistory => from:"oh-my-zsh" plugins/copydir => from:"oh-my-zsh" b4b4r07/zsh-vimode-visual => defer:"3" zsh-users/zsh-syntax-highlighting => defer:"2" plugins/copyfile => from:"oh-my-zsh" plugins/emacs => from:"oh-my-zsh" plugins/colored-man-pages => from:"oh-my-zsh" plugins/vagrant => from:"oh-my-zsh" plugins/nyan => from:"oh-my-zsh" plugins/colorize => from:"oh-my-zsh" rupa/z => use:"z.sh" plugins/gem => from:"oh-my-zsh" plugins/command-not-found => from:"oh-my-zsh" plugins/sudo => from:"oh-my-zsh" plugins/git-flow => from:"oh-my-zsh" plugins/git => from:"oh-my-zsh" #+END_EXAMPLE

=.zshrc= only contains a list of files to source. The order matters for some files. I use vim bindings with a right prompt to signal the normal or insert mode.