X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/581fa9c70ad2df00f7b85527b889eebd6e4b7f6d..e5e4450f889a82197d845cc06a63fcb3e740583d:/rc.org?ds=inline
diff --git a/rc.org b/rc.org
index 6f77a37..8533246 100644
--- a/rc.org
+++ b/rc.org
@@ -10,9 +10,668 @@ this file using =org-babel=.
Note: This file is best viewed inside Emacs with org mode.
* Configs
+:PROPERTIES:
+:header-args+: :comments no
+:END:
This section contains the configuration files (dotfiles) of various
-programs I use.
+programs I use besides GNU Emacs.
+
+** Fontconfig
+:PROPERTIES:
+:header-args+: :tangle ~/.config/fontconfig/fonts.conf
+:END:
+
+#+begin_src xml
+
+
+
+
+
+ rgb
+
+
+
+
+ true
+
+
+
+
+ hintslight
+
+
+
+
+ true
+
+
+
+
+ lcddefault
+
+
+ ~/.fonts
+
+
+
+ Helvetica
+
+ Liberation Sans
+
+
+
+#+end_src
+
+** getmail
+:PROPERTIES:
+:header-args+: :tangle ~/.config/getmail/getmailrc
+:END:
+
+#+begin_src conf
+[retriever]
+type = SimplePOP3SSLRetriever
+server = fencepost.gnu.org
+username = bandali
+password_command = ("gpg", "--no-tty", "-q", "-d", "/home/bandali/.passwd/gnu.gpg")
+port = 995
+use_apop = True
+
+[destination]
+type = Maildir
+path = ~/mail/gnu.local/bandali/mail/
+
+# [destination]
+# type = MDA_external
+# path = /usr/lib/dovecot/deliver
+# arguments = ('-e', '-f', '%(sender)', '-d', 'bandali@gnu.local')
+
+[options]
+read_all = false
+delete_after = 1
+# delete = true
+received = false
+delivered_to = false
+#+end_src
+
+** Git
+
+*** config
+:PROPERTIES:
+:header-args+: :tangle ~/.config/git/config
+:END:
+
+#+begin_src conf
+[user]
+ name = Amin Bandali
+ email = bandali@gnu.org
+ signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
+
+[commit]
+ gpgsign = true
+
+# [format]
+# signoff = true
+
+[core]
+ autocrlf = input # CRLF -> LF on commit
+ editor = emacsclient -t
+ pager = "less"
+
+[mailmap]
+ file = ~/.config/git/mailmap
+
+[alias]
+ git = !exec git # handle nested git calls, e.g. git git status
+ aliases = config --get-regexp '^alias\\.'
+ a = add
+ s = status
+ sl = status --long
+ c = checkout
+ cb = checkout -b
+ b = branch
+ r = rebase
+ p = pull
+ pr = pull --rebase
+ ps = push
+ psf = push --force
+ nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
+ nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
+
+[color]
+ ui = auto
+[color "status"]
+ added = green bold
+ changed = red bold
+ untracked = red bold
+[color "branch"]
+ current = green bold
+ remote = magenta bold
+[color "diff"]
+ new = green bold
+ old = red bold
+
+# [status]
+# # showUntrackedFiles = all
+# short=true
+# branch=true
+
+[github]
+ user = notbandali
+
+[sendemail]
+ smtpuser = bandali
+ smtpserver = fencepost.gnu.org
+ smtpserverport = 587
+ smtpencryption = tls
+ annotate = yes
+
+[transfer]
+ fsckObjects = true
+#+end_src
+
+*** ignore
+:PROPERTIES:
+:header-args+: :tangle ~/.config/git/ignore
+:END:
+
+#+begin_src conf
+*.orig
+*.py[co]
+*.sublime-workspace
+*~
+.DS_Store
+*.elc
+*-autoloads.el
+TAGS
+#+end_src
+
+*** mailmap
+:PROPERTIES:
+:header-args+: :tangle ~/.config/git/mailmap
+:END:
+
+#+begin_src conf
+
+
+
+
+
+#+end_src
+
+** GnuPG
+:PROPERTIES:
+:header-args+: :tangle ~/.gnupg/gpg-agent.conf
+:END:
+
+#+begin_src conf
+default-cache-ttl 43200
+max-cache-ttl 86400
+
+default-cache-ttl-ssh 43200
+max-cache-ttl-ssh 86400
+
+pinentry-program /home/bandali/.guix-profile/bin/pinentry-emacs
+allow-emacs-pinentry
+allow-loopback-pinentry
+#+end_src
+
+** GTK
+
+*** GTK+ 2
+:PROPERTIES:
+:header-args+: :tangle ~/.gtkrc-2.0
+:END:
+
+#+begin_src conf
+gtk-theme-name="Xfce"
+# gtk-icon-theme-name="elementary Xfce darker"
+gtk-font-name="Roboto 10"
+# gtk-font-name="Source Code Variable 10"
+gtk-menu-images=0
+# gtk-key-theme-name = "Emacs"
+#+end_src
+
+*** GTK+ 3
+:PROPERTIES:
+:header-args+: :tangle ~/.config/gtk-3.0/settings.ini
+:END:
+
+#+begin_src conf
+[Settings]
+gtk-icon-theme-name = Adwaita
+# gtk-theme-name = Adwaita
+
+gtk-theme-name = Xfce
+# gtk-theme-name = Arc-Darker
+# gtk-theme-name = Numix-ArchBlue
+
+gtk-font-name = Roboto 10
+# gtk-font-name = Source Code Variable Medium 10
+# gtk-key-theme-name = Emacs
+#+end_src
+
+** Guix
+
+*** Channels
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/channels.scm
+:END:
+
+#+begin_src scheme
+(list (channel
+ (name 'guix) ; https://git.savannah.gnu.org/git/guix.git
+ (url "file:///home/bandali/src/git/guix"))
+ (channel
+ (name 'guix-bandali) ; https://git.sr.ht/~bandali/guix-bandali
+ (url "file:///home/bandali/src/git/guix-bandali")))
+#+end_src
+
+*** Profile manifests
+
+To install/update the packages of the default profile, use
+#+begin_example
+guix package -m $MY_GUIX_MANIFESTS/main.scm
+#+end_example
+and for other profiles, use
+#+begin_example
+guix package -m $MY_GUIX_MANIFESTS/name.scm -p $MY_GUIX_PROFILES/name/name
+#+end_example
+where =name= is the name of the profile (e.g. =doc=, =media=, ...).
+
+**** doc
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/manifest/doc.scm
+:END:
+
+#+begin_src scheme
+(specifications->manifest
+ '("libreoffice"
+ "texlive-amsfonts"
+ "texlive-base"
+ "texlive-latex-listings"
+ ;; "texlive-palatino"
+ "texlive-xcolor"
+))
+#+end_src
+
+**** main
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/manifest/main.scm
+:END:
+
+#+begin_src scheme
+(specifications->manifest
+ '("alsa-utils"
+ "bash-completion"
+ "cpufrequtils"
+ "cpupower"
+ "cvs"
+ "dunst"
+ "emacs"
+ "emacs-alert"
+ "emacs-amx"
+ "emacs-async"
+ "emacs-biblio-git"
+ "emacs-boxquote"
+ "emacs-company"
+ "emacs-company-ebdb"
+ "emacs-crux"
+ "emacs-dash"
+ "emacs-debbugs"
+ "emacs-diff-hl"
+ "emacs-dmenu"
+ "emacs-doom-themes"
+ "emacs-ebdb"
+ "emacs-emmet-mode"
+ ;; "emacs-emojify"
+ "emacs-erc-hl-nicks"
+ "emacs-erc-scrolltoplace"
+ "emacs-eshell-up"
+ "emacs-exec-path-from-shell"
+ "emacs-expand-region"
+ "emacs-exwm"
+ "emacs-exwm-edit"
+ "emacs-flycheck"
+ "emacs-geiser"
+ ;; "emacs-gnus-harvest"
+ "emacs-guix"
+ "emacs-helpful"
+ "emacs-hl-todo"
+ "emacs-ivy"
+ "emacs-magit"
+ "emacs-message-x"
+ "emacs-minions"
+ ;; "emacs-multi-term"
+ "emacs-multiple-cursors"
+ "emacs-mwim"
+ ;; "emacs-next"
+ ;; "emacs-next-delight"
+ "emacs-no-littering"
+ "emacs-org"
+ "emacs-org-contrib"
+ "emacs-org-ref"
+ "emacs-orgalist"
+ "emacs-page-break-lines"
+ "emacs-pass"
+ "emacs-pinentry"
+ "emacs-projectile"
+ "emacs-shrink-path-git"
+ "emacs-smart-mode-line"
+ "emacs-typo"
+ "emacs-unkillable-scratch"
+ "emacs-use-package"
+ "emacs-web-mode"
+ "emacs-which-key"
+ "emacs-yasnippet"
+ "emacs-znc-git"
+ "font-adobe-source-code-pro"
+ "font-gnu-freefont-ttf"
+ "font-google-roboto"
+ "font-liberation"
+ "font-linuxlibertine"
+ "font-sil-gentium"
+ "font-tex-gyre"
+ ;; "font-ubuntu"
+ "font-vazir"
+ "getmail"
+ "gettext"
+ "git"
+ "git:send-email"
+ "gnupg"
+ "guile"
+ "haunt"
+ "htop"
+ "hunspell"
+ "hunspell-dict-en-ca"
+ "hunspell-dict-en-us"
+ "isync"
+ "light"
+ "msmtp"
+ "ncdu"
+ "notmuch"
+ "openjdk"
+ "openssh"
+ "openssl"
+ "pass-otp"
+ "password-store"
+ "pasystray"
+ "pinentry-emacs"
+ "poppler" ; for 'pdffonts'
+ "rofi"
+ "rofi-pass"
+ "rsync"
+ "rxvt-unicode"
+ "screen"
+ "scrot"
+ "setxkbmap"
+ "strace"
+ "thinkfan"
+ "unzip"
+ "wget"
+ "xdg-user-dirs"
+ ;; "xkbcomp"
+ "xmodmap"
+ "xrdb"
+ "xset"
+ "xsetroot"))
+#+end_src
+
+**** media
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/manifest/media.scm
+:END:
+
+#+begin_src scheme
+(specifications->manifest
+ '("audacity"
+ "gimp"
+ "inkscape"
+ "mpv"
+ "youtube-dl"))
+#+end_src
+
+**** web
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/manifest/web.scm
+:END:
+
+#+begin_src scheme
+(specifications->manifest
+ '("icecat"
+ "rtv"))
+#+end_src
+
+*** Systems
+
+**** chaman
+:PROPERTIES:
+:header-args+: :tangle ~/.config/guix/system/chaman.scm
+:END:
+
+#+begin_src scheme
+(use-modules (gnu)
+ (gnu packages certs) ; for nss-certs
+ (gnu packages emacs-xyz) ; for exwm
+ (gnu packages linux)) ; for powertop
+(use-service-modules admin desktop mail networking pm ssh xorg)
+
+(operating-system
+ (host-name "chaman")
+ (locale "en_CA.utf8")
+ (timezone "Canada/Eastern")
+ (keyboard-layout
+ (keyboard-layout "us" "basic"))
+ (bootloader
+ (bootloader-configuration
+ (bootloader grub-bootloader)
+ (target "/dev/sda")
+ (keyboard-layout keyboard-layout)))
+ (mapped-devices
+ (list (mapped-device
+ (source
+ (uuid "283da85e-2c84-47e6-a8ca-20f4e8efb806"))
+ (target "groot")
+ (type luks-device-mapping))
+ (mapped-device
+ (source
+ (uuid "017ddebc-c2c3-4a0a-bda4-d47ec0bc67f0"))
+ (target "data")
+ (type luks-device-mapping))))
+ (file-systems
+ (cons* (file-system
+ (mount-point "/")
+ (device "/dev/mapper/groot")
+ (type "ext4")
+ (dependencies mapped-devices))
+ (file-system
+ (mount-point "/data")
+ (device "/dev/mapper/data")
+ (type "ext4")
+ (dependencies mapped-devices))
+ %base-file-systems))
+ (users
+ (cons* (user-account
+ (name "bandali")
+ (group "users")
+ (home-directory "/home/bandali")
+ (supplementary-groups
+ '("wheel" "netdev" "audio" "video")))
+ %base-user-accounts))
+ (packages
+ (cons* nss-certs
+ emacs-exwm
+ %base-packages))
+ (services
+ (cons*
+ (service xfce-desktop-service-type)
+ (set-xorg-configuration
+ (xorg-configuration
+ (keyboard-layout keyboard-layout)))
+ (dovecot-service
+ #:config
+ (dovecot-configuration
+ ;; (log-path "/dev/stderr")
+ (protocols (list (protocol-configuration
+ (name "imap"))))
+ (ssl? "no")
+ (listen '("127.0.0.1"))
+ (disable-plaintext-auth? #f)
+ (auth-mechanisms '("plain"))
+ (postmaster-address "bandali@gnu.local")
+ (mail-location "maildir:/home/bandali/mail/%d/%n/mail")
+ (userdbs (list (userdb-configuration
+ (driver "static")
+ (args (list "uid=bandali" "gid=users" "home=/home/bandali/mail/%d/%n")))))
+ (passdbs (list (passdb-configuration
+ (driver "passwd-file")
+ (args (list "/data/dovecot-passwd")))))))
+ (service rottlog-service-type)
+ (service thermald-service-type)
+ (service tlp-service-type
+ (tlp-configuration
+ (cpu-boost-on-ac? #t)
+ (sound-power-save-on-bat 0)
+ (sound-power-save-controller? #f)
+ ;; (usb-blacklist "0e8f:00a8") ;for some reason doesn't seem to work
+ (usb-autosuspend? #f)))
+ (simple-service 'my-powertop-auto-tune activation-service-type
+ #~(zero? (system* #$(file-append powertop "/sbin/powertop")
+ "--auto-tune")))
+ (simple-service 'light-udev-rules udev-service-type (list light))
+ %desktop-services)))
+#+end_src
+
+** isync
+:PROPERTIES:
+:header-args+: :tangle ~/.config/isync/mbsyncrc
+:END:
+
+#+begin_src conf
+# Global defaults
+CopyArrivalDate yes
+Create Both
+Expunge Both
+
+######
+IMAPAccount shemshak
+Host mail.shemshak.org
+User amin@shemshak.org
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak.gpg"
+SSLType IMAPS
+
+IMAPStore shemshak-remote
+Account shemshak
+
+IMAPAccount shemshak-local
+Host 127.0.0.1
+Port 143
+User amin@shemshak.local
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak-local.gpg"
+SSLType None
+
+IMAPStore shemshak-local
+Account shemshak-local
+
+Channel shemshak
+Master :shemshak-remote:
+Slave :shemshak-local:
+Patterns *
+
+######
+IMAPAccount gnub
+Host mail.shemshak.org
+User gnu@bandali.eu.org
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub.gpg"
+SSLType IMAPS
+
+IMAPStore gnub-remote
+Account gnub
+
+IMAPAccount gnub-local
+Host 127.0.0.1
+Port 143
+User bandali@gnu.local
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub-local.gpg"
+SSLType None
+
+IMAPStore gnub-local
+Account gnub-local
+
+Channel gnub
+Master :gnub-remote:
+Slave :gnub-local:
+Patterns *
+
+######
+IMAPAccount uwaterloo
+Host connect.uwaterloo.ca
+User abandali
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
+SSLType IMAPS
+
+IMAPStore uwaterloo-remote
+Account uwaterloo
+
+IMAPAccount uwaterloo-local
+Host 127.0.0.1
+Port 143
+User abandali@uw.local
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-local.gpg"
+SSLType None
+
+IMAPStore uwaterloo-local
+Account uwaterloo-local
+
+Channel uwaterloo
+Master :uwaterloo-remote:
+Slave :uwaterloo-local:
+Patterns *
+
+######
+IMAPAccount csclub
+Host mail.csclub.uwaterloo.ca
+User abandali
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub.gpg"
+SSLType IMAPS
+
+IMAPStore csclub-remote
+Account csclub
+
+IMAPAccount csclub-local
+Host 127.0.0.1
+Port 143
+User abandali@csc.uw.local
+PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub-local.gpg"
+SSLType None
+
+IMAPStore csclub-local
+Account csclub-local
+
+Channel csclub
+Master :csclub-remote:
+Slave :csclub-local:
+Patterns *
+#+end_src
+
+** Latexmk
+:PROPERTIES:
+:header-args+: :tangle ~/.config/latexmk/latexmkrc
+:END:
+
+#+begin_src conf
+$pdf_previewer = "start zathura %O %S";
+$clean_ext = "aux out";
+
+# $pdf_update_method = 4;
+# $pdf_update_command = "zathura %O %S";
+
+# Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
+# by Ctrl+click in the PDF.
+# Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
+# editor.
+# $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
+#+end_src
** mpd
:PROPERTIES:
@@ -429,6 +1088,76 @@ audio_output {
###############################################################################
#+end_src
+** msmtp
+:PROPERTIES:
+:header-args+: :tangle ~/.config/msmtp/config
+:END:
+
+#+begin_src conf
+# Set default values for all following accounts.
+defaults
+port 587
+tls on
+auth on
+#tls_trust_file /etc/ssl/certs/ca-certificates.crt
+logfile ~/.msmtp.log
+
+account shemshak
+host mail.shemshak.org
+# use `msmtp -a shemshak --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
+tls_fingerprint 01:6F:1B:92:0A:E8:47:35:62:80:DD:17:F5:9A:9D:26:7D:59:E2:EC:69:67:36:69:2F:58:8C:89:57:66:F6:B1
+tls_starttls on
+from amin@shemshak.org
+user amin@shemshak.org
+passwordeval gpg --no-tty -q -d ~/.passwd/shemshak.gpg
+
+account aminb : shemshak
+from amin@aminb.org
+account bndl : shemshak
+from amin@bndl.org
+
+account gnu
+host fencepost.gnu.org
+# use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
+tls_fingerprint A5:E9:14:9F:46:3E:8E:0F:09:8C:5D:21:C2:BE:DE:77:BE:8B:E7:82:6C:56:78:0C:62:CA:46:D7:18:FE:33:05
+tls_starttls on
+from bandali@gnu.org
+user bandali
+passwordeval gpg --no-tty -q -d ~/.passwd/gnu.gpg
+
+account gnu-mab : gnu
+from mab@gnu.org
+account gnu-aminb : gnu
+from aminb@gnu.org
+account gnu-amin : gnu
+from amin@gnu.org
+
+account uwaterloo
+host connect.uwaterloo.ca
+tls_starttls on
+from abandali@uwaterloo.ca
+user abandali
+passwordeval gpg --no-tty -q -d ~/.passwd/uwaterloo.gpg
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+
+account uwaterloo-friendly : uwaterloo
+from bandali@uwaterloo.ca
+
+account csclub
+host mail.csclub.uwaterloo.ca
+tls_starttls on
+from abandali@csclub.uwaterloo.ca
+user abandali
+passwordeval gpg --no-tty -q -d ~/.passwd/csclub.gpg
+tls_trust_file /etc/ssl/certs/ca-certificates.crt
+
+account csclub-friendly : csclub
+from bandali@csclub.uwaterloo.ca
+
+# Set a default account
+account default : shemshak
+#+end_src
+
** ncmpcpp
*** config
@@ -1079,6 +1808,426 @@ if anyof (
}
#+end_src
+** Readline
+:PROPERTIES:
+:header-args+: :tangle ~/.config/readline/inputrc
+:END:
+
+#+begin_src conf
+set enable-bracketed-paste on
+
+set colored-stats on
+set colored-completion-prefix on
+set completion-ignore-case on
+set menu-complete-display-prefix on
+set page-completions off
+set show-all-if-ambiguous on
+set show-all-if-unmodified on
+set visible-stats on
+
+TAB: menu-complete
+"\e[Z": menu-complete-backward
+
+"\e[A": history-search-backward
+"\e[B": history-search-forward
+#+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.font: Source Code Pro 10.5
+rofi.modi: run,window
+! rofi.width: 640
+rofi.width: 600
+!rofi.location: 2
+!rofi.yoffset: 200
+rofi.monitor: -1
+!rofi.lines: 10
+
+rofi.theme: ~/.guix-profile/share/rofi/themes/gruvbox-light-hard.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 -kb-accept-entry "!Return" "$@"
+}
+
+# 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=bandali
+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
+
+** Screen
+:PROPERTIES:
+:header-args+: :tangle ~/.config/screen/screenrc
+:END:
+
+#+begin_src screen
+startup_message off
+caption always "%{= kc}GNU Screen $USER@%H (load: %l)%-28=%{= .m}%D %d.%m.%Y %0c"
+#+end_src
+
+** Shell
+
+*** GNU Bash
+:PROPERTIES:
+:header-args+: :tangle ~/.bashrc
+:END:
+
+#+begin_src bash
+# Bash initialization for interactive non-login shells and
+# for remote shells (info "(bash) Bash Startup Files").
+
+# Export 'SHELL' to child processes. Programs such as 'screen'
+# honor it and otherwise use /bin/sh.
+export SHELL
+
+if [[ $- != *i* ]]
+then
+ # We are being invoked from a non-interactive shell. If this
+ # is an SSH session (as in "ssh host command"), source
+ # /etc/profile so we get PATH and other essential variables.
+ [[ -n "$SSH_CLIENT" ]] && source /etc/profile
+
+ # Don't do anything else.
+ return
+fi
+
+if [ -n "$IS_GUIX_SYSTEM" ]; then
+ # Source the system-wide file.
+ source /etc/bashrc
+fi
+
+# from https://unix.stackexchange.com/a/55935
+b_prompt() {
+ cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
+ printf $cwd
+}
+
+if [ $(id -u) == "0" ]; then
+ PS1='`printf "\[\e[1;31m\]\$\[\e[00m\]"` '
+else
+ PS1='\$ '
+fi
+PS1="\u@\h:\w/`[ -n "$GUIX_ENVIRONMENT" ] && printf \" [env]\"`\n$PS1"
+
+# set terminal title
+PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: $(b_prompt)\007"'
+
+# i-beam cursor
+# echo -e "\033[5 q" # blinking
+echo -e "\033[6 q" # non-blinking
+
+# various bash tweaks
+# append to the history file, don't overwrite it
+shopt -s histappend
+shopt -s cmdhist
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+# If set, the pattern "**" used in a pathname expansion context will
+# match all files and zero or more directories and subdirectories.
+#shopt -s globstar
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=
+HISTFILESIZE=
+# don't put duplicate lines or lines starting with space in the
+# history.
+HISTCONTROL=ignoreboth
+# ignore a few very common commands and don't add them to history
+HISTIGNORE='ls:l:s:g:[bf]g:history'
+HISTTIMEFORMAT='%F %T '
+stty stop ""
+
+# aliases
+alias ls='ls -p --color=auto'
+alias l='ls -lh' # long format and human-readable sizes
+alias ll='l -A' # long format, all files
+alias dir='dir --color=auto'
+alias vdir='vdir --color=auto'
+alias grep='grep --color=auto'
+alias fgrep='fgrep --color=auto'
+alias egrep='egrep --color=auto'
+alias mpv="mpv --ytdl-format mp4"
+alias mv="mv -iv"
+alias cp="cp -iv"
+alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
+alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
+alias m="mbsync csclub; mbsync uwaterloo; mbsync shemshak; mbsync gnub"
+alias best="youtube-dl -f best"
+alias e="$EDITOR"
+alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
+
+aur() {
+ cd ~/usr/builds
+ [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
+ cd ${1}
+}
+
+function t {
+ cd $(mktemp -d /tmp/$1.XXXX)
+}
+
+# separate alias definitions file, if exists
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# enable programmable completion features (not needed if already
+# enabled in /etc/bash.bashrc and if /etc/profile sources
+# /etc/bash.bashrc).
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+
+# source Guix shell config dirs, for vte.sh and bash completions
+GUIX_PROFILES=("${HOME}/.guix-profile"
+ "${HOME}/.config/guix/current")
+for profile in "${GUIX_PROFILES[@]}"; do
+ for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
+ if [ -d "${dir}" ]; then
+ for f in "${dir}"/*; do
+ . $f
+ done
+ fi
+ done
+done
+#+end_src
+
+*** profile
+:PROPERTIES:
+:header-args+: :tangle ~/.profile
+:END:
+
+#+begin_src sh
+# ~/.profile: executed by the command interpreter for login shells.
+# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
+# exists.
+
+# source host-specific profile
+if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
+ . "$HOME/.config/profiles/$(hostname)"
+fi
+
+export EDITOR="emacsclient -nw"
+export VISUAL="emcl"
+
+PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
+PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
+if [ -z "$IS_GUIX_SYSTEM" ]; then
+ PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
+ INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
+ export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
+fi
+export PATH
+export INFOPATH
+
+export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
+export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
+
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+
+if [ -f "$HOME/.config/user-dirs.dirs" ]; then
+ set -a
+ . "$HOME/.config/user-dirs.dirs"
+ set +a
+fi
+
+export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
+export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
+
+export MAILDIR="$HOME/mail"
+export CVS_RSH="ssh"
+
+if [ -x "$(command -v go)" ]; then
+ export GOPATH="$HOME/src/go"
+ export PATH="$GOPATH/bin:$PATH"
+fi
+
+# if running bash
+if [ -n "$BASH_VERSION" ]; then
+ # include .bashrc if it exists
+ if [ -f "$HOME/.bashrc" ]; then
+ . "$HOME/.bashrc"
+ fi
+fi
+
+if [ -z "$IS_GUIX_SYSTEM" ]; then
+ # if guix is installed
+ if [ -x "$(command -v guix)" ]; then
+ SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
+ if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
+ export SSL_CERT_DIR
+ export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
+ else
+ printf "it seems you forgot to \`guix install nss-certs\'\n"
+ fi
+ GUIX_PROFILE="$HOME/.guix-profile"
+ . "$GUIX_PROFILE/etc/profile"
+ unset XDG_DATA_DIRS
+ fi
+fi
+
+for p in $MY_GUIX_PROFILES/*; do
+ profile=$p/$(basename "$p")
+ if [ -f "$profile"/etc/profile ]; then
+ GUIX_PROFILE="$profile"
+ . "$GUIX_PROFILE"/etc/profile
+ fi
+ unset profile
+done
+
+# start an ssh-agent (with guix's openssh)
+if [ -z "$IS_GUIX_SYSTEM" ]; then
+ if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent > ~/.ssh-agent-thing
+ fi
+ if [[ ! "$SSH_AUTH_SOCK" ]]; then
+ eval "$(<~/.ssh-agent-thing)"
+ fi
+fi
+
+# footenote: when on a foreign distro and using Xfce, don't forget to
+# disable its auto-start of gpg- and ssh-agent, by issuing
+# xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
+# xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
+# see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
+# also, MATE does something similar with gnome-keyring-daemon:
+# http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop
+#+end_src
+
+*** per-host profiles
+
+Host-specific profiles, sourced from =~/.profile=. Each
+=~/.config/profiles/HOST= file will be sourced on the machine with
+=hostname= of =HOST=.
+
+**** chaman
+:PROPERTIES:
+:header-args+: :tangle ~/.config/profiles/chaman
+:END:
+
+#+begin_src sh
+export IS_GUIX_SYSTEM=true
+
+if [ -x "$(command -v xinput)" ]; then
+ xinput --set-prop "TPPS/2 IBM TrackPoint" 'libinput Accel Speed' -0.4
+fi
+
+setxkbmap \
+ -layout us,ir \
+ -option ctrl:nocaps \
+ -option grp:shifts_toggle
+
+xmodmap -e "keysym Menu = Super_R"
+
+xsetroot -cursor_name left_ptr
+xset r rate 200 45
+xset b off
+#+end_src
+
+**** darrud
+:PROPERTIES:
+:header-args+: :tangle ~/.config/profiles/darrud
+:END:
+
+#+begin_src sh
+export INFOPATH="$HOME/usr/local/share/info${INFOPATH:+:}$INFOPATH"
+#+end_src
+
+**** langa
+:PROPERTIES:
+:header-args+: :tangle ~/.config/profiles/langa
+:END:
+
+#+begin_src sh
+export XDG_DATA_DIRS="/usr/share/mate:/usr/local/share/:/usr/share/"
+#+end_src
+
** redshift
:PROPERTIES:
:header-args+: :tangle ~/.config/redshift.conf :comments none
@@ -1152,6 +2301,20 @@ adjustment-method=randr
;screen=1
#+end_src
+** signature
+:PROPERTIES:
+:header-args+: :tangle ~/.signature
+:END:
+
+My email signature.
+
+#+begin_src
+Amin Bandali
+Free Software activist | GNU maintainer & webmaster
+GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
+https://bandali.eu.org
+#+end_src
+
** systemd
Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
@@ -1881,3 +3044,338 @@ RESTORE_DEVICE_STATE_ON_STARTUP=1
#DEVICES_TO_DISABLE_ON_UNDOCK=""
#+end_src
+** X
+
+*** xinit
+:PROPERTIES:
+:header-args+: :tangle ~/.xinitrc
+:END:
+
+#+begin_src sh
+[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
+#+end_src
+
+*** X resources
+
+#+begin_src conf-xdefaults :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
+#include ".Xresources.d/fonts"
+#include ".Xresources.d/emacs"
+#include ".Xresources.d/rxvt-unicode"
+#+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: Source Code Pro Medium:size=14
+! Emacs.font: Ubuntu Mono:size=16
+! Emacs.font: Iosevka:size=16
+#+end_src
+
+**** 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
+
+**** 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:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
+URxvt.boldFont: xft:source code pro:semibold:pixelsize=14:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
+URxvt.italicFont: xft:source code pro:italic:pixelsize=14:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
+URxvt.bolditalicFont: xft:source code pro:semibold:italic:pixelsize=14:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
+
+URxvt.xftAntialias: true
+URxvt.letterSpace: -1
+
+!URxvt.depth: 0
+!URxvt.loginShell: true
+!URxvt*buffered: false
+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.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/abrowser
+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.M-c: eval:selection_to_clipboard
+URxvt.keysym.M-v: eval:paste_clipboard
+URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
+! URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
+! URxvt.keysym.Shift-Control-V: eval:paste_clipboard
+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/elementary-xfce/apps/48/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
+
+
+! ! Solarized
+! ! Base16 Solarized Light
+! ! Scheme: Ethan Schoonover (http://ethanschoonover.com/solarized)
+
+! #define base00 #fdf6e3
+! #define base01 #eee8d5
+! #define base02 #93a1a1
+! #define base03 #839496
+! #define base04 #657b83
+! #define base05 #586e75
+! #define base06 #073642
+! #define base07 #002b36
+! #define base08 #dc322f
+! #define base09 #cb4b16
+! #define base0A #b58900
+! #define base0B #859900
+! #define base0C #2aa198
+! #define base0D #268bd2
+! #define base0E #6c71c4
+! #define base0F #d33682
+
+! *foreground: base05
+! #ifdef background_opacity
+! *background: [background_opacity]base00
+! #else
+! *background: base00
+! #endif
+! *cursorColor: base05
+
+! *color0: base00
+! *color1: base08
+! *color2: base0B
+! *color3: base0A
+! *color4: base0D
+! *color5: base0E
+! *color6: base0C
+! *color7: base05
+
+! *color8: base03
+! *color9: base08
+! *color10: base0B
+! *color11: base0A
+! *color12: base0D
+! *color13: base0E
+! *color14: base0C
+! *color15: base07
+
+! ! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
+! ! use 'shell' template to set these if necessary
+! *color16: base09
+! *color17: base0F
+! *color18: base01
+! *color19: base02
+! *color20: base04
+! *color21: base06
+
+
+! 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
+
+*** ~/.xsession
+:PROPERTIES:
+:header-args+: :tangle ~/.xsession :tangle-mode (identity #o755)
+:END:
+
+For custom session on Debian. See https://wiki.debian.org/Xsession.
+
+#+begin_src sh
+if [ -f "$HOME/.xinitrc" ]; then
+ . "$HOME/.xinitrc"
+fi
+
+[ -f "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" ] && /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd &
+[ -x "$(command -v light-locker)" ] && light-locker --lock-on-suspend &
+[ -x "$(command -v pasystray)" ] && pasystray -a &
+[ -x "$(command -v nm-applet)" ] && nm-applet &
+[ -x "$(command -v compton)" ] && compton &
+[ -x "$(command -v dunst)" ] && dunst &
+[ -x "$(command -v emacs)" ] && exec ssh-agent exwm -ib 0
+#+end_src
+
+*** ~/.xsessionrc
+:PROPERTIES:
+:header-args+: :tangle ~/.xsessionrc
+:END:
+
+#+begin_src sh
+if [ -f "$HOME/.profile" ]; then . "$HOME/.profile"; fi
+#+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/doc"
+XDG_DOWNLOAD_DIR="$HOME/usr/dl"
+XDG_MUSIC_DIR="$HOME/usr/music"
+XDG_PICTURES_DIR="$HOME/usr/pic"
+XDG_PUBLICSHARE_DIR="$HOME/usr/pub"
+XDG_TEMPLATES_DIR="$HOME/usr/temp"
+XDG_VIDEOS_DIR="$HOME/usr/vid"
+#+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"
+set window-title-basename true
+set statusbar-home-tilde true
+
+map scroll down
+map scroll up
+
+map H jumplist backward
+map L jumplist forward
+
+map [normal] i toggle_index
+map [index] i toggle_index
+map [index] q toggle_index
+#+end_src