X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/a92a01fe479e3b069e23297cb3b541eb273deb58..96611976e652d23d88916be38c112d081d1f88aa:/rc.org?ds=inline diff --git a/rc.org b/rc.org index fc6fc24..6f77a37 100644 --- a/rc.org +++ b/rc.org @@ -14,140 +14,6 @@ Note: This file is best viewed inside Emacs with org mode. This section contains the configuration files (dotfiles) of various programs I use. -** dovecot -:PROPERTIES: -:header-args+: :tangle "/sudo::/etc/dovecot/dovecot.conf" -:END: - -#+begin_src conf -protocols = imap - -listen = 127.0.0.1 -log_path = /var/log/dovecot.log -info_log_path = /var/log/dovecot-info.log - -ssl = no -disable_plaintext_auth = no - -auth_verbose = yes -auth_mechanisms = plain - -passdb { - driver = passwd-file - args = /etc/dovecot/passwd -} - -userdb { - driver = static - args = uid=amin gid=amin home=/home/amin/mail/%d/%n - default_fields = mail=maildir:/home/amin/mail/%d/%n/mail -} - -# mail_home = /home/amin/mail/%d/%n -# mail_location = maildir:/home/amin/mail/%d/%n/mail:LAYOUT=fs:INBOX=/home/amin/mail/%d/%n/mail/Inbox - -# namespace { -# inbox = yes -# separator = / -# } - -mail_plugins = $mail_plugins fts fts_lucene - -plugin { - fts = lucene - fts_lucene = whitespace_chars=@. - fts_autoindex = yes -} -#+end_src - -** libinput - -Improve XPS 15 9560's touchpad experience. - -# begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf") -#+begin_src conf :tangle no -Section "InputClass" - Identifier "libinput touchpad catchall" - Driver "libinput" - MatchIsTouchpad "on" - Option "ClickMethod" "clickfinger" - Option "NaturalScrolling" "true" - Option "Tapping" "on" - Option "TappingButtonMap" "lrm" -EndSection -#+end_src - -** mkinitcpio - -#+begin_src conf :tangle /sudo::/etc/mkinitcpio.conf :comments none -# vim:set ft=sh -# MODULES -# The following modules are loaded before any boot hooks are -# run. Advanced users may wish to specify all system modules -# in this array. For instance: -# MODULES=(piix ide_disk reiserfs) -MODULES=(i915) - -# BINARIES -# This setting includes any additional binaries a given user may -# wish into the CPIO image. This is run last, so it may be used to -# override the actual binaries included by a given hook -# BINARIES are dependency parsed, so you may safely ignore libraries -BINARIES=() - -# FILES -# This setting is similar to BINARIES above, however, files are added -# as-is and are not parsed in any way. This is useful for config files. -FILES=() - -# HOOKS -# This is the most important setting in this file. The HOOKS control the -# modules and scripts added to the image, and what happens at boot time. -# Order is important, and it is recommended that you do not change the -# order in which HOOKS are added. Run 'mkinitcpio -H ' for -# help on a given hook. -# 'base' is _required_ unless you know precisely what you are doing. -# 'udev' is _required_ in order to automatically load modules -# 'filesystems' is _required_ unless you specify your fs modules in MODULES -# Examples: -## This setup specifies all modules in the MODULES setting above. -## No raid, lvm2, or encrypted root is needed. -# HOOKS=(base) -# -## This setup will autodetect all modules for your system and should -## work as a sane default -# HOOKS=(base udev autodetect block filesystems) -# -## This setup will generate a 'full' image which supports most systems. -## No autodetection is done. -# HOOKS=(base udev block filesystems) -# -## This setup assembles a pata mdadm array with an encrypted root FS. -## Note: See 'mkinitcpio -H mdadm' for more information on raid devices. -# HOOKS=(base udev block mdadm encrypt filesystems) -# -## This setup loads an lvm2 volume group on a usb device. -# HOOKS=(base udev block lvm2 filesystems) -# -## NOTE: If you have /usr on a separate partition, you MUST include the -# usr, fsck and shutdown hooks. -HOOKS=(base udev autodetect modconf block keyboard encrypt lvm2 resume filesystems fsck) - -# COMPRESSION -# Use this to compress the initramfs image. By default, gzip compression -# is used. Use 'cat' to create an uncompressed image. -#COMPRESSION="gzip" -#COMPRESSION="bzip2" -#COMPRESSION="lzma" -#COMPRESSION="xz" -#COMPRESSION="lzop" -#COMPRESSION="lz4" - -# COMPRESSION_OPTIONS -# Additional options for the compressor -#COMPRESSION_OPTIONS=() -#+end_src - ** mpd :PROPERTIES: :header-args+: :tangle ~/.config/mpd/mpd.conf @@ -1140,226 +1006,6 @@ def_key "K" move_sort_order_up #+end_src -** pacman - -*** conf - -#+begin_src conf :tangle /sudo::/etc/pacman.conf :comments none -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -#HookDir = /etc/pacman.d/hooks/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -L -C - -f -o %o %u -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -#UseDelta = 0.7 -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -Color -TotalDownload -CheckSpace -VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -SigLevel = Required DatabaseOptional -LocalFileSigLevel = Optional -#RemoteFileSigLevel = Required - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all Arch/Parabola packagers -# with `pacman-key --populate archlinux` and `pacman-key --populate parabola`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -# NOTE: Nonprism is a particular repository that aims to provide software built -# and patched without services under global data surveillance programs like PRISM, -# XKeyscore and Tempora. For more info see: https://wiki.parabola.nu/Nonprism - -#[nonprism-testing] -#Include = /etc/pacman.d/mirrorlist - -#[nonprism] -#Include = /etc/pacman.d/mirrorlist - -[libre-testing] -Include = /etc/pacman.d/mirrorlist - -[libre] -Include = /etc/pacman.d/mirrorlist - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/mirrorlist - -# The PCR (Parabola Community Repository) contains packages maintained by trusted -# members of the Parabola community. It also contains packages maintained by -# Parabola developers, but that the developer decided didn't belong in core/libre. - -#[pcr-testing] -#Include = /etc/pacman.d/mirrorlist - -[pcr] -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the libre-multilib, multilib and pcr-multilib repositories as required here. - -#[nonprism-multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -#[nonprism-multilib] -#Include = /etc/pacman.d/mirrorlist - -#[libre-multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -#[libre-multilib] -#Include = /etc/pacman.d/mirrorlist - -#[multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -#[multilib] -#Include = /etc/pacman.d/mirrorlist - -#[pcr-multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -#[pcr-multilib] -#Include = /etc/pacman.d/mirrorlist - -# Parabola also supports another community projects and personal repositories, to -# find them check out this wiki page: https://wiki.parabola.nu/Repositories - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - -Include = /etc/pacman.d/*.conf -#+end_src - -*** mirrorlist - -#+begin_src conf :tangle /sudo::/etc/pacman.d/mirrorlist :comments none -# Parabola GNU/Linux-libre - Last Updated: Wed Dec 20 02:59:35 GMT 2017 - -Server = http://mirror.fsf.org/parabola/$repo/os/$arch -Server = http://mirror.fsf.org/parabola/$repo/os/$arch -Server = http://mirror.fsf.org/parabola/$repo/os/$arch -Server = http://mirror.fsf.org/parabola/$repo/os/$arch - -# Location: London, UK -# Responsible: Parabola Project -# Note: Not really a mirror, automatically redirects you to an Arch -# mirror when possible. Works best specifying it a few times in a -# row (404s workaround). -# Server = http://redirector.parabola.nu/$repo/os/$arch -Server = https://redirector.parabola.nu/$repo/os/$arch - -# Location: Reykjavík, Iceland -# Responsible: Parabola Project -# Note: Not really a mirror, automatically redirects you to a Parabola -# mirror that has the file you are looking for. -# Server = http://repomirror.parabola.nu/$repo/os/$arch -Server = https://repomirror.parabola.nu/$repo/os/$arch - -# Location: Falkenstein, Germany -# Server = http://mirror.grapentin.org/parabola/$repo/os/$arch -Server = https://mirror.grapentin.org/parabola/$repo/os/$arch - -# Location: Volendam, Netherlands -Server = https://jeweet.net/repo/parabola/$repo/os/$arch - -# Location: Amsterdam, Netherlands -# Note: Not really a mirror, but a high-speed 10GiB cache for -# mirror.yandex.ru/mirrors/parabola -# Server = http://parabola.isacdaavid.info:8080/$repo/os/$arch -Server = https://parabola.isacdaavid.info:8081/$repo/os/$arch - -# Location: Moscow, Russian Federation -# Server = http://mirror.yandex.ru/mirrors/parabola/$repo/os/$arch -Server = https://mirror.yandex.ru/mirrors/parabola/$repo/os/$arch - -# Location: Ho Chi Minh City, Vietnam -# Server = http://mirror.freedif.org/Parabola/$repo/os/$arch -Server = https://mirror.freedif.org/Parabola/$repo/os/$arch - -# Location: Los Angeles, CA, USA -# Note: Also visit http://alfplayer.com/ for its SNAPSHOTS ARCHIVE -Server = http://alfplayer.com/parabola/$repo/os/$arch - -# Location: Boston, MA, USA -Server = http://mirror.fsf.org/parabola/$repo/os/$arch - -# Location: Austin, TX, USA -# Server = http://parabola.serverpit.com/ -Server = https://parabola.serverpit.com/ - -# Location: Reykjavík, Iceland -# Responsible: Parabola Project -# Note: Currently pointing to repomirror.parabola.nu -# Server = http://repo.parabola.nu/$repo/os/$arch -Server = https://repo.parabola.nu/$repo/os/$arch -#+end_src - ** pigeonhole *** amin.sieve :PROPERTIES: @@ -1433,23 +1079,6 @@ if anyof ( } #+end_src -** PowerTOP -:PROPERTIES: -:header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service" -:END: - -#+begin_src conf -[Unit] -Description=Powertop tunings - -[Service] -ExecStart=/usr/bin/powertop --auto-tune -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target -#+end_src - ** redshift :PROPERTIES: :header-args+: :tangle ~/.config/redshift.conf :comments none @@ -2252,321 +1881,3 @@ RESTORE_DEVICE_STATE_ON_STARTUP=1 #DEVICES_TO_DISABLE_ON_UNDOCK="" #+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 :tangle no -xset -b # disable bell -xset r rate 200 45 # repeat delay (ms) and rate (repeats/sec) - -# 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' - -if [ $(hostname) = "plasma" ] -then - unlock-def-gk.py & -fi - -bspwm & -#+end_src - -*** xkb us_ab keyboard layout - -#+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none -default partial alphanumeric_keys -xkb_symbols "us_ab" { - include "us(basic)" - name[Group1]= "English (US)(aminb)"; - - key { [ Alt_R ] }; -}; -#+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_ed25519_bandali) - -# -# 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:$HOME/.elan/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" - -export NIXPKGS=$HOME/src/git/nixpkgs - -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 - -export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" -export PATH="/$HOME/.config/guix/current/bin${PATH:+:}$PATH" -export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" -export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt" -export GIT_SSL_CAINFO="$SSL_CERT_FILE" -#+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 -# - -# Define 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 csclub; mbsync uwaterloo; mbsync amin" -alias best="youtube-dl -f best" -alias sd="ssh deb" -alias sf="ssh fp" -alias sn="ssh nix" - -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 -