From 80113fd63397d018bb29b8b3fbe3c6ab7ee8f375 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Thu, 31 Jan 2019 09:41:03 +0100 Subject: [PATCH] Initial Commit --- Makefile | 25 + awesome/emacs.org | 65 + awesome/latex.org | 54 + awesome/vim.org | 73 + documentation/makefile.org | 4 + documentation/unix-commands.org | 42 + dotfiles/bash.org | 398 +++ dotfiles/config.org | 1719 +++++++++ dotfiles/git.org | 209 ++ dotfiles/i3.org | 661 ++++ dotfiles/mail.org | 910 +++++ dotfiles/music.org | 981 ++++++ dotfiles/newsboat.org | 288 ++ dotfiles/polybar.org | 807 +++++ dotfiles/qutebrowser.org | 897 +++++ dotfiles/ranger.org | 902 +++++ dotfiles/rofi.org | 476 +++ dotfiles/termite.org | 103 + dotfiles/tmux.org | 319 ++ dotfiles/vim.org | 1389 ++++++++ elisp/tangle.el | 19 + install.org | 117 + makefiles/mf_latex | 33 + readme.html | 5782 +++++++++++++++++++++++++++++++ readme.org | 1933 +++++++++++ 25 files changed, 18206 insertions(+) create mode 100644 Makefile create mode 100644 awesome/emacs.org create mode 100644 awesome/latex.org create mode 100644 awesome/vim.org create mode 100644 documentation/makefile.org create mode 100644 documentation/unix-commands.org create mode 100644 dotfiles/bash.org create mode 100644 dotfiles/config.org create mode 100644 dotfiles/git.org create mode 100644 dotfiles/i3.org create mode 100644 dotfiles/mail.org create mode 100644 dotfiles/music.org create mode 100644 dotfiles/newsboat.org create mode 100644 dotfiles/polybar.org create mode 100644 dotfiles/qutebrowser.org create mode 100644 dotfiles/ranger.org create mode 100644 dotfiles/rofi.org create mode 100644 dotfiles/termite.org create mode 100644 dotfiles/tmux.org create mode 100644 dotfiles/vim.org create mode 100644 elisp/tangle.el create mode 100644 install.org create mode 100644 makefiles/mf_latex create mode 100644 readme.html create mode 100644 readme.org diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f11425f --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +cache_dir := .cache +orgs := $(wildcard dotfiles/*.org) + +tangle_el := elisp/tangle.el + +^el = $(filter %.el,$^) +EMACS.funcall = emacs --batch --no-init-file $(addprefix --load ,$(^el)) --funcall + +all: tangle + +clean: + rm -rf $(cache_dir) + +tangle: $(basename $(orgs)) + $(cache_dir)/%.out: %.org $(tangle_el) $(cache_dir)/ + $(EMACS.funcall) literate-dotfiles-tangle $< > $@ + +%/: + mkdir -p $@ + +%: %.org $(cache_dir)/%.out + @$(NOOP) + +.PHONY: all clean test +.PRECIOUS: $(cache_dir)/ $(cache_dir)/%.out diff --git a/awesome/emacs.org b/awesome/emacs.org new file mode 100644 index 0000000..8800a19 --- /dev/null +++ b/awesome/emacs.org @@ -0,0 +1,65 @@ +#+TITLE: Awesome Emacs + +* Other Awesome Emacs +https://github.com/emacs-tw/awesome-emacs +https://github.com/dakrone/eos + +* Distributions +https://github.com/hlissner/doom-emacs +https://github.com/ralesi/spacemacs.org + +* General +https://github.com/chrisdone/elisp-guide +https://github.com/melpa/melpa +https://github.com/jwiegley/use-package + +* Packages +https://github.com/company-mode/company-mode +https://github.com/emacs-evil/evil +https://github.com/syl20bnr/spacemacs +https://github.com/magit/magit +https://github.com/jaypei/emacs-neotree +https://github.com/abo-abo/swiper +https://github.com/joaotavora/yasnippet +https://github.com/politza/pdf-tools +https://github.com/jkitchin/scimax +https://github.com/jkitchin/org-ref +https://github.com/weirdNox/org-noter +https://github.com/abo-abo/avy +https://github.com/bbatsov/projectile +https://github.com/emacs-helm/helm +https://github.com/redguardtoo/evil-matchit +https://github.com/kiwanami/emacs-calfw +https://github.com/ch11ng/exwm +https://github.com/yuya373/emacs-slack +https://github.com/rudolfochrist/interleave +https://github.com/jwiegley/alert +https://github.com/nashamri/academic-phrases +https://github.com/vermiculus/magithub +https://github.com/auto-complete/auto-complete +https://github.com/Fuco1/smartparens +https://github.com/Alexander-Miller/treemacs +https://github.com/rexim/org-cliplink +https://github.com/abo-abo/org-download +https://github.com/jsinglet/latex-preview-pane +https://github.com/noctuid/evil-guide +https://github.com/linktohack/ox-latex-subfigure +https://github.com/Wilfred/ag.el +https://github.com/dengste/org-caldav +https://github.com/tmalsburg/helm-bibtex +https://github.com/pronobis/matlab-mode +https://github.com/yuhonglin/matlab-mode +https://github.com/Chobbes/org-chef +https://github.com/fuxialexander/emacs-webkit-katex-render +https://github.com/myuhe/org-gcal.el +https://github.com/emacs-evil/evil-collection + +* Theme +https://github.com/greduan/emacs-theme-gruvbox + +* Org Mode +https://github.com/fniessen/org-html-themes +https://github.com/astahlman/ob-async +https://github.com/bastibe/org-journal +https://github.com/alphapapa/org-super-agenda +https://github.com/hagmonk/org-kanban diff --git a/awesome/latex.org b/awesome/latex.org new file mode 100644 index 0000000..847186e --- /dev/null +++ b/awesome/latex.org @@ -0,0 +1,54 @@ +#+TITLE: Awesome LaTeX + +* Other Awezome LaTeX +https://github.com/cmichi/latex-template-collection +https://github.com/latex3/latex3 +https://github.com/egeerardyn/awesome-LaTeX +https://github.com/simonharrer/latex-best-practices +https://github.com/dspinellis/latex-advice + +* Learn LaTeX +https://www.youtube.com/user/AlainOlivetti/playlists +* Tools +https://tectonic-typesetting.github.io/en-US/ +https://github.com/gpoore/minted + +* Theme/class +https://github.com/derric/cleanthesis +https://github.com/tdehaeze/clean-latex-template +https://github.com/deedy/Deedy-Resume +https://github.com/deselaers/latex-beamerposter + +* Beamer +https://github.com/josephwright/beamer + +** Theme +https://github.com/matze/mtheme +https://github.com/martinbjeldbak/ultimate-beamer-theme-list + +* Tikz +https://github.com/walmes/Tikz +https://github.com/xiaohanyu/awesome-tikz +https://github.com/circuitikz/circuitikz +https://github.com/cbersch/pst-optexp +https://github.com/hackl/TikZ-StructuralAnalysis +https://github.com/fhackenberger/ktikz + +* Packages +https://github.com/T-F-S/tcolorbox +* Math +** Make arrows with text above and bellow +https://tex.stackexchange.com/questions/103988/rightarrow-with-text-above-it + +#+BEGIN_SRC latex +\documentclass{article} +\usepackage{mathtools} +\begin{document} + +$\xrightarrow[\text{world}]{\text{hello}}$ +$\xRightarrow[\text{world}]{\text{hello}}$ + +$\xrightarrow[g(x)]{f(x)}$ +$\xRightarrow[g(x)]{f(x)}$ +\end{document} +#+END_SRC diff --git a/awesome/vim.org b/awesome/vim.org new file mode 100644 index 0000000..d78053d --- /dev/null +++ b/awesome/vim.org @@ -0,0 +1,73 @@ +#+TITLE: Awesome Vim + +* Other Awesome Vim +https://github.com/akrawchyk/awesome-vim + +* Distribution +https://github.com/SpaceVim/SpaceVim + +* Packages +https://github.com/metakirby5/codi.vim +https://github.com/SirVer/ultisnips +https://github.com/fatih/vim-go +https://github.com/junegunn/fzf.vim +https://github.com/junegunn/goyo.vim +https://github.com/junegunn/vim-easy-align +https://github.com/tpope/vim-obsession +https://github.com/itchyny/lightline.vim +https://github.com/christoomey/vim-tmux-navigator +https://github.com/Valloric/YouCompleteMe +https://github.com/tpope/vim-dispatch +https://github.com/jpalardy/vim-slime +https://github.com/Shougo/deoplete.nvim +https://github.com/justinmk/vim-sneak +https://github.com/sheerun/vim-polyglot +https://github.com/tommcdo/vim-exchange +https://github.com/tpope/vim-commentary +https://github.com/neomake/neomake +https://github.com/honza/vim-snippets +https://github.com/kassio/neoterm +https://github.com/Shougo/vimfiler.vim +https://github.com/tpope/vim-abolish +https://github.com/zchee/deoplete-jedi +https://github.com/Rip-Rip/clang_complete +https://github.com/jiangmiao/auto-pairs +https://github.com/majutsushi/tagbar +https://github.com/vim-scripts/a.vim +https://github.com/mhinz/vim-startify +https://github.com/dkprice/vim-easygrep +https://github.com/tpope/vim-vinegar +https://github.com/jceb/vim-orgmode +https://github.com/plasticboy/vim-markdown +https://github.com/AndrewRadev/splitjoin.vim +https://github.com/tpope/vim-surround +https://github.com/mhinz/vim-signify +https://github.com/mhinz/vim-grepper +https://github.com/itchyny/calendar.vim +https://github.com/maxbrunsfeld/vim-yankstack +https://github.com/brooth/far.vim +https://github.com/JamshedVesuna/vim-markdown-preview +https://github.com/sjl/gundo.vim +https://github.com/wincent/terminus +https://github.com/sbdchd/neoformat +https://github.com/ntpeters/vim-better-whitespace +https://github.com/tpope/vim-eunuch +https://github.com/w0rp/ale +https://github.com/Shougo/denite.nvim +https://github.com/haya14busa/is.vim +https://github.com/Olical/vim-enmasse +https://github.com/wincent/loupe +https://github.com/daeyun/vim-matlab +https://github.com/cknadler/vim-anywhere +https://github.com/szymonmaszke/vimpyter +https://github.com/tpope/vim-dadbod +https://github.com/urbainvaes/vim-remembrall +https://github.com/junegunn/vim-peekaboo +https://github.com/liuchengxu/vim-which-key +https://github.com/easymotion/vim-easymotion +https://github.com/chrisbra/NrrwRgn + +* Themes +https://github.com/jacoborus/tender.vim +https://github.com/mhartington/oceanic-next +https://github.com/morhetz/gruvbox diff --git a/documentation/makefile.org b/documentation/makefile.org new file mode 100644 index 0000000..d55fc07 --- /dev/null +++ b/documentation/makefile.org @@ -0,0 +1,4 @@ +#+TITLE: Makefiles + +- http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ +- https://swcarpentry.github.io/make-novice/02-makefiles/ diff --git a/documentation/unix-commands.org b/documentation/unix-commands.org new file mode 100644 index 0000000..a3ed4e2 --- /dev/null +++ b/documentation/unix-commands.org @@ -0,0 +1,42 @@ +#+TITLE: Unix Commands + +* Navigation +- =pwd= Print Working Directory +- =ls= List Segments: list files + - =-a= All - show hidden files + - =-l= Long + - =-t= Time - in order of modification time +- =cd= Change Directory +- =mkdir= Make Directory + +* Manipulation +- =cp= : copies files +- =mv= : moves and rename files +- =rm= : remove files +- =rm -r= : remove directories (-r : Recursive) + +* Redirection +- =>= : redirects output of a command to a file, overwriting previous content +- =>>= : redirects output of a command to a file, appending new content to previous content +- =<= : redirects standard input to a command +- =|= : redirects standard output of a command to another command +- =sort= : sort lines of text alphabetically +- =uniq= : filters duplicate, adjacent lines of text +- =grep= : searches for a text pattern and outputs it +- =sed= : searches for a text pattern, modifies it, and outputs it + +* Environnement +- =~= (alt+n) : user’s home directory +- =nano= : line text editor +- =\.bash_profile= : is where environment settings are stored + - ~export VARIABLE='Value'~ + - =USER= : the name of the current user + - =HOME= : home directory (not to customize) + - =env= : return a list of environment variables + +* Grep +=grep texte nomfichier= +- =-i= : ne pas tenir compte de la casse (majuscules / minuscules) +- =-n= : connaître les numéros des lignes +- =-v= : inverser la recherche : ignorer un mot +- =-r= : rechercher dans tous les fichiers et sous-dossiers diff --git a/dotfiles/bash.org b/dotfiles/bash.org new file mode 100644 index 0000000..011b755 --- /dev/null +++ b/dotfiles/bash.org @@ -0,0 +1,398 @@ +#+TITLE: Bash Configuration + +* Bashrc + :PROPERTIES: + :header-args:conf: :tangle ~/.bashrc + :header-args:conf+: :comments both :mkdirp yes + :END: + +** TODO What does that do? +#+BEGIN_SRC conf +[[ $- != *i* ]] && return +#+END_SRC + +** Bash Completion +#+BEGIN_SRC conf +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion +#+END_SRC + +** Change the window title of X terminals +#+BEGIN_SRC conf +case ${TERM} in + xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' + ;; + screen*) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' + ;; +esac +#+END_SRC + +** Use Color +#+BEGIN_SRC conf +use_color=true +#+END_SRC + +** TODO Set colorful PS1 only on colorful terminals. +dircolors --print-database uses its own built-in database instead of using /etc/DIR_COLORS. Try to use the external file first to take advantage of user additions. Use internal bash globbing instead of external grep binary. + +#+BEGIN_SRC conf +safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM +match_lhs="" +[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" +[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ + && match_lhs=$(dircolors --print-database) +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true + +if ${use_color} ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + if type -P dircolors >/dev/null ; then + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi + + if [[ ${EUID} == 0 ]] ; then + PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' + else + PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' + fi + + alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi +fi +#+END_SRC + +#+BEGIN_SRC conf +unset use_color safe_term match_lhs sh +#+END_SRC + +#+BEGIN_SRC conf +xhost +local:root > /dev/null 2>&1 + +complete -cf sudo + +# Line wrap on window resize +shopt -s checkwinsize + +shopt -s expand_aliases + +# Auto "cd" when entering just a path +shopt -s autocd + +# Enable history appending instead of overwriting +shopt -s histappend +#+END_SRC + +** Rebind up and down arrow keys to search through bash history +#+BEGIN_SRC conf +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' +#+END_SRC + +** Aliases +*** Better defaults for some commands +#+BEGIN_SRC conf +alias cp="cp -i" # confirm before overwriting something +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +alias mutt="neomutt" +#+END_SRC + +*** One letter aliases +#+BEGIN_SRC conf +alias r="ranger" +alias t="tmux" +alias v="nvim" +alias sv='sudo -E nvim' +alias g="git" +alias m="neomutt" +alias y="yadm" +alias o="xdg-open" +#+END_SRC + +*** Magit +#+BEGIN_SRC conf +alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)' ." +#+END_SRC + +*** Vim-like +#+BEGIN_SRC conf +alias :q=exit +alias :e=nvim +#+END_SRC + +*** Youtube +#+BEGIN_SRC conf +alias yt="youtube-dl --add-metadata -ic" # Download video link +alias yta="yt -x -f bestaudio/best" # Download only audio +#+END_SRC + +*** Print each PATH entry on a separate line +#+BEGIN_SRC conf +alias path='echo -e ${PATH//:/\\n}' +#+END_SRC + +*** TODO IP addresses - Remove the use of =dig= and =ifconfig= +#+BEGIN_SRC conf + # alias ip="dig +short myip.opendns.com @resolver1.opendns.com" + # alias localip="ip route get 8.8.4.4 | head -1 | awk '{print $7}'" + # alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" +#+END_SRC + +** Functions +*** Display colors +#+BEGIN_SRC conf +colors() { + local fgc bgc vals seq0 + + printf "Color escapes are %s\n" '\e[${value};...;${value}m' + printf "Values 30..37 are \e[33mforeground colors\e[m\n" + printf "Values 40..47 are \e[43mbackground colors\e[m\n" + printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" + + # foreground colors + for fgc in {30..37}; do + # background colors + for bgc in {40..47}; do + fgc=${fgc#37} # white + bgc=${bgc#40} # black + + vals="${fgc:+$fgc;}${bgc}" + vals=${vals%%;} + + seq0="${vals:+\e[${vals}m}" + printf " %-9s" "${seq0:-(default)}" + printf " ${seq0}TEXT\e[m" + printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" + done + echo; echo + done +} +#+END_SRC + +*** TODO Meteo - Is Dig mandatory? +To install =dig=, use =yay -S bind-tools= + +#+BEGIN_SRC conf +meteo() { + if [ -n "$*" ]; then + address="wttr.in/" + address+=$* + address+="?lang=fr" + curl "$address" + else + address="wttr.in/" + address+=$(ip) + address+="?lang=fr" + curl "$address" + fi +} +alias meteo=meteo +#+END_SRC + +*** TODO Upload using transfer.sh +#+BEGIN_SRC conf +upload() { + # write to output to tmpfile because of progress bar + tmpfile=$(mktemp -t transferXXX) + # basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g') + curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile; + cat $tmpfile | xclip; + echo "Copied:" $(cat $tmpfile); + rm -f $tmpfile; +} +alias upload=upload +#+END_SRC + +*** TODO Upload alternative +#+BEGIN_SRC conf +transfer() { + curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename $1) | xclip -in -selection clipboard; +} +alias transfer=transfer +#+END_SRC + +*** Extract archive +usage: ex + +#+BEGIN_SRC conf +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} +#+END_SRC + +*** Tree display +=tre= is a shorthand for =tree= with hidden files and color enabled, ignoring +the =.git= directory, listing directories first. The output gets piped into +=less= with options to preserve color and line numbers, unless the output is +small enough for one screen. + +#+BEGIN_SRC conf +function tre() { + tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; +} +#+END_SRC + +*** Create a new directory and enter it +#+BEGIN_SRC conf +function mkd() { + mkdir -p "$@" && cd "$_"; +} +#+END_SRC + +*** Filesize of directory +#+BEGIN_SRC conf +function fs() { + if du -b /dev/null > /dev/null 2>&1; then + local arg=-sbh; + else + local arg=-sh; + fi + if [[ -n "$@" ]]; then + du $arg -- "$@"; + else + du $arg .[^.]* ./*; + fi; +} +#+END_SRC + +*** Redirect both standard output and standard error, as well as sending to background +#+BEGIN_SRC conf +function nullify() { + "$@" >/dev/null 2>&1 +} +#+END_SRC + +** Prompt +#+BEGIN_SRC conf +if [ "`id -u`" -eq 0 ]; then + PS1="\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1;31m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]" +else + PS1="\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]" +fi +#+END_SRC + +** Exports +*** Better yaourt colors +#+BEGIN_SRC conf +export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35" +#+END_SRC + +*** Use Ripgrep for FZF +#+BEGIN_SRC conf +export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' +#+END_SRC + +*** Goland +#+BEGIN_SRC conf +export GOPATH=$HOME/go +#+END_SRC + +*** Path +#+BEGIN_SRC conf + PATH=$GOPATH:$GOPATH/bin:$PATH + PATH=$HOME/appimages:$PATH + PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH + PATH=~/bin:$PATH + export PATH +#+END_SRC + +** Bash History +Undocumented feature which sets the size to "unlimited". http://stackoverflow.com/questions/9457233/unlimited-bash-history + +#+BEGIN_SRC conf +export HISTFILESIZE= +export HISTSIZE= +export HISTTIMEFORMAT="[%F %T] " +#+END_SRC + +Change the file location because certain bash sessions truncate =.bash_history= file upon close. http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login + +#+BEGIN_SRC conf +export HISTFILE=~/.bash_eternal_history +#+END_SRC + +Force prompt to write history after every command. http://superuser.com/questions/20900/bash-history-loss + +#+BEGIN_SRC conf +PROMPT_COMMAND="history -a; $PROMPT_COMMAND" +#+END_SRC + +** Base16 Shell +#+BEGIN_SRC conf +BASE16_SHELL="$HOME/.base16-manager/chriskempson/base16-shell/" +[ -n "$PS1" ] && \ +[ -s "$BASE16_SHELL/profile_helper.sh" ] && \ +eval "$("$BASE16_SHELL/profile_helper.sh")" +#+END_SRC + +* Bash Profile + :PROPERTIES: + :header-args:conf: :tangle ~/.bash_profile + :header-args:conf+: :comments both :mkdirp yes + :END: +** Ignore case for autocompletion +#+BEGIN_SRC conf +bind "set completion-ignore-case on" +bind "set show-all-if-ambiguous on" +#+END_SRC + +** Source bashrc +#+BEGIN_SRC conf +[[ -f ~/.bashrc ]] && . ~/.bashrc +#+END_SRC + +* Profile + :PROPERTIES: + :header-args:conf: :tangle ~/.profile + :header-args:conf+: :comments both :mkdirp yes + :END: + +** QT And GTK Themes +#+BEGIN_SRC conf +export QT_QPA_PLATFORMTHEME="qt5ct" +export GTK2_RC_FILES="$HOME/.gtkrc-2.0" +#+END_SRC + +** Gui program to ask for sudo password +#+BEGIN_SRC conf +export SUDO_ASKPASS=~/bin/askpass-rofi +#+END_SRC + +** Default +#+BEGIN_SRC conf +export EDITOR=/usr/bin/nvim +export BROWSER=/usr/bin/qutebrowser +#+END_SRC diff --git a/dotfiles/config.org b/dotfiles/config.org new file mode 100644 index 0000000..b73a637 --- /dev/null +++ b/dotfiles/config.org @@ -0,0 +1,1719 @@ +#+TITLE: Configuration Files + +* Xresources + :PROPERTIES: + :header-args: :tangle ~/.Xresources + :header-args+: :comments both :mkdirp yes + :END: + +** XFT +#+BEGIN_SRC conf +! Xft.dpi: 96 +Xft.dpi: 96 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb +#+END_SRC + +** Xcursor +#+BEGIN_SRC conf +Xcursor.theme: Adwaita +Xcursor.size: 0 +#+END_SRC + +** URxvt +#+BEGIN_SRC conf +URxvt*termName: screen-256color +URxvt*geometry: 240x84 +URxvt*loginShell: true +URxvt*scrollstyle: plain +URxvt*scrollTtyKeypress: true +URxvt*scrollTtyOutput: false +URxvt*scrollWithBuffer: false +URxvt*secondaryScreen: true +URxvt*secondaryScroll: true +URxvt*skipScroll: true +URxvt*scrollBar: false +URxvt*scrollBar_right: false +URxvt*scrollBar_floating: false +URxvt*utmpInhibit: false +URxvt*urgentOnBell: false +URxvt*visualBell: true +URxvt*mapAlert: true +URxvt*mouseWheelScrollPage: true +URxvt*font: xft:SauceCodePro Nerd Font Mono:size=10 +URxvt*boldFont: xft:SauceCodePro Nerd Font Mono:bold:size=10 +URxvt.perl-ext-common: selection-to-clipboard +URxvt.keysym.C-S-c: perl:clipboard:copy +URxvt.keysym.C-S-v: perl:clipboard:paste +#+END_SRC + +** Custom Colors +#+BEGIN_SRC conf +#include ".Xresources.d/colors" +#+END_SRC + +* Redshift + :PROPERTIES: + :header-args: :tangle ~/.config/redshift.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+begin_src conf + ; Global settings for redshift + [redshift] + ; Set the day and night screen temperatures + temp-day=5700 + temp-night=3500 + + ; 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=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: 'geoclue', 'geoclue2', 'manual' + ; type 'redshift -l list' to see possible values. + ; The location provider settings are in a different section. + location-provider=manual + + ; 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=45.1 + lon=5.7 +#+end_src + +* dmenu + :PROPERTIES: + :header-args: :tangle ~/.dmenurc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# define the font for dmenu to be used +DMENU_FN="Noto-10.5" + +# background colour for unselected menu-items +DMENU_NB="#222D31" + +# textcolour for unselected menu-items +DMENU_NF="#F9FAF9" + +# background colour for selected menu-items +DMENU_SB="#16A085" + +# textcolour for selected menu-items +DMENU_SF="#F9FAF9" + +# command for the terminal application to be used: +TERMINAL_CMD="terminal -e" + +# export our variables +DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB" +#+END_SRC + +* GTK +** GTK-2.0 + :PROPERTIES: + :header-args: :tangle ~/.gtkrc-2.0 + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "/home/tdehaeze/.gtkrc-2.0.mine" +gtk-theme-name="Adapta-Nokto-Eta-Maia" +gtk-icon-theme-name="ePapirus" +gtk-font-name="SauceCodePro Nerd Font Mono 10" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" +#+END_SRC + +** GTK-3.0 + :PROPERTIES: + :header-args: :tangle ~/.config/gtk-3.0/settings.ini + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Settings] +gtk-theme-name=Adwaita +gtk-icon-theme-name=Faenza-Radiance +gtk-font-name=Cantarell 8 +gtk-cursor-theme-name=Adwaita +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb +#+END_SRC + +* Input + :PROPERTIES: + :header-args: :tangle ~/.inputrc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# Single tab for autocompletion +set show-all-if-ambiguous on + +# Ignore case for completion +set completion-ignore-case on +#+END_SRC + +* Mailcap + :PROPERTIES: + :header-args: :tangle ~/.mailcap + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +text/plain; nvim %s +audio/*; /usr/bin/xdg-open %s ; copiousoutput +video/*; setsid mpv --quiet %s &; copiousoutput +image/*; ~/scripts/openfile.sh %s; +application/pdf; ~/scripts/openfile.sh %s; +text/html; qutebrowser %s; -n "$DISPLAY"; nametemplate=%s.html; +text/html; w3m -I %{charset} -T text/html; copiousoutput; +text/calendar; khal import --batch -a home %s && khal printics %s; copiousoutput; +application/ics; khal import --batch -a home %s && khal printics %s; copiousoutput; +#+END_SRC + +* urlview + :PROPERTIES: + :header-args: :tangle ~/.urlview + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] + +COMMAND nohup qutebrowser %s /dev/null & +#+END_SRC + +* xinit + :PROPERTIES: + :header-args: :tangle ~/.xinitrc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +#!/bin/sh + + +# ============================================================= +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap +# ============================================================= + + +# ============================================================= +# merge in defaults and keymaps +# ============================================================= +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi +# ============================================================= + + +# ============================================================= +# start some nice programs +# ============================================================= +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi +# ============================================================= + + +# ============================================================= +# hiDPI +# ============================================================= +export GDK_SCALE=1 +export GDK_DPI_SCALE=0.95 + +export QT_SCREEN_SCALE_FACTORS=0.9 +export QT_AUTO_SCREEN_SCALE_FACTOR=2 +export QT_SCALE_FACTOR=2 +# ============================================================= + + +# ============================================================= +# Screen options +# ============================================================= +# # xrandr --output eDP1 --mode 1680x1050 --dpi 192 +# xrandr --dpi 192 +# ============================================================= + + +# ============================================================= +# # Set repetition keyboard rate +# xset r rate 200 30 +# # Set International US keyboard layout +# setxkbmap -layout us -variant intl -option caps:escape +# ============================================================= + + +# ============================================================= +# get_session(){ +# local dbus_args=(--sh-syntax --exit-with-session) +# case $1 in +# awesome) dbus_args+=(awesome) ;; +# bspwm) dbus_args+=(bspwm-session) ;; +# budgie) dbus_args+=(budgie-desktop) ;; +# cinnamon) dbus_args+=(cinnamon-session) ;; +# deepin) dbus_args+=(startdde) ;; +# enlightenment) dbus_args+=(enlightenment_start) ;; +# fluxbox) dbus_args+=(startfluxbox) ;; +# gnome) dbus_args+=(gnome-session) ;; +# i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;; +# jwm) dbus_args+=(jwm) ;; +# kde) dbus_args+=(startkde) ;; +# lxde) dbus_args+=(startlxde) ;; +# lxqt) dbus_args+=(lxqt-session) ;; +# mate) dbus_args+=(mate-session) ;; +# xfce) dbus_args+=(xfce4-session) ;; +# openbox) dbus_args+=(openbox-session) ;; +# *) dbus_args+=($DEFAULT_SESSION) ;; +# esac + +# echo "dbus-launch ${dbus_args[*]}" +# } + +# exec $(get_session) +# exec i3 +export XDG_CURRENT_DESKTOP=Budgie:GNOME +exec budgie-desktop +# ============================================================= +#+END_SRC + +* Calcurse + :PROPERTIES: + :header-args: :tangle ~/.calcurse/conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +appearance.calendarview=monthly +appearance.compactpanels=no +appearance.defaultpanel=calendar +appearance.layout=1 +appearance.notifybar=yes +appearance.sidebarwidth=0 +appearance.theme=red on default +appearance.todoview=show-completed +appearance.headingpos=right-justified +daemon.enable=no +daemon.log=no +format.inputdate=1 +format.notifydate=%a %F +format.notifytime=%T +format.outputdate=%D +format.dayheading=%B %-d, %Y +general.autogc=no +general.autosave=yes +general.confirmdelete=yes +general.confirmquit=yes +general.firstdayofweek=monday +general.periodicsave=0 +general.progressbar=yes +general.systemdialogs=yes +notification.command=printf '\a' +notification.notifyall=flagged-only +notification.warning=300 +#+END_SRC + +* GnuPG + :PROPERTIES: + :header-args: :tangle ~/.gnupg/gpg-agent.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +max-cache-ttl 60480000 +default-cache-ttl 60480000 +#+END_SRC + +* Dunst + :PROPERTIES: + :header-args: :tangle ~/.config/dunst/dunstrc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[global] + frame_width = 3 + frame_color = "#282828" + font = SauceCodePro Nerd Font 10 + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # Markup is allowed + format = "%s\n%b" + + # Sort messages by urgency. + sort = yes + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # The frequency with wich text that is longer than the notification + # window allows bounces back and forth. + # This option conflicts with "word_wrap". + # Set to 0 to disable. + bounce_freq = 5 + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = no + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectevly. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "350x5-0+27" + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing windowmanager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 20 + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # default 120 + idle_threshold = 120 + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a windowmanager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern windowmanagers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = keyboard + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = no + + # Maximum amount of notifications kept in history + history_length = 20 + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + # The height of a single line. If the height is smaller than the + # font height, it will get raised to the font height. + # This adds empty space above and under the text. + line_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 0 + + # Horizontal padding. + horizontal_padding = 8 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = #263238 + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = qutebrowser + + # Align icons left/right/off + icon_position = left + + # Paths to default icons. + # icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + # Limit icons size. + max_icon_size=40 + +# TODO - How to use these shortcuts? +[shortcuts] + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + + # Close notification. + close = mod1+backspace + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#263238" + foreground = "#556064" + timeout = 10 + +[urgency_normal] + background = "#263238" + foreground = "#F9FAF9" + timeout = 10 + +[urgency_critical] + background = "#D62929" + foreground = "#F9FAF9" + timeout = 0 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low + +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low + +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical + +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal + +[New Mail] + appname = mbsync + category = email.arrived + urgency = normal + background = "#2F899E" + foreground = "#FFA247" + +#[mute.sh] +# appname = mute +# category = mute.sound +# script = mute.sh + +#[JDownloader] +# appname = JDownloader +# category = JD +# background = "#FFA247" +# foreground = "#FFFFFF" + +#[newsbeuter] +# summary = *Feeds* +# background = "#A8EB41" +# foreground = "#FFFFFF" + +#[irc] +# appname = weechat +# timeout = 0 +# background = "#0033bb" +# foreground = "#dddddd" + +#[weechat hl] +# appname = weechat +# category = weechat.HL +# background = "#FF5C47" +# foreground = "#FFFFFF" + +#[weechat pn] +# appname = weechat +# category = weechat.PM +# background = "#D53B84" +# foreground = "#FFFFFF" + +#[CMUS] +# appname = CMUS +# category = cmus +# background = "#6C4AB7" +# foreground = "#FFE756" +#+END_SRC + +* feh + :PROPERTIES: + :header-args: :tangle ~/.config/feh/config + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================= +next_img L space +prev_img BackSpace H +# ============================================================= + + +# ============================================================= +scroll_up k Up +scroll_down j Down +scroll_right l Right +scroll_left h Left +# ============================================================= + + +# ============================================================= +toggle_fullscreen f +save_filelist F +# ============================================================= +#+END_SRC + +* MPV +** Configuration + :PROPERTIES: + :header-args: :tangle ~/.config/mpv/mpv.conf + :header-args+: :comments both :mkdirp yes + :END: + +*** Video settings +#+begin_src conf +# Start in fullscreen mode by default. +#fs=yes + +# force starting with centered window +#geometry=50%:50% + +# don't allow a new window to have a size larger than 90% of the screen size +#autofit-larger=90%x90% + +# Do not close the window on exit. +#keep-open=yes + +# Do not wait with showing the video window until it has loaded. (This will + +# resize the window once video is loaded. Also always shows a window with +# audio.) +#force-window=immediate + +# Disable the On Screen Controller (OSC). +#osc=no + +# Keep the player window on top of all other windows. +#ontop=yes + +# Specify high quality video rendering preset (for --vo=gpu only) +# Can cause performance problems with some drivers and GPUs. +#profile=gpu-hq + +# Force video to lock on the display's refresh rate, and change video and audio +# speed to some degree to ensure synchronous playback - can cause problems +# with some drivers and desktop environments. +#video-sync=display-resample + +# Enable hardware decoding if available. Often, this does not work with all +# video outputs, but should work well with default settings on most systems. +# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs +# may or may not help. +#hwdec=auto +#+end_src + +*** Audio settings +#+begin_src conf +# Specify default audio device. You can list devices with: --audio-device=help +# The option takes the device string (the stuff between the '...'). +#audio-device=alsa/default + +# Do not filter audio to keep pitch when changing playback speed. +#audio-pitch-correction=no + +# Output 5.1 audio natively, and upmix/downmix audio with a different format. +#audio-channels=5.1 +# Disable any automatic remix, _if_ the audio output accepts the audio format. +# of the currently played file. See caveats mentioned in the manpage. +# (The default is "auto-safe", see manpage.) +#audio-channels=auto +#+end_src + +*** Other settings +#+begin_src conf +# Pretend to be a web browser. Might fix playback with some streaming sites, +# but also will break with shoutcast streams. +#user-agent="Mozilla/5.0" + +stop-screensaver = "yes" + +# cache settings +# +# Use 150MB input cache by default. The cache is enabled for network streams only. +#cache-default=153600 +# +# Use 150MB input cache for everything, even local files. +#cache=153600 +# +# Disable the behavior that the player will pause if the cache goes below a +# certain fill size. +#cache-pause=no +# +# Read ahead about 5 seconds of audio and video packets. +#demuxer-readahead-secs=5.0 +# +# Raise readahead from demuxer-readahead-secs to this value if a cache is active. +#cache-secs=50.0 + +# Display English subtitles if available. +#slang=en + +# Play Finnish audio if available, fall back to English otherwise. +#alang=fi,en + +# Change subtitle encoding. For Arabic subtitles use 'cp1256'. +# If the file seems to be valid UTF-8, prefer UTF-8. +# (You can add '+' in front of the codepage to force it.) +#sub-codepage=cp1256 +#+end_src + +** Key bindings + :PROPERTIES: + :header-args: :tangle ~/.config/mpv/input.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================= +# Audio +# ============================================================= +#WHEEL_LEFT add volume -2 +#WHEEL_RIGHT add volume 2 +#ctrl++ add audio-delay 0.100 # this changes audio/video sync +#ctrl+- add audio-delay -0.100 + +#9 add volume -2 +#/ add volume -2 +#0 add volume 2 +#* add volume 2 +#m cycle mute + +#SHARP cycle audio # switch audio streams +# ============================================================= + + +# ============================================================= +# Basic +# ============================================================= +ESC set fullscreen no + +q quit +Q quit-watch-later + +SPACE cycle pause # toggle pause/playback mode +# p cycle pause # toggle pause/playback mode +# ============================================================= + + +# ============================================================= +# Navigation +# ============================================================= +l seek 5 +h seek -5 +k seek 60 +j seek -60 + +L playlist-next # skip to next file +H playlist-prev # skip to previous file +K add chapter 1 # skip to next chapter +J add chapter -1 # skip to previous chapter + +WHEEL_UP seek 10 +WHEEL_DOWN seek -10 +# ============================================================= + + +# ============================================================= +# Subtitles +# ============================================================= +z add sub-delay -0.1 # subtract 100 ms delay from subs +Z add sub-delay +0.1 # add +#x add sub-delay +0.1 # same as previous binding (discouraged) +#r add sub-pos -1 # move subtitles up +#R add sub-pos +1 # down +#t add sub-pos +1 # same as previous binding (discouraged) +#v cycle sub-visibility +# stretch SSA/ASS subtitles with anamorphic videos to match historical +#V cycle sub-ass-vsfilter-aspect-compat +# switch between applying no style overrides to SSA/ASS subtitles, and +# overriding them almost completely with the normal subtitle style +#u cycle-values sub-ass-override "force" "no" +#j cycle sub # cycle through subtitles +#J cycle sub down # ...backwards +# Skip to previous/next subtitle (subject to some restrictions; see manpage) +#Ctrl+LEFT no-osd sub-seek -1 +#Ctrl+RIGHT no-osd sub-seek 1 +# Adjust timing to previous/next subtitle +#Ctrl+Shift+LEFT sub-step -1 +#Ctrl+Shift+RIGHT sub-step 1 +# F9 show_text ${track-list} # show list of audio/sub streams +# ? add sub-scale +0.1 # increase subtitle font size +# ? add sub-scale -0.1 # decrease subtitle font size +# ============================================================= + + +# ============================================================= +# Video +# ============================================================= +# Move video rectangle +#Alt+left add video-pan-x 0.1 +#Alt+right add video-pan-x -0.1 +#Alt+up add video-pan-y 0.1 +#Alt+down add video-pan-y -0.1 +# Zoom/unzoom video +#Alt++ add video-zoom 0.1 +#Alt+- add video-zoom -0.1 +# Reset video zoom/pan settings +#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 + +#1 add contrast -1 +#2 add contrast 1 +#3 add brightness -1 +#4 add brightness 1 +#5 add gamma -1 +#6 add gamma 1 +#7 add saturation -1 +#8 add saturation 1 +# ============================================================= + + +# ============================================================= +# Speed +# ============================================================= +#[ multiply speed 1/1.1 # scale playback speed +#] multiply speed 1.1 +#{ multiply speed 0.5 +#} multiply speed 2.0 +#BS set speed 1.0 # reset speed to normal +# ============================================================= + + +# ============================================================= +# # Informations +# ============================================================= +#o show-progress +#P show-progress + +#i script-binding stats/display-stats +#I script-binding stats/display-stats-toggle +# ============================================================= + + +# ============================================================= +# Screenshot +# ============================================================= +#s async screenshot # take a screenshot +#S async screenshot video # ...without subtitles +#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled +#Alt+s screenshot each-frame # automatically screenshot every frame +# ============================================================= + + +# ============================================================= +# Media keys +# ============================================================= +#POWER quit +#PLAY cycle pause +#PAUSE cycle pause +#PLAYPAUSE cycle pause +#STOP quit +#FORWARD seek 60 +#REWIND seek -60 +#NEXT playlist-next +#PREV playlist-prev +#VOLUME_UP add volume 2 +#VOLUME_DOWN add volume -2 +#MUTE cycle mute +#CLOSE_WIN quit +#CLOSE_WIN {encode} quit 4 +# ============================================================= + + +# ============================================================= +# Others +# ============================================================= +#Shift+BS revert-seek # undo previous (or marked) seek +#Shift+Ctrl+BS revert-seek mark # mark position for revert-seek + +#. frame-step # advance one frame and pause +#, frame-back-step # go back by one frame and pause + +#O no-osd cycle-values osd-level 3 1 # cycle through OSD mode + + +#Alt+0 set window-scale 0.5 +#Alt+1 set window-scale 1.0 +#Alt+2 set window-scale 2.0 + +# toggle deinterlacer (automatically inserts or removes required filter) +#d cycle deinterlace + +#_ cycle video + +#T cycle ontop # toggle video window ontop of other windows +#f cycle fullscreen # toggle fullscreen + + +#w add panscan -0.1 # zoom out with -panscan 0 -fs +#W add panscan +0.1 # in +#e add panscan +0.1 # same as previous binding (discouraged) + +# cycle video aspect ratios; "-1" is the container aspect +#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1" + +#E cycle edition # next edition +#l ab-loop # Set/clear A-B loop points +#L cycle-values loop-file "inf" "no" # toggle infinite looping +#ctrl+c quit 4 +#DEL script-binding osc/visibility # cycle OSC display +#ctrl+h cycle-values hwdec "auto" "no" # cycle hardware decoding +#F8 show_text ${playlist} # show playlist + + +#q {encode} quit 4 +#ESC {encode} quit 4 +# ============================================================= +#+END_SRC + +* Systemd +** Buku Git +*** Service + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/bukugit.service + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Sync Bookmarks every day +RefuseManualStart=no +RefuseManualStop=yes + +[Service] +Type=oneshot +ExecStart=/home/tdehaeze/scripts/buku_git_push.sh +#+END_SRC + +*** Timer + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/bukugit.timer + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Sync All Mails every x hours +RefuseManualStart=no +RefuseManualStop=no +After=network.target network-online.target dbus.socket + +[Timer] +OnCalendar=*-*-* 16:00:00 +Persistent=true +Unit=bukugit.service + +[Install] +WantedBy=default.target +#+END_SRC + +** Check mail +*** Service + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/checkmail.service + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Check new mails +RefuseManualStart=no +RefuseManualStop=yes + +[Service] +Type=oneshot +ExecStart=/home/tdehaeze/scripts/checkmail.sh +#+END_SRC + +*** Timer + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/checkmail.timer + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Check Mail every x minutes +RefuseManualStart=no +RefuseManualStop=no +After=network.target network-online.target dbus.socket + +[Timer] +Persistent=false +OnBootSec=2min +OnUnitActiveSec=5min +Unit=checkmail.service + +[Install] +WantedBy=default.target +#+END_SRC + +** Sync mail +*** Service + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/syncmail.timer + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Sync all mails +RefuseManualStart=no +RefuseManualStop=yes + +[Service] +Type=oneshot +ExecStart=/home/tdehaeze/scripts/checkmail.sh all +#+END_SRC + +*** Timer + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/syncmail.timer + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Sync All Mails every x hours +RefuseManualStart=no +RefuseManualStop=no +After=network.target network-online.target dbus.socket + +[Timer] +Persistent=false +OnBootSec=30min +OnUnitActiveSec=300min +Unit=syncmail.service + +[Install] +WantedBy=default.target +#+END_SRC + +** Emacs +*** Service + :PROPERTIES: + :header-args: :tangle ~/.config/systemd/user/emacs.service + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Unit] +Description=Emacs text editor +Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ + +[Service] +Type=simple +ExecStart=/usr/bin/emacs --fg-daemon +ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" +Environment=SSH_AUTH_SOCK=%t/keyring/ssh +Restart=on-failure + +[Install] +WantedBy=default.target +#+END_SRC + +* Zathura + :PROPERTIES: + :header-args: :tangle ~/.config/zathura/zathurarc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# Include the theme file +include zathurarc.theme + +# Use clipboard +set selection-clipboard clipboard + +# Remove padding +set statusbar-h-padding 0 +set statusbar-v-padding 0 + +# Padding between pages +set page-padding 1 + +map u scroll half-up +map d scroll half-down + +map D toggle_page_mode + +map r reload +map R rotate + +map L zoom in +map H zoom out + +map i recolor +map p print + +map m toggle_statusbar +#+END_SRC + +* Compton + :PROPERTIES: + :header-args: :tangle ~/.config/compton.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================ +# Shadow +# ============================================================ +shadow = false; +# no-dnd-shadow = true; +no-dock-shadow = true; +clear-shadow = true; +detect-rounded-corners = true; +shadow-radius = 5; +shadow-offset-x = 1; +shadow-offset-y = 1; +shadow-opacity = .3; +shadow-ignore-shaped = false; +shadow-exclude = [ + "name = 'Notification'", +# workaround for conky until it provides window properties: + "override_redirect = 1 && !WM_CLASS@:s", + "class_g ?= 'Dmenu'", +# "class_g ?= 'Dunst'", +# disable shadows for hidden windows: + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + "_GTK_FRAME_EXTENTS@:c", +# disables shadows on sticky windows: +# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'", +# disables shadows on i3 frames + "class_g ?= 'i3-frame'" +]; + +# shadow-exclude-reg = "x10+0+0"; +# xinerama-shadow-crop = true; +# ============================================================ + + +# ============================================================ +menu-opacity = 1.0; +inactive-opacity = 0.9; +active-opacity = 1.0; +alpha-step = 0.0; +# Dim the inactive windows +inactive-dim = 0.05; +blur-background = true; +blur-kern = "3x3box"; +# ============================================================ + + +# ============================================================ +# Fading - TODO +# ============================================================ +fading = false; +fade-delta = 1; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-exclude = [ ]; +# ============================================================ + + +# ============================================================ +backend = "xrender"; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +detect-client-opacity = true; +unredir-if-possible = true; +refresh-rate = 0; +vsync = "none"; +dbe = false; +paint-on-overlay = true; +focus-exclude = [ "class_g = 'Cairo-clock'" ]; +detect-transient = true; +detect-client-leader = true; +invert-color-include = [ ]; +glx-copy-from-front = false; +glx-swap-method = "undefined"; +# ============================================================ + + +# ============================================================ +# Opacity Rules for specific windows +# ============================================================ +#opacity-rule = [ +#"99:name *?= 'Call'", +#"99:class_g = 'Chromium'", +#"99:name *?= 'Conky'", +#"99:class_g = 'Darktable'", +#"50:class_g = 'Dmenu'", +#"99:name *?= 'Event'", +#"99:class_g = 'Firefox'", +#"99:class_g = 'GIMP'", +#"99:name *?= 'Image'", +#"99:class_g = 'Lazpaint'", +#"99:class_g = 'Midori'", +#"99:name *?= 'Minitube'", +#"99:class_g = 'Mousepad'", +#"99:name *?= 'MuseScore'", +#"90:name *?= 'Page Info'", +#"99:name *?= 'Pale Moon'", +#"90:name *?= 'Panel'", +#"99:class_g = 'Pinta'", +#"90:name *?= 'Restart'", +#"99:name *?= 'sudo'", +#"99:name *?= 'Screenshot'", +#"99:class_g = 'Viewnior'", +#"99:class_g = 'VirtualBox'", +#"99:name *?= 'VLC'", +#"99:name *?= 'Write'", +#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a", +#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", +#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'" +#]; +# ============================================================ + + +# ============================================================ +wintypes : +{ + tooltip : + { + fade = true; + shadow = false; + opacity = 0.85; + focus = true; + }; + fullscreen : + { + fade = true; + shadow = false; + opacity = 1; + focus = true; + }; +}; +# ============================================================ +#+END_SRC + +* Locale + :PROPERTIES: + :header-args: :tangle ~/.config/locale.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +LANG=en_US.UTF-8 +LC_CTYPE="en_US.UTF-8" +LC_NUMERIC=fr_FR.UTF-8 +LC_TIME=fr_FR.UTF-8 +LC_COLLATE="en_US.UTF-8" +LC_MONETARY=fr_FR.UTF-8 +LC_MESSAGES="en_US.UTF-8" +LC_PAPER=fr_FR.UTF-8 +LC_NAME=fr_FR.UTF-8 +LC_ADDRESS=fr_FR.UTF-8 +LC_TELEPHONE=fr_FR.UTF-8 +LC_MEASUREMENT=fr_FR.UTF-8 +LC_IDENTIFICATION=fr_FR.UTF-8 +LC_ALL= +#+END_SRC + +* Mime applications + :PROPERTIES: + :header-args: :tangle ~/.config/mimeapps.list + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[Default Applications] +image/jpeg=feh.desktop +image/png=feh.desktop; +text/plain=nvim.desktop +x-scheme-handler/mailto=neomutt.desktop +message/rfc822=neomutt.desktop +application/x-bittorrent=deluge.desktop +application/pdf=zathura.desktop +x-scheme-handler/http=qutebrowser.desktop +x-scheme-handler/https=qutebrowser.desktop +x-scheme-handler/ftp=qutebrowser.desktop +x-scheme-handler/chrome=qutebrowser.desktop +text/html=qutebrowser.desktop +application/x-extension-htm=qutebrowser.desktop +application/x-extension-html=qutebrowser.desktop +application/x-extension-shtml=qutebrowser.desktop +application/xhtml+xml=qutebrowser.desktop +application/x-extension-xhtml=qutebrowser.desktop +application/x-extension-xht=qutebrowser.desktop + +[Added Associations] +image/jpeg=viewnior.desktop;gpicview.desktop; +image/png=viewnior.desktop;gpicview.desktop; +text/plain=mousepad.desktop; +application/x-bittorrent=deluge.desktop; +#+END_SRC + +* Bukurun + :PROPERTIES: + :header-args: :tangle ~/.config/buku_run/config + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +#!/usr/bin/env bash + +# ============================================================= +_rofi () { + rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@" +} +# ============================================================= + + +# ============================================================= +# display settings +# ============================================================= +display_type=1 +max_str_width=80 +# ============================================================= + + +# ============================================================= +# keybindings +# ============================================================= +switch_view="Alt+Tab" +new_bookmark="Alt+n" +actions="Alt+a" +edit="Alt+e" +delete="Alt+d" +# ============================================================= + + +# ============================================================= +# colors +# ============================================================= +help_color="#2d7ed8" +# ============================================================= +#+END_SRC + +* Clipit - Clipboard Manager + :PROPERTIES: + :header-args: :tangle ~/.config/clipit/clipitrc + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[rc] +use_copy=true +use_primary=false +synchronize=false +automatic_paste=false +show_indexes=false +save_uris=false +use_rmb_menu=false +save_history=false +history_limit=50 +items_menu=20 +statics_show=false +statics_items=10 +hyperlinks_only=false +confirm_clear=false +single_line=false +reverse_history=false +item_length=50 +ellipsize=2 +history_key= +actions_key= +menu_key= +search_key= +offline_key= +offline_mode=false +#+END_SRC +* Conky + :PROPERTIES: + :header-args: :tangle ~/.config/conky/conky.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +conky.config = { + alignment = 'top_left', + background = false, + border_width = 0, + color0 = 'white', + color1 = 'black', + color5 = '#F69CDA', + --cpu_avg_samples = 2, + --default_color = 'white', + --default_bar_height = 6, + --default_bar_width = 0, + --default_gauge_height = 25, + --default_gauge_width = 40, + --default_graph_height = 25, + --default_graph_width = , + --default_outline_color = 'white', + --default_shade_color = 'white', + --disable_auto_reload = true, + diskio_avg_samples = 3, + --display = , + --xinerama_head = , + double_buffer = true, + --draw_borders = false, + --draw_graph_borders = true, + --draw_outline = false, + --draw_shades = false, + --extra_newline = false, + font = 'SauceCodePro Nerd Font:size=12', + gap_x = 3285, + gap_y = 80, + --http_refresh = false, + if_up_strictness = 'link', + --max_text_width = 0, + --max_user_text = 16384, + --maximum_width = , + --minimum_height = 5, + --minimum_width = 5, + net_avg_samples = 4, + --no_buffers = true, + --nvidia_display = , + --out_to_console = false, + --out_to_http = false, + --out_to_ncurses = false, + --out_to_stderr = false, + --out_to_x = true, + --override_utf8_locale = true, + own_window = true, + --own_window_class = 'Conky', + --own_window_title = 'conky0 ()' + own_window_argb_visual = true, + own_window_argb_value = 0, + --own_window_transparent = yes, + own_window_type = 'override', + --short_units = true, + --show_graph_scale = false, + --show_graph_range = false, + --stippled_borders = 0, + --text_buffer_size = 256, + --top_cpu_separate = true, + --top_name_verbose = true, + --top_name_width = 15, + --total_run_times = 0, + update_interval = 0.5, + update_interval_on_battery = 1, + use_spacer = 'none', + use_xft = true +} + +conky.text = [[ +$color5${hr 2} + +${alignc}${color0}${font SauceCodePro Nerd Font:pixelsize=80}${time %I:%M}$font +${alignc}${time %d}$color ${time %B} ${time %Y} + +]] +#+END_SRC +* Scrot + :PROPERTIES: + :header-args: :tangle ~/.config/i3-scrot.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +scrot_dir=$HOME/Pictures +#+END_SRC + +* Khal + :PROPERTIES: + :header-args: :tangle ~/.config/khal/config + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[calendars] + + [[home]] + path = ~/.calendars/google/dehaeze.thomas@gmail.com/ + color = dark green + + [[work]] + path = ~/.calendars/google/8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com/ + color = dark red +#+END_SRC +* Nitrogen + :PROPERTIES: + :header-args: :tangle ~/.config/nitrogen/nitrogen.cfg + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[geometry] +posx=560 +posy=65 +sizex=578 +sizey=591 + +[nitrogen] +view=list +recurse=false +sort=alpha +icon_caps=false +dirs=/home/tdehaeze/Pictures/wallpapers; +#+END_SRC +* Pass Git Helper + :PROPERTIES: + :header-args: :tangle ~/.config/pass-git-helper/git-pass-mapping.ini + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[github.com*] +target=github.com/tdehaeze +#+END_SRC + +* Pavu Control + :PROPERTIES: + :header-args: :tangle ~/.config/pavucontrol.ini + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[window] +width=500 +height=400 +sinkInputType=1 +sourceOutputType=1 +sinkType=0 +sourceType=1 +showVolumeMeters=1 +#+END_SRC + +* PCmanfm + :PROPERTIES: + :header-args: :tangle ~/.config/pcmanfm/default/pcmanfm.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[config] +bm_open_method=0 + +[volume] +mount_on_startup=1 +mount_removable=1 +autorun=1 + +[ui] +always_show_tabs=0 +max_tab_chars=32 +win_width=1263 +win_height=690 +splitter_pos=150 +media_in_new_tab=0 +desktop_folder_new_win=0 +change_tab_on_drop=1 +close_on_unmount=1 +focus_previous=0 +side_pane_mode=places +view_mode=icon +show_hidden=0 +sort=mtime;descending; +toolbar=newtab;navigation;home; +show_statusbar=1 +pathbar_mode_buttons=0 +#+END_SRC + +* Vdirsyncer + :PROPERTIES: + :header-args: :tangle ~/.config/vdirsyncer/config + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[general] +status_path = "~/.config/vdirsyncer/status/" + +[pair google_calendar] +a = "google_calendar_remote" +b = "google_calendar_local" +collections = ["dehaeze.thomas@gmail.com", "8kjmhe2ar0abnm054ill1fb0gc@group.calendar.google.com"] +conflict_resolution = "a wins" + +[storage google_calendar_remote] +type = "google_calendar" +token_file = "~/.config/dotfiles/private/token_file" +client_id = "188415318767-802h28ig8gromo0f72blrbg6cgcop6m8.apps.googleusercontent.com" +client_secret = "***REMOVED***" + +[storage google_calendar_local] +type = "filesystem" +path = "~/.calendars/google/" +fileext = ".ics" +#+END_SRC +* Viewnior + :PROPERTIES: + :header-args: :tangle ~/.config/viewnior/viewnior.conf + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +[prefs] +zoom-mode=0 +fit-on-fullscreen=true +show-hidden=false +smooth-images=true +confirm-delete=true +reload-on-save=false +show-menu-bar=false +show-toolbar=true +show-scrollbar=true +start-maximized=false +slideshow-timeout=5 +auto-resize=false +behavior-wheel=1 +behavior-click=0 +behavior-modify=0 +jpeg-quality=90 +png-compression=9 +desktop=9 +#+END_SRC +* TODO Binaries +* TODO Scripts diff --git a/dotfiles/git.org b/dotfiles/git.org new file mode 100644 index 0000000..3cfd9a4 --- /dev/null +++ b/dotfiles/git.org @@ -0,0 +1,209 @@ +#+TITLE: Git Configuration + +* Gitconfig + :PROPERTIES: + :header-args:conf: :tangle ~/.gitconfig + :header-args:conf+: :comments both :mkdirp yes + :END: + +** Aliases +#+BEGIN_SRC conf +[alias] + # View abbreviated SHA, description, and history graph of the latest 20 commits + l = log --pretty=oneline -n 20 --graph --abbrev-commit + + # View the current working tree status using the short format + s = status -s + + # Show the diff between the latest commit and the current state + d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" + + di = diff --cached --ignore-all-space + + # Pull in remote changes for the current repository and all its submodules + p = !"git pull; git submodule foreach git pull origin master" + + # Clone a repository including all submodules + c = clone --recursive + + # Commit all changes + ca = !git add -A && git commit -av + + # Switch to a branch, creating it if necessary + go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + + # Show verbose output about tags, branches or remotes + tags = tag -l + branches = branch -a + remotes = remote -v + + # Amend the currently staged files to the latest commit + amend = commit --amend --reuse-message=HEAD + + # Credit an author on the latest commit + credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" + + # Interactive rebase with the given number of latest commits + reb = "!r() { git rebase -i HEAD~$1; }; r" + + # Remove the old tag with this name and tag the latest commit with it. + retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" + + # Find branches containing commit + fb = "!f() { git branch -a --contains $1; }; f" + + # Find tags containing commit + ft = "!f() { git describe --always --contains $1; }; f" + + # Find commits by source code + fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" + + # Find commits by commit message + fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" + + # Remove branches that have already been merged with master + dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" + + # List contributors with number of commits + contributors = shortlog --summary --numbered + + ec = config --global -e + + # Pretty log output + hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all + + pp = pull origin $(git_current_branch) + gg = push origin $(git_current_branch) + rhh = reset HEAD --hard + + unstage = reset HEAD -- + last = log -1 HEAD +#+END_SRC + +** Apply +#+BEGIN_SRC conf +[apply] + # Detect whitespace errors when applying a patch + whitespace = fix +#+END_SRC + +** Colors +#+BEGIN_SRC conf +[color] + # Use colors in Git commands that are capable of colored output when outputting to the terminal + ui = true + +[color "branch"] + current = yellow reverse + local = yellow + remote = green + HEAD = red bold + +[color "diff"] + meta = yellow bold + frag = magenta bold # line info + old = red # deletions + new = green # additions + +[color "status"] + added = green + changed = yellow + untracked = cyan + +[color "decorate"] + HEAD = red bold + branch = green + remoteBranch = cyan + tag = yellow + stash = bold yellow +#+END_SRC + +** Default Remote +#+BEGIN_SRC conf +# Use `origin` as the default remote on the `master` branch in all cases +[branch "master"] + remote = origin + merge = refs/heads/master +#+END_SRC + +** Push Configuration +#+BEGIN_SRC conf +[push] + default = matching + # Make `git push` push relevant annotated tags when pushing branches out. + followTags = true +#+END_SRC + +** User +#+BEGIN_SRC conf +[user] + name = Thomas Dehaeze + email = dehaeze.thomas@gmail.com +#+END_SRC + +** Core configuration +#+BEGIN_SRC conf +[core] + # Use custom `.gitignore` and `.gitattributes` + excludesfile = ~/.gitignore_global + + # Treat spaces before tabs and all kinds of trailing whitespace as an error + # [default] trailing-space: looks for spaces at the end of a line + # [default] space-before-tab: looks for spaces before tabs at the beginning of a line + whitespace = space-before-tab,-indent-with-non-tab,trailing-space + + # Prevent showing files whose names contain non-ASCII symbols as unversioned. + # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html + precomposeunicode = false + + pager = diff-so-fancy | less --tabs=4 -RFX + + autocrlf = input + + # Open vim, start Goyo and enter insert mode on the first line + editor = "nvim -u ~/.vim/vimrc.git -c ':Goyo' -c 'goto 1' -c 'startinsert'" +#+END_SRC + +** Credentials using pass +#+BEGIN_SRC conf +[credential] + helper = !pass-git-helper $@ + +[credential "https://github.com"] + username = tdehaeze +#+END_SRC + +** Magithub +#+BEGIN_SRC conf +[magithub] + online = false + +[magithub "status"] + includeStatusHeader = false + includePullRequestsSection = false + includeIssuesSection = false +#+END_SRC + +** Diff-so-fancy +#+begin_src conf +[diff-so-fancy] + markEmptyLines = false +#+end_src + +** Github +#+BEGIN_SRC conf +[github] + user = tdehaeze +#+END_SRC + +* Global Git Ignore + :PROPERTIES: + :header-args:conf: :tangle ~/.gitignore_global + :header-args:conf+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +*~ +.DS_Store +Session.vim +#+END_SRC diff --git a/dotfiles/i3.org b/dotfiles/i3.org new file mode 100644 index 0000000..b89253e --- /dev/null +++ b/dotfiles/i3.org @@ -0,0 +1,661 @@ +#+TITLE: I3 Configuration +#+PROPERTY: header-args:conf+ :comments both +#+PROPERTY: header-args:conf+ :mkdirp yes +#+PROPERTY: header-args:conf+ :tangle ~/.i3/config + +* Mod Key +#+BEGIN_SRC conf +# Set mod key (Mod1=, Mod4=) +set $mod Mod4 +#+end_src + +* Border Style +#+begin_src conf +# Configure border style +new_window pixel 2 +new_float normal +# Hide borders +hide_edge_borders none +#+end_src + +* Font for window titles +#+begin_src conf +font SauceCodePro Nerd Font 11 +#+end_src + +* Multimedia keys +#+begin_src conf +# Sound +bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle +bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ +bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- + +# Backlight +bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 +bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 + +# Tracks +bindsym XF86AudioPlay exec --no-startup-id mpc toggle +bindsym XF86AudioNext exec --no-startup-id mpc next +bindsym XF86AudioPrev exec --no-startup-id mpc prev + +# Screenshots +bindsym $mod+XF86LaunchA --release exec --no-startup-id i3-scrot -w +bindsym $mod+Shift+XF86LaunchA --release exec --no-startup-id i3-scrot -s + +# Other +bindsym XF86LaunchB fullscreen toggle +#+end_src + +* Start Applications +#+begin_src conf +# TODO +# Start program launcher +bindsym $mod+d exec --no-startup-id rofi -show run +# Windows Switch +bindsym $mod+w exec --no-startup-id rofi -show window +# CheatSheets +bindsym $mod+Shift+c exec --no-startup-id rofi -show CheatSheets -modi CheatSheets:~/scripts/rofi_cheatsheets.sh +# Program Launcher with Icons +# bindsym $mod+Shift+d exec --no-startup-id rofi -show drun -show-icons +# Launch categorized menu +bindsym $mod+z exec --no-startup-id rofimenu +# Bookmarks +bindsym $mod+Shift+f exec --no-startup-id buku_run +# Passwords +bindsym $mod+Shift+p exec --no-startup-id rofi-pass +# Start Terminal +bindsym $mod+Return exec termite +# Tmux Terminal +bindsym $mod+Shift+Return exec termite -e 'tmux' +# Configuration application +bindsym $mod+Ctrl+b exec termite -e 'bmenu' +# Start Command line Calendar +bindsym $mod+c exec termite -e "khal interactive" +# Start GUI Calendar (Google calendar) +# bindsym $mod+Shift+c exec qutebrowser https://calendar.google.com/ +# File Manager +bindsym $mod+o exec urxvt -e "ranger" +# GUI File Manager +# bindsym $mod+Shift+o exec pcmanfm +# Mail: Neomutt +bindsym $mod+m exec termite -e "tmuxinator start neomutt" +# Music Manager: NCMPCPP +# bindsym $mod+Shift+p exec termite -e "ncmpcpp" +# Browser +bindsym $mod+i exec qutebrowser +# Sound Manager +bindsym $mod+Ctrl+m exec pavucontrol +# Kill one application +bindsym $mod+Ctrl+x --release exec --no-startup-id xkill +# Kill and restart Notification Manager +bindsym $mod+Shift+n --release exec "killall dunst; exec notify-send 'restart dunst'" + +# Keyboard Deadkey +# TODO - Better keybindings +bindsym $mod+Ctrl+d exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape +bindsym $mod+Shift+d exec --no-startup-id setxkbmap -layout us -option caps:escape +# Toggle poylbar +bindsym $mod+t exec --no-startup-id ~/.config/polybar/bin/toggle.sh bottom +bindsym $mod+Shift+t exec --no-startup-id ~/.config/polybar/bin/toggle.sh top +#+end_src + +* Vim Anywhere +#+begin_src conf + # bindsym $mod+t exec vim-anywhere nvim termite +#+end_src + +* TODO Screenshot - Change to simplier keys +#+begin_src conf +bindsym Print exec --no-startup-id i3-scrot +bindsym $mod+Print --release exec --no-startup-id i3-scrot -w +bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s +#+end_src + +* change focus +#+begin_src conf +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right +#+end_src + +* Move focused window +#+begin_src conf +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right +#+end_src + +* Windows Manager +** TODO Split orientation - Use just one key bindings that alternates? +#+begin_src conf +bindsym $mod+semicolon split h +bindsym $mod+v split v +bindsym $mod+q split toggle +#+end_src + +** Kill focused window +#+begin_src conf +bindsym $mod+Shift+q kill +#+end_src + +** Use Mouse+$mod to drag floating windows +#+begin_src conf +floating_modifier $mod +#+end_src + +** Toggle fullscreen mode for the focused container +#+begin_src conf +bindsym $mod+f fullscreen toggle +#+end_src + +** TODO Change container layout (stacked, tabbed, toggle split) +#+begin_src conf +# bindsym $mod+s layout stacking +# bindsym $mod+w layout tabbed +# bindsym $mod+e layout toggle split +#+end_src + +** TODO Toggle tiling / floating +#+begin_src conf +bindsym $mod+Shift+space floating toggle +#+end_src + +** TODO Change focus between tiling / floating windows +#+begin_src conf +# bindsym $mod+space focus mode_toggle +#+end_src + +** TODO Toggle sticky +#+begin_src conf +bindsym $mod+Shift+s sticky toggle +#+end_src + +** TODO Focus the parent container +#+begin_src conf +bindsym $mod+a focus parent +#+end_src + +* Scratchpad +#+begin_src conf +# move the currently focused window to the scratchpad +bindsym $mod+Shift+BackSpace move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+BackSpace scratchpad show +#+end_src + +* Custom Cratchpad for Quick Access +** Music with ncmpcpp +#+begin_src conf +for_window [instance="scratch-ncmpcpp"] scratchpad show; +exec termite --name="scratch-ncmpcpp" --exec="ncmpcpp" +for_window [instance="scratch-ncmpcpp"] floating enable; +for_window [instance="scratch-ncmpcpp"] move position 440 px 225 px; +for_window [instance="scratch-ncmpcpp"] resize set 800 px 600 px; +for_window [instance="scratch-ncmpcpp"] move scratchpad; +#+end_src + +** RSS Feed with NewsBoat +#+begin_src conf +for_window [instance="scratch-newsboat"] scratchpad show; +exec termite --name="scratch-newsboat" --exec="tmuxinator start newsboat" +for_window [instance="scratch-newsboat"] floating enable; +for_window [instance="scratch-newsboat"] move position 240 px 125 px; +for_window [instance="scratch-newsboat"] resize set 1200 px 800 px; +for_window [instance="scratch-newsboat"] move scratchpad; +#+end_src + +** Calculator with insect +#+begin_src conf +for_window [instance="scratch-insect"] scratchpad show; +exec termite --name="scratch-insect" --exec="insect" +for_window [instance="scratch-insect"] floating enable; +for_window [instance="scratch-insect"] move position 440 px 225 px; +for_window [instance="scratch-insect"] resize set 800 px 600 px; +for_window [instance="scratch-insect"] move scratchpad; +#+end_src + +** Mails with Neomutt +#+begin_src conf +for_window [instance="scratch-neomutt"] scratchpad show; +exec termite --name="scratch-neomutt" --exec="neomutt" +for_window [instance="scratch-neomutt"] floating enable; +for_window [instance="scratch-neomutt"] move position 240 px 125 px; +for_window [instance="scratch-neomutt"] resize set 1200 px 800 px; +for_window [instance="scratch-neomutt"] move scratchpad; +#+end_src + +** Ranger +#+begin_src conf +for_window [instance="scratch-ranger"] scratchpad show; +exec urxvt -name scratch-ranger -e ranger +for_window [instance="scratch-ranger"] floating enable; +for_window [instance="scratch-ranger"] move position 240 px 125 px; +for_window [instance="scratch-ranger"] resize set 1200 px 800 px; +for_window [instance="scratch-ranger"] move scratchpad; +#+end_src + +** Terminal +#+begin_src conf +for_window [instance="scratch-termite"] scratchpad show; +exec termite --name="scratch-termite" +for_window [instance="scratch-termite"] floating enable; +for_window [instance="scratch-termite"] move position 440 px 225 px; +for_window [instance="scratch-termite"] resize set 800 px 600 px; +for_window [instance="scratch-termite"] move scratchpad; +#+end_src + +** TODO Stratchpad Mode - Add scripts that is there is no windows with that name runs the windows and then displays it +#+begin_src conf +bindsym $mod+s mode "$mode_stratchpad" +set $mode_stratchpad (m)ails (p)layer (c)alc (s)hell (n)ews (r)anger +mode "$mode_stratchpad" { + bindsym p [instance="scratch-ncmpcpp"] scratchpad show; mode "default" + bindsym n [instance="scratch-newsboat"] scratchpad show; mode "default" + bindsym s [instance="scratch-termite"] scratchpad show; mode "default" + bindsym c [instance="scratch-insect"] scratchpad show; mode "default" + bindsym m [instance="scratch-neomutt"] scratchpad show; mode "default" + bindsym r [instance="scratch-ranger"] scratchpad show; mode "default" + + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" +} +#+end_src + +* TODO [#A] Workspace names +To display names or symbols instead of plain workspace numbers you can use something like: =set $ws1 1:mail= and =set $ws2 2:=. + +#+begin_src conf +set $ws1 1: +set $ws2 2: +set $ws3 3: +set $ws4 4: +set $ws5 5: +set $ws6 6: +set $ws7 7: +set $ws8 8: +#+end_src + +* Switch to workspace +#+begin_src conf +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +#+end_src + +* Navigate Workspace +** Workspace back and forth (with/without active container) +#+begin_src conf +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth +#+end_src + +** Move to prev/next workspace +#+begin_src conf +bindsym $mod+n workspace next +bindsym $mod+p workspace prev +#+end_src + +* Move focused container to workspace +#+begin_src conf +bindsym $mod+Ctrl+1 move container to workspace $ws1 +bindsym $mod+Ctrl+2 move container to workspace $ws2 +bindsym $mod+Ctrl+3 move container to workspace $ws3 +bindsym $mod+Ctrl+4 move container to workspace $ws4 +bindsym $mod+Ctrl+5 move container to workspace $ws5 +bindsym $mod+Ctrl+6 move container to workspace $ws6 +bindsym $mod+Ctrl+7 move container to workspace $ws7 +bindsym $mod+Ctrl+8 move container to workspace $ws8 +#+end_src + +* Move to workspace with focused container +#+begin_src conf +bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 +#+end_src + +* Open applications on specific workspaces +#+begin_src conf + # assign [class="qutebrowser"] $ws1 + # assign [class="Pcmanfm"] $ws2 + + # Matlab Figures + assign[title="^Fig"] $ws6 + for_window [title="^Fig"] layout tabbed + assign[title="^HG_Peer"] $ws6 # Name of window when export figure with matlab +#+end_src + +* Open specific applications in floating mode +#+begin_src conf + for_window [title="alsamixer"] floating enable border pixel 1 + for_window [class="calamares"] floating enable border normal + for_window [class="Clipgrab"] floating enable + for_window [title="File Transfer*"] floating enable + for_window [class="Galculator"] floating enable border pixel 1 + for_window [class="GParted"] floating enable border normal + for_window [title="i3_help"] floating enable sticky enable border normal + for_window [class="Lightdm-settings"] floating enable + for_window [class="Lxappearance"] floating enable sticky enable border normal + for_window [class="Manjaro Settings Manager"] floating enable border normal + for_window [title="MuseScore: Play Panel"] floating enable + for_window [class="Nitrogen"] floating enable sticky enable border normal + for_window [class="Oblogout"] fullscreen enable + for_window [class="octopi"] floating enable + for_window [class="Pamac-manager"] floating enable + for_window [class="Pavucontrol"] floating enable + for_window [class="qt5ct"] floating enable sticky enable border normal + for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal + for_window [class="Simple-scan"] floating enable border normal + for_window [class="(?i)System-config-printer.py"] floating enable border normal + for_window [class="Skype"] floating enable border normal + for_window [class="Timeset-gui"] floating enable border normal + for_window [class="(?i)virtualbox"] floating enable border normal + for_window [class="Xfburn"] floating enable + for_window [title="^Documentation -"] floating enable border normal + for_window [class="Yad"] floating enable +#+end_src + +* reload the configuration file +#+begin_src conf +# bindsym $mod+Shift+c reload +#+end_src + +* restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +#+begin_src conf +bindsym $mod+Shift+r restart +#+end_src + +* exit i3 (logs you out of your X session) +#+begin_src conf +# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" +#+end_src + +* Set shut down, restart and locking features +#+begin_src conf +bindsym $mod+0 mode "$mode_system" +# TODO - Power Key, if "ignored" in /etc/systemd/logind.conf +bindcode 124 mode "$mode_system" + +set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown +mode "$mode_system" { + bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym s exec --no-startup-id i3exit suspend, mode "default" + bindsym u exec --no-startup-id i3exit switch_user, mode "default" + bindsym e exec --no-startup-id i3exit logout, mode "default" + bindsym h exec --no-startup-id i3exit hibernate, mode "default" + bindsym r exec --no-startup-id i3exit reboot, mode "default" + bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" + + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" +} +#+end_src + +* Command Mode +#+begin_src conf +bindsym $mod+space mode "command" + +mode "command" { + # Command line Calendar Client (khal) + bindsym c exec termite -e "khal interactive"; mode "default" + # GUI Calendar (Google Calendar) + bindsym Shift+c exec qutebrowser https://calendar.google.com/; mode "default" + # Ranger + bindsym r exec urxvt -e "ranger"; mode "default" + # pcmanfm: GUI file manager + bindsym Shift+r exec pcmanfm; mode "default" + # Mails with neomutt + bindsym m exec termite -e "tmuxinator start neomutt"; mode "default" + # Mails with GUI + bindsym Shift+m exec qutebrowser https://mail.google.com/ https://mail.ulg.ac.be/ https://ssl.esrf.fr/+CSCO+0h75676763663A2F2F6A6A6A662E726665732E7365++/rc/?_task=mail&_mbox=INBOX; mode "default" + # Music with ncmpcpp + bindsym p exec termite --exec="ncmpcpp"; mode "default" + # Browser with qutebrowser + bindsym i exec qutebrowser; mode "default" + # Browser with firefox + bindsym Shift+i exec firefox; mode "default" + + # exit resize mode: Enter or Escape + bindsym Escape mode "default" +} +#+end_src + +* Emacs Mode +#+begin_src conf +bindsym $mod+e mode "emacs" + +mode "emacs" { + # Emacs Client + bindsym e exec emacsclient -create-frame --alternate-editor=""; mode "default" + # Full Emacs - Usefull when installing packages + bindsym Shift+e exec emacs; mode "default" + # Bibliography Managmenet with Emacs and Helm-Bibtex + bindsym b exec emacsclient -create-frame --alternate-editor="" --eval '(helm-bibtex)'; mode "default" + # Capture + bindsym c exec emacsclient -create-frame --alternate-editor="" --eval '(org-capture)'; mode "default" + # TODO Mails with Emacs + # bindsym m exec emacsclient -create-frame --alternate-editor="" --eval '(mu4e)'; mode "default" + + # exit resize mode: Enter or Escape + bindsym Escape mode "default" +} +#+end_src + +* Resize +#+begin_src conf +bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt +bindsym $mod+Shift+u resize grow height 10 px or 10 ppt +bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt +bindsym $mod+Shift+o resize grow width 10 px or 10 ppt +#+end_src + +* Autostart Background Applications +#+begin_src conf +# Authentication agent +exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + +# Set custom wallpaper script +exec --no-startup-id $HOME/scripts/wallpaper.sh + +# Run Compton +exec --no-startup-id compton -b + +# Start Network Management Framework +exec --no-startup-id nm-applet + +# Start Power Manager +exec --no-startup-id xfce4-power-manager + +# Bluetooth Manager +exec --no-startup-id blueman-applet + +# Autolock screen after x minutes +# exec --no-startup-id xautolock -time 30 -locker blurlock +exec --no-startup-id xautolock -detectsleep -time 30 -locker blurlock -notify 60 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 60 seconds'" + +# Autostart udiskie that is used to automount devices +exec --no-startup-id udiskie + +# Screen options +exec --no-startup-id xrandr --output eDP1 --mode 1680x1050 --dpi 192 + +# Redshift +exec --no-startup-id redshift + +# Emacs Daemon +exec --no-startup-id /usr/bin/emacs --fg-daemon + +# TODO - Start polybar +exec_always --no-startup-id $HOME/.config/polybar/bin/launch.sh +# exec_always --no-startup-id $HOME/.i3/scripts/polybar_wrapper.sh launch +#+end_src + +* Old autostart Applications +#+begin_src conf +# Used to display shortcuts in the background +# exec --no-startup-id start_conky_live_solarized +# Tray keyboard indicator +# exec_always --no-startup-id sbxkb +# Clipboard Manager +# exec --no-startup-id clipit +# Tray Icon with update notifications +# exec --no-startup-id pamac-tray +# Sound Icon +# exec --no-startup-id volumeicon +# Find what this does +# exec_always --no-startup-id fix_xcursor +#+end_src + +* Color palette used for the terminal ( ~/.Xresources file ) +Colors are gathered based on the documentation https://i3wm.org/docs/userguide.html#xresources. + +#+begin_src conf +set_from_resource $darkred color1 #000000 +set_from_resource $red color9 #000000 +set_from_resource $darkgreen color2 #000000 +set_from_resource $green color10 #000000 +set_from_resource $darkyellow color3 #000000 +set_from_resource $yellow color11 #000000 +set_from_resource $darkblue color4 #000000 +set_from_resource $blue color12 #000000 +set_from_resource $darkmagenta color5 #000000 +set_from_resource $magenta color13 #000000 +set_from_resource $darkcyan color6 #000000 +set_from_resource $cyan color14 #000000 +set_from_resource $darkwhite color7 #000000 +set_from_resource $white color15 #000000 + +# Use custom colors for black +set $black #282828 +set $darkblack #1d2021 +set $transparent #00000000 + +# set_from_resource $term_background background +# set_from_resource $term_foreground foreground +# set_from_resource $term_color0 color0 +# set_from_resource $term_color1 color1 +# set_from_resource $term_color2 color2 +# set_from_resource $term_color3 color3 +# set_from_resource $term_color4 color4 +# set_from_resource $term_color5 color5 +# set_from_resource $term_color6 color6 +# set_from_resource $term_color7 color7 +# set_from_resource $term_color8 color8 +# set_from_resource $term_color9 color9 +# set_from_resource $term_color10 color10 +# set_from_resource $term_color11 color11 +# set_from_resource $term_color12 color12 +# set_from_resource $term_color13 color13 +# set_from_resource $term_color14 color14 +# set_from_resource $term_color15 color15 +#+end_src + +* TODO Theme colors +#+begin_src conf +# class border backgr. text indic. child_border +client.focused #2F3D44 #2F3D44 #1ABC9C #454948 +client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948 +client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 +client.unfocused #556064 #556064 #80FFF9 #FDF6E3 +client.placeholder #000000 #0c0c0c #ffffff #000000 + +client.background #2B2C2B +#+end_src + +* Settings for i3-gaps +#+begin_src conf +# Set inner/outer gaps +gaps inner 10 +gaps outer -2 + +# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. +# gaps inner|outer current|all set|plus|minus +# gaps inner all set 10 +# gaps outer all plus 5 + +# Smart gaps (gaps used if only more than one container on the workspace) +# smart_gaps on + +# Smart borders (draw borders around container only if it is not the only container on this workspace) +# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) +smart_borders on + +# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. +set $mode_gaps Gaps: (o) outer, (i) inner +set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) +bindsym $mod+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "default" + bindsym Escape mode "default" +} +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} +#+end_src + +* Keyboard Configuration +#+begin_src conf +# Set repetition keyboard rate +exec --no-startup-id xset r rate 200 40 +# Set International US keyboard layout +exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape +# Default numpad on +# exec --no-startup-id numlockx & +# ============================================================= +#+END_SRC diff --git a/dotfiles/mail.org b/dotfiles/mail.org new file mode 100644 index 0000000..2ff0d65 --- /dev/null +++ b/dotfiles/mail.org @@ -0,0 +1,910 @@ +#+TITLE: Mail Configuration + +* Synchronize Mailboxes - Mbsync + :PROPERTIES: + :header-args:conf: :tangle ~/.mbsyncrc + :header-args:conf+: :comments both :mkdirp yes + :END: +http://isync.sourceforge.net/ + +** Global Defaults +#+BEGIN_SRC conf +# Automatically create missing mailboxes, both locally and on the server +Create Both +# Save the synchronization state files in the relevant directory +SyncState * +# Permanently remove all messages [on the Master/Slave] marked for deletion. +Expunge Both +#+END_SRC + +** Gmail Account +#+BEGIN_SRC conf +IMAPAccount gmail +Host imap.gmail.com +User dehaeze.thomas@gmail.com +PassCmd "pass email/dehaeze.thomas@gmail.com" +SSLType IMAPS +AuthMechs LOGIN +CertificateFile /etc/ssl/certs/ca-certificates.crt +#+END_SRC + +#+BEGIN_SRC conf +IMAPStore gmail-remote +Account gmail + +MaildirStore gmail-local +Path ~/.mail/gmail/ +Inbox ~/.mail/gmail/Inbox + +Channel gmail-Home +Master :gmail-remote:"INBOX" +Slave :gmail-local:Inbox + +Channel gmail-Drafts +Master :gmail-remote:"[Gmail]/Drafts" +Slave :gmail-local:Drafts + +Channel gmail-Sent +Master :gmail-remote:"[Gmail]/Sent Mail" +Slave :gmail-local:Sent + +Channel gmail-Trash +Master :gmail-remote:"[Gmail]/Trash" +Slave :gmail-local:Trash + +Channel gmail-All +Master :gmail-remote:"[Gmail]/All Mail" +Slave :gmail-local:Archive +#+END_SRC + +#+BEGIN_SRC conf +# Catch-all for everything else: note that the `Patterns` have to exclude both +# the remote and local names for all the folders we want to exclude (except +# "INBOX", which is special-cased, it would seem). +Channel gmail +Master :gmail-remote: +Slave :gmail-local: +# Exclude everything under the internal [Gmail] folder, except the interesting folders +Patterns * +Patterns !INBOX +Patterns ![Gmail]* +Patterns !Archive +Patterns !Drafts +Patterns !Sent Mail +Patterns !Trash +Patterns !Spam +Patterns !Starred +#+END_SRC + +#+BEGIN_SRC conf +# For doing a quick sync of just the INBOX with `mbsync gmail-download`. +Channel gmail-download +Master :gmail-remote:"INBOX" +Slave :gmail-local:Inbox +Create Slave +Expunge Slave +Sync Pull +#+END_SRC + +** ESRF Account +#+BEGIN_SRC conf +IMAPAccount esrf +Host imaps.esrf.fr +User dehaeze +PassCmd "pass email/thomas.dehaeze@esrf.fr" +SSLType IMAPS +AuthMechs LOGIN +#+END_SRC + +#+BEGIN_SRC conf +IMAPStore esrf-remote +Account esrf + +MaildirStore esrf-local +Path ~/.mail/esrf/ +Inbox ~/.mail/esrf/Inbox + +Channel esrf-Home +Master :esrf-remote:"Inbox" +Slave :esrf-local:Inbox + +Channel esrf-Drafts +Master :esrf-remote:"Drafts" +Slave :esrf-local:Drafts + +Channel esrf-Archive +Master :esrf-remote:"Archive" +Slave :esrf-local:Archive + +Channel esrf-Sent +Master :esrf-remote:"Sent" +Slave :esrf-local:Sent + +Channel esrf-Trash +Master :esrf-remote:"Trash" +Slave :esrf-local:Trash +#+END_SRC + +#+BEGIN_SRC conf +Channel esrf +Master :esrf-remote: +Slave :esrf-local: +#+END_SRC + +For doing a quick sync of just the INBOX with `mbsync esrf-download`. +#+BEGIN_SRC conf +Channel esrf-download +Master :esrf-remote:"INBOX" +Slave :esrf-local:Inbox +Create Slave +Expunge Slave +Sync Pull +#+END_SRC + +** ULG Account +#+BEGIN_SRC conf +IMAPAccount ulg +Host mail.ulg.ac.be +User thomas.dehaeze@doct.uliege.be +PassCmd "pass email/thomas.dehaeze@doct.uliege.be" +SSLType IMAPS +AuthMechs LOGIN +#+END_SRC + +#+BEGIN_SRC conf +IMAPStore ulg-remote +Account ulg + +MaildirStore ulg-local +Path ~/.mail/ulg/ +Inbox ~/.mail/ulg/Inbox + +Channel ulg-Home +Master :ulg-remote:"Inbox" +Slave :ulg-local:Inbox + +Channel ulg-Drafts +Master :ulg-remote:"Drafts" +Slave :ulg-local:Drafts + +Channel ulg-Archive +Master :ulg-remote:"Archive" +Slave :ulg-local:Archive + +Channel ulg-Sent +Master :ulg-remote:"Sent" +Slave :ulg-local:Sent + +Channel ulg-Trash +Master :ulg-remote:"Trash" +Slave :ulg-local:Trash +#+END_SRC + +#+BEGIN_SRC conf +Channel ulg +Master :ulg-remote: +Slave :ulg-local: +#+END_SRC + +For doing a quick sync of just the INBOX with `mbsync ulg-download`. +#+BEGIN_SRC conf +Channel ulg-download +Master :ulg-remote:"Inbox" +Slave :ulg-local:Inbox +Create Slave +Expunge Slave +Sync Pull +#+END_SRC + +* Send Mails - Msmtp + :PROPERTIES: + :header-args:conf: :tangle ~/.msmtprc + :header-args:conf+: :comments both :mkdirp yes + :END: +https://marlam.de/msmtp/ + +** Defaults +#+BEGIN_SRC conf +defaults +auth on +tls on +tls_certcheck off +#+END_SRC + +** Gmail Account +#+BEGIN_SRC conf +account gmail +host smtp.gmail.com +port 587 +protocol smtp +from dehaeze.thomas@gmail.com +user dehaeze.thomas@gmail.com +passwordeval "pass email/dehaeze.thomas@gmail.com" +#+END_SRC + +** ESRF Account +#+BEGIN_SRC conf +account esrf +host smtps.esrf.fr +port 465 +protocol smtp +from thomas.dehaeze@esrf.fr +user dehaeze +tls_starttls off +passwordeval "pass email/thomas.dehaeze@esrf.fr" +#+END_SRC + +** ULG Account +#+BEGIN_SRC conf +account ulg +host smtp.ulg.ac.be +port 587 +protocol smtp +from thomas.dehaeze@doct.uliege.be +user s177313 +tls_starttls on +passwordeval "pass email/thomas.dehaeze@doct.uliege.be" +#+END_SRC + +** Default Account +#+BEGIN_SRC conf +account default : gmail +#+END_SRC + +* TODO Mail Indexer - Mu +http://www.djcbsoftware.nl/code/mu/ + +** Cheatsheet +http://www.djcbsoftware.nl/code/mu/cheatsheet.html + +* Mail Client - NeoMutt + :PROPERTIES: + :header-args:conf: :tangle ~/.mutt/muttrc + :header-args:conf+: :comments both :mkdirp yes + :END: +https://neomutt.org/ + +** Bindings +*** TODO Vim Bindings +Unding toutes les touches (https://github.com/iagox86/mutt/blob/master/keybindings.conf) et rebind tout pour faire un truc coherent et documenté +Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#issuecomment-250780838 + +*** Unbind Few keys +#+BEGIN_SRC conf +bind index,pager i noop +bind index,pager g noop +bind index,pager \# noop +bind index \Cf noop +#+END_SRC + +*** Index and Pager +#+BEGIN_SRC conf +bind index,pager R group-reply +bind index,pager s sync-mailbox +#+END_SRC + +*** Navigation +#+BEGIN_SRC conf +bind index collapse-thread + +bind index k previous-entry +bind pager k previous-line +bind index j next-entry +bind pager j next-line +bind index l display-message +bind index gg first-entry +bind pager gg top +bind index G last-entry +bind pager G bottom + +bind attach,index,pager \CD next-page +bind attach,index,pager \CU previous-page + +bind index h noop +bind pager h exit +#+END_SRC + +*** Index +#+BEGIN_SRC conf +bind index u undelete-message + +bind index F search + +bind index,pager P print-message + +bind index,pager p recall-message +bind index,pager N search-opposite + +macro index \Cr "T~UN." "mark all messages as read" +macro index,pager \Cw " urlview" "call urlview to open links" +#+END_SRC + +*** TODO Sync email +#+BEGIN_SRC conf +# Just use one script for that. Merge with the script under ~/script +macro index,pager o "$HOME/.mutt/bin/get_new_mail.sh" +macro index,pager O "$HOME/.mutt/bin/get_new_mail.sh all" +#+END_SRC + +*** Copy and move dialogs +#+BEGIN_SRC conf +macro index C "?" "copy a message to a mailbox" +macro index M "?" "move a message to a mailbox" +#+END_SRC + +*** Quickly change mailboxes +#+BEGIN_SRC conf +macro index,pager c "?" "change folder" +macro index,pager gm "+gmail/Inbox" "go to inbox" +macro index,pager ge "+esrf/Inbox" "go to inbox" +macro index,pager gu "+ulg/Inbox" "go to inbox" +#+END_SRC + +*** TODO Labels +#+BEGIN_SRC conf +bind index,pager y edit-label +#+END_SRC + +*** Open in Vim +#+BEGIN_SRC conf +bind index,pager V noop +macro index,pager V "|nvim -u ~/.vim/vimrc.mutt -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' -" "open in vim" +#+END_SRC + +*** Make quick html view macro +#+BEGIN_SRC conf +bind index,pager H noop # Unbinds V from version +macro index,pager H "html" +#+END_SRC + +*** Mouse wheel +#+BEGIN_SRC conf +bind pager \031 previous-line # Mouse wheel +bind pager \005 next-line # Mouse wheel +#+END_SRC + +*** TODO Contacts +#+BEGIN_SRC conf +macro pager \Ca " goobook add" "add the sender address to Google contacts" +#+END_SRC + +*** Compose +#+BEGIN_SRC conf +bind compose p postpone-message + +macro attach,compose \Cw " urlview" "call urlview to open links" + +bind compose R rename-attachment + +bind compose a attach-file +#+END_SRC + +**** TODO Attach file using GUI File Manager +#+BEGIN_SRC conf +macro compose A "bash $HOME/.mutt/bin/attach-file.shsource /tmp/muttpick" "Attach with GUI" +#+END_SRC + +**** TODO - Write html emails using markdown +#+BEGIN_SRC conf +# macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=us-ascii\n" +#+END_SRC + +**** TODO Open another instance of neomutt in readonly mode while composing +#+BEGIN_SRC conf +macro compose M "termite -e \"neomutt -R\"" +#+END_SRC + +*** TODO Sidebar +#+BEGIN_SRC conf +bind index,pager \Ck sidebar-prev +bind index,pager \Cj sidebar-next +bind index,pager \Co sidebar-open +bind index,pager \Cp sidebar-prev-new +bind index,pager \Cn sidebar-next-new +bind index,pager B sidebar-toggle-visible +#+END_SRC + +*** Attachments +#+BEGIN_SRC conf +bind attach view-mailcap + +macro attach W ~/Downloads/y "Save entry" +#+END_SRC + +** Colors +*** Basic colors +#+BEGIN_SRC conf +color normal brightblue default +color error red default +color tilde white default +color message cyan default +color markers red black +color attachment black default +color search brightmagenta default +color status brightblue white +color indicator brightwhite yellow +color tree yellow default + +# basic monocolor screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold +#+END_SRC + +*** Index +#+BEGIN_SRC conf +#color index red default "~D(!~p|~p)" # deleted +#color index white default ~F # flagged +#color index brightred default ~= # duplicate messages +#color index brightcyan default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +#color index J_base default "~A~N!~T!~p!~Q!~F!~D" # the rest, new +color index red default "~A" # all messages +color index brightred default "~E" # expired messages +color index blue default "~N" # new messages +color index blue default "~O" # old messages +color index brightmagenta default "~Q" # messages that have been replied to +color index brightcyan default "~R" # read messages +color index blue default "~U" # unread messages +color index blue default "~U~$" # unread, unreferenced messages +color index brightblue default "~v" # messages part of a collapsed thread +color index brightblue default "~P" # messages from me +color index cyan default "~p!~F" # messages to me +color index cyan default "~N~p!~F" # new messages to me +color index cyan default "~U~p!~F" # unread messages to me +color index brightcyan default "~R~p!~F" # messages to me +color index red default "~F" # flagged messages +color index red default "~F~p" # flagged messages to me +color index red default "~N~F" # new flagged messages +color index red default "~N~F~p" # new flagged messages to me +color index red default "~U~F~p" # new flagged messages to me +color index white red "~D" # deleted messages +color index brightgreen default "~v~(!~N)" # collapsed thread with no unread +color index yellow default "~v~(~N)" # collapsed thread with some unread +color index green default "~N~v~(~N)" # collapsed thread with unread parent +# statusbg used to indicated flagged when foreground color shows other status +# for collapsed thread +color index red white "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index yellow white "~v~(~F~N)" # collapsed thread with some unread & flagged +color index green white "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index green white "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index cyan white "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly +color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +#color index yellow default "~(~N)" # messages in threads with some unread +#color index green default "~S" # superseded messages +#color index red default "~T" # tagged messages +#color index brightred red "~=" # duplicated messages +#+END_SRC + +*** Message headers +#+BEGIN_SRC conf +color hdrdefault brightcyan default +color header brightblue default "^(From)" +color header blue default "^(Subject)" +#+END_SRC + +*** Body +#+BEGIN_SRC conf +color quoted blue default +color quoted1 cyan default +color quoted2 yellow default +color quoted3 red default +color quoted4 brightred default + +color signature brightcyan default +color bold white default +color underline white default +color normal default default + +color body brightgreen default "[;:][-o][)/(|]" # emoticons +color body brightgreen default "[;:][)(|]" # emoticons +color body brightgreen default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ + |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ + |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" +color body brightgreen default "[ ][*][^*]*[*][ ]?" # more emoticon? +color body brightgreen default "[ ]?[*][^*]*[*][ ]" # more emoticon? +#+END_SRC + +*** PGP +#+BEGIN_SRC conf +color body red default "(BAD signature)" +color body cyan default "(Good signature)" +color body brightwhite default "^gpg: Good signature .*" +color body brightblue default "^gpg: " +color body brightblue red "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" +#+END_SRC + +*** Urls +#+BEGIN_SRC conf +color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" +#+END_SRC + +*** Emails +#+BEGIN_SRC conf + # color body J_magent default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" +#+END_SRC + +*** Various smilies and the like +#+BEGIN_SRC conf +#color body brightblack default "<[Gg]>" # +#color body brightblack default "<[Bb][Gg]>" # +#color body yellow default " [;:]-*[})>{(<|]" # :-) etc... +# *bold* +#color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +#mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" +# _underline_ +#color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +#color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +#mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +# Border lines. +#color body blue default "( *[-+=#*~_]){6,}" + +#folder-hook . "color status J_black J_status " +#folder-hook gmail/inbox "color status J_black yellow " +#folder-hook gmail/important "color status J_black yellow " +#+END_SRC + +** Sidebar +#+BEGIN_SRC conf +# Should the Sidebar be shown? +set sidebar_visible = yes + +# How wide should the Sidebar be in screen columns? +# Note: Some characters, e.g. Chinese, take up two columns each. +set sidebar_width = 20 + +# Should the mailbox paths be abbreviated? +set sidebar_short_path = yes + +# When abbreviating mailbox path names, use any of these characters as path +# separators. Only the part after the last separators will be shown. +# For file folders '/' is good. For IMAP folders, often '.' is useful. +set sidebar_delim_chars = '/.' + +# If the mailbox path is abbreviated, should it be indented? +set sidebar_folder_indent = yes + +# Indent mailbox paths with this string. +set sidebar_indent_string = ' ' + +# Make the Sidebar only display mailboxes that contain new, or flagged, +# mail. +set sidebar_new_mail_only = no + +# Any mailboxes that are whitelisted will always be visible, even if the +# sidebar_new_mail_only option is enabled. +# sidebar_whitelist '/home/user/mailbox1' +# sidebar_whitelist '/home/user/mailbox2' + +# When searching for mailboxes containing new mail, should the search wrap +# around when it reaches the end of the list? +set sidebar_next_new_wrap = no + +# Show the Sidebar on the right-hand side of the screen +set sidebar_on_right = no + +# The character to use as the divider between the Sidebar and the other Mutt +# panels. +# Note: Only the first character of this string is used. +set sidebar_divider_char = '│' + +# Enable extended buffy mode to calculate total, new, and flagged +# message counts for each mailbox. +set mail_check_stats + +# Display the Sidebar mailboxes using this format string. +set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' + +# Sort the mailboxes in the Sidebar using this method: +# count - total number of messages +# flagged - number of flagged messages +# new - number of new messages +# path - mailbox path +# unsorted - do not sort the mailboxes +set sidebar_sort_method = 'unsorted' +#+END_SRC + +** TODO [#A] Searching using Mu +#+begin_src conf + # mutt macros for mu + macro index \Cf "mu find --clearlinks --format=links --linksdir=~/.mail/search " \ + "mu find" + macro index gf "~/.mail/search" \ + "mu find results" +#+end_src + +** Contacts with Mu +#+BEGIN_SRC conf + # set query_command="goobook query '%s'" + # set query_command="lbdbq '%s'" + set query_command="mu cfind '%s' -o mutt-ab" + + bind editor complete-query +#+END_SRC + +** Paths +#+BEGIN_SRC conf +set folder = ~/.mail # mail location +set alias_file = ~/.mutt/alias # where to store aliases +set header_cache = ~/.mutt/cache/headers # where to store headers +set message_cachedir = ~/.mutt/cache/bodies # where to store bodies +set certificate_file = ~/.mutt/certificates # where to store certs +# set mailcap_path = ~/.mutt/config/mailcap # entries for filetypes +set tmpdir = ~/.mutt/temp # where to keep temp files +#+END_SRC + +** TODO Mailcap configuration +** TODO Print +https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt + +#+BEGIN_SRC conf +set print_command="$HOME/.mutt/bin/mutt_print.sh" +#+END_SRC + +** Accounts +#+BEGIN_SRC conf +set spoolfile = "+gmail/Inbox" # Default inbox +set realname = "Dehaeze Thomas" +set from = "dehaeze.thomas@gmail.com" + +folder-hook gmail/* source ~/.mutt/accounts/gmail +folder-hook esrf/* source ~/.mutt/accounts/esrf +folder-hook ulg/* source ~/.mutt/accounts/ulg +#+END_SRC + +*** Gmail +**** Configuration +#+begin_src conf :tangle ~/.mutt/accounts/gmail :comments none +set from = "dehaeze.thomas@gmail.com" +set sendmail = "msmtp -a gmail" + +# Other special folders. +set mbox = "+gmail/Archive" +set record = "+gmail/Sent" +set postponed = "+gmail/Drafts" + +set signature = "~/.mutt/accounts/gmail.signature" + +color status cyan default + +macro index,pager d \ + "+gmail/Archive" \ + "Move message to the Archive" + +macro index,pager D \ + "+gmail/Trash" \ + "Move message to the Trash" +#+end_src + +**** Signature +#+begin_src conf :tangle ~/.mutt/accounts/gmail.signature :comments none +Thomas Dehaeze + +#+end_src + +*** ESRF +**** Configuration +#+begin_src conf :tangle ~/.mutt/accounts/esrf :comments none +set from = "thomas.dehaeze@esrf.fr" +set sendmail = "msmtp -a esrf" + +# Other special folders. +set mbox = "+esrf/Archive" +set record = "+esrf/Sent" +set postponed = "+esrf/Drafts" + +set signature = "~/.mutt/accounts/esrf.signature" + +color status cyan default + +macro index,pager d \ + "+esrf/Archive" \ + "Move message to the Archive" + +macro index,pager D \ + "+esrf/Trash" \ + "Move message to the Trash" +#+end_src + +**** Signature +#+begin_src conf :tangle ~/.mutt/accounts/esrf.signature :comments none +Thomas Dehaeze + +#+end_src + +*** ULG +**** Configuration +#+begin_src conf :tangle ~/.mutt/accounts/ulg :comments none +set from = "thomas.dehaeze@doct.uliege.be" +set sendmail = "msmtp -a ulg" + +# Other special folders. +set mbox = "+ulg/Archive" +set record = "+ulg/Sent" +set postponed = "+ulg/Drafts" + +set signature = "~/.mutt/accounts/ulg.signature" + +color status cyan default + +macro index,pager d \ + "+ulg/Archive" \ + "Move message to the Archive" + +macro index,pager D \ + "+ulg/Trash" \ + "Move message to the Trash" +#+end_src + +**** Signature +#+begin_src conf :tangle ~/.mutt/accounts/ulg.signature :comments none +Thomas Dehaeze + +#+end_src + +** Mailboxes to show in the sidebar. +#+BEGIN_SRC conf +mailboxes \ + +search \ + "+Google" \ + +gmail/Inbox \ + +gmail/Archive \ + +gmail/Drafts \ + +gmail/Sent \ + +gmail/Trash \ + "+ESRF" \ + +esrf/Inbox \ + +esrf/Archive \ + +esrf/Drafts \ + +esrf/Sent \ + +esrf/Trash \ + "+ULG" \ + +ulg/Inbox \ + +ulg/Archive \ + +ulg/Drafts \ + +ulg/Sent \ + +ulg/Trash \ + +set sendmail_wait = 0 # no please don't silently fail, email is important +unset record +#+END_SRC + +** Use Vim to compose email, with a few default options. +#+BEGIN_SRC conf +set editor = "nvim -u ~/.vim/vimrc.mutt -c ':Goyo' -c '/\\n--' -c ':noh' -c 'startinsert'" +#+END_SRC + +** Basic Options +#+BEGIN_SRC conf +set wait_key = no # shut up, mutt +set mbox_type = Maildir # mailbox type +set help = no # No top bar +set timeout = 3 # idle time before scanning +set sleep_time = 0 # how long NeoMutt may wait after an error message +set mail_check = 0 # minimum time between scans +unset move # gmail does that +set delete # don't ask, just do +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +set mark_old = no # read/new is good enough for me +set beep_new # bell on new mails +# set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching +set send_charset="us-ascii:utf-8:iso-8859-1" +set use_from # respect the From: address the editor sends back +#+END_SRC + +** Status Bar +#+BEGIN_SRC conf +set status_on_top = no +set status_chars = " *%A" +set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" +#+END_SRC + +** Index View Options +#+BEGIN_SRC conf +set date_format = "%d/%m/%y %H:%M" +set index_format = "[%Z] %D %-20.20F %s" +# set index_format = " %Z %<[y?%<[m?%<[d?%[ %H:%M]&%[ %a %d]>&%[ %b %d]>&%[%d/%m/%Y]> %-30.30F % %?GS?%GS& ?%?GE?%GE& ?%?GA?%GA& ? %g %s" +# set index_format='%4C %S %[%y.%m.%d] %-18.18n %?GU?%GU& ? %?GR?%GR& ? %?GI?%GI& ? %s' + +set sort = threads # like gmail +set sort_aux = reverse-last-date-received # like gmail +set uncollapse_jump # don't collapse on an unread message +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" +set folder_format = "%2C %t %N %8s %f" +#+END_SRC + +** Pager View Options +#+BEGIN_SRC conf +set pager_index_lines = 10 # number of index lines to show +set pager_context = 3 # number of context lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +set markers = no # no ugly plus signs +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" + +auto_view text/html # view html automatically +alternative_order text/plain text/enriched text/html # save html for last +#+END_SRC + +** Compose View Options +#+BEGIN_SRC conf +set envelope_from # which from? +set sig_dashes # dashes before sig +set sig_on_top # the signature is just below the response +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +set askcc # ask for CC: +set fcc_attach # save attachments with the body +set mime_forward = yes # forward attachments as part of body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_decode # decode when forwarding +set attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include # include message in replies +set forward_quote # include message in forwards +#+END_SRC + +** Attachment View Options +#+BEGIN_SRC conf +set attach_format = "[%D %t] %2n [%-7.7m/%10.10M] %.40d %> [%s] " +#+END_SRC + +** Headers +#+BEGIN_SRC conf +ignore * # ignore all headers +unignore from: to: cc: date: subject: # show only these +unhdr_order * +hdr_order from: to: cc: date: subject: # and in this order +#+END_SRC + +** Progress Bar +#+BEGIN_SRC conf +color progress white red +#+END_SRC + +** TODO Open PDF from mail +=~/scripts/openfile.sh= + +** TODO [#B] Integrate with contact manager +** TODO Integration with org-mode +https://www.donarmstrong.com/posts/org_mode_mutt_capture/ +https://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/ +** TODO Send HTML mails using Markdown +https://unix.stackexchange.com/questions/108485/send-email-written-in-markdown-using-mutt/424162 +https://github.com/Roguelazer/muttdown + +** TODO Attachments +*** Attach multiple files at once +First, tag the files you want to send using =t=, then =;= to apply the action on all tagged files and finally == to add them all +*** TODO Add attachment using GUI file manager +*** Cheatsheet +| Command | Usage | +|---------+---------------| +| == | Open the file | + +** TODO Open Url from mail +#+BEGIN_SRC bash +yay -S urlview +#+END_SRC + +** TODO View emails while composing +https://wiki.archlinux.org/index.php/Mutt#Display_another_email_while_composing + +** TODO Integration with calendar application +http://jasonwryan.com/blog/2014/04/05/calendar/ +https://gist.github.com/guiniol/5109c5bd953af950e0530b720507d704 + +=~/scripts/printics.sh= + +* TODO Notification system +A script (=~/scripts/checkmail.sh=) is used to retreive new mails and use =notify=send= is there are new received mails. diff --git a/dotfiles/music.org b/dotfiles/music.org new file mode 100644 index 0000000..4f32377 --- /dev/null +++ b/dotfiles/music.org @@ -0,0 +1,981 @@ +#+TITLE: Music Configuration + + +* NCMPCPP +https://rybczak.net/ncmpcpp/ +Cheatsheet: https://pkgbuild.com/~jelle/ncmpcpp/ + +** Config + :PROPERTIES: + :header-args:conf: :tangle ~/.ncmpcpp/config + :header-args:conf+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +############################################################################## +## This is the example configuration file. Copy it to $HOME/.ncmpcpp/config ## +## or $XDG_CONFIG_HOME/ncmpcpp/config and set up your preferences. ## +############################################################################## +# +##### directories ###### +## +## Directory for storing ncmpcpp related files. Changing it is useful if you +## want to store everything somewhere else and provide command line setting for +## alternative location to config file which defines that while launching +## ncmpcpp. +## +# +ncmpcpp_directory = ~/.config/.ncmpcpp +# +## +## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other +## MPD clients (eg. ncmpc) also use that location. +## +# +#lyrics_directory = ~/.lyrics +# +##### connection settings ##### +# +mpd_host = localhost + +mpd_port = 6600 + +#mpd_connection_timeout = 5 + +## Needed for tag editor and file operations to work. +## +mpd_music_dir = ~/Music +# +#mpd_crossfade_time = 5 +# +##### music visualizer ##### +## +## Note: In order to make music visualizer work you'll need to use mpd fifo +## output, whose format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. Example configuration +## (it has to be put into mpd.conf): +## +## audio_output { +## type "fifo" +## name "Visualizer feed" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +# +#visualizer_fifo_path = /tmp/mpd.fifo +# +## +## Note: Below parameter is needed for ncmpcpp to determine which output +## provides data for visualizer and thus allow syncing between visualization and +## sound as currently there are some problems with it. +## +# +#visualizer_output_name = Visualizer feed +# +## +## If you set format to 44100:16:2, make it 'yes'. +## +#visualizer_in_stereo = yes +# +## +## Note: Below parameter defines how often ncmpcpp has to "synchronize" +## visualizer and audio outputs. 30 seconds is optimal value, but if you +## experience synchronization problems, set it to lower value. Keep in mind +## that sane values start with >=10. +## +# +#visualizer_sync_interval = 30 +# +## +## Note: To enable spectrum frequency visualization you need to compile ncmpcpp +## with fftw3 support. +## +# +## Available values: spectrum, wave, wave_filled, ellipse. +## +#visualizer_type = wave +# +#visualizer_look = ●▮ +# +#visualizer_color = blue, cyan, green, yellow, magenta, red +# +## Alternative subset of 256 colors for terminals that support it. +## +#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding but if it failed to do so, you +## can specify charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build supports charset detection by +## checking output of `ncmpcpp --version`. +## +## Note: Since MPD uses UTF-8 by default, setting this option makes sense only +## if your encoding is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## Time of inactivity (in seconds) after playlist highlighting will be disabled +## (0 = always on). +## +#playlist_disable_highlight_delay = 5 +# +## Defines how long messages are supposed to be visible. +## +#message_delay_time = 5 +# +##### song format ##### +## +## For a song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - date +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## %P - priority +## $R - begin right alignment +## +## If you want to make sure that a part of the format is displayed only when +## certain tags are present, you can archieve it by grouping them with brackets, +## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are +## present or '' otherwise. It is also possible to define a list of +## alternatives by providing several groups and separating them with '|', +## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is +## not present. +## +## Note: If you want to set limit on maximal length of a tag, just put the +## appropriate number between % and character that defines tag type, e.g. to +## make album take max. 20 terminal cells, use '%20b'. +## +## In addition, formats support markers used for text attributes. They are +## followed by character '$'. After that you can put: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use a non-color attribute anymore, just put it again, +## but this time insert character '/' between '$' and attribute character, +## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with +## reversed colors. +## +## If you want to use 256 colors and/or background colors in formats (the naming +## scheme is described below in section about color definitions), it can be done +## with the syntax $(COLOR), e.g. to set the artist tag to one of the +## non-standard colors and make it have yellow background, you need to write +## $(197_yellow)%a$(end). Note that for standard colors this is interchangable +## with attributes listed above. +## +## Note: colors can be nested. +## +# +#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9} +# +#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} +# +#song_library_format = {%n - }{%t}|{%f} +# +#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +# +#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# +#current_item_prefix = $(yellow)$r +# +#current_item_suffix = $/r$(end) +# +#current_item_inactive_column_prefix = $(white)$r +# +#current_item_inactive_column_suffix = $/r$(end) +# +#now_playing_prefix = $b +# +#now_playing_suffix = $/b +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = $6 +# +#selected_item_suffix = $9 +# +#modified_item_prefix = $3> $9 +# +## +## Note: attributes are not supported for the following variables. +## +#song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. The sort mode +## determines how songs are sorted, and can be used in combination with a sort +## format to specify a custom sorting format. Available values for +## browser_sort_mode are "name", "mtime", "format" and "noop". +## +# +#browser_sort_mode = name +# +#browser_sort_format = {%a - }{%t}|{%f} {(%l)} +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of the column)[color of the column]{displayed tag} +## +## Note: Width is by default in %, if you want a column to have fixed size, add +## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of +## screen (so the real width will depend on actual screen size), whereas +## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen +## is. +## +## - color is optional (if you want the default one, leave the field empty). +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, separated with +## character ':', e.g. {lr:Length} gives you right aligned column of lengths +## named "Length". +## +## - define sequence of tags, that have to be displayed in case predecessor is +## empty in a way similar to the one in classic song format, i.e. using '|' +## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to +## display artist tag and then composer and performer if previous ones are not +## available. +## +# +#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each time song changes. Useful for +## notifications etc. +## +#execute_on_song_change = "" +# +## +## Note: Custom command that will be executed each time player state +## changes. The environment variable MPD_PLAYER_STATE is set to the current +## state (either unknown, play, pause, or stop) for its duration. +## +# +#execute_on_player_state_change = "" +# +#playlist_show_mpd_host = no +# +#playlist_show_remaining_time = no +# +#playlist_shorten_total_times = no +# +#playlist_separate_albums = no +# +## +## Note: Possible display modes: classic, columns. +## +#playlist_display_mode = columns +# +#browser_display_mode = classic +# +#search_engine_display_mode = classic +# +#playlist_editor_display_mode = classic +# +#discard_colors_if_item_is_selected = yes +# +#show_duplicate_tags = yes +# +#incremental_seeking = yes +# +#seek_time = 1 +# +#volume_change_step = 2 +# +#autocenter_mode = no +# +#centered_cursor = no +# +## +## Note: You can specify third character which will be used to build 'empty' +## part of progressbar. +## +#progressbar_look = => +# +## Available values: database, playlist. +## +#default_place_to_search_in = database +# +## Available values: classic, alternative. +## +#user_interface = classic +# +#data_fetching_delay = yes +# +## Available values: artist, album_artist, date, genre, composer, performer. +## +#media_library_primary_tag = artist +# +#media_library_albums_split_by_date = yes +# +## Available values: wrapped, normal. +## +#default_find_mode = wrapped +# +#default_tag_editor_pattern = %n - %t +# +#header_visibility = yes +# +#statusbar_visibility = yes +# +#titles_visibility = yes +# +#header_text_scrolling = yes +# +#cyclic_scrolling = no +# +#lines_scrolled = 2 +# +#lyrics_fetchers = lyricwiki, azlyrics, genius, sing365, lyricsmania, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet +# +#follow_now_playing_lyrics = no +# +#fetch_lyrics_for_current_song_in_background = no +# +#store_lyrics_in_song_dir = no +# +#generate_win32_compatible_filenames = yes +# +#allow_for_physical_item_deletion = no +# +## +## Note: If you set this variable, ncmpcpp will try to get info from last.fm in +## language you set and if it fails, it will fall back to english. Otherwise it +## will use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = en +# +#space_add_mode = add_remove +# +#show_hidden_files_in_local_browser = no +# +## +## How shall screen switcher work? +## +## - "previous" - switch between the current and previous screen. +## - "screen1,...,screenN" - switch between given sequence of screens. +## +## Screens available for use: help, playlist, browser, search_engine, +## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, +## lyrics, last_fm. +## +#screen_switcher_mode = playlist, browser +# +## +## Note: You can define startup screen by choosing screen from the list above. +## +#startup_screen = playlist +# +## +## Note: You can define startup slave screen by choosing screen from the list +## above or an empty value for no slave screen. +## +#startup_slave_screen = "" +# +#startup_slave_screen_focus = no +# +## +## Default width of locked screen (in %). Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = 50 +# +#ask_for_locked_screen_width_part = yes +# +#jump_to_now_playing_song_at_start = yes +# +#ask_before_clearing_playlists = yes +# +#clock_display_seconds = no +# +#display_volume_level = yes +# +#display_bitrate = no +# +#display_remaining_time = no +# +## Available values: none, basic, extended, perl. +## +#regular_expressions = perl +# +## +## Note: if below is enabled, ncmpcpp will ignore leading "The" word while +## sorting items in browser, tags in media library, etc. +## +#ignore_leading_the = no +# +## +## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and +## filtering lists. This takes an effect only if boost was compiled with ICU +## support. +## +#ignore_diacritics = no +# +#block_search_constraints_change_if_items_found = yes +# +#mouse_support = yes +# +#mouse_list_scroll_whole_page = yes +# +#empty_tag_marker = +# +#tags_separator = " | " +# +#tag_editor_extended_numeration = no +# +#media_library_sort_by_mtime = no +# +#enable_window_title = yes +# +## +## Note: You can choose default search mode for search engine. Available modes +## are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but +## if your mpd is on a remote machine, downloading big database to process +## it can take a while +## +## - 3 - match only exact values (this mode uses mpd function for searching in +## database and local one for searching in current playlist) +## +# +#search_engine_default_search_mode = 1 +# +#external_editor = nano +# +## Note: set to yes if external editor is a console application. +## +#use_console_editor = yes +# +##### colors definitions ##### +## +## It is possible to set a background color by setting a color value +## "_", e.g. red_black will set foregound color to red +## and background color to black. +## +## In addition, for terminals that support 256 colors it is possible to set one +## of them by using a number in range [1, 256] instead of color name, +## e.g. numerical value corresponding to red_black is 2_1. To find out if the +## terminal supports 256 colors, run ncmpcpp and check out the bottom of the +## help screen for list of available colors and their numerical values. +## +## What is more, there are two special values for the background color: +## "transparent" and "current". The first one explicitly sets the background to +## be transparent, while the second one allows you to preserve current +## background color and change only the foreground one. It's used implicitly +## when background color is not specified. +## +## Moreover, it is possible to attach format information to selected color +## variables by appending to their end a colon followed by one or more format +## flags, e.g. black:b or red:ur. The following variables support this syntax: +## visualizer_color, color1, color2, empty_tag_color, volume_color, +## state_line_color, state_flags_color, progressbar_color, +## progressbar_elapsed_color, player_state_color, statusbar_time_color, +## alternative_ui_separator_color. +## +## Note: due to technical limitations of older ncurses version, if 256 colors +## are used there is a possibility that you'll be able to use only colors with +## transparent background. +# +#colors_enabled = yes +# +#empty_tag_color = cyan +# +#header_window_color = default +# +#volume_color = default +# +#state_line_color = default +# +#state_flags_color = default:b +# +#main_window_color = yellow +# +#color1 = white +# +#color2 = green +# +#progressbar_color = black:b +# +#progressbar_elapsed_color = green:b +# +#statusbar_color = default +# +#statusbar_time_color = default:b +# +#player_state_color = default:b +# +#alternative_ui_separator_color = black:b +# +#window_border_color = green +# +#active_window_border = red +# +#+END_SRC + +** Bindings + :PROPERTIES: + :header-args:conf: :tangle ~/.ncmpcpp/bindings + :header-args:conf+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================= +def_key "l" + next_column +def_key "h" + previous_column +def_key "k" + scroll_up +def_key "j" + scroll_down +# ============================================================= +#+END_SRC + +* MPD + :PROPERTIES: + :header-args:conf: :tangle ~/.config/mpd/mpd.conf + :header-args:conf+: :comments both :mkdirp yes + :END: +https://www.musicpd.org/ + +** Files and directories +#+BEGIN_SRC conf +# This setting controls the top directory which MPD will search to discover the +# available audio files and add them to the daemon's online database. This +# setting defaults to the XDG directory, otherwise the music directory will be +# be disabled and audio files will only be accepted over ipc socket (using +# file:// protocol) or streaming files over an accepted protocol. +music_directory "~/Music" + +# This setting sets the MPD internal playlist directory. The purpose of this +# directory is storage for playlists created by MPD. The server will use +# playlist files not created by the server but only if they are in the MPD +# format. This setting defaults to playlist saving being disabled. +playlist_directory "~/.config/mpd/playlists" + +# This setting sets the location of the MPD database. This file is used to +# load the database at server start up and store the database while the +# server is not up. This setting defaults to disabled which will allow +# MPD to accept files over ipc socket (using file:// protocol) or streaming +# files over an accepted protocol. +# +db_file "~/.config/mpd/database" + +# These settings are the locations for the daemon log files for the daemon. +# These logs are great for troubleshooting, depending on your log_level +# settings. +# +# The special value "syslog" makes MPD use the local syslog daemon. This +# setting defaults to logging to syslog, otherwise logging is disabled. +log_file "~/.config/mpd/log" + +# This setting sets the location of the file which stores the process ID +# for use of mpd --kill and some init scripts. This setting is disabled by +# default and the pid file will not be stored. +# +pid_file "~/.config/mpd/pid" + +# This setting sets the location of the file which contains information about +# most variables to get MPD back into the same general shape it was in before +# it was brought down. This setting is disabled by default and the server +# state will be reset on server start up. +state_file "~/.config/mpd/state" + +# The location of the sticker database. This is a database which +# manages dynamic information attached to songs. +#sticker_file "~/.config/mpd/sticker.sql" +#+END_SRC + +** General music daemon options +#+BEGIN_SRC conf +# This setting specifies the user that MPD will run as. MPD should never run as +# root and you may use this setting to make MPD change its user ID after +# initialization. This setting is disabled by default and MPD is run as the +# current user. +# +#user "nobody" +# +# This setting specifies the group that MPD will run as. If not specified +# primary group of user specified with "user" setting will be used (if set). +# This is useful if MPD needs to be a member of group such as "audio" to +# have permission to use sound card. +# +#group "nogroup" +# +# This setting sets the address for the daemon to listen on. Careful attention +# should be paid if this is assigned to anything other then the default, any. +# This setting can deny access to control of the daemon. Not effective if +# systemd socket activiation is in use. +# +# For network +#bind_to_address "any" +# +# And for Unix Socket +#bind_to_address "~/.mpd/socket" +# +# This setting is the TCP port that is desired for the daemon to get assigned +# to. +# +#port "6600" +# +# This setting controls the type of information which is logged. Available +# setting arguments are "default", "secure" or "verbose". The "verbose" setting +# argument is recommended for troubleshooting, though can quickly stretch +# available resources on limited hardware storage. +# +#log_level "default" +# +# Setting "restore_paused" to "yes" puts MPD into pause mode instead +# of starting playback after startup. +# +#restore_paused "no" +# +# This setting enables MPD to create playlists in a format usable by other +# music players. +# +#save_absolute_paths_in_playlists "no" +# +# This setting defines a list of tag types that will be extracted during the +# audio file discovery process. The complete list of possible values can be +# found in the user manual. +#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" +# +# This example just enables the "comment" tag without disabling all +# the other supported tags: +#metadata_to_use "+comment" +# +# This setting enables automatic update of MPD's database when files in +# music_directory are changed. +# +#auto_update "yes" +# +# Limit the depth of the directories being watched, 0 means only watch +# the music directory itself. There is no limit by default. +# +#auto_update_depth "3" +# +#+END_SRC + +** Symbolic link behavior +#+BEGIN_SRC conf +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links outside of the configured music_directory. +# +#follow_outside_symlinks "yes" +# +# If this setting is set to "yes", MPD will discover audio files by following +# symbolic links inside of the configured music_directory. +# +#follow_inside_symlinks "yes" +# +#+END_SRC + +** Zeroconf / Avahi Service Discovery +#+BEGIN_SRC conf +# If this setting is set to "yes", service information will be published with +# Zeroconf / Avahi. +# +#zeroconf_enabled "yes" +# +# The argument to this setting will be the Zeroconf / Avahi unique name for +# this MPD server on the network. %h will be replaced with the hostname. +# +#zeroconf_name "Music Player @ %h" +# +#+END_SRC + +** Permissions +#+BEGIN_SRC conf +# If this setting is set, MPD will require password authorization. The password +# setting can be specified multiple times for different password profiles. +# +#password "password@read,add,control,admin" +# +# This setting specifies the permissions a user has who has not yet logged in. +# +#default_permissions "read,add,control,admin" +# +#+END_SRC + +** Database +#+BEGIN_SRC conf +#database { +# plugin "proxy" +# host "other.mpd.host" +# port "6600" +#} +#+END_SRC + +** Input +#+BEGIN_SRC conf +input { + plugin "curl" +# proxy "proxy.isp.com:8080" +# proxy_user "user" +# proxy_password "password" +} +#+END_SRC + +** Audio Output +#+BEGIN_SRC conf +# MPD supports various audio output types, as well as playing through multiple +# audio outputs at the same time, through multiple audio_output settings +# blocks. Setting this block is optional, though the server will only attempt +# autodetection for one sound card. +# +# An example of an ALSA output: +# +audio_output { + type "alsa" + name "My ALSA Device" + period_time "50000" +# device "hw:0,0" # optional +# mixer_type "hardware" # optional +# mixer_device "default" # optional +# mixer_control "PCM" # optional +# mixer_index "0" # optional +} + +# For NCMPCPP Visualizer +audio_output { + type "fifo" + name "Visualizer feed" + path "/tmp/mpd.fifo" + format "44100:16:2" +} + +# +# An example of an OSS output: +# +#audio_output { +# type "oss" +# name "My OSS Device" +## device "/dev/dsp" # optional +## mixer_type "hardware" # optional +## mixer_device "/dev/mixer" # optional +## mixer_control "PCM" # optional +#} +# +# An example of a shout output (for streaming to Icecast): +# +#audio_output { +# type "shout" +# encoder "vorbis" # optional +# name "My Shout Stream" +# host "localhost" +# port "8000" +# mount "/mpd.ogg" +# password "hackme" +# quality "5.0" +# bitrate "128" +# format "44100:16:1" +## protocol "icecast2" # optional +## user "source" # optional +## description "My Stream Description" # optional +## url "http://example.com" # optional +## genre "jazz" # optional +## public "no" # optional +## timeout "2" # optional +## mixer_type "software" # optional +#} +# +# An example of a recorder output: +# +#audio_output { +# type "recorder" +# name "My recorder" +# encoder "vorbis" # optional, vorbis or lame +# path "/var/lib/mpd/recorder/mpd.ogg" +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +#} +# +# An example of a httpd output (built-in HTTP streaming server): +# +#audio_output { +# type "httpd" +# name "My HTTP Stream" +# encoder "vorbis" # optional, vorbis or lame +# port "8000" +# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 +## quality "5.0" # do not define if bitrate is defined +# bitrate "128" # do not define if quality is defined +# format "44100:16:1" +# max_clients "0" # optional 0=no limit +#} +# +# An example of a pulseaudio output (streaming to a remote pulseaudio server) +# +#audio_output { +# type "pulse" +# name "My Pulse Output" +## server "remote_server" # optional +## sink "remote_server_sink" # optional +#} +# +# An example of a winmm output (Windows multimedia API). +# +#audio_output { +# type "winmm" +# name "My WinMM output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +# or +## device "0" # optional +## mixer_type "hardware" # optional +#} +# +# An example of an openal output. +# +#audio_output { +# type "openal" +# name "My OpenAL output" +## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional +#} +# +# An example of an sndio output. +# +#audio_output { +# type "sndio" +# name "sndio output" +# mixer_type "hardware" +#} +# +# An example of an OS X output: +# +#audio_output { +# type "osx" +# name "My OS X Device" +## device "Built-in Output" # optional +## channel_map "-1,-1,0,1" # optional +#} +# +## Example "pipe" output: +# +#audio_output { +# type "pipe" +# name "my pipe" +# command "aplay -f cd 2>/dev/null" +## Or if you're want to use AudioCompress +# command "AudioCompress -m | aplay -f cd 2>/dev/null" +## Or to send raw PCM stream through PCM: +# command "nc example.org 8765" +# format "44100:16:2" +#} +# +## An example of a null output (for no audio output): +# +#audio_output { +# type "null" +# name "My Null Output" +# mixer_type "none" # optional +#} +# +#+END_SRC + +** Normalization automatic volume adjustments +#+BEGIN_SRC conf +# This setting specifies the type of ReplayGain to use. This setting can have +# the argument "off", "album", "track" or "auto". "auto" is a special mode that +# chooses between "track" and "album" depending on the current state of +# random playback. If random playback is enabled then "track" mode is used. +# See for more details about ReplayGain. +# This setting is off by default. +# +#replaygain "album" +# +# This setting sets the pre-amp used for files that have ReplayGain tags. By +# default this setting is disabled. +# +#replaygain_preamp "0" +# +# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. +# By default this setting is disabled. +# +#replaygain_missing_preamp "0" +# +# This setting enables or disables ReplayGain limiting. +# MPD calculates actual amplification based on the ReplayGain tags +# and replaygain_preamp / replaygain_missing_preamp setting. +# If replaygain_limit is enabled MPD will never amplify audio signal +# above its original level. If replaygain_limit is disabled such amplification +# might occur. By default this setting is enabled. +# +#replaygain_limit "yes" +# +# This setting enables on-the-fly normalization volume adjustment. This will +# result in the volume of all playing audio to be adjusted so the output has +# equal "loudness". This setting is disabled by default. +# +#volume_normalization "no" +# +#+END_SRC + +** Character Encoding +#+BEGIN_SRC conf +# If file or directory names do not display correctly for your locale then you +# may need to modify this setting. +# +#filesystem_charset "UTF-8" +#+END_SRC + +* Beets + :PROPERTIES: + :header-args:conf: :tangle ~/.config/beets/config.yaml + :header-args:conf+: :comments both :mkdirp yes + :END: +http://beets.io/ + +#+BEGIN_SRC conf +directory: ~/Music +library: ~/Music/musiclibrary.db + +import: + move: yes +#+END_SRC diff --git a/dotfiles/newsboat.org b/dotfiles/newsboat.org new file mode 100644 index 0000000..9a1b7db --- /dev/null +++ b/dotfiles/newsboat.org @@ -0,0 +1,288 @@ +#+TITLE: Newsboat Configuration + +* Config + :PROPERTIES: + :header-args: :tangle ~/.config/newsboat/config + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================= +# Basic configuration +# ============================================================= +# All feeds will be automatically reloaded after a certain time has passed +# auto-reload yes +auto-reload no +# reload-time 60 +# suppress-first-reload yes + +confirm-exit yes + +external-url-viewer "urlscan -dc -r 'linkhandler {}'" + +goto-first-unread no +goto-next-feed no + +save-path "~/Saved Articles" +download-path "~/Downloads" + +# If set to no, then the keymap hints on the bottom of screen will not be displayed. +show-keymap-hint no + +feed-sort-order lastupdated +# ============================================================= + + +# ============================================================= +# Notifications +# ============================================================= +notify-format "newsbeuter: %n unread articles within %f unread feeds" +notify-program notify-send +# ============================================================= + + +# ============================================================= +# Bindings +# ============================================================= +bind-key j down +bind-key k up +bind-key j next articlelist +bind-key k prev articlelist +bind-key J next-feed articlelist +bind-key K prev-feed articlelist +bind-key G end +bind-key g home +bind-key d pagedown +bind-key u pageup + +bind-key l open +bind-key h quit + +bind-key a toggle-article-read + +bind-key n next-unread +bind-key N prev-unread + +bind-key D pb-download + +bind-key U show-urls + +# bind-key x pb-delete + +bind-key t set-tag +bind-key T clear-tag + +bind-key r reload # Reload the currently selected feed +bind-key R reload-all # Reload all feeds +# ============================================================= + + +# ============================================================= +# Macros - Starts with , key +# ============================================================= +# Default Browser +browser "qutebrowser %u" + +# Open in Browser +macro , open-in-browser + +# Download Video with Youtube-DL +# TODO - Should write a script for that? Maybe open a tmux script if newsboat is in tmux pane? +macro t set browser "~/scripts/download-video.sh %u" ; open-in-browser ; set browser "qutebrowser %u" + +# Download Audio with Youtube-DL +macro a set browser "~/scripts/download-audio.sh %u" ; open-in-browser ; set browser "qutebrowser %u" + +# Open Video with MPV +macro v set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser "qutebrowser %u" + +# Open With W3M +macro w set browser "w3m %u" ; open-in-browser ; set browser "qutebrowser %u" + +# Copy Address to clipboard +macro c set browser "xsel -b <<<" ; open-in-browser ; set browser "qutebrowser %u" +# ============================================================= + + +# ============================================================= +# hide articles matching +# ============================================================= +ignore-article "*" "title =~ \"Sponsor\"" +ignore-article "*" "title =~ \"Advertisement\"" +ignore-mode "display" +# ============================================================= + + +# ============================================================= +# Feedlist and Article Format +# ============================================================= +feedlist-format "%4i %n %11u %t" +feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?" + +articlelist-format "%3i %f %D %?T?|%-17T| ?%t" +articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U" + +itemview-title-format "Article '%T'" +# ============================================================= + + +# ============================================================= +# Color Scheme +# ============================================================= +include "~/.config/newsboat/colors" +# ============================================================= +#+END_SRC + +* Colors + :PROPERTIES: + :header-args: :tangle ~/.config/newsboat/colors + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +# ============================================================= +# Color Scheme +# ============================================================= +highlight feedlist "^ *[0-9]+ *N " cyan cyan +highlight articlelist "^ *[0-9]+ *N " cyan cyan + +highlight article "(^Feed:.*|^Title:.*|^Author:.*)" red default +highlight article "(^Link:.*|^Date:.*)" white default +highlight article "^Podcast Download URL:.*" cyan default +highlight article "^Links:" magenta black underline +highlight article "https?://[^ ]+" green default +highlight article "^(Title):.*$" blue default +highlight article "\\[[0-9][0-9]*\\]" magenta default bold +highlight article "\\[image\\ [0-9]+\\]" green default bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold +highlight article ":.*\\(link\\)$" cyan default +highlight article ":.*\\(image\\)$" blue default +highlight article ":.*\\(embedded flash\\)$" magenta default + +color background default default +color listnormal default default +color listnormal_unread white default +color listfocus color255 cyan bold +color listfocus_unread color255 cyan bold +color info cyan black +color article default default +# ============================================================= +#+END_SRC + +* Config + :PROPERTIES: + :header-args: :tangle ~/.config/newsboat/urls + :header-args+: :comments both :mkdirp yes + :END: + +#+BEGIN_SRC conf +https://lukesmith.xyz/rss.xml unix + +http://www.planet.emacsen.org/atom.xml emacs +http://sachachua.com/blog/feed/ emacs +https://www.reddit.com/r/emacs/.rss reddit emacs + +http://xkcd.com/rss.xml fun + +https://www.youtube.com/feeds/videos.xml?channel_id=UCJM10Rp7G0h9j5S92QszJ5Q "~Tales From The Click (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCRhyS_ylPQ5GWBl1lK92ftA "~Léo - TechMaker (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCBJycsmduvYEL83R_U4JriQ "~Marques Brownlee (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCPpNtkHeCnwN7Tl5oLq4AAg "~Une chanson, l'addition (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC4HANn7TBY-xcION-eL3rLA "~Daniil le Russe (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCww2zZWg4Cf5xcRKG-ThmXQ "~Norman Fait Des Vidéos (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCf0mOxfawezlHIVuHd3L2VA "~Didi Chandouidoui (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCuBzVunAVbcwzMfQaJVacuw "~Le Roi Des Rats (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCyWqModMQlbIo8274Wh_ZsQ "~Cyprien (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCWeg2Pkate69NFdBeuRFTAw "~Squeezie (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~Chat sceptique (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~EmacsCast (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCZHPwKyeypWwU8SNJSzQhCw "~Révisons nos Classiques (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCZeyUZmGAyRLDfM2ir3q-OQ "~Captain Popcorn (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCDEtZ7AKmwS0_GNJog01D2g "~Uncle Dave (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCk0fGHsCEzGig-rSzkfCjMw "~The Engineering Mindset (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCOchT7ZJ4TXe3stdLW1Sfxw "~Dans Ton Corps (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA "~Bryan Lunduke (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~Emacsrocks (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~John Kitchin (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~Brian Douglas (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC6mzA8J7n0ylf0RnDpj-vrg "~PS Audio (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~Steve Brunton (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCyGEYs6CykOtrb8Ok69kL9w "~Alain Olivetti (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCUR03ZSZlEvCO6EWwv4jU2w "~Absol Vidéos (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCP5tjEmvPItGyLhmjdwP7Ww "~RealLifeLore (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCDPK_MTu3uTUFJXRVcTJcEw "~Mcfly & Carlito (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCCMxHHciWRBBouzk-PGzmtQ "~Bazar du Grenier (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~Hygiène Mentale (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCtI0Hodo5o5dUb67FeUjDeA "~SpaceX (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCdL3UpiseRlvxXuORJjmqZw "~Stardust - La Chaîne Espace (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC6wrGV-8evsewfCpVnYv2sw "~ESRFsynchrotron (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~Domain of Science (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC5X4e8ScZI2AFd_vkjSoyoQ "~AstronoGeek (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCTafEJoRl5myC8A50plIrng "~FabienOlicard (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC5ClFK9Ko4ACRgXjRZc_GfA "~Rhinofeed (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCWty1tzwZW_ZNSp5GVGteaA "~La statistique expliquée à mon chat (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC4PasDd25MXqlXBogBw9CAg "~Mickaël Launay (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~BostonDynamics (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~Greg Hurrell (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCqdRx3JV3xRchi4_xwFJUTA "~8FabLab (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCs7Jg5KBsgiova4CrseuwIw "~TheGrandTest (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~Thoughtbot (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC9Ntx-EF3LzKY1nQ5rTUP2g "~Cyriak (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~How To Mechatronics (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCJRljQ8OcyfzHBYpS_bDbow "~La Mezzanine (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC3gZqwD45zGCsduBn-Q2lew "~Gabrielle Grau (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC9BnGZLT4iPaJtDOXYwQuHQ "~Primum Non Nocere (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCsz9DiwPtgDvxJ-njWnieZw "~Passe-Science (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCP46_MXP_WG_auH88FnfS1A "~Nota Bene (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC5eOLQO5VUEFJukNg9cl5jg "~Dave Sheik (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC4Euikzr0bLKsnNuIKW6Sfg "~On n'est pas couché (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~2veritasium (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCeR8BYZS7IHYjk_9Mh5JgkA "~Scilabus (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCCsdIja21VT7AKkbVI5y8bQ "~Alain Vaillancourt (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCr-cm90DwFJC0W3f9jBs5jA "~EEVblog2 (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC_ZChHhr5nDrUymz7qsRqRw "~Confér'ENS (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2UT8pPDlUvRbQXTVOf5Ocw "~Hihacks (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCSULDz1yaHLVQWHpm4g_GHA "~Monsieur bidouille (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCjsHDXUU3BjBCG7OaCbNDyQ "~Le Sense Of Wonder (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCwRXb5dUK4cvsHbx-rGzSgw "~Derek Banas (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCND0gjuG9ltEWDvh82VJITg "~Jeannot Nymouce (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCWMYFDuCcvkmPiOf1RP_IKQ "~Bigorneaux et Coquillages (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCYD22MFqaNqXp-ogTMosW_A "~Le Show Jaune (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC0qKPcBbWJpJbyxPhtye5cg "~Ce soir ou jamais (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCVqx3vXNghSqUcVg2nmegYA "~U꞊RI (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~ScienceEtonnante (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCNmLe68qKzdjuEpT_YTDFuA "~Etonnarium (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2qLXSbTeNI3bHkfrHGvn1g "~ProfOkita (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCm3C3OSgcyzaTBXrNRupB3Q "~Le Woop (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCUK0HBIBWgM2c4vsPhkYY4w "~The Slow Mo Guys (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCH6ppHEvV3_WIXEwmhv9HEg "~Deus Ex Silicium (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC5QPFDZ3Y4ylkkGJc6Y1OOA "~Philippe Demerliac (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCtqICqGbPSbTN09K1_7VZ3Q "~DirtyBiology (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ "~Engineerguy (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCw3tZ7g_FljNjzGprCuptpA "~Taupe10 (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCwbV8cTR4yBgFdfa_BXV2OA "~Le Fossoyeur de Films (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC7DdEm33SyaTDtWYGO2CwdA "~Physics Girl (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCx8mQU1dOemRUTPmrjs_Jaw "~MrGalagomusic (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~Jipihorn (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC8gSNcKgwBK7B4ulB8nh_gw "~Igor Presnyakov (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCiLhOvfEbf_uPvlcWWZKOrw "~Gonzaguetv (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCcziTK2NKeWtWQ6kB5tmQ8Q "~E-penser (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCm5wThREh298TkK8hCT9HuA "~Data Gueule (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC_GlthPB9gzdxfkTTEIVxMA "~Incroyables Expériences (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~Veritasium (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UC2_OG1L8DLTzQ7UrZVOk7OA "~Axolot (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCAFQjCZo5okIPkHUQlBZM-g "~Bonjour Tristesse (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCTt2AnK--mnRmICnf-CCcrw "~Le Rire Jaune (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCyi6pFP-lmaDD3Eb4dqsvdg "~Ioduremetallique (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCGgvKW19IWVvUUblrr8EgHA "~Experimentboy 2 (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCvGag7MyHR8H9oRm9iL9Ifw "~Experimentboy (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCj_iGliGCkLcHSZ8eqVNPDQ "~Grafikart.fr (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCt52sko033qGQl9EjtgTWPA "~Juliette Koch (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCeQEKFH31vvD-InkTGSvCrA "~Brusspup (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCxeA1l2E5AYrtpkqUbBEg3A "~Pierre Lecourt (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCUJQSGHlYC9Xyz-uNfSpSsA "~ElectronikHeart (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCtI6_1vGanPlH5lgVIDjJGQ "~MrAntoineDaniel (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCkEa1AfdeB93-he4VziKGFg "~Jigmé (Youtube)" youtube +https://www.youtube.com/feeds/videos.xml?channel_id=UCfXXAQ-mp1uUcvSpvMcAAtw "~LinksTheSun (Youtube)" youtube +#+END_SRC diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org new file mode 100644 index 0000000..df9b0dc --- /dev/null +++ b/dotfiles/polybar.org @@ -0,0 +1,807 @@ +#+TITLE: Polybar Configuration +#+PROPERTY: header-args+ :comments both +#+PROPERTY: header-args+ :mkdirp yes +#+PROPERTY: header-args+ :tangle ~/.config/polybar/config + +* Colors +#+begin_src conf +[colors] +base00 = ${xrdb:color0:#000000} +base01 = ${xrdb:color10:#000000} +base02 = ${xrdb:color11:#000000} +base03 = ${xrdb:color8:#000000} +base04 = ${xrdb:color12:#000000} +base05 = ${xrdb:color7:#000000} +base06 = ${xrdb:color13:#000000} +base07 = ${xrdb:color15:#000000} +base08 = ${xrdb:color1:#000000} +base09 = ${xrdb:color9:#000000} +base0A = ${xrdb:color3:#000000} +base0B = ${xrdb:color2:#000000} +base0C = ${xrdb:color6:#000000} +base0D = ${xrdb:color4:#000000} +base0E = ${xrdb:color5:#000000} +base0F = ${xrdb:color14:#000000} + +; based on http://chriskempson.com/projects/base16/ +background = ${colors.base00} +background-light = ${colors.base01} +background-selection = ${colors.base02} +comments = ${colors.base03} +foreground-dark = ${colors.base04} +foreground = ${colors.base05} +foreground-light = ${colors.base06} +foreground-light-bis = ${colors.base07} +red = ${colors.base08} +orange = ${colors.base09} +brown = ${colors.base0A} +green = ${colors.base0B} +turquoise = ${colors.base0C} +blue = ${colors.base0D} +purple = ${colors.base0E} +magenta = ${colors.base0F} +black = ${#000000} +#+end_src + +* VM +#+begin_src conf +[global/wm] +margin-top = 5 +margin-bottom = 5 +#+end_src + +* Top Bar +#+BEGIN_SRC conf + [bar/top] + # monitor = ${env:MONITOR:eDP1} + enable-ipc = true + override-redirect = false + bottom = false + fixed-center = true + + width = 100% + height = 27 + radius = 0.0 + + background = ${colors.background} + foreground = ${colors.foreground} + + line-size = 3 + + border-size = 0 + + padding-left = 2 + padding-right = 2 + + module-margin-left = 1 + module-margin-right = 1 + + font-0 = SauceCodePro Nerd Font:style=Medium,Regular:pixelsize=10;1 + font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 + font-2 = Weather Icons:size=10;1 + # font-3 = siji:pixelsize=10;1 + + # modules-left = mpd pulseaudio + # modules-center = i3 xwindow + modules-left = i3 + modules-center = xwindow + modules-right = nordvpn unread_mail cpu battery temperature date + + tray-position = right + tray-padding = 2 + #tray-transparent = true + #tray-background = #0063ff + + #cursor-click = pointer + #cursor-scroll = ns-resize +#+END_SRC + +* Bottom Bar +#+BEGIN_SRC conf + [bar/bottom] + # monitor = ${env:MONITOR:eDP1} + enable-ipc = true + override-redirect = false + bottom = true + fixed-center = true + + width = 100% + height = 27 + radius = 0.0 + + background = ${colors.background} + foreground = ${colors.foreground} + + line-size = 3 + + border-size = 0 + + padding-left = 2 + padding-right = 2 + + module-margin-left = 1 + module-margin-right = 1 + + font-0 = SauceCodePro Nerd Font:style=Medium,Regular:pixelsize=10;1 + font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 + font-2 = Weather Icons:size=10;1 + # font-3 = siji:pixelsize=10;1 + + modules-left = mpd pulseaudio + # modules-center = xwindow + modules-right = screenshot weather emacs caffeine redshift + + # tray-position = right + # tray-padding = 2 + #tray-transparent = true + #tray-background = #0063ff + + #cursor-click = pointer + #cursor-scroll = ns-resize +#+END_SRC + +* Show Windows Title +#+BEGIN_SRC conf + [module/xwindow] + type = internal/xwindow + label = %title:0:30:...% +#+END_SRC + +* Current Layour of the Keyboard +#+BEGIN_SRC conf + [module/xkeyboard] + type = internal/xkeyboard + + # List of indicators to ignore + blacklist-0 = num lock + + + format = + format-prefix = " " + format-prefix-foreground = ${colors.foreground} + format-prefix-underline = ${colors.background} + + label-layout = %layout% + label-layout-underline = ${colors.background} +#+END_SRC + +* Mount filesystem and show available space +#+BEGIN_SRC conf + [module/filesystem] + type = internal/fs + + interval = 25 + + # List of mountpoints to display + mount-0 = / + + label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% + label-unmounted = %mountpoint% + label-unmounted-foreground = ${colors.comments} +#+END_SRC + +* I3 - Information about workspaces and active one +#+BEGIN_SRC conf + [module/i3] + type = internal/i3 + + enable-scroll = false + wrapping-scroll = false +#+END_SRC + +** TODO - Choose some nice icons +#+BEGIN_SRC conf +ws-icon-0 = 1; +ws-icon-1 = 2; +ws-icon-2 = 3; +ws-icon-3 = 4; +ws-icon-4 = 5; +ws-icon-default =  +#+END_SRC + +#+BEGIN_SRC conf +format = +index-sort = true +#+END_SRC + +** Colors +#+BEGIN_SRC conf +label-mode-foreground = ${colors.foreground} +label-mode-background = ${colors.turquoise} +label-mode-padding = 1 + +# focused = Active workspace on focused monitor +label-focused = %icon% %index% +label-focused-foreground = ${colors.foreground} +label-focused-background = ${colors.background} +label-focused-underline = ${colors.turquoise} +label-focused-padding = 1 + +# unfocused = Inactive workspace on any monitor +label-unfocused = %icon% %index% +label-unfocused-foreground = ${colors.foreground} +label-unfocused-background = ${colors.background} +label-unfocused-underline = ${colors.background} +label-unfocused-padding = 1 + +# visible = Active workspace on unfocused monitor +label-visible = %icon% %index% +label-visible-background = ${colors.background} +label-visible-underline = ${colors.turquoise} +label-visible-padding = 1 + +# urgent = Workspace with urgency hint set +label-urgent = %icon% %index% +label-urgent-background = ${colors.red} +label-urgent-padding = 1 + +# Separator in between workspaces +#label-separator = | +#+END_SRC + +* Music using MPD +#+BEGIN_SRC conf +[module/mpd] +type = internal/mpd +format-online = %{A1:termite -e "ncmpcpp" &:}%{A} + +format-online-spacing = 0 +format-online-padding = 0 + +label-offline = mpd is offline +format-offline = +format-offline-foreground = #777 + +label-song = %artist% - %title% +label-song-maxlen = 30 +label-song-ellipsis = true + +icon-prev = 寧 +icon-stop = 栗 +icon-play = 契 +icon-pause =  +icon-next = 嶺 +icon-random = 咽 +icon-repeat = 凌 + +# Used to display the state of random/repeat/repeatone/single +# Only applies if is used +toggle-on-foreground = ${colors.foreground-light} +toggle-off-foreground = ${colors.comments} + +bar-progress-width = 15 +bar-progress-indicator = | +bar-progress-fill = ─ +bar-progress-empty = ─ +#+END_SRC + +* Backlight level +#+BEGIN_SRC conf +[module/xbacklight] +type = internal/xbacklight + +format = +ramp-0 =  +ramp-1 =  +ramp-2 =  +ramp-3 =  +ramp-4 =  +ramp-5 =  +ramp-6 =  +ramp-7 =  +ramp-8 =  +ramp-9 =  +ramp-10 =  +ramp-11 =  +#+END_SRC + +* CPU Usage +#+BEGIN_SRC conf +[module/cpu] +type = internal/cpu +interval = 2 + +format-prefix-foreground = ${colors.foreground} + +format-underline = ${colors.background} + +label = %{A1:termite -e "htop" &:} ﬙ %percentage:2%% %{A} +#+END_SRC + +* Available Memory +#+BEGIN_SRC conf +[module/memory] +type = internal/memory + +interval = 2 + +format-prefix = " " + +format-prefix-foreground = ${colors.foreground-dark} +format-underline = #4bffdc + +label = %percentage_used%% +#+END_SRC + +* Date +#+BEGIN_SRC conf +[module/date] +type = internal/date +interval = 1 + +# Open google calendar on left right +date = %{A1:qutebrowser https\://calendar.google.com/ &:} %d-%m%{A} +date-alt = "%{A1:qutebrowser https\://calendar.google.com/ &:} %d-%m-%Y%{A}" + +time =  %H:%M +time-alt =  %H:%M:%S + +label = %date% %time% +#+END_SRC + +* Sound Volume +#+BEGIN_SRC conf +[module/pulseaudio] +type = internal/pulseaudio + +# Open pavucontrol on left right +format-volume =%{A1:pavucontrol &:} %{A} + +label-volume = %percentage%% +label-volume-foreground = ${root.foreground} + +label-muted = ﱝ muted + +bar-volume-width = 10 +bar-volume-foreground-0 = ${colors.green} +bar-volume-foreground-1 = ${colors.green} +bar-volume-foreground-2 = ${colors.blue} +bar-volume-foreground-3 = ${colors.blue} +bar-volume-foreground-4 = ${colors.red} +bar-volume-foreground-5 = ${colors.red} +bar-volume-foreground-6 = ${colors.red} +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 2 +bar-volume-fill = ─ +bar-volume-fill-font = 2 +bar-volume-empty = ─ +bar-volume-empty-font = 2 +bar-volume-empty-foreground = ${colors.foreground} +#+END_SRC + +* Battery +#+BEGIN_SRC conf +# TODO - open battery manager on click +[module/battery] +type = internal/battery + +battery = BAT0 +adapter = ADP1 +full-at = 95 + +format-charging = +format-charging-underline = ${colors.blue} + +format-discharging = +format-discharging-underline = ${colors.red} + +format-full-prefix = " " +format-full-prefix-foreground = ${colors.foreground} +format-full-underline = ${colors.background} + +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +ramp-capacity-foreground = ${colors.foreground} + +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-3 =  +animation-charging-4 =  +animation-charging-foreground = ${colors.foreground} +animation-charging-framerate = 750 + +animation-discharging-0 =  +animation-discharging-1 =  +animation-discharging-2 =  +animation-discharging-3 =  +animation-discharging-4 =  +animation-discharging-foreground = ${colors.foreground} +animation-discharging-framerate = 750 +#+END_SRC + +* TODO Temperature +- [ ] Open temperature manager on click + +#+BEGIN_SRC conf + [module/temperature] + type = internal/temperature + + interval = 5 + thermal-zone = 0 + warn-temperature = 70 + ;; Temperature off one cpu core + hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input + + format =