[rc/zsh] migrate my zsh setup to rc.org
[~bandali/configs] / rc.org
diff --git a/rc.org b/rc.org
index 287345c..de3ef32 100644 (file)
--- a/rc.org
+++ b/rc.org
@@ -2669,10 +2669,10 @@ margin-bottom = 0
 
 *** polybar-launch
 :PROPERTIES:
-:header-args+: :tangle ~/.local/bin/polybar-launch
+:header-args+: :tangle ~/.local/bin/polybar-launch :shebang "#!/usr/bin/env sh"
 :END:
 
-#+begin_src sh :shebang "#!/bin/sh" :tangle no
+#+begin_src sh :tangle no
 # Terminate already running bar instances
 killall -q polybar
 
@@ -3227,10 +3227,10 @@ copytmap <ESC> q Q w <C-c>
 
 *** scope.sh
 :PROPERTIES:
-:header-args+: :tangle ~/.config/ranger/scope.sh
+:header-args+: :tangle ~/.config/ranger/scope.sh :shebang "#!/usr/bin/env sh"
 :END:
 
-#+begin_src sh :shebang "#!/bin/sh" :tangle no
+#+begin_src sh :tangle no
 # ranger supports enhanced previews.  If the option "use_preview_script"
 # is set to True and this file exists, this script will be called and its
 # output is displayed in ranger.  ANSI color codes are supported.
@@ -3316,6 +3316,844 @@ esac
 exit 1
 #+end_src
 
+** redshift
+:PROPERTIES:
+:header-args+: :tangle ~/.config/redshift.conf
+:END:
+
+#+begin_src conf
+; Global settings for redshift
+[redshift]
+; Set the day and night screen temperatures (Neutral is 6500K)
+;temp-day=5700
+;temp-night=3500
+
+;temp-day=6500
+temp-day=6200
+;temp-night=4800
+;temp-night=5000
+;temp-night=4500
+temp-night=4000
+
+; Enable/Disable a smooth transition between day and night
+; 0 will cause a direct change from day to night screen temperature.
+; 1 will gradually increase or decrease the screen temperature.
+transition=1
+
+; Set the screen brightness. Default is 1.0.
+;brightness=0.9
+; It is also possible to use different settings for day and night
+; since version 1.8.
+;brightness-day=0.7
+;brightness-night=0.4
+; Set the screen gamma (for all colors, or each color channel
+; individually)
+;gamma=0.8
+;gamma=1.0
+;gamma=0.8:0.7:0.8
+; This can also be set individually for day and night since
+; version 1.10.
+;gamma-day=0.8:0.7:0.8
+;gamma-night=0.6
+
+; Set the location-provider: 'geoclue2' or 'manual'
+; type 'redshift -l list' to see possible values.
+; The location provider settings are in a different section.
+;location-provider=manual
+location-provider=geoclue2
+
+; Set the adjustment-method: 'randr', 'vidmode'
+; type 'redshift -m list' to see all possible values.
+; 'randr' is the preferred method, 'vidmode' is an older API.
+; but works in some cases when 'randr' does not.
+; The adjustment method settings are in a different section.
+adjustment-method=randr
+
+; Configuration of the location-provider:
+; type 'redshift -l PROVIDER:help' to see the settings.
+; ex: 'redshift -l manual:help'
+; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
+; are negative numbers.
+;[manual]
+;lat=48.1
+;lon=11.6
+
+; Configuration of the adjustment-method
+; type 'redshift -m METHOD:help' to see the settings.
+; ex: 'redshift -m randr:help'
+; In this example, randr is configured to adjust screen 1.
+; Note that the numbering starts from 0, so this is actually the
+; second screen. If this option is not specified, Redshift will try
+; to adjust _all_ screens.
+;[randr]
+;screen=1
+#+end_src
+
+** rofi
+:PROPERTIES:
+:header-args+: :tangle ~/.config/rofi/config
+:END:
+
+#+begin_src conf
+rofi.font: Ubuntu Mono 13
+! rofi.font: Inconsolata 16
+! rofi.font: Iosevka 13
+! rofi.font: Source Code Pro 11
+rofi.modi: run,window
+! rofi.width: 640
+rofi.width: 600
+!rofi.location: 2
+!rofi.yoffset: 200
+rofi.monitor: -1
+!rofi.lines: 10
+
+!rofi.theme: /usr/share/rofi/themes//Arc.rasi
+!rofi.theme: /usr/share/rofi/themes//Paper.rasi
+!rofi.theme: /usr/share/rofi/themes//sidebar.rasi
+
+rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi
+#+end_src
+
+** rofi-pass
+:PROPERTIES:
+:header-args+: :tangle ~/.config/rofi-pass/config
+:END:
+
+#+begin_src conf
+# permanently set alternative root dir
+# root=/path/to/root
+
+# rofi command. Make sure to have "$@" as last argument
+_rofi () {
+    #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
+    rofi -i -no-auto-select "$@"
+}
+
+# xdotool needs the keyboard layout to be set using setxkbmap
+# You can do this in your autostart scripts (e.g. xinitrc)
+
+# If for some reason, you cannot do this, you can set the command here.
+# and set fix_layout to true
+fix_layout=false
+
+layout_cmd () {
+  setxkbmap us
+}
+
+# fields to be used
+URL_field='url'
+USERNAME_field='user'
+AUTOTYPE_field='autotype'
+
+# delay to be used for :delay keyword
+delay=2
+
+## Programs to be used
+# Editor
+EDITOR='gvim -f'
+
+# Browser
+BROWSER='chromium'
+
+## Misc settings
+
+default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
+auto_enter='false'
+notify='false'
+default_autotype='user :tab pass'
+
+# color of the help messages
+# leave empty for autodetection
+help_color="#4872FF"
+
+# Clipboard settings
+# Possible options: primary, clipboard, both
+clip=primary
+
+# Options for generating new password entries
+# default_user is also used for password files that have no user field.
+default_user=aminb
+default_user2=aminban
+password_length=30
+
+# Custom Keybindings
+#autotype="Alt+1"
+autotype="Alt+m"
+type_user="Alt+2"
+type_pass="Alt+3"
+open_url="Alt+4"
+copy_name="Alt+u"
+copy_url="Alt+l"
+copy_pass="Alt+p"
+show="Alt+o"
+copy_entry="Alt+2"
+type_entry="Alt+1"
+copy_menu="Alt+c"
+action_menu="Alt+a"
+type_menu="Alt+t"
+help="Alt+h"
+switch="Alt+x"
+insert_pass="Alt+n"
+#+end_src
+
+** X
+
+*** xprofile
+:PROPERTIES:
+:header-args+: :tangle ~/.xprofile
+:END:
+
+=~/.xprofile= is similar in style to =~/.xinitrc=, but on the
+contrary, it's automatically sourced by LightDM, my display manager of
+choice.
+
+#+begin_src sh
+# setxkbmap -option compose:ralt
+
+setxkbmap -option ctrl:nocaps          # turn capslock into control
+setxkbmap -option altwin:swap_alt_win  # swap alt and super
+
+if [ $(hostname) = "plasma" ]
+then
+    setxkbmap -option ctrl:rctrl_ralt  # turn right control into right alt
+fi
+
+if [ $(hostname) = "enigma" ]
+then
+    xmodmap -e "keycode 135 = Alt_R"  # remap menu key to alt
+fi
+
+light -Scrs "intel_backlight" 2
+
+source $HOME/.zprofile
+
+export _JAVA_AWT_WM_NONREPARENTING=1
+export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
+
+# unlock-def-gk.py &
+
+if [ $(hostname) = "plasma" ]
+then
+    bspwm &
+elif [ $(hostname) = "enigma" ]
+then
+    emacs &
+fi
+#+end_src
+
+*** X resources
+
+**** Xresources
+:PROPERTIES:
+:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
+:END:
+
+#+begin_src conf-xdefaults
+#include ".Xresources.d/fonts"
+! #include ".Xresources.d/colors"
+#include ".Xresources.d/emacs"
+#include ".Xresources.d/rxvt-unicode"
+#+end_src
+
+**** Xresources.d
+
+***** fonts
+:PROPERTIES:
+:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
+:END:
+
+#+begin_src conf-xdefaults
+Xft.lcdfilter: lcddefault
+Xft.antialias: true
+Xft.autohint: 0
+Xft.hinting: true
+Xft.hintstyle: hintslight
+! Xft.hintstyle: hintfull
+Xft.rgba: rgb
+Xft.dpi: 96
+#+end_src
+
+***** colors
+:PROPERTIES:
+:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors")
+:END:
+
+#+begin_src conf-xdefaults :tangle no
+#include "gruvbox-light.xresources"
+! #include "gruvbox-dark.xresources"
+#include "gruvbox-urxvt256.xresources"
+#+end_src
+
+#+begin_src conf-xdefaults :tangle no
+! -----------------------------------------------------------------------------
+! File: gruvbox-light.xresources
+! Description: Retro groove colorscheme generalized
+! Author: morhetz <morhetz@gmail.com>
+! Source: https://github.com/morhetz/gruvbox-generalized
+! Last Modified: 6 Sep 2014
+! -----------------------------------------------------------------------------
+
+! hard contrast: *background: #f9f5d7
+*background: #fbf1c7
+! soft contrast: *background: #f2e5bc
+*foreground: #3c3836
+! Black + DarkGrey
+*color0:  #fdf4c1
+*color8:  #928374
+! DarkRed + Red
+*color1:  #cc241d
+*color9:  #9d0006
+! DarkGreen + Green
+*color2:  #98971a
+*color10: #79740e
+! DarkYellow + Yellow
+*color3:  #d79921
+*color11: #b57614
+! DarkBlue + Blue
+*color4:  #458588
+*color12: #076678
+! DarkMagenta + Magenta
+*color5:  #b16286
+*color13: #8f3f71
+! DarkCyan + Cyan
+*color6:  #689d6a
+*color14: #427b58
+! LightGrey + White
+*color7:  #7c6f64
+*color15: #3c3836
+#+end_src
+
+#+begin_src conf-xdefaults :tangle no
+! -----------------------------------------------------------------------------
+! File: gruvbox-dark.xresources
+! Description: Retro groove colorscheme generalized
+! Author: morhetz <morhetz@gmail.com>
+! Source: https://github.com/morhetz/gruvbox-generalized
+! Last Modified: 6 Sep 2014
+! -----------------------------------------------------------------------------
+
+! hard contrast: *background: #1d2021
+*background: #282828
+! soft contrast: *background: #32302f
+*foreground: #ebdbb2
+! Black + DarkGrey
+*color0:  #282828
+*color8:  #928374
+! DarkRed + Red
+*color1:  #cc241d
+*color9:  #fb4934
+! DarkGreen + Green
+*color2:  #98971a
+*color10: #b8bb26
+! DarkYellow + Yellow
+*color3:  #d79921
+*color11: #fabd2f
+! DarkBlue + Blue
+*color4:  #458588
+*color12: #83a598
+! DarkMagenta + Magenta
+*color5:  #b16286
+*color13: #d3869b
+! DarkCyan + Cyan
+*color6:  #689d6a
+*color14: #8ec07c
+! LightGrey + White
+*color7:  #a89984
+*color15: #ebdbb2
+#+end_src
+
+#+begin_src conf-xdefaults :tangle no
+! -----------------------------------------------------------------------------
+! File: gruvbox-urxvt256.xresources
+! Description: Retro groove colorscheme generalized
+! Author: morhetz <morhetz@gmail.com>
+! Source: https://github.com/morhetz/gruvbox-generalized
+! Last Modified: 13 Dec 2013
+! -----------------------------------------------------------------------------
+
+URxvt.color24:  #076678
+URxvt.color66:  #427b58
+URxvt.color88:  #9d0006
+URxvt.color96:  #8f3f71
+URxvt.color100: #79740e
+URxvt.color108: #8ec07c
+URxvt.color109: #83a598
+URxvt.color130: #af3a03
+URxvt.color136: #b57614
+URxvt.color142: #b8bb26
+URxvt.color167: #fb4934
+URxvt.color175: #d3869b
+URxvt.color208: #fe8019
+URxvt.color214: #fabd2f
+URxvt.color223: #ebdbb2
+URxvt.color228: #f2e5bc
+URxvt.color229: #fbf1c7
+URxvt.color230: #f9f5d7
+URxvt.color234: #1d2021
+URxvt.color235: #282828
+URxvt.color236: #32302f
+URxvt.color237: #3c3836
+URxvt.color239: #504945
+URxvt.color241: #665c54
+URxvt.color243: #7c6f64
+URxvt.color244: #928374
+URxvt.color245: #928374
+URxvt.color246: #a89984
+URxvt.color248: #bdae93
+URxvt.color250: #d5c4a1
+#+end_src
+
+***** emacs
+:PROPERTIES:
+:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
+:END:
+
+#+begin_src conf-xdefaults
+Emacs.menuBar: off
+Emacs.toolBar: off
+Emacs.verticalScrollBars: off
+Emacs.cursorBlink: off
+Emacs.FontBackend: xft,x
+! Emacs.font: Ubuntu Mono-12
+! Emacs.font: Triplicate T4C-11
+! Emacs.font: Ubuntu Mono-10.5
+! Emacs.font: Ubuntu Mono-12
+! Emacs.font: Iosevka-11
+
+! Emacs.font: Fira Mono:size=15
+! Emacs.font: DejaVu Sans Mono:size=15
+! Emacs.font: Inconsolata:size=17
+! Emacs.font: Inconsolata:size=16
+! Emacs.font: Inconsolata LGC:size=14
+! Emacs.font: Source Code Pro Medium-10.5
+Emacs.font: Ubuntu Mono:size=16
+! Emacs.font: Iosevka:size=16
+#+end_src
+
+***** rxvt-unicode
+:PROPERTIES:
+:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
+:END:
+
+#+begin_src conf-xdefaults
+! Font
+URxvt.font:             xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
+URxvt.boldFont:         xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
+URxvt.italicFont:       xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
+URxvt.bolditalicFont:   xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
+
+URxvt.xftAntialias:     true
+URxvt.letterSpace:      0
+
+URxvt.depth:                0
+URxvt.loginShell:           true
+URxvt.saveLines:            100000
+URxvt.internalBorder:       3
+URxvt.lineSpace:            0
+URxvt.scrollBar:            false
+URxvt.scrollStyle:          rxvt
+URxvt*scrollTtyOutput:      false
+URxvt*scrollWithBuffer:     true
+URxvt*scrollTtyKeypress:    true
+URxvt.keysym.Shift-Up:      command:\033]720;1\007
+URxvt.keysym.Shift-Down:    command:\033]721;1\007
+
+URxvt.perl-ext-common:      default,clipboard,url-select,keyboard-select
+URxvt.perl-ext:             bidi
+URxvt.bidi.enabled:         1
+URxvt.url-select.launcher:  firefox
+URxvt.url-select.underline: true
+URxvt.keysym.M-u:           perl:url-select:select_next
+URxvt.keysym.M-Escape:      perl:keyboard-select:activate
+URxvt.keysym.M-s:           perl:keyboard-select:search
+URxvt.url-launcher:         /usr/bin/firefox
+URxvt.matcher.button:       1
+URxvt.iso14755:             false
+URxvt.iso14755_53:          false
+URxvt.keysym.M-c:           perl:clipboard:copy
+URxvt.keysym.M-v:           perl:clipboard:paste
+URxvt.keysym.C-A-V:         perl:clipboard:paste_escaped
+URxvt.keysym.C-Up:          font-size:increase
+URxvt.keysym.C-Down:        font-size:decrease
+URxvt.keysym.C-S-Up:        font-size:incglobal
+URxvt.keysym.C-S-Down:      font-size:decglobal
+URxvt.keysym.C-equal:       font-size:reset
+!URxvt.keysym.C-question:   font-size:show
+
+URxvt.iconFile:             /usr/share/icons/Paper/48x48/apps/utilities-terminal.png
+
+!urxvt*foreground: white
+!urxvt*background: black
+
+!*color0:  #2E3436
+!*color1:  #a40000
+!*color2:  #4E9A06
+!*color3:  #C4A000
+!*color4:  #3465A4
+!*color5:  #75507B
+!*color6:  #ce5c00
+!*color7:  #babdb9
+!*color8:  #555753
+!*color9:  #EF2929
+!*color10: #8AE234
+!*color11: #FCE94F
+!*color12: #729FCF
+!*color13: #AD7FA8
+!*color14: #fcaf3e
+!*color15: #EEEEEC
+
+!URxvt.foreground: #C8C8C8
+!URxvt.background: #FFFFFF
+
+!! black
+!*color0:  #2E3436
+!*color8:  #555753
+!! red
+!*color1:  #a40000
+!*color9:  #EF2929
+!! green
+!*color2:  #4E9A06
+!*color10: #8AE234
+!! yellow
+!*color3:  #C4A000
+!*color11: #FCE94F
+!! blue
+!*color4:  #3465A4
+!*color12: #729FCF
+!! purple
+!*color5:  #75507B
+!*color13: #AD7FA8
+!! orange (replaces cyan)
+!*color6:  #ce5c00
+!*color14: #fcaf3e
+!! white
+!*color7:  #babdb9
+!*color15: #EEEEEC
+
+! Tango colour theme for rxvt-unicode
+URxvt.background: #FFFFFF
+URxvt.foreground: #000000
+
+! Black
+URxvt.color0: #2E3436
+URxvt.color8: #757773
+
+! Red
+URxvt.color1: #CC0000
+URxvt.color9: #EF2929
+
+! Green
+URxvt.color2: #4E9A06
+URxvt.color10: #8AE234
+
+! Yellow
+URxvt.color3: #C4A000
+URxvt.color11: #FCE94F
+
+! Blue
+URxvt.color4: #3465A4
+URxvt.color12: #729FCF
+
+! Magenta
+URxvt.color5: #75507B
+URxvt.color13: #AD7FA8
+
+!! Cyan
+!URxvt.color6: #06989A
+!URxvt.color14: #34E2E2
+! orange (replaces cyan)
+*color6:  #ce5c00
+*color14: #fcaf3e
+
+! White
+URxvt.color7: #D3D7CF
+URxvt.color15: #EEEEEC
+#+end_src
+
+** XDG
+:PROPERTIES:
+:header-args+: :tangle ~/.config/user-dirs.dirs
+:END:
+
+#+begin_src conf
+XDG_DESKTOP_DIR="$HOME/Desktop"
+XDG_DOCUMENTS_DIR="$HOME/usr/docs"
+XDG_DOWNLOAD_DIR="$HOME/usr/dls"
+XDG_MUSIC_DIR="$HOME/usr/music"
+XDG_PICTURES_DIR="$HOME/usr/pics"
+XDG_PUBLICSHARE_DIR="$HOME/usr/Public"
+XDG_TEMPLATES_DIR="$HOME/usr/Templates"
+XDG_VIDEOS_DIR="$HOME/usr/vids"
+#+end_src
+
+** Zathura
+:PROPERTIES:
+:header-args+: :tangle ~/.config/zathura/zathurarc
+:END:
+
+#+begin_src conf
+set smooth-scroll true
+set selection-clipboard clipboard
+set zoom-step 05
+set default-bg "#272727"
+set statusbar-bg "#272727"
+set inputbar-bg "#373737"
+#+end_src
+
+** Zsh
+
+My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
+[[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
+installed.
+
+*** zimrc
+:PROPERTIES:
+:header-args+: :tangle ~/.zimrc
+:END:
+
+#+begin_src sh
+
+
+#################
+# CORE SETTINGS #
+#################
+
+#
+# Zim settings
+#
+
+# Select what modules you would like enabled.
+# The second line of modules may depend on options set by modules in the first
+# line. These dependencies are noted on the respective module's README.md.
+zmodules=(directory environment git git-info history input ssh utility custom \
+          syntax-highlighting history-substring-search prompt completion)
+
+
+###################
+# MODULE SETTINGS #
+###################
+
+#
+# Prompt
+#
+
+# Set your desired prompt here
+zprompt_theme='pure'
+#PURE_PROMPT_SYMBOL=λ
+#PURE_PROMPT_SYMBOL=δ
+PURE_PROMPT_SYMBOL=➜
+
+#
+# Completion
+#
+
+# set an optional host-specific filename for the completion cache file
+# if none is provided, the default '.zcompdump' is used.
+#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
+
+#
+# Utility
+#
+
+# Uncomment to enable command correction prompts
+# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
+setopt CORRECT
+
+#
+# Environment
+#
+
+# Set the string below to the desired terminal title format string.
+# The terminal title is redrawn upon directory change, however, variables like 
+# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
+#   http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
+# The example below uses the following format: 'username@host:/current/directory'
+ztermtitle='%n@%m:%~'
+
+#
+# Input
+#
+
+# Uncomment to enable double-dot expansion.
+# This appends '../' to your input for each '.' you type after an initial '..'
+#zdouble_dot_expand='true'
+
+#
+# Syntax-Highlighting
+#
+
+# This determines what highlighters will be used with the syntax-highlighting module.
+# Documentation of the highlighters can be found here:
+#   https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
+# For (u)rxvt, termite and gnome-terminal users,
+# removing the 'cursor' highlighter will fix the disappearing cursor problem
+#zhighlighters=(main brackets cursor)
+zhighlighters=(main brackets pattern)
+
+
+#
+# SSH
+#
+
+# Load these ssh identities with the ssh module
+zssh_ids=(id_rsa plasma_id_rsa id_ed25519 id_rsa_aur)
+
+
+#
+# Pacman
+#
+
+# Set (optional) pacman front-end.
+zpacman_frontend='yay'
+
+# Load any helper scripts as defined here
+#zpacman_helper=(aur)
+#+end_src
+
+*** zlogin
+:PROPERTIES:
+:header-args+: :tangle ~/.zlogin
+:END:
+
+#+begin_src sh
+
+
+#
+# User configuration sourced by login shells
+#
+
+# Initialize zim
+[[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
+#+end_src
+
+*** zprofile
+:PROPERTIES:
+:header-args+: :tangle ~/.zprofile
+:END:
+
+#+begin_src sh
+#PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
+#PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
+export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$PATH
+export XDG_CONFIG_HOME=$HOME/.config
+export XDG_DATA_HOME=$HOME/.local/share
+export XDG_DATA_DIRS=/usr/local/share:/usr/share
+export MAILDIR="$HOME/mail"
+export CVS_RSH=ssh
+#export MATHMODELS=$HOME/src/eiffel/mathmodels
+#export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
+#export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
+
+# Eiffel2Java stuff
+#export JAVA_HOME=/usr/lib/jvm/default
+#export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
+#export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
+#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
+
+#export PATH="$HOME/usr/build/pvs:$PATH"
+#export SBCLISP_HOME=/usr/share/sbcl-source
+#export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
+
+export MOZ_USE_XINPUT2=1  # precise scrolling in firefox
+
+#export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
+#export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
+
+#if [ -e /home/amin/.nix-profile/etc/profile.d/nix.sh ]; then . /home/amin/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
+#+end_src
+
+*** zshenv
+:PROPERTIES:
+:header-args+: :tangle ~/.zshenv
+:END:
+
+#+begin_src sh
+# Ensure that a non-login, non-interactive shell has a defined environment.
+if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
+  source "${ZDOTDIR:-$HOME}/.zprofile"
+fi
+#+end_src
+
+*** zshrc
+:PROPERTIES:
+:header-args+: :tangle ~/.zshrc
+:END:
+
+#+begin_src sh
+# Bash-like navigation
+#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
+#export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
+export WORDCHARS='*?[]~=&;!#$%^(){}<>'
+#ZLE_SPACE_SUFFIX_CHARS=$'|&'
+
+#disable -r time       # disable shell reserved word
+#alias time='time -p'  # -p for POSIX output
+
+# rehash if last command was pacaur or pacman
+# (so that zsh picks up changes in $PATH immediately)
+TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
+
+#
+# User configuration sourced by interactive shells
+#
+
+# Change default zim location
+export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
+
+# Start zim
+[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
+
+ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
+#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold' 
+
+setopt globdots
+
+source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
+source ~/.zsh/zsh-autopair/autopair.zsh
+
+
+### fzf ###
+
+source /usr/share/fzf/key-bindings.zsh
+source /usr/share/fzf/completion.zsh
+
+# Accept history selection instead of putting it on
+# the command line
+fzf-history-widget-accept() {
+  fzf-history-widget
+  zle accept-line
+}
+#zle     -N   fzf-history-widget-accept
+#bindkey '^R' fzf-history-widget-accept
+
+# alt+c preview
+export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
+
+### fzf ###
+
+
+# aliases
+alias mpv="mpv --ytdl-format mp4"
+alias mv="mv -iv"
+alias cp="cp -iv"
+alias scl=systemctl
+alias jcl=journalctl
+alias m="mbsync -Va; getmail; notmuch new"
+alias best="youtube-dl -f best"
+alias ace="mosh amin@ace.aminb.org"
+alias nix="ssh amin@aminb.org"
+
+aur() {
+   cd ~/usr/build
+   git clone https://aur.archlinux.org/${1}.git
+   cd ${1}
+}
+
+# i-beam cursor
+echo -e "\033[5 q"
+#echo -e "\033[6 q"
+#+end_src
+
 * Scripts
 
 This section contains various useful scripts and the ones used by the
@@ -3361,6 +4199,142 @@ fi
 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
 #+end_src
 
+** unlock-def-gk.py
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
+:END:
+
+#+begin_src python
+import gnomekeyring as gk
+# list_item_ids_sync('login')[0] == 1L
+gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
+#+end_src
+
+** wp
+
+My little wallpaper changer script.
+
+*** wp
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash"
+:END:
+
+#+begin_src bash :tangle no
+export DISPLAY=:0
+
+case "$1" in
+  "day")
+    feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
+    ;;
+  "night")
+    feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
+    ;;
+  *)
+    echo $"Usage: $0 {day|night}"
+    exit 1
+esac
+#+end_src
+
+*** wp-auto
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash"
+:END:
+
+#+begin_src bash :tangle no
+SED=$(which sed)
+ROFI=$(which rofi)
+
+export DISPLAY=:0
+HOUR=$(date +%H)
+
+if [ -z "${SED}" ]
+then
+    echo "Did not find 'sed', script cannot continue."
+    exit 1
+fi
+if [ -z "${ROFI}" ]
+then
+    echo "Did not find rofi, there is no point to continue."
+    exit 1
+fi
+
+###
+# Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
+# Repeated calls should leave the config clean-ish
+###
+function set_theme()
+{
+    CDIR="${HOME}/.config/rofi/"
+    if [ ! -d "${CDIR}" ]
+    then
+        mkdir -p ${CDIR}
+    fi
+    if [ -f "${CDIR}/config" ]
+    then
+        ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
+    fi
+    echo "rofi.theme: ${1}" >> "${CDIR}/config"
+
+}
+
+if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ]
+    then
+        feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
+        xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources
+        set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi"
+    else
+        feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
+        xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources
+        set_theme "/usr/share/rofi/themes//gruvbox-light.rasi"
+fi
+#+end_src
+
+*** wp.service
+:PROPERTIES:
+:header-args+: :tangle ~/.config/systemd/user/wp.service
+:END:
+
+#+begin_src conf :tangle no
+[Unit]
+Description=wallpaper service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto
+#+end_src
+
+*** wp.timer
+:PROPERTIES:
+:header-args+: :tangle ~/.config/systemd/user/wp.timer
+:END:
+
+#+begin_src conf :tangle no
+[Unit]
+[Unit]
+Description=wallpaper timer
+
+[Timer]
+OnCalendar=07,21:00
+Unit=wp.service
+Persistent=true
+
+[Install]
+WantedBy=timers.target
+#+end_src
+
+** zathura-sync.sh
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
+:END:
+
+#+begin_src sh
+pos="$1"
+pdffile="$2"
+zathura --synctex-forward "$pos" "$pdffile" || \
+    (
+    zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
+    sleep 1; zathura --synctex-forward "$pos" "$pdffile" )
+#+end_src
 ** Fun :)
 
 *** eat-em