diff --git a/dotfiles/applications.org b/dotfiles/applications.org index e6b4351..7a7624d 100644 --- a/dotfiles/applications.org +++ b/dotfiles/applications.org @@ -7,11 +7,11 @@ :END: #+begin_src conf [Desktop Entry] - Name=neomutt + Name=Neomutt GenericName=Email client - Exec=/usr/bin/kitty --class neomutt /usr/bin/neomutt + Exec=/usr/bin/termite -e neomutt %u Type=Application - Icon=/usr/share/doc/neomutt/logo/neomutt-128.png + Icon=/usr/share/icons/Papirus/64x64/apps/mutt.svg Categories=Network;Email; MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall; StartupNotify=true @@ -29,30 +29,103 @@ Name=Zathura Comment=A minimalistic document viewer Exec=zathura %U - # Translators: Icon of the desktop entry. - Icon=org.pwmt.zathura + Icon=/usr/share/icons/Papirus/64x64/apps/zathura.svg Terminal=false Categories=Office;Viewer; - # Translators: Search terms to find this application. Do not translate or - # localize the semicolons. The list must also end with a semicolon. Keywords=PDF;PS;PostScript;DjVU;document;presentation;viewer; #+end_src + * Weechat :PROPERTIES: :header-args: :tangle ~/.local/share/applications/weechat.desktop :header-args+: :comments both :mkdirp yes :END: #+begin_src conf -[Desktop Entry] -Encoding=UTF-8 -MultipleArgs=false -Terminal=false -Exec=termite --class=WeeChat -e 'weechat' -StartupWMClass=WeeChat -Icon=chat -Type=Application -Categories=Network;IRCClient; -StartupNotify=true -Name=WeeChat -GenericName=IRC Client + [Desktop Entry] + Encoding=UTF-8 + MultipleArgs=false + Terminal=false + Exec=termite --class=WeeChat -e 'weechat' + StartupWMClass=WeeChat + Icon=/usr/share/icons/Papirus/64x64/apps/weechat.svg + Type=Application + Categories=Network;IRCClient; + StartupNotify=true + Name=WeeChat + GenericName=IRC Client +#+end_src + +* Matlab + :PROPERTIES: + :header-args: :tangle ~/.local/share/applications/matlab.desktop + :header-args+: :comments both :mkdirp yes + :END: +#+begin_src conf + [Desktop Entry] + Version=1.0 + Type=Application + Terminal=false + Exec=/usr/local/bin/matlab -desktop + Name=MATLAB + Icon=/usr/share/icons/Papirus/48x48/apps/matlab.svg + Categories=Development;Math;Science + Comment=Scientific computing environment + StartupNotify=true + StartupWMClass=com-mathworks-util-PostVMInit +#+end_src + +* Neovim + :PROPERTIES: + :header-args: :tangle ~/.local/share/applications/nvim.desktop + :header-args+: :comments both :mkdirp yes + :END: +#+begin_src conf + [Desktop Entry] + Name=Neovim + GenericName=Text Editor + Comment=Edit text files + Exec=nvim %F + Terminal=true + Type=Application + Keywords=Text;editor; + Icon=/usr/share/icons/Papirus/48x48/apps/nvim.svg + Categories=Utility;TextEditor; + StartupNotify=false + MimeType=text/english;text/plain;text/x-makefile; +#+end_src + +* TODO Transmission + :PROPERTIES: + :header-args: :tangle ~/.local/share/applications/transmission.desktop + :header-args+: :comments both :mkdirp yes + :END: + +#+begin_src conf + [Desktop Entry] + Type=Application + Name=Torrent + Exec=/usr/bin/env transadd %U +#+end_src +* Images + :PROPERTIES: + :header-args: :tangle ~/.local/share/applications/img.desktop + :header-args+: :comments both :mkdirp yes + :END: +#+begin_src conf + [Desktop Entry] + Type=Application + Name=Image viewer + Exec=/usr/bin/sxiv -a %u +#+end_src + +* TODO RSS + :PROPERTIES: + :header-args: :tangle ~/.local/share/applications/rss.desktop + :header-args+: :comments both :mkdirp yes + :END: +#+begin_src conf + [Desktop Entry] + Type=Application + Name=RSS feed addition + Exec=/usr/bin/env rssadd %U #+end_src diff --git a/dotfiles/bash.org b/dotfiles/bash.org index 61ab4c6..55b76c3 100644 --- a/dotfiles/bash.org +++ b/dotfiles/bash.org @@ -30,50 +30,47 @@ esac ** Use Color #+BEGIN_SRC conf -use_color=true + use_color=true + alias ls='ls -hN --color=auto --group-directories-first' + alias grep='grep --colour=auto' #+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 + 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) + 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 + else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' 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 @@ -122,11 +119,18 @@ bind '"\e[B": history-search-forward' alias m="neomutt" alias y="yadm" alias o="xdg-open" + alias x="sxiv -ft *" #+END_SRC +*** Neovim +#+begin_src conf + command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present. +#+end_src + *** Magit #+BEGIN_SRC conf - alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'" + # alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'" + alias magit="nvim -c MagitOnly" #+END_SRC *** Vim-like @@ -298,11 +302,7 @@ function nullify() { ** 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 + export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" #+END_SRC ** Exports @@ -391,8 +391,11 @@ export SUDO_ASKPASS=~/bin/askpass-rofi ** Default #+BEGIN_SRC conf -export EDITOR=/usr/bin/nvim -export BROWSER=/usr/bin/qutebrowser + export EDITOR="nvim" + export TERMINAL="st" + export BROWSER="qutebrowser" + export READER="zathura" + export FILE="vifm" #+END_SRC ** Path diff --git a/dotfiles/binaries.org b/dotfiles/binaries.org new file mode 100644 index 0000000..caa324a --- /dev/null +++ b/dotfiles/binaries.org @@ -0,0 +1,521 @@ +#+TITLE: Binaries + +* Select Screen + :PROPERTIES: + :header-args: :tangle ~/bin/displayselect + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +Script taken from Luke Smith. + +#+begin_src bash + twoscreen() { # If multi-monitor is selected and there are two screens. + + mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?") + # Mirror displays using native resolution of external display and a scaled + # version for the internal display + if [ "$mirror" = "yes" ]; then + external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:") + internal=$(echo "$screens" | grep -v "$external") + + res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \ + tail -n 1 | awk '{print $1}') + res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \ + tail -n 1 | awk '{print $1}') + + res_ext_x=$(echo $res_external | sed 's/x.*//') + res_ext_y=$(echo $res_external | sed 's/.*x//') + res_int_x=$(echo $res_internal | sed 's/x.*//') + res_int_y=$(echo $res_internal | sed 's/.*x//') + + scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l) + scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l) + + xrandr --output "$external" --auto --scale 1.0x1.0 \ + --output "$internal" --auto --same-as "$external" \ + --scale "$scale_x"x"$scale_y" + else + + primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + secondary=$(echo "$screens" | grep -v "$primary") + direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") + xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0 + fi + } + + morescreen() { # If multi-monitor is selected and there are more than two screens. + primary=$(echo "$screens" | dmenu -i -p "Select primary display:") + secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:") + direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?") + tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:") + xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto + } + + multimon() { # Multi-monitor handler. + case "$(echo "$screens" | wc -l)" in + 1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; + 2) twoscreen ;; + ,*) morescreen ;; + esac ;} + + # Get all possible displays + allposs=$(xrandr -q | grep "connected") + + # Get all connected screens. + screens=$(echo "$allposs" | grep " connected" | awk '{print $1}') + + # Get user choice including multi-monitor and manual selection: + chosen=$(printf "%s\\ncancel\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") && + case "$chosen" in + "cancel") exit ;; + "manual selection") arandr ; exit ;; + "multi-monitor") multimon ;; + ,*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; + esac + + # setbg # Fix background if screen size/arangement has changed. + $HOME/.config/polybar/scripts/launch.sh # restart polybar + pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen +#+end_src + +* getbib + :PROPERTIES: + :header-args: :tangle ~/bin/getbib + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +#+begin_src bash + [ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit + + if [ -f "$1" ]; then + # Try to get DOI from pdfinfo or pdftotext output. + doi=$(pdfinfo "$1" | grep -io "doi:.*") || + doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) || + exit 1 + else + doi="$1" + fi + + # Check crossref.org for the bib citation. + curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n" +#+end_src + +* vpnToggle + :PROPERTIES: + :header-args: :tangle ~/bin/vpntoggle + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: + +#+begin_src bash + if [[ $(nordvpn status) == *"Connected"* ]]; then + nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected"; + else + country=`nordvpn countries | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'` + nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country"; + fi +#+end_src + +* bukurun + :PROPERTIES: + :header-args: :tangle ~/bin/bukurun + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: + +#+begin_src 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="#334433" + +# source global config +if [[ -f /etc/buku_run.config ]] +then + source /etc/buku_run.config +fi + +# source local config: +if [[ -z $XDG_CONFIG_DIR ]] +then + if [[ -f $HOME/.config/buku_run/config ]] + then + source $HOME/.config/buku_run/config + else + echo "User config file \'~/.config/buku_run/config\' not found. using global config" + fi +else + if [[ -f "${XDG_CONFIG_DIR}/buku_run/config" ]] + then + source "${XDG_CONFIG_DIR}/buku_run/config" + else + echo "User config file \'~/.config/buku_run/config\' not found. using global config" + fi +fi + + +main () { + HELP="Welcome to Buku. Use ${new_bookmark} to add a new Bookmark +Use ${switch_view} to switch View. ${actions} for actions" + if [[ $mode == "bookmarks" ]]; then + content=$(parseBuku) + menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}") + elif [[ $mode == "tags" ]]; then + menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}") + fi + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 12 ]]; then + optionsMenu + elif [[ $val -eq 10 ]]; then + addMark + elif [[ $val -eq 14 ]]; then + deleteMenu + elif [[ $val -eq 13 ]]; then + editMenu + elif [[ $val -eq 11 ]]; then + if [[ $mode == "bookmarks" ]]; then + export mode="tags" + mode=tags main + elif [[ $mode == "tags" ]]; then + export mode="bookmarks" + mode=bookmarks main + fi + elif [[ $val -eq 0 ]]; then + if [[ $mode == "bookmarks" ]]; then + id=$(getId "$content" "$menu") + for bm in ${id}; do + buku -o "${bm}" + done + elif [[ $mode == "tags" ]]; then + filter="${menu}" mode="bookmarks" main + fi + fi +} + +optionsMenu () { + if [[ $mode == "bookmarks" ]]; then + askmenu=$(echo -e "< Return\n---\n1. Edit\n2. Delete" | _rofi -p '> ' -mesg "Choose Action for bookmark") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $askmenu == "< Return" ]]; then + export mode=bookmarks + main + elif [[ $askmenu == "1. Edit" ]]; then + editMenu + elif [[ $askmenu == "2. Delete" ]]; then + deleteMenu + fi + fi + elif [[ $mode == "tags" ]]; then + askmenu=$(echo -e "< Return\n---\n1. Replace Tag\n2. Delete Tag" | _rofi -p '> ' -mesg "Choose Action for tag \"${menu}\"") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $askmenu == "< Return" ]]; then + export mode=tags + main + elif [[ $askmenu == "1. Replace Tag" ]]; then + newtag=$(echo | _rofi -p '> ' -mesg "Enter new tag name for tag \"${menu}\"") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $newtag == "" ]]; then + mode=tags main + else + buku -r "${menu}" "${newtag}" + mode=tags main + fi + fi + elif [[ $askmenu == "2. Delete Tag" ]]; then + delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete tag?") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $delask == "1. Yes" ]]; then + buku -r "${menu}" + mode=tags main + elif [[ $delask == "2. No" ]]; then + mode=tags main + fi + fi + fi + fi + fi +} + +deleteMenu () { + id=$(getId "$content" "$menu") + delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete bookmark?") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $delask == "1. Yes" ]]; then + buku -d ${id} --tacit + mode=bookmarks main + elif [[ $delask == "2. No" ]]; then + optionsMenu + fi + fi +} + +editMenu () { + id=$(getId "$content" "$menu") + title="$(getTitleFromId $id)" + bookmark="$(getUrlFromId $id)" + tags="$(getTagsFromId $id)" + content=$(echo -e "1. title: $title\n2. url: $bookmark\n3. tags: $tags") + editmenu=$(echo -e "< Return\n---\n${content}" | _rofi -p '> ') + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $editmenu == "< Return" ]]; then + main + elif [[ $editmenu == "tags: NOTAG" ]]; then + addTags --update + elif [[ $editmenu =~ tags:* ]]; then + tags="${tags}" editTags + elif [[ $editmenu =~ url:* ]]; then + editBookmark + elif [[ $editmenu =~ title:* ]]; then + editTitle + fi + fi +} + +editTags () { + edittagsmenu=$(echo | _rofi -filter "${tags}" -p '> ' -mesg "Edit Tags and hit Enter") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + buku -u ${id} --tag "${edittagsmenu}" + fi + mode=bookmarks main +} + +editBookmark () { + bmarkmenu=$(echo "" | _rofi -p "> " -filter "${bookmark}" -mesg "Edit Bookmark and hit Enter") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $bmarkmenu == "http"* ]]; then + buku -u "${id}" --url "${bmarkmenu}" + else + echo "" | rofi -e "Not a valid URI, Make sure URLs start with http" + editBookmark + fi + fi + mode=bookmarks main +} + +editTitle () { + titlemenu=$(echo "" | _rofi -p "> " -filter "${title}" -mesg "Edit Title and hit Enter") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + buku -u "${id}" --title "${titlemenu}" + fi + mode=bookmarks main +} + +addMark () { + inserturl=$(echo -e "$(xclip -o)" | _rofi -p '> ' -mesg "Use URL below or type manually") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + addTags + fi +} + +addTags () { + inserttags=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "Add some tags. Separate tags with ', '") + val=$? + if [[ $val -eq 1 ]]; then + exit + elif [[ $val -eq 0 ]]; then + if [[ $(echo "${inserttags}" | wc -l) -gt 1 ]]; then + taglist=$(echo "${inserttags}" | tr '\n' ',') + tags=() + for tag in $taglist; do + tags+=("$tag") + done + else + tags=${inserttags} + fi + if [[ $1 == "--update" ]]; then + buku -u "${id}" --tag ${tags} + else + buku -a ${inserturl} ${tags} + fi + fi +} + +parseBuku () { + echo "$(buku --nc -p | gawk -v max="$max_str_width" -v type="$display_type" ' +BEGIN { + RS="" + FS="\n" +} +{ + if ($3 == "") + $3 = " # NOTAG" + id = gensub(/([0-9]+)\.(.*)/, "\\1", "g", $1) + url = substr(gensub(/\s+> (.*)/, "\\1", "g", $2),0,max) + tags = gensub(/\s+# (.*)/, "\\1", "g", $3) + title = substr(gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1),0,max) + + if (type == 1) + print id "\t" url "\t" tags + else + print id "\t" title "\t" tags + if (type == 3) + print " \t" url "\t " + print "" +} +' | column -t -s $'\t')" +} + +getId () { + id=$(echo "${2%% *}") + if [ -z "$id" ]; then + prev="" + IFS=$'\n' + for line in $1; do + if [ "$2" = "$line" ]; then + id=$(echo "${prev%% *}") + break + else + prev="$line" + fi + done + fi + echo $id +} + +getTitleFromId () { + echo "$(buku --nc -p $1 | gawk ' + BEGIN { + RS="" + FS="\n" + } + { + print gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1) + } + ')" +} + +getUrlFromId () { + echo "$(buku --nc -p $1 | gawk ' + BEGIN { + RS="" + FS="\n" + } + { + print gensub(/\s+> (.*)/, "\\1", "g", $2) + } + ')" +} + +getTagsFromId () { + echo "$(buku --nc -p $1 | gawk ' + BEGIN { + RS="" + FS="\n" + } + { + print gensub(/\s+# (.*)/, "\\1", "g", $3) + } + ')" +} + +mode=bookmarks main +#+end_src +* i3exit + :PROPERTIES: + :header-args: :tangle ~/bin/i3exit + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: + +#+begin_src bash + # with openrc use loginctl + [[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl + + case "$1" in + lock) + ~/scripts/lockscreen.sh + ;; + logout) + i3-msg exit + ;; + switch_user) + dm-tool switch-to-greeter + ;; + suspend) + ~/scripts/lockscreen.sh && $logind suspend + ;; + hibernate) + ~/scripts/lockscreen.sh && $logind hibernate + ;; + reboot) + $logind reboot + ;; + shutdown) + $logind poweroff + ;; + ,*) + echo "== ! i3exit: missing or invalid argument ! ==" + echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown" + exit 2 + esac + + exit 0 +#+end_src +* readbib + :PROPERTIES: + :header-args: :tangle ~/bin/readbib + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +#+begin_src bash + cd ~/MEGA/These/Ressources/pdfs/ && ls | dmenu -l 20 | xargs -I {} zathura {} +#+end_src +* askpass + :PROPERTIES: + :header-args: :tangle ~/bin/askpass-rofi + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +Take password prompt from STDIN, print password to STDOUT. +The sed piece just removes the colon from the provided prompt: =rofi -p= already gives us a colon +#+BEGIN_SRC bash + rofi -dmenu \ + -password \ + -no-fixed-num-lines \ + -p "$(printf "$1" | sed s/://)" +#+END_SRC diff --git a/dotfiles/calendar.org b/dotfiles/calendar.org index 94a4bad..336ff34 100644 --- a/dotfiles/calendar.org +++ b/dotfiles/calendar.org @@ -50,4 +50,9 @@ [default] highlight_event_days = True + + [keybindings] + delete = d + today = . + new = c #+END_SRC diff --git a/dotfiles/config.org b/dotfiles/config.org index 81c1836..fdd95e4 100644 --- a/dotfiles/config.org +++ b/dotfiles/config.org @@ -80,31 +80,74 @@ ** 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:Hack Nerd Font Mono:size=10 - URxvt*boldFont: xft:Hack 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 + ! ----------------------------------------------------------------------------- + ! File: gruvbox-dark.xresources + ! Description: Retro groove colorscheme generalized + ! Author: morhetz + ! Source: https://github.com/morhetz/gruvbox-generalized + ! Last Modified: 6 Sep 2014 + ! ----------------------------------------------------------------------------- + + ! hard contrast: *background: #1d2021 + *background: #282828 + ! soft contrast: *background: #32302f + *foreground: #ebdbb2 + ! Black + DarkGrey + *color0: #282828 + *color8: #928374 + ! DarkRed + Red + *color1: #cc241d + *color9: #fb4934 + ! DarkGreen + Green + *color2: #98971a + *color10: #b8bb26 + ! DarkYellow + Yellow + *color3: #d79921 + *color11: #fabd2f + ! DarkBlue + Blue + *color4: #458588 + *color12: #83a598 + ! DarkMagenta + Magenta + *color5: #b16286 + *color13: #d3869b + ! DarkCyan + Cyan + *color6: #689d6a + *color14: #8ec07c + ! LightGrey + White + *color7: #a89984 + *color15: #ebdbb2 #+END_SRC +* Font + :PROPERTIES: + :header-args: :tangle ~/.config/fontconfig/fonts.conf + :header-args+: :comments none :mkdirp yes + :END: +#+begin_src conf + + + + + + serif + Linux Libertine + + + sans-serif + Linux Biolinum + + + sans + Linux Biolinum + + + monospace + SauceCodePro Nerd Font Mono + + + +#+end_src + * Redshift :PROPERTIES: :header-args: :tangle ~/.config/redshift.conf @@ -252,107 +295,261 @@ set completion-ignore-case on #+END_SRC -* Mailcap +* Xmodmap :PROPERTIES: - :header-args: :tangle ~/.mailcap - :header-args+: :comments both :mkdirp yes + :header-args: :tangle ~/.Xmodmap + :header-args+: :comments no :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 - -** Libreoffice #+begin_src conf - application/docx; libreoffice %s --nologo &; copiousoutput; - application/doc; libreoffice --nologo %s &; copiousoutput; - - application/vnd.oasis.opendocument.database; libreoffice --nologo --base '%s'; copiousoutput - application/vnd.oasis.opendocument.chart; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.oasis.opendocument.spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.oasis.opendocument.spreadsheet-template; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.oasis.opendocument.graphics; libreoffice --nologo --draw '%s'; copiousoutput - application/vnd.oasis.opendocument.graphics-template; libreoffice --nologo --draw '%s'; copiousoutput - application/vnd.oasis.opendocument.presentation; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.oasis.opendocument.presentation-template; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.oasis.opendocument.formula; libreoffice --nologo --math '%s'; copiousoutput - application/vnd.oasis.opendocument.text; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.oasis.opendocument.text-master; libreoffice --nologo -global '%s'; copiousoutput - application/vnd.oasis.opendocument.text-template; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.oasis.opendocument.text-web; libreoffice --nologo -web '%s'; copiousoutput - application/vnd.sun.xml.base; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.sun.xml.calc; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.sun.xml.calc.template; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.sun.xml.draw; libreoffice --nologo --draw '%s'; copiousoutput - application/vnd.sun.xml.draw.template; libreoffice --nologo --draw '%s'; copiousoutput - application/vnd.stardivision.calc; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.stardivision.chart; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.stardivision.draw; libreoffice --nologo --draw '%s'; copiousoutput - application/vnd.stardivision.impress; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.stardivision.math; libreoffice --nologo --math '%s'; copiousoutput - application/vnd.stardivision.writer-global; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.stardivision.writer; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.sun.xml.impress; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.sun.xml.impress.template; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.sun.xml.math; libreoffice --nologo --math '%s'; copiousoutput - application/vnd.sun.xml.writer; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.sun.xml.writer.global; libreoffice --nologo -global '%s'; copiousoutput - application/vnd.sun.xml.writer.template; libreoffice --nologo --writer '%s'; copiousoutput - text/csv; libreoffice --nologo --calc '%s'; copiousoutput - text/spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput - application/x-quattropro; libreoffice --nologo --calc '%s'; copiousoutput - application/x-dbf; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.ms-excel.sheet.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.ms-excel.template.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.spreadsheetml.template; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.lotus-1-2-3; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.ms-excel; libreoffice --nologo --calc '%s'; copiousoutput - application/msexcel; libreoffice --nologo --calc '%s'; copiousoutput - application/x-dbase; libreoffice --nologo --calc '%s'; copiousoutput - text/x-csv; libreoffice --nologo --calc '%s'; copiousoutput - application/vnd.ms-powerpoint.presentation.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.ms-powerpoint.slideshow.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.ms-powerpoint.template.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.presentationml.slideshow; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.presentationml.template; libreoffice --nologo --impress '%s'; copiousoutput - application/vnd.ms-powerpoint; libreoffice --nologo --impress '%s'; copiousoutput - application/mspowerpoint; libreoffice --nologo --impress '%s'; copiousoutput - text/mathml; libreoffice --nologo --math '%s'; copiousoutput - application/rtf; libreoffice --nologo --writer '%s'; copiousoutput - application/x-t602; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.wordperfect; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.ms-word.document.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.ms-word.template.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.openxmlformats-officedocument.wordprocessingml.template; libreoffice --nologo --writer '%s'; copiousoutput - application/vnd.ms-works; libreoffice --nologo --writer '%s'; copiousoutput - application/msword; libreoffice --nologo --writer '%s'; copiousoutput - application/wordperfect; libreoffice --nologo --writer '%s'; copiousoutput - text/rtf; libreoffice --nologo --writer '%s'; copiousoutput + keycode 8 = + keycode 9 = Escape NoSymbol Escape + keycode 10 = 1 exclam 1 exclam + keycode 11 = 2 at 2 at + keycode 12 = 3 numbersign 3 numbersign + keycode 13 = 4 dollar 4 dollar + keycode 14 = 5 percent 5 percent + keycode 15 = 6 asciicircum 6 asciicircum + keycode 16 = 7 ampersand 7 ampersand + keycode 17 = 8 asterisk 8 asterisk + keycode 18 = 9 parenleft 9 parenleft + keycode 19 = 0 parenright 0 parenright + keycode 20 = minus underscore minus underscore + keycode 21 = equal plus equal plus + keycode 22 = BackSpace BackSpace BackSpace BackSpace + keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab + keycode 24 = q Q q Q + keycode 25 = w W w W + keycode 26 = e E e E + keycode 27 = r R r R + keycode 28 = t T t T + keycode 29 = y Y y Y + keycode 30 = u U u U + keycode 31 = i I i I + keycode 32 = o O o O + keycode 33 = p P p P + keycode 34 = bracketleft braceleft bracketleft braceleft + keycode 35 = bracketright braceright bracketright braceright + keycode 36 = Return NoSymbol Return + keycode 37 = Control_L NoSymbol Control_L + keycode 38 = a A a A + keycode 39 = s S s S + keycode 40 = d D d D + keycode 41 = f F f F + keycode 42 = g G g G + keycode 43 = h H h H + keycode 44 = j J j J + keycode 45 = k K k K + keycode 46 = l L l L + keycode 47 = semicolon colon semicolon colon + keycode 48 = apostrophe quotedbl apostrophe quotedbl + keycode 49 = grave asciitilde grave asciitilde + keycode 50 = Shift_L NoSymbol Shift_L + keycode 51 = backslash bar backslash bar + keycode 52 = z Z z Z + keycode 53 = x X x X + keycode 54 = c C c C + keycode 55 = v V v V + keycode 56 = b B b B + keycode 57 = n N n N + keycode 58 = m M m M + keycode 59 = comma less comma less + keycode 60 = period greater period greater + keycode 61 = slash question slash question + keycode 62 = Shift_R NoSymbol Shift_R + keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab + keycode 64 = Alt_L Meta_L Alt_L Meta_L + keycode 65 = space NoSymbol space + keycode 66 = Caps_Lock NoSymbol Caps_Lock + keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 + keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 + keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 + keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 + keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 + keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 + keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 + keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 + keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 + keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 + keycode 77 = Num_Lock NoSymbol Num_Lock + keycode 78 = Scroll_Lock NoSymbol Scroll_Lock + keycode 79 = KP_Home KP_7 KP_Home KP_7 + keycode 80 = KP_Up KP_8 KP_Up KP_8 + keycode 81 = KP_Prior KP_9 KP_Prior KP_9 + keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode + keycode 83 = KP_Left KP_4 KP_Left KP_4 + keycode 84 = KP_Begin KP_5 KP_Begin KP_5 + keycode 85 = KP_Right KP_6 KP_Right KP_6 + keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode + keycode 87 = KP_End KP_1 KP_End KP_1 + keycode 88 = KP_Down KP_2 KP_Down KP_2 + keycode 89 = KP_Next KP_3 KP_Next KP_3 + keycode 90 = KP_Insert KP_0 KP_Insert KP_0 + keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal + keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift + keycode 93 = + keycode 94 = less greater less greater bar brokenbar bar + keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 + keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 + keycode 97 = + keycode 98 = Katakana NoSymbol Katakana + keycode 99 = Hiragana NoSymbol Hiragana + keycode 100 = Henkan_Mode NoSymbol Henkan_Mode + keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana + keycode 102 = Muhenkan NoSymbol Muhenkan + keycode 103 = + keycode 104 = KP_Enter NoSymbol KP_Enter + keycode 105 = Control_R NoSymbol Control_R + keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab + keycode 107 = Print Sys_Req Print Sys_Req + keycode 108 = Alt_R Meta_R Alt_R Meta_R + keycode 109 = Linefeed NoSymbol Linefeed + keycode 110 = Home NoSymbol Home + keycode 111 = Up NoSymbol Up + keycode 112 = Prior NoSymbol Prior + keycode 113 = Left NoSymbol Left + keycode 114 = Right NoSymbol Right + keycode 115 = End NoSymbol End + keycode 116 = Down NoSymbol Down + keycode 117 = Next NoSymbol Next + keycode 118 = Insert NoSymbol Insert + keycode 119 = Delete NoSymbol Delete + keycode 120 = + keycode 121 = XF86AudioMute NoSymbol XF86AudioMute + keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume + keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume + keycode 124 = XF86PowerOff NoSymbol XF86PowerOff + keycode 125 = KP_Equal NoSymbol KP_Equal + keycode 126 = plusminus NoSymbol plusminus + keycode 127 = Pause Break Pause Break + keycode 128 = XF86LaunchA NoSymbol XF86LaunchA + keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal + keycode 130 = Hangul NoSymbol Hangul + keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja + keycode 132 = + keycode 133 = + keycode 134 = Super_R NoSymbol Super_R + keycode 135 = Menu NoSymbol Menu + keycode 136 = Cancel NoSymbol Cancel + keycode 137 = Redo NoSymbol Redo + keycode 138 = SunProps NoSymbol SunProps + keycode 139 = Undo NoSymbol Undo + keycode 140 = SunFront NoSymbol SunFront + keycode 141 = XF86Copy NoSymbol XF86Copy + keycode 142 = XF86Open NoSymbol XF86Open + keycode 143 = XF86Paste NoSymbol XF86Paste + keycode 144 = Find NoSymbol Find + keycode 145 = XF86Cut NoSymbol XF86Cut + keycode 146 = Help NoSymbol Help + keycode 147 = xf86menukb nosymbol xf86menukb + keycode 148 = XF86Calculator NoSymbol XF86Calculator + keycode 149 = + keycode 150 = XF86Sleep NoSymbol XF86Sleep + keycode 151 = XF86WakeUp NoSymbol XF86WakeUp + keycode 152 = XF86Explorer NoSymbol XF86Explorer + keycode 153 = XF86Send NoSymbol XF86Send + keycode 154 = + keycode 155 = XF86Xfer NoSymbol XF86Xfer + keycode 156 = XF86Launch1 NoSymbol XF86Launch1 + keycode 157 = XF86Launch2 NoSymbol XF86Launch2 + keycode 158 = XF86WWW NoSymbol XF86WWW + keycode 159 = XF86DOS NoSymbol XF86DOS + keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver + keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows + keycode 162 = XF86TaskPane NoSymbol XF86TaskPane + keycode 163 = XF86Mail NoSymbol XF86Mail + keycode 164 = XF86Favorites NoSymbol XF86Favorites + keycode 165 = XF86MyComputer NoSymbol XF86MyComputer + keycode 166 = XF86Back NoSymbol XF86Back + keycode 167 = XF86Forward NoSymbol XF86Forward + keycode 168 = + keycode 169 = XF86Eject NoSymbol XF86Eject + keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject + keycode 171 = XF86AudioNext NoSymbol XF86AudioNext + keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause + keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev + keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject + keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord + keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind + keycode 177 = XF86Phone NoSymbol XF86Phone + keycode 178 = + keycode 179 = XF86Tools NoSymbol XF86Tools + keycode 180 = XF86HomePage NoSymbol XF86HomePage + keycode 181 = XF86Reload NoSymbol XF86Reload + keycode 182 = XF86Close NoSymbol XF86Close + keycode 183 = + keycode 184 = + keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp + keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown + keycode 187 = parenleft NoSymbol parenleft + keycode 188 = parenright NoSymbol parenright + keycode 189 = XF86New NoSymbol XF86New + keycode 190 = Redo NoSymbol Redo + keycode 191 = XF86Tools NoSymbol XF86Tools + keycode 192 = XF86Launch5 NoSymbol XF86Launch5 + keycode 193 = XF86Launch6 NoSymbol XF86Launch6 + keycode 194 = XF86Launch7 NoSymbol XF86Launch7 + keycode 195 = XF86Launch8 NoSymbol XF86Launch8 + keycode 196 = XF86Launch9 NoSymbol XF86Launch9 + keycode 197 = + keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute + keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle + keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn + keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff + keycode 202 = + keycode 203 = Mode_switch NoSymbol Mode_switch + keycode 204 = NoSymbol Alt_L NoSymbol Alt_L + keycode 205 = NoSymbol Meta_L NoSymbol Meta_L + keycode 206 = NoSymbol Super_L NoSymbol Super_L + keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L + keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay + keycode 209 = XF86AudioPause NoSymbol XF86AudioPause + keycode 210 = XF86Launch3 NoSymbol XF86Launch3 + keycode 211 = XF86Launch4 NoSymbol XF86Launch4 + keycode 212 = XF86LaunchB NoSymbol XF86LaunchB + keycode 213 = XF86Suspend NoSymbol XF86Suspend + keycode 214 = XF86Close NoSymbol XF86Close + keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay + keycode 216 = XF86AudioForward NoSymbol XF86AudioForward + keycode 217 = + keycode 218 = Print NoSymbol Print + keycode 219 = + keycode 220 = XF86WebCam NoSymbol XF86WebCam + keycode 221 = + keycode 222 = + keycode 223 = XF86Mail NoSymbol XF86Mail + keycode 224 = XF86Messenger NoSymbol XF86Messenger + keycode 225 = XF86Search NoSymbol XF86Search + keycode 226 = XF86Go NoSymbol XF86Go + keycode 227 = XF86Finance NoSymbol XF86Finance + keycode 228 = XF86Game NoSymbol XF86Game + keycode 229 = XF86Shop NoSymbol XF86Shop + keycode 230 = + keycode 231 = Cancel NoSymbol Cancel + keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown + keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp + keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia + keycode 235 = XF86Display NoSymbol XF86Display + keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff + keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown + keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp + keycode 239 = XF86Send NoSymbol XF86Send + keycode 240 = XF86Reply NoSymbol XF86Reply + keycode 241 = XF86MailForward NoSymbol XF86MailForward + keycode 242 = XF86Save NoSymbol XF86Save + keycode 243 = XF86Documents NoSymbol XF86Documents + keycode 244 = XF86Battery NoSymbol XF86Battery + keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth + keycode 246 = XF86WLAN NoSymbol XF86WLAN + keycode 247 = + keycode 248 = XF86Display NoSymbol XF86Display + keycode 249 = + keycode 250 = + keycode 251 = + keycode 252 = + keycode 253 = + keycode 254 = XF86WWAN NoSymbol XF86WWAN + keycode 255 = XF86RFKill NoSymbol XF86RFKill #+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 - * TODO xinit :PROPERTIES: :header-args: :tangle ~/.xinitrc @@ -530,7 +727,7 @@ Keyboard Options frame_width = 2 # Defines color of the frame around the notification window. - frame_color = "#2f343f" + frame_color = "#32302f" # Define a color for the separator. # possible values are: @@ -619,6 +816,7 @@ Keyboard Options show_indicators = yes #+end_src + *** Icons #+begin_src conf # Align icons left/right/off @@ -630,6 +828,7 @@ Keyboard Options # Paths to default icons. icon_path = /usr/share/icons/Arc/16x16/status/:/usr/share/icons/Arc/16x16/devices/ #+end_src + *** History #+begin_src conf # Should a notification popped up from history be sticky or timeout @@ -639,6 +838,7 @@ Keyboard Options # Maximum amount of notifications kept in history history_length = 20 #+end_src + *** Misc/Advanced #+BEGIN_SRC conf # dmenu path. @@ -673,7 +873,7 @@ Keyboard Options close = mod1+space # Close all notifications. - close_all = mod1+shift+space + # close_all = mod1+shift+space # Redisplay last message(s). # On the US keyboard layout "grave" is normally above TAB and left @@ -688,22 +888,20 @@ Keyboard Options ** Urgency #+BEGIN_SRC conf [urgency_low] - background = "#2f343f" - foreground = "#f5f8f6" - timeout = 2 - - [urgency_normal] - background = "#2f343f" - foreground = "#f5f8f6" + background = "#32302f" + foreground = "#ebdbb2" timeout = 4 + [urgency_normal] + background = "#32302f" + foreground = "#ebdbb2" + timeout = 6 + [urgency_critical] - background = "#2f343f" - foreground = "#f5f8f6" - frame_color = "#e3788f" + background = "#32302f" + foreground = "#cc241d" timeout = 0 #+END_SRC - * feh :PROPERTIES: :header-args: :tangle ~/.config/feh/config @@ -723,6 +921,30 @@ Keyboard Options save_filelist F #+END_SRC +* SXIV + :PROPERTIES: + :header-args: :tangle ~/.config/sxiv/exec/key-handler + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +Press =C-x= to activate to key handler. + +#+begin_src conf + while read file + do + case "$1" in + "C-d") + mv "$file" ~/.trash ;; + "C-r") + convert -rotate 90 "$file" "$file" ;; + "C-c") + echo -n "$file" | xclip -selection clipboard ;; + "C-w") + nitrogen --save --set-zoom-fill "$file" ;; + esac + done +#+end_src + * MPV ** Configuration :PROPERTIES: @@ -1034,7 +1256,6 @@ stop-screensaver = "yes" #ESC {encode} quit 4 # ============================================================= #+END_SRC - * Zathura :PROPERTIES: :header-args: :tangle ~/.config/zathura/zathurarc @@ -1250,9 +1471,13 @@ stop-screensaver = "yes" #+BEGIN_SRC conf [Default Applications] - image/jpeg=feh.desktop - image/png=feh.desktop; text/plain=nvim.desktop + x-scheme-handler/magnet=torrent.desktop; + text/x-shellscript=nvim.desktop; + image/png=img.desktop; + image/jpeg=img.desktop; + image/gif=img.desktop; + application/rss+xml=rss.desktop x-scheme-handler/mailto=neomutt.desktop message/rfc822=neomutt.desktop application/x-bittorrent=deluge.desktop @@ -1270,8 +1495,8 @@ stop-screensaver = "yes" application/x-extension-xht=qutebrowser.desktop [Added Associations] - image/jpeg=viewnior.desktop;gpicview.desktop; - image/png=viewnior.desktop;gpicview.desktop; + image/jpeg=viewnior.desktop;gpicview.desktop;feh.desktop; + image/png=viewnior.desktop;gpicview.desktop;feh.desktop; text/plain=mousepad.desktop; application/x-bittorrent=deluge.desktop; #+END_SRC @@ -1353,7 +1578,7 @@ Colors scrot_dir=$HOME/Pictures #+END_SRC -* TODO Nitrogen +* TODO [#B] Nitrogen :PROPERTIES: :header-args: :tangle ~/.config/nitrogen/nitrogen.cfg :header-args+: :comments both :mkdirp yes @@ -1464,18 +1689,13 @@ Colors png-compression=9 desktop=9 #+END_SRC - -* TODO [#A] Binaries -* TODO [#A] Scripts -** Wallpapers +* Castnow :PROPERTIES: - :header-args: :tangle ~/scripts/wallpapers.sh - :header-args+: :comments both :mkdirp yes - :header-args+: :shebang "#!/usr/bin/env bash" + :header-args: :tangle ~/.castnowrc + :header-args+: :comments none :mkdirp yes :END: -#+begin_src bash - while true; do - nitrogen --set-zoom-fill --random ".wallpapers" - sleep 10m - done + +#+begin_src conf + --address=192.168.1.51 + --volume-step=0.01 #+end_src diff --git a/dotfiles/i3.org b/dotfiles/i3.org index 61c8bf9..d4c3071 100644 --- a/dotfiles/i3.org +++ b/dotfiles/i3.org @@ -1,7 +1,33 @@ #+TITLE: I3 Configuration +:DRAWER: #+PROPERTY: header-args:conf+ :comments both #+PROPERTY: header-args:conf+ :mkdirp yes #+PROPERTY: header-args:conf+ :tangle ~/.config/i3/config +:END: + +* Colors +#+begin_src conf + set $bg #32302f + set $bg1 #3c3836 + set $bg2 #504945 + set $bg3 #665c54 + set $bg4 #7c6f64 + + set $fg #ebdbb2 + set $fg1 #ebdbb2 + set $fg2 #d5c4a1 + set $fg3 #bdae93 + set $fg4 #a89984 + + set $gray #a89984 + set $red #cc241d + set $green #98971a + set $yellow #d79921 + set $blue #458588 + set $purple #b16286 + set $aqua #689d6a + set $orange #d65d0e +#+end_src * Mod Key Set mod key (Mod1=, Mod4=) @@ -12,10 +38,11 @@ Set mod key (Mod1=, Mod4=) * Border Style #+begin_src conf # Configure border style - new_window pixel 2 + new_window pixel 1 new_float normal + # Hide borders - hide_edge_borders none + hide_edge_borders smart #+end_src * Font for window titles @@ -23,28 +50,38 @@ Set mod key (Mod1=, Mod4=) font Hack Nerd Font 11 #+end_src -* TODO [#C] Multimedia keys +* Multimedia keys +** Sound #+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%- +#+end_src +#+begin_src conf # Backlight - bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 - bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 + # bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 + # bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 +#+end_src - # Tracks +** Change Tracks +#+begin_src conf bindsym XF86AudioPlay exec --no-startup-id mpc toggle bindsym XF86AudioNext exec --no-startup-id mpc next bindsym XF86AudioPrev exec --no-startup-id mpc prev +#+end_src - # Screenshots - bindsym $mod+XF86LaunchA --release exec --no-startup-id i3-scrot -w - bindsym $mod+Shift+XF86LaunchA --release exec --no-startup-id i3-scrot -s +** Print Screen +#+begin_src conf + bindsym Print exec --no-startup-id ~/scripts/screenshot.sh + bindsym XF86Display exec --no-startup-id rofi -show window +#+end_src - # Other - bindsym XF86LaunchB fullscreen toggle +** Other +#+begin_src conf + bindsym XF86Search exec --no-startup-id rofi -show run + bindsym XF86PowerOff exec --no-startup-id $HOME/scripts/quit.sh #+end_src * Start Applications @@ -54,115 +91,192 @@ Set mod key (Mod1=, Mod4=) # Windows Switch bindsym $mod+w exec --no-startup-id rofi -show window # Launch categorized menu - bindsym $mod+z exec --no-startup-id rofimenu + bindsym $mod+z exec --no-startup-id rofi -show drun # Bookmarks - bindsym $mod+Shift+F exec --no-startup-id $HOME/bin/buku_run + bindsym $mod+Shift+F exec --no-startup-id $HOME/bin/bukurun # Passwords - bindsym $mod+Shift+P exec --no-startup-id pass clip + bindsym $mod+Shift+P exec --no-startup-id rofi-pass # Start Terminal - bindsym $mod+Return exec termite + 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' + bindsym $mod+Shift+Return exec termite -e 'tmux' # 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/scripts/toggle.sh bottom - bindsym $mod+Shift+t exec --no-startup-id ~/.config/polybar/scripts/toggle.sh top + bindsym $mod+trl+m exec pavucontrol #+end_src -* TODO Vim Anywhere +* Set shut down, restart and locking features +#+begin_src conf + bindsym $mod+0 exec --no-startup-id $HOME/scripts/quit.sh +#+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 "tmux -L neomutt attach"; mode "default" + # Weechat + bindsym w exec termite -e "tmux -L weechat attach"; mode "default" + # News with newsboat + bindsym n exec termite -e "tmux -L newsboat attach"; mode "default" + # Music with ncmpcpp + bindsym p exec termite -e "tmux -L ncmpcpp attach"; mode "default" + # Print Screen + bindsym Shift+p exec --no-startup-id ~/scripts/screenshot.sh + + # Browser with qutebrowser + bindsym i exec qutebrowser; mode "default" + # Browser with firefox + bindsym Shift+i exec firefox; mode "default" + + # 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" + + # exit command mode: Enter or Escape + bindsym Escape mode "default" + } +#+end_src + +* Autostart Background Applications +#+begin_src conf + # Set custom wallpaper script + exec --no-startup-id $HOME/scripts/wallpapers.sh + + # Run Compton + exec --no-startup-id compton -b + + # Start Network Management Framework + exec --no-startup-id nm-applet + + # Hide mouse cursor after x seconds + exec --no-startup-id unclutter --timeout 5 + + # 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 -locker "~/scripts/lockscreen.sh" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" + + # Lockscreen when using suspend or hibernate (when closing the lid for instance) + exec --no-startup-id xss-lock -- ~/scripts/lockscreen.sh + + # Autostart udiskie that is used to automount devices + exec --no-startup-id udiskie + + # Screen options + exec --no-startup-id xrandr --output eDP1 --mode 1920x1080 --dpi 192 + + # Redshift + exec --no-startup-id redshift + + # Start mopidy + exec --no-startup-id mopidy + + # PulseAudio Server + # exec --no-startup-id pulseaudio --daemon + + # Emacs Daemon + # exec --no-startup-id /usr/bin/emacs --fg-daemon + + # TODO - Start polybar + exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh + + # Megasync + exec --no-startup-id i3-msg 'exec megasync' +#+end_src + +* Kill one application +#+begin_src conf + bindsym $mod+Ctrl+x --release exec --no-startup-id xkill +#+end_src + +* Change Keyboard Layout +#+begin_src conf + 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 +#+end_src + +* TODO [#B] Vim Anywhere #+begin_src conf # bindsym $mod+t exec vim-anywhere nvim termite #+end_src -* TODO Screenshot - Change to simplier keys -#+begin_src conf :tangle no -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 +* TODO Windows Manager +** 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 + + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right #+end_src -* Change focus +** Move focused window #+begin_src conf -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right + 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+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right + 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 -* Move focused window +** TODO [#A] Split orientation - Use just one key bindings that alternates? #+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 + 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 + bindsym $mod+Shift+q kill #+end_src ** Use Mouse+$mod to drag floating windows #+begin_src conf -floating_modifier $mod + floating_modifier $mod #+end_src ** Toggle fullscreen mode for the focused container #+begin_src conf -bindsym $mod+f fullscreen toggle + bindsym $mod+f fullscreen toggle #+end_src -** TODO Change container layout (stacked, tabbed, toggle split) +** TODO [#A] 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 + # bindsym $mod+s layout stacking + # bindsym $mod+w layout tabbed + # bindsym $mod+e layout toggle split #+end_src ** TODO Toggle tiling / floating @@ -180,12 +294,16 @@ bindsym $mod+f fullscreen toggle bindsym $mod+Shift+s sticky toggle #+end_src -** TODO Focus the parent container +** Resize Floating Window #+begin_src conf - # bindsym $mod+a focus parent + 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 -* Scratchpad +* TODO [#B] Scratchpad +** Move to Scratchpad #+begin_src conf # move the currently focused window to the scratchpad bindsym $mod+Shift+BackSpace move scratchpad @@ -195,38 +313,18 @@ bindsym $mod+f fullscreen toggle bindsym $mod+BackSpace scratchpad show #+end_src -* Custom Cratchpad for Quick Access -** Weechat -#+begin_src conf - # for_window [instance="scratch-weechat"] scratchpad show; - # exec termite --name="scratch-weechat" --exec="weechat" - # for_window [instance="scratch-weechat"] floating enable; - # for_window [instance="scratch-weechat"] move position 240 px 125 px; - # for_window [instance="scratch-weechat"] resize set 1200 px 800 px; - # for_window [instance="scratch-weechat"] move scratchpad; -#+end_src - -** Music with ncmpcpp +** TODO 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" + exec termite --name="scratch-ncmpcpp" --exec="tmux -L ncmpcpp attach" 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 +*** Calculator with insect #+begin_src conf for_window [instance="scratch-insect"] scratchpad show; exec termite --name="scratch-insect" --exec="insect" @@ -236,17 +334,7 @@ bindsym $mod+f fullscreen toggle 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 +*** Ranger #+begin_src conf for_window [instance="scratch-ranger"] scratchpad show; exec urxvt -name scratch-ranger -e ranger @@ -256,7 +344,7 @@ bindsym $mod+f fullscreen toggle for_window [instance="scratch-ranger"] move scratchpad; #+end_src -** Terminal +*** Terminal #+begin_src conf for_window [instance="scratch-termite"] scratchpad show; exec termite --name="scratch-termite" @@ -271,12 +359,9 @@ bindsym $mod+f fullscreen toggle bindsym $mod+s mode "$mode_stratchpad" set $mode_stratchpad (w)eechat (m)ails (p)layer (c)alc (s)hell (n)ews (r)anger mode "$mode_stratchpad" { - bindsym w [instance="scratch-weechat"] scratchpad show; mode "default" 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" @@ -285,7 +370,8 @@ mode "$mode_stratchpad" { } #+end_src -* TODO [#A] Workspace names +* Workspaces +** 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 @@ -299,7 +385,7 @@ To display names or symbols instead of plain workspace numbers you can use somet set $ws8 8 #+end_src -* Switch to workspace +** Switch to workspace #+begin_src conf bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -311,7 +397,7 @@ To display names or symbols instead of plain workspace numbers you can use somet bindsym $mod+8 workspace $ws8 #+end_src -* Navigate Workspace +** Navigate Workspace ** Workspace back and forth (with/without active container) #+begin_src conf workspace_auto_back_and_forth yes @@ -325,7 +411,7 @@ To display names or symbols instead of plain workspace numbers you can use somet bindsym $mod+p workspace prev #+end_src -* Move focused container to workspace +** 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 @@ -337,7 +423,7 @@ To display names or symbols instead of plain workspace numbers you can use somet bindsym $mod+Ctrl+8 move container to workspace $ws8 #+end_src -* Move to workspace with focused container +** 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 @@ -349,7 +435,7 @@ To display names or symbols instead of plain workspace numbers you can use somet bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 #+end_src -* Open applications on specific workspaces +** Open applications on specific workspaces #+begin_src conf # Matlab Figures assign[title="^Fig"] $ws6 @@ -388,121 +474,7 @@ To display names or symbols instead of plain workspace numbers you can use somet * Restart i3 inplace (preserves your layout/session, can be used to upgrade i3) #+begin_src conf bindsym $mod+Shift+r restart -#+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" - # Weechat inside Tmux - bindsym w exec termite -e "tmux -L weechat attach"; 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" - # 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" - - # 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/wallpapers.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 1920x1080 --dpi 192 - - # Redshift - exec --no-startup-id redshift - - # Start mopidy - exec --no-startup-id mopidy - - # PulseAudio Server - # exec --no-startup-id pulseaudio --daemon - - # Emacs Daemon - exec --no-startup-id /usr/bin/emacs --fg-daemon - - # TODO - Start polybar - exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh -#+end_src - -* Start Foreground Applications -#+begin_src conf - # Megasync - exec --no-startup-id i3-msg 'exec megasync' + bindsym $mod+r exec $HOME/.config/polybar/scripts/launch.sh #+end_src * Color palette used for the terminal ( ~/.Xresources file ) @@ -552,13 +524,13 @@ Colors are gathered based on the documentation https://i3wm.org/docs/userguide.h * 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.focused $blue $blue $fg $blue + client.focused_inactive $bg $bg $fg $bg + client.urgent $bg $bg $fg $bg + client.unfocused $bg $bg $fg $bg + client.placeholder $bg $bg $fg $bg - client.background #2B2C2B + client.background #32302F #+end_src * Settings for i3-gaps @@ -577,7 +549,7 @@ Colors are gathered based on the documentation https://i3wm.org/docs/userguide.h # 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 + # 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 diff --git a/dotfiles/mail.org b/dotfiles/mail.org index 08357e0..2f0a825 100644 --- a/dotfiles/mail.org +++ b/dotfiles/mail.org @@ -271,129 +271,404 @@ Documentation: #+end_src ** 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 +*** Unding all the key bindings +#+begin_src conf + bind generic,pager,editor,index a noop + bind generic,pager,editor,index b noop + bind generic,pager,editor,index c noop + bind generic,pager,editor,index d noop + bind generic,pager,editor,index e noop + bind generic,pager,editor,index f noop + bind generic,pager,editor,index g noop + bind generic,pager,editor,index h noop + bind generic,pager,editor,index i noop + bind generic,pager,editor,index j noop + bind generic,pager,editor,index k noop + bind generic,pager,editor,index l noop + bind generic,pager,editor,index m noop + bind generic,pager,editor,index n noop + bind generic,pager,editor,index o noop + bind generic,pager,editor,index p noop + bind generic,pager,editor,index q noop + bind generic,pager,editor,index r noop + bind generic,pager,editor,index s noop + bind generic,pager,editor,index t noop + bind generic,pager,editor,index u noop + bind generic,pager,editor,index v noop + bind generic,pager,editor,index w noop + bind generic,pager,editor,index x noop + bind generic,pager,editor,index y noop + bind generic,pager,editor,index z noop + bind generic,pager,editor,index A noop + bind generic,pager,editor,index B noop + bind generic,pager,editor,index C noop + bind generic,pager,editor,index D noop + bind generic,pager,editor,index E noop + bind generic,pager,editor,index F noop + bind generic,pager,editor,index G noop + bind generic,pager,editor,index H noop + bind generic,pager,editor,index I noop + bind generic,pager,editor,index J noop + bind generic,pager,editor,index K noop + bind generic,pager,editor,index L noop + bind generic,pager,editor,index M noop + bind generic,pager,editor,index N noop + bind generic,pager,editor,index O noop + bind generic,pager,editor,index P noop + bind generic,pager,editor,index Q noop + bind generic,pager,editor,index R noop + bind generic,pager,editor,index S noop + bind generic,pager,editor,index T noop + bind generic,pager,editor,index U noop + bind generic,pager,editor,index V noop + bind generic,pager,editor,index W noop + bind generic,pager,editor,index X noop + bind generic,pager,editor,index Y noop + bind generic,pager,editor,index Z noop -*** Unbind Few keys + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + + bind generic,pager,editor,index 1 noop + bind generic,pager,editor,index 2 noop + bind generic,pager,editor,index 3 noop + bind generic,pager,editor,index 4 noop + bind generic,pager,editor,index 5 noop + bind generic,pager,editor,index 6 noop + bind generic,pager,editor,index 7 noop + bind generic,pager,editor,index 8 noop + bind generic,pager,editor,index 9 noop + bind generic,pager,editor,index 0 noop + bind generic,pager,editor,index ! noop + bind generic,pager,editor,index @ noop + bind generic,pager,editor,index $ noop + bind generic,pager,editor,index % noop + bind generic,pager,editor,index ^ noop + bind generic,pager,editor,index & noop + bind generic,pager,editor,index * noop + bind generic,pager,editor,index ( noop + bind generic,pager,editor,index ) noop + + bind generic,pager,editor,index \Ca noop + bind generic,pager,editor,index \Cb noop + bind generic,pager,editor,index \Cc noop + bind generic,pager,editor,index \Cd noop + bind generic,pager,editor,index \Ce noop + bind generic,pager,editor,index \Cf noop + bind generic,pager,editor,index \Cg noop + bind generic,pager,editor,index \Ch noop + bind generic,pager,editor,index \Ci noop + bind generic,pager,editor,index \Cj noop + bind generic,pager,editor,index \Ck noop + bind generic,pager,editor,index \Cl noop + bind generic,pager,editor,index \Cm noop + bind generic,pager,editor,index \Cn noop + bind generic,pager,editor,index \Co noop + bind generic,pager,editor,index \Cp noop + bind generic,pager,editor,index \Cq noop + bind generic,pager,editor,index \Cr noop + bind generic,pager,editor,index \Cs noop + bind generic,pager,editor,index \Ct noop + bind generic,pager,editor,index \Cu noop + bind generic,pager,editor,index \Cv noop + bind generic,pager,editor,index \Cw noop + bind generic,pager,editor,index \Cx noop + bind generic,pager,editor,index \Cy noop + bind generic,pager,editor,index \Cz noop + bind generic,pager,editor,index \CA noop + bind generic,pager,editor,index \CB noop + bind generic,pager,editor,index \CC noop + bind generic,pager,editor,index \CD noop + bind generic,pager,editor,index \CE noop + bind generic,pager,editor,index \CF noop + bind generic,pager,editor,index \CG noop + bind generic,pager,editor,index \CH noop + bind generic,pager,editor,index \CI noop + bind generic,pager,editor,index \CJ noop + bind generic,pager,editor,index \CK noop + bind generic,pager,editor,index \CL noop + bind generic,pager,editor,index \CM noop + bind generic,pager,editor,index \CN noop + bind generic,pager,editor,index \CO noop + bind generic,pager,editor,index \CP noop + bind generic,pager,editor,index \CQ noop + bind generic,pager,editor,index \CR noop + bind generic,pager,editor,index \CS noop + bind generic,pager,editor,index \CT noop + bind generic,pager,editor,index \CU noop + bind generic,pager,editor,index \CV noop + bind generic,pager,editor,index \CW noop + bind generic,pager,editor,index \CX noop + bind generic,pager,editor,index \CY noop + bind generic,pager,editor,index \CZ noop + + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + bind generic,pager,editor,index \C noop + + bind generic,pager,editor,index \C1 noop + bind generic,pager,editor,index \C2 noop + bind generic,pager,editor,index \C3 noop + bind generic,pager,editor,index \C4 noop + bind generic,pager,editor,index \C5 noop + bind generic,pager,editor,index \C6 noop + bind generic,pager,editor,index \C7 noop + bind generic,pager,editor,index \C8 noop + bind generic,pager,editor,index \C9 noop + bind generic,pager,editor,index \C0 noop + bind generic,pager,editor,index \C! noop + bind generic,pager,editor,index \C$ noop + bind generic,pager,editor,index \C% noop + bind generic,pager,editor,index \C^ noop + bind generic,pager,editor,index \C& noop + bind generic,pager,editor,index \C* noop + bind generic,pager,editor,index \C( noop + bind generic,pager,editor,index \C) noop + + bind generic,pager,editor,index a noop + bind generic,pager,editor,index b noop + bind generic,pager,editor,index c noop + bind generic,pager,editor,index d noop + bind generic,pager,editor,index e noop + bind generic,pager,editor,index f noop + bind generic,pager,editor,index g noop + bind generic,pager,editor,index h noop + bind generic,pager,editor,index i noop + bind generic,pager,editor,index j noop + bind generic,pager,editor,index k noop + bind generic,pager,editor,index l noop + bind generic,pager,editor,index m noop + bind generic,pager,editor,index n noop + bind generic,pager,editor,index o noop + bind generic,pager,editor,index p noop + bind generic,pager,editor,index q noop + bind generic,pager,editor,index r noop + bind generic,pager,editor,index s noop + bind generic,pager,editor,index t noop + bind generic,pager,editor,index u noop + bind generic,pager,editor,index v noop + bind generic,pager,editor,index w noop + bind generic,pager,editor,index x noop + bind generic,pager,editor,index y noop + bind generic,pager,editor,index z noop + bind generic,pager,editor,index A noop + bind generic,pager,editor,index B noop + bind generic,pager,editor,index C noop + bind generic,pager,editor,index D noop + bind generic,pager,editor,index E noop + bind generic,pager,editor,index F noop + bind generic,pager,editor,index G noop + bind generic,pager,editor,index H noop + bind generic,pager,editor,index I noop + bind generic,pager,editor,index J noop + bind generic,pager,editor,index K noop + bind generic,pager,editor,index L noop + bind generic,pager,editor,index M noop + bind generic,pager,editor,index N noop + bind generic,pager,editor,index O noop + bind generic,pager,editor,index P noop + bind generic,pager,editor,index Q noop + bind generic,pager,editor,index R noop + bind generic,pager,editor,index S noop + bind generic,pager,editor,index T noop + bind generic,pager,editor,index U noop + bind generic,pager,editor,index V noop + bind generic,pager,editor,index W noop + bind generic,pager,editor,index X noop + bind generic,pager,editor,index Y noop + bind generic,pager,editor,index Z noop + + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + bind generic,pager,editor,index noop + + bind generic,pager,editor,index 1 noop + bind generic,pager,editor,index 2 noop + bind generic,pager,editor,index 3 noop + bind generic,pager,editor,index 4 noop + bind generic,pager,editor,index 5 noop + bind generic,pager,editor,index 6 noop + bind generic,pager,editor,index 7 noop + bind generic,pager,editor,index 8 noop + bind generic,pager,editor,index 9 noop + bind generic,pager,editor,index 0 noop + bind generic,pager,editor,index ! noop + bind generic,pager,editor,index @ noop + bind generic,pager,editor,index $ noop + bind generic,pager,editor,index % noop + bind generic,pager,editor,index ^ noop + bind generic,pager,editor,index & noop + bind generic,pager,editor,index * noop + bind generic,pager,editor,index ( noop + bind generic,pager,editor,index ) noop +#+end_src + +*** Quit Neomutt +#+begin_src conf + bind index,pager,compose Q exit + macro index q "if [ $TMUX ]; then tmux detach; fi" +#+end_src + +*** Generic +#+begin_src conf + bind generic select-entry + bind generic l select-entry + + bind generic,index k previous-entry + bind generic,index j next-entry + + bind generic,index 0 first-entry + bind generic,index $ last-entry + + bind generic,index \031 previous-entry # Mouse wheel + bind generic,index \005 next-entry # Mouse wheel + + bind generic,index gg first-entry + bind generic,index G last-entry + + bind generic,index,pager \Cu half-up + bind generic,index,pager \Cd half-down + + bind generic,index,pager \Ce next-line + bind generic,index,pager \Cy previous-line +#+end_src + +*** Index and Pager #+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 collapse-thread + + bind index,pager K previous-entry + bind index,pager J next-entry + bind index l display-message - bind index gg first-entry + bind index display-message + bind pager l view-attachments + bind pager gg top - bind index G last-entry - bind pager G bottom + bind pager 0 top - bind attach,index,pager \CD next-page - bind attach,index,pager \CU previous-page + bind pager G bottom + bind pager $ bottom - bind index h noop + macro index h "?" "Go back to the list of mailboxes" bind pager h exit -#+END_SRC + bind pager q exit -*** Index -#+BEGIN_SRC conf - bind index u undelete-message + macro index c "?" "change folder" + + bind index,pager u undelete-message 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 "\ - :set my_tmp_pipe_decode=\$pipe_decode\n\ - :set pipe_decode\n\ - |urlview\n\ - :set pipe_decode=\$my_tmp_pipe_decode\n\ - :unset my_tmp_pipe_decode\n" \ - 'call urlview to extract URLs out of a message' - + # Marl All message as read + macro index \Cr \ + "~NN." \ + "mark all new as read" #+END_SRC -*** Sync email +#+begin_src conf + bind index za collapse-thread + bind index zA collapse-all # Missing :folddisable/foldenable +#+end_src + + +Write/Reply/Forward mail +#+BEGIN_SRC conf + bind index,pager p recall-message + bind index,pager m mail + bind index,pager r reply + bind index,pager R group-reply + bind index,pager b bounce-message + bind index,pager f forward-message +#+END_SRC + +Sync Mailbox +#+begin_src conf + bind index,pager s sync-mailbox +#+end_src + +Sync email #+BEGIN_SRC conf macro index,pager o "$HOME/.config/neomutt/bin/get_new_mail.sh" macro index,pager O "$HOME/.config/neomutt/bin/get_new_mail.sh all" #+END_SRC -**** Sync Mail script - :PROPERTIES: - :header-args: :tangle ~/.config/neomutt/bin/get_new_mail.sh - :header-args+: :comments both :mkdirp yes - :header-args+: :shebang "#!/usr/bin/env bash" - :END: -#+begin_src bash - if [ "$1" = "all" ]; then - command='mbsync --all' - else - command='mbsync gmail-Home esrf-Home ulg-Home' - fi - - if [ $TMUX ]; then - tmux split -v -l 1 $command && tmux select-pane -U - else - $command - fi -#+end_src - -*** Copy and move dialogs +Make quick html view macro #+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" -#+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 -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 +Open mail with Vim +#+begin_src conf + macro index,pager V "plain" +#+end_src + +#+begin_src conf + # bind index,pager U toggle-new +#+end_src + +Labels #+BEGIN_SRC conf - bind pager \031 previous-line # Mouse wheel - bind pager \005 next-line # Mouse wheel + bind index,pager y edit-label + bind index,pager Y modify-labels #+END_SRC -*** TODO [#A] Contacts -#+BEGIN_SRC conf - macro pager \Ca " goobook add" "add the sender address to Google contacts" -#+END_SRC +*** Search +#+begin_src conf + bind generic,index,pager / search + + bind index,pager n search-next + bind index,pager N search-opposite +#+end_src + +*** Attachments +#+begin_src conf + bind attach l view-attach + + bind attach h exit + bind attach q exit + + bind attach view-mailcap + + macro attach W ~/Downloads/y "Save entry" +#+end_src *** Compose #+BEGIN_SRC conf @@ -404,9 +679,62 @@ Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#iss bind compose a attach-file #+END_SRC +Attach file using GUI File Manager +#+begin_src conf + # macro compose A "bash $HOME/.config/neomut/bin/attach-file.shsource /tmp/muttpick" "Attach with GUI" +#+end_src + +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 + +Open another instance of neomutt in readonly mode while composing +#+BEGIN_SRC conf + macro compose M "termite -e \"neomutt -R\"" +#+END_SRC + +*** Browser +#+begin_src conf + bind browser l select-entry + + macro browser h "" + bind browser q exit + + bind index G bottom-page + bind index gg top-page +#+end_src + +*** Generic +Enter Command +#+begin_src conf + bind generic,index,pager : enter-command +#+end_src + +*** Copy and move mails +#+BEGIN_SRC conf + macro index C "?" "copy a message to a mailbox" + macro index M "?" "move a message to a mailbox" +#+END_SRC + +*** Sidebar +#+BEGIN_SRC conf + bind index,pager \Ck sidebar-prev + bind index,pager \Cj sidebar-next + bind index,pager \Cl sidebar-open + + bind index,pager B sidebar-toggle-visible +#+END_SRC + +*** Reload Configuration +#+begin_src conf + macro generic,index,pager,editor , ":source ~/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file" +#+end_src + +*** urlview - Open URL in emails Use =urlview= to extract urls from the mail. #+begin_src conf - macro attach,compose \cw "\ + macro attach,compose,index,pager \cw "\ :set my_tmp_pipe_decode=\$pipe_decode\n\ :set pipe_decode\n\ |urlview\n\ @@ -415,270 +743,321 @@ Use =urlview= to extract urls from the mail. 'call urlview to extract URLs out of a message' #+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 [#A] 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 - -** TODO Colors -Mutt template by Robert Timm (https://github.com/rti) -Base16 scheme and Base16 Builder by Chris Kempson (https://github.com/chriskempson) - -| ~A | all messages | -| ~b EXPR | messages which contain EXPR in the message body | -| ~B EXPR | messages which contain EXPR in the whole message | -| ~c USER | messages carbon-copied to USER | -| ~C EXPR | message is either to: or cc: EXPR | -| ~D | deleted messages | -| ~d [MIN]-[MAX] | messages with ``date-sent'' in a Date range | -| ~E | expired messages | -| ~e EXPR | message which contains EXPR in the ``Sender'' field | -| ~F | flagged messages | -| ~f USER | messages originating from USER | -| ~g | PGP signed messages | -| ~G | PGP encrypted messages | -| ~h EXPR | messages which contain EXPR in the message header | -| ~k | message contains PGP key material | -| ~i ID | message which match ID in the ``Message-ID'' field | -| ~L EXPR | message is either originated or received by EXPR | -| ~l | message is addressed to a known mailing list | -| ~m [MIN]-[MAX] | message in the range MIN to MAX *) | -| ~n [MIN]-[MAX] | messages with a score in the range MIN to MAX *) | -| ~N | new messages | -| ~O | old messages | -| ~p | message is addressed to you (consults $alternates) | -| ~P | message is from you (consults $alternates) | -| ~Q | messages which have been replied to | -| ~R | read messages | -| ~r [MIN]-[MAX] | messages with ``date-received'' in a Date range | -| ~S | superseded messages | -| ~s SUBJECT | messages having SUBJECT in the ``Subject'' field. | -| ~T | tagged messages | -| ~t USER | messages addressed to USER | -| ~U | unread messages | -| ~v | message is part of a collapsed thread. | -| ~x EXPR | messages which contain EXPR in the `References' field | -| ~y EXPR | messages which contain EXPR in the `X-Label' field | -| ~z [MIN]-[MAX] | messages with a size in the range MIN to MAX *) | -| ~= | duplicated messages (see $duplicate_threads) | - +*** Searching using Mu #+begin_src conf -# basic colors -# name foreground background pattern -color normal color20 color0 -color error color1 color0 -color tilde color20 color0 -color message color20 color0 -color markers color1 color0 -color attachment color8 color0 -color search color2 color0 -color status color8 color18 -color indicator color7 color19 -color tree color19 color0 # arrow in threads - -color index color20 color0 "~A" # all messages -color index color1 color0 "~F" # flagged messages -color index color20 color0 "~v~(!~N)" # collapsed thread with no unread -color index color4 color0 "~U" # unread messages -color index color4 color0 "~v~(~N)" # collapsed thread with some unread -color index color1 color0 "~v~(~F)" # collapsed thread with some flagged -color index color0 color1 "~D" # deleted messages - -# header -color hdrdefault color20 color18 -color header color20 color18 "^" -color header color7 color18 "^(From)" -color header color7 color18 "^(Subject)" - -# body -color normal color7 color0 -color underline color7 color0 -color bold color7 color0 -color signature color20 color0 - -color quoted color3 color0 -color quoted1 color2 color0 -color quoted2 color5 color0 -color quoted3 color6 color0 -color quoted4 color4 color0 - -# pgp -color body color2 color0 "(Good signature)" -color body color2 color0 "^gpg: Good signature .*" -color body color20 color0 "^gpg: " -color body color1 color0 "(BAD signature)" -color body color1 color1 "^gpg: BAD signature from.*" - -# body url -color body color4 color0 "([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<>\"]" -# body email -color body color4 color0 "((@(([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]\\])" + macro index,pager \Cf "mu find --clearlinks --format=links --linksdir=~/.mail/search " \ + "mu find" + macro index,pager gf "~/.mail/search" \ + "mu find results" #+end_src -** Colors OLD - :PROPERTIES: - :header-args:conf+: :tangle no - :END: +** 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 + color normal color021 color000 + color error color021 color000 + color tilde color021 color000 + color message color021 color000 + color markers color021 color000 + color attachment color021 color000 + color search color000 color003 + color status color016 color000 + color indicator color000 color021 + color tree color021 color000 + color progress color000 color021 -# basic monocolor screen -mono bold bold -mono underline underline -mono indicator reverse -mono error bold + # 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 +#+begin_src conf + color index color021 color000 "~A" # All messages + color index brightcolor006 color000 "~N" # New messages + color index color020 color000 "~O" # Old messages + color index color020 color000 "~Q" # messages that have been replied to + color index color021 color000 "~R" # read messages + color index color006 color000 "~U" # unread messages + color index color021 color000 "~R~p!~F" # messages to me + color index brightcolor006 color000 "~N~p!~F" # new messages to me + color index brightcolor006 color000 "~U~p!~F" # unread messages to me + color index color005 color000 "~F" # flagged messages + color index color005 color000 "~F~p" # flagged messages to me + color index brightcolor006 color000 "~N~F" # new flagged messages + color index brightcolor006 color000 "~N~F~p" # new flagged messages to me + color index brightcolor006 color000 "~U~F~p" # new flagged messages to me + color index brightcolor000 color001 "~D" # deleted messages + + color index brightcolor021 color019 "~v~(!~N)" # collapsed thread with no unread + color index brightcolor006 color019 "~v~(~N)" # collapsed thread with some unread + color index brightcolor006 color019 "~N~v~(~N)" # collapsed thread with unread parent + color index brightcolor005 color019 "~v~(~F)!~N" # collapsed thread with flagged, no unread + color index brightcolor006 color019 "~v~(~F~N)" # collapsed thread with some unread & flagged + color index brightcolor006 color019 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged + color index brightcolor005 color019 "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged + color index brightcolor000 color001 "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +#+end_src *** Message headers #+BEGIN_SRC conf -color hdrdefault brightcyan default -color header brightblue default "^(From)" -color header blue default "^(Subject)" + color hdrdefault color006 color000 + color header brightcolor006 color000 "^(From)" + color header brightcolor004 color000 "^(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 quoted color002 color000 + color quoted1 color003 color000 + color quoted2 color004 color000 + color quoted3 color005 color000 + color quoted4 color006 color000 -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? + color signature color021 color000 + color bold brightcolor021 color000 + color underline brightcolor021 color000 + color normal color021 color000 #+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.*" + color body color001 color000 "(BAD signature)" + color body color002 color000 "(Good signature)" + color body color002 color000 "^gpg: Good signature .*" + color body color002 color000 "^gpg: " + color body color002 color000 "^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<>\"]" + color body color006 color000 "([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]\\])" + color body color006 color000 "((@(([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 +** Contacts with Mu #+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:]]|$)" + set query_command="mu cfind '%s' -o mutt-ab" -# Border lines. -#color body blue default "( *[-+=#*~_]){6,}" + bind editor complete-query +#+END_SRC -#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 " +** Paths +#+BEGIN_SRC conf + set folder = ~/.mail # mail location + set alias_file = ~/.config/neomutt/alias # where to store aliases + set header_cache = ~/.config/neomutt/cache/headers # where to store headers + set message_cachedir = ~/.config/neomutt/cache/bodies # where to store bodies + set certificate_file = ~/.config/neomutt/certificates # where to store certs + set mailcap_path = ~/.config/neomutt/mailcap # entries for filetypes + set tmpdir = ~/.config/neomutt/temp # where to keep temp files +#+END_SRC + +** Print +https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt + +#+BEGIN_SRC conf + # set print_command="/usr/bin/muttprint %s -p ctb110c1u" +#+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 ~/.config/neomutt/accounts/gmail + folder-hook esrf/* source ~/.config/neomutt/accounts/esrf + folder-hook ulg/* source ~/.config/neomutt/accounts/ulg + + macro index,pager gu "+ulg/Inbox" "go to inbox" + macro index,pager ge "+esrf/Inbox" "go to inbox" + macro index,pager gm "+gmail/Inbox" "go to inbox" +#+END_SRC + +*** Gmail +**** Configuration +#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail :comments none + set from = "dehaeze.thomas@gmail.com" + set sendmail = "msmtp -a gmail" + + # Other special folders. + set mbox = "+gmail/Archive" + unset record # Don't copy send message to Sent folder: Gmail does that for us + set postponed = "+gmail/Drafts" + + set signature = "~/.config/neomutt/accounts/gmail.signature" + + 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 ~/.config/neomutt/accounts/gmail.signature :comments none :padline no + Thomas Dehaeze +#+end_src +This empty code block is used to add a new line after signatude +#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail.signature :comments none :padline no +#+end_src +*** ESRF +**** Configuration +#+begin_src conf :tangle ~/.config/neomutt/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 = "~/.config/neomutt/accounts/esrf.signature" + + 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 ~/.config/neomutt/accounts/esrf.signature :comments none :padline no + Thomas Dehaeze +#+end_src +This empty code block is used to add a new line after signatude +#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no +#+end_src + +*** ULG +**** Configuration +#+begin_src conf :tangle ~/.config/neomutt/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 = "~/.config/neomutt/accounts/ulg.signature" + + 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 ~/.config/neomutt/accounts/ulg.signature :comments none :padline no + Thomas Dehaeze +#+end_src +This empty code block is used to add a new line after signatude +#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no +#+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 + 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 + + # Use Vim to compose email, with a few default options. + set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert' -c ':Goyo'" +#+END_SRC + +** View Options +*** 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 + +*** 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 ** Sidebar +*** General Config #+BEGIN_SRC conf # Should the Sidebar be shown? set sidebar_visible = yes @@ -738,154 +1117,7 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-] set sidebar_sort_method = 'unsorted' #+END_SRC -** Searching using Mu -#+begin_src conf - # mutt macros for mu - macro index,pager \Cf "mu find --clearlinks --format=links --linksdir=~/.mail/search " \ - "mu find" - macro index,pager 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 = ~/.config/neomutt/alias # where to store aliases - set header_cache = ~/.config/neomutt/cache/headers # where to store headers - set message_cachedir = ~/.config/neomutt/cache/bodies # where to store bodies - set certificate_file = ~/.config/neomutt/certificates # where to store certs - # set mailcap_path = ~/.config/neomutt/config/mailcap # entries for filetypes - set tmpdir = ~/.config/neomutt/temp # where to keep temp files -#+END_SRC - -** TODO Mailcap configuration -** TODO [#A] Print -https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt - -#+BEGIN_SRC conf - set print_command="/usr/bin/muttprint %s -p ctb110c1u" -#+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 ~/.config/neomutt/accounts/gmail - folder-hook esrf/* source ~/.config/neomutt/accounts/esrf - folder-hook ulg/* source ~/.config/neomutt/accounts/ulg - - macro index,pager gu "+ulg/Inbox" "go to inbox" - macro index,pager ge "+esrf/Inbox" "go to inbox" - macro index,pager gm "+gmail/Inbox" "go to inbox" -#+END_SRC - -*** Gmail -**** Configuration -#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail :comments none - set from = "dehaeze.thomas@gmail.com" - set sendmail = "msmtp -a gmail" - - # Other special folders. - set mbox = "+gmail/Archive" - unset record # Don't copy send message to Sent folder: Gmail does that for us - set postponed = "+gmail/Drafts" - - set signature = "~/.config/neomutt/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 ~/.config/neomutt/accounts/gmail.signature :comments none :padline no - Thomas Dehaeze -#+end_src -This empty code block is used to add a new line after signatude -#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail.signature :comments none :padline no -#+end_src -*** ESRF -**** Configuration -#+begin_src conf :tangle ~/.config/neomutt/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 = "~/.config/neomutt/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 ~/.config/neomutt/accounts/esrf.signature :comments none :padline no - Thomas Dehaeze -#+end_src -This empty code block is used to add a new line after signatude -#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no -#+end_src - -*** ULG -**** Configuration -#+begin_src conf :tangle ~/.config/neomutt/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 = "~/.config/neomutt/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 ~/.config/neomutt/accounts/ulg.signature :comments none :padline no - Thomas Dehaeze -#+end_src -This empty code block is used to add a new line after signatude -#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no -#+end_src - -** Mailboxes to show in the sidebar. +*** Mailboxes to show in the sidebar. #+BEGIN_SRC conf mailboxes \ +search \ @@ -912,124 +1144,50 @@ This empty code block is used to add a new line after signatude unset move #+END_SRC -** Use Vim to compose email, with a few default options. -#+BEGIN_SRC conf -set editor = "nvim -c '/\\n--' -c ':noh' -c 'startinsert' -c ':Goyo'" -#+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 - 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 +** Attachments +*** Attachment View Options #+BEGIN_SRC conf set attach_format = "[%D %t] %2n [%-7.7m/%10.10M] %.40d %> [%s] " #+END_SRC +*** Open Attachment +Program to open is defined in the =mailcap= file. -** 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 +A script =openfile.sh= is used to open files with the default application using =xdg-open=. -** Progress Bar -#+BEGIN_SRC conf - color progress white red -#+END_SRC +*** 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 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 [#A] Attachments -*** Open Attachments +*** Forgotten Attachment +#+begin_src conf + set abort_noattach = ask-yes + set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>" +#+end_src +** Scripts and other config files +*** Sync Mail script :PROPERTIES: - :header-args: :tangle ~/scripts/openfile.sh + :header-args: :tangle ~/.config/neomutt/bin/get_new_mail.sh + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: +#+begin_src bash + if [ "$1" = "all" ]; then + command='mbsync --all' + else + command='mbsync gmail-Home esrf-Home ulg-Home' + fi + + if [ $TMUX ]; then + tmux split -v -l 1 $command && tmux select-pane -U + else + $command + fi +#+end_src +*** Openfile Scripts + :PROPERTIES: + :header-args: :tangle ~/.config/neomutt/bin/openfile.sh :header-args+: :comments both :mkdirp yes :header-args+: :shebang "#!/usr/bin/env bash" :END: -A script is used to open the attachment with the default application: -*it seems this script is not use at the moment* #+begin_src bash base=$(basename "$1") ext="${base##*.}" @@ -1043,27 +1201,104 @@ A script is used to open the attachment with the default application: setsid xdg-open "$file" >/dev/null 2>&1 & #+end_src -*** 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. +*** urlview Config + :PROPERTIES: + :header-args:conf+: :tangle ~/.urlview + :header-args:conf+: :comments both :mkdirp yes + :END: -*** Forgotten Attachment -#+begin_src conf - set abort_noattach = ask-yes - set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons))\\>" -#+end_src - -*** TODO [#B] Attach file using GUI File Manager #+BEGIN_SRC conf - # macro compose A "bash $HOME/.config/neomut/bin/attach-file.shsource /tmp/muttpick" "Attach with GUI" + REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] + + COMMAND nohup qutebrowser %s /dev/null & #+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 +*** Mailcap + :PROPERTIES: + :header-args:conf: :tangle ~/.config/neomutt/mailcap + :header-args:conf+: :comments both :mkdirp yes + :END: -=~/scripts/printics.sh= +Generic +#+BEGIN_SRC conf + text/plain; nvim %s + audio/*; /usr/bin/xdg-open %s; copiousoutput + video/*; setsid mpv --quiet %s &; copiousoutput + image/*; ~/.config/neomutt/bin/openfile.sh %s; + application/pdf; ~/.config/neomutt/bin/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 -* TODO Notification system -A script (=~/scripts/checkmail.sh=) is used to retreive new mails and use =notify=send= is there are new received mails. +Libreoffice +#+begin_src conf + application/docx; libreoffice %s --nologo &; copiousoutput; + application/doc; libreoffice --nologo %s &; copiousoutput; + + application/vnd.oasis.opendocument.database; libreoffice --nologo --base '%s'; copiousoutput + application/vnd.oasis.opendocument.chart; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.oasis.opendocument.spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.oasis.opendocument.spreadsheet-template; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.oasis.opendocument.graphics; libreoffice --nologo --draw '%s'; copiousoutput + application/vnd.oasis.opendocument.graphics-template; libreoffice --nologo --draw '%s'; copiousoutput + application/vnd.oasis.opendocument.presentation; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.oasis.opendocument.presentation-template; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.oasis.opendocument.formula; libreoffice --nologo --math '%s'; copiousoutput + application/vnd.oasis.opendocument.text; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.oasis.opendocument.text-master; libreoffice --nologo -global '%s'; copiousoutput + application/vnd.oasis.opendocument.text-template; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.oasis.opendocument.text-web; libreoffice --nologo -web '%s'; copiousoutput + application/vnd.sun.xml.base; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.sun.xml.calc; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.sun.xml.calc.template; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.sun.xml.draw; libreoffice --nologo --draw '%s'; copiousoutput + application/vnd.sun.xml.draw.template; libreoffice --nologo --draw '%s'; copiousoutput + application/vnd.stardivision.calc; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.stardivision.chart; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.stardivision.draw; libreoffice --nologo --draw '%s'; copiousoutput + application/vnd.stardivision.impress; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.stardivision.math; libreoffice --nologo --math '%s'; copiousoutput + application/vnd.stardivision.writer-global; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.stardivision.writer; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.sun.xml.impress; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.sun.xml.impress.template; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.sun.xml.math; libreoffice --nologo --math '%s'; copiousoutput + application/vnd.sun.xml.writer; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.sun.xml.writer.global; libreoffice --nologo -global '%s'; copiousoutput + application/vnd.sun.xml.writer.template; libreoffice --nologo --writer '%s'; copiousoutput + text/csv; libreoffice --nologo --calc '%s'; copiousoutput + text/spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput + application/x-quattropro; libreoffice --nologo --calc '%s'; copiousoutput + application/x-dbf; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.ms-excel.sheet.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.ms-excel.template.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.spreadsheetml.template; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.lotus-1-2-3; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.ms-excel; libreoffice --nologo --calc '%s'; copiousoutput + application/msexcel; libreoffice --nologo --calc '%s'; copiousoutput + application/x-dbase; libreoffice --nologo --calc '%s'; copiousoutput + text/x-csv; libreoffice --nologo --calc '%s'; copiousoutput + application/vnd.ms-powerpoint.presentation.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.ms-powerpoint.slideshow.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.ms-powerpoint.template.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.presentationml.slideshow; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.presentationml.template; libreoffice --nologo --impress '%s'; copiousoutput + application/vnd.ms-powerpoint; libreoffice --nologo --impress '%s'; copiousoutput + application/mspowerpoint; libreoffice --nologo --impress '%s'; copiousoutput + text/mathml; libreoffice --nologo --math '%s'; copiousoutput + application/rtf; libreoffice --nologo --writer '%s'; copiousoutput + application/x-t602; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.wordperfect; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.ms-word.document.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.ms-word.template.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.openxmlformats-officedocument.wordprocessingml.template; libreoffice --nologo --writer '%s'; copiousoutput + application/vnd.ms-works; libreoffice --nologo --writer '%s'; copiousoutput + application/msword; libreoffice --nologo --writer '%s'; copiousoutput + application/wordperfect; libreoffice --nologo --writer '%s'; copiousoutput + text/rtf; libreoffice --nologo --writer '%s'; copiousoutput +#+end_src diff --git a/dotfiles/music.org b/dotfiles/music.org index 0e9794f..b613c07 100644 --- a/dotfiles/music.org +++ b/dotfiles/music.org @@ -11,550 +11,551 @@ Cheatsheet: https://pkgbuild.com/~jelle/ncmpcpp/ :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 + ############################################################################## + ## 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_port = 6600 -#mpd_connection_timeout = 5 + #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 -# + ## 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 = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)" + + # + ## + ## 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 diff --git a/dotfiles/newsboat.org b/dotfiles/newsboat.org index d0437d1..d288875 100644 --- a/dotfiles/newsboat.org +++ b/dotfiles/newsboat.org @@ -1,4 +1,6 @@ #+TITLE: Newsboat Configuration +https://wiki.archlinux.org/index.php/Newsboat +https://newsboat.org/releases/2.12/docs/newsboat.html * Config :PROPERTIES: @@ -6,131 +8,137 @@ :header-args+: :comments both :mkdirp yes :END: +** Reload configuration #+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 + # All feeds will be automatically reloaded after a certain time has passed + auto-reload yes -confirm-exit yes + # The number of minutes between automatic reloads. + reload-time 180 -external-url-viewer "urlscan -dc -r 'linkhandler {}'" + # The number of parallel reload threads that shall be started when all feeds are reloaded. + reload-threads 3 -goto-first-unread no -goto-next-feed no + # If set to yes, then the first automatic reload will be suppressed if auto-reload is set to yes. + suppress-first-reload yes +#+END_SRC -save-path "~/Saved Articles" -download-path "~/Downloads" +** Basic configuration +#+BEGIN_SRC conf + confirm-exit no -# If set to no, then the keymap hints on the bottom of screen will not be displayed. -show-keymap-hint no + external-url-viewer "urlscan -dc -r 'linkhandler {}'" -feed-sort-order none -# ============================================================= + goto-first-unread no + goto-next-feed no + save-path "~/Saved Articles" + download-path "~/Downloads" -# ============================================================= -# Notifications -# ============================================================= -notify-format "newsbeuter: %n unread articles within %f unread feeds" -notify-program notify-send -# ============================================================= + # If set to no, then the keymap hints on the bottom of screen will not be displayed. + show-keymap-hint no + feed-sort-order none +#+END_SRC -# ============================================================= -# 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 +** Notifications +#+BEGIN_SRC conf + notify-format "%n unread articles" + notify-program ~/scripts/newsboat-notify.sh + notify-always no +#+END_SRC -bind-key l open -bind-key h quit +*** Notification Script + :PROPERTIES: + :header-args: :tangle ~/scripts/newsboat-notify.sh + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: -bind-key a toggle-article-read +#+begin_src bash + dunstify -replace=38492 "Newsbeuter " "$1" +#+end_src -bind-key n next-unread -bind-key N prev-unread +** Bindings +#+BEGIN_SRC conf + 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 D pb-download + bind-key l open + bind-key h quit -bind-key U show-urls + bind-key a toggle-article-read -# bind-key x pb-delete + bind-key n next-unread + bind-key N prev-unread -bind-key t set-tag -bind-key T clear-tag + bind-key D pb-download -bind-key r reload # Reload the currently selected feed -bind-key R reload-all # Reload all feeds -# ============================================================= + bind-key U show-urls + # bind-key x pb-delete -# ============================================================= -# Macros - Starts with , key -# ============================================================= -# Default Browser -browser "qutebrowser %u" + bind-key t set-tag + bind-key T clear-tag -# Open in Browser -macro , open-in-browser + bind-key r reload # Reload the currently selected feed + bind-key R reload-all # Reload all feeds +#+END_SRC -# 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" +** Macros - Starts with , key +#+BEGIN_SRC conf + # Default Browser + 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 in Browser + macro , open-in-browser -# Open Video with MPV -macro v set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser "qutebrowser %u" + # 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" -# Open With W3M -macro w set browser "w3m %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" -# Copy Address to clipboard -macro c set browser "xsel -b <<<" ; 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" -# ============================================================= -# hide articles matching -# ============================================================= -ignore-article "*" "title =~ \"Sponsor\"" -ignore-article "*" "title =~ \"Advertisement\"" -ignore-mode "display" -# ============================================================= + # Copy Address to clipboard + macro c set browser "xsel -b <<<" ; open-in-browser ; set browser "qutebrowser %u" +#+END_SRC +** hide articles matching +#+BEGIN_SRC conf + ignore-article "*" "title =~ \"Sponsor\"" + ignore-article "*" "title =~ \"Advertisement\"" + ignore-mode "display" +#+END_SRC -# ============================================================= -# Feedlist and Article Format -# ============================================================= -feedlist-format "%4i %n %11u %t" -feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?" +** Feedlist and Article Format +#+BEGIN_SRC conf + 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" + 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'" -# ============================================================= + itemview-title-format "Article '%T'" +#+END_SRC - -# ============================================================= -# Color Scheme -# ============================================================= -include "~/.config/newsboat/colors" -# ============================================================= +** Color Scheme +#+BEGIN_SRC conf + include "~/.config/newsboat/colors" #+END_SRC * Colors @@ -140,86 +148,91 @@ include "~/.config/newsboat/colors" :END: #+BEGIN_SRC conf -# ============================================================= -# Color Scheme -# ============================================================= -highlight feedlist "^ *[0-9]+ *N " cyan cyan -highlight articlelist "^ *[0-9]+ *N " cyan cyan + 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 + 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 -# ============================================================= + 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 +* URLS :PROPERTIES: :header-args: :tangle ~/.config/newsboat/urls :header-args+: :comments both :mkdirp yes :END: +** NEWSFEEDS +*** Linux +#+begin_src conf + https://itsfoss.com/feed/ "~NEWSFEED: It's Foss" linux + https://lukesmith.xyz/rss.xml "~NEWSFEED: Lukesmith" linux + + https://lord.re/index.xml "~NEWSFEED: /home/lord" linux + http://feeds.cyberciti.biz/Nixcraft-LinuxFreebsdSolarisTipsTricks "~NEWSFEED: nixCraft" linux + http://frederic.bezies.free.fr/blog/?feed=rss2 "~NEWSFEED: Le Weblog de Frederic Bezies" linux + https://addy-dclxvi.github.io/index.xml "~NEWSFEED: Addy's Blog" linux + http://feeds.feedburner.com/linoxideblog "~NEWSFEED: LinOxide" linux +#+end_src + +*** Emacs #+begin_src conf - ------------------------ - -------NEWSFEEDS-------- - ------------------------ - https://itsfoss.com/feed/ "~NEWSFEED: It's Foss" unix - https://lukesmith.xyz/rss.xml "~NEWSFEED: Lukesmith" unix http://www.planet.emacsen.org/atom.xml "~NEWSFEED: Planet Emacs" emacs http://sachachua.com/blog/feed/ "~NEWSFEED: Sacha Chua" emacs + https://scripter.co/categories/org/index.xml "~NEWSFEED: Scripter" emacs + http://kitchingroup.cheme.cmu.edu/blog/feed "~NEWSFEED: The Kitchin Research Group" emacs + http://irreal.org/blog/?feed=rss2 "~NEWSFEED: Irreal" emacs + https://emacs.cafe/feed.xml "~NEWSFEED: Emacs café" emacs + http://pragmaticemacs.com/feed/ "~NEWSFEED: Pragmatic Emacs" emacs + https://pinecast.com/feed/emacscast "~NEWSFEED: EmacsCast" emacs + http://feeds.feedburner.com/CestLaZ "~newsfeed: c'est la Z" emacs + https://joshrollinswrites.com/index.xml "The Art of Not Asking Why" emacs +#+end_src + +*** Other +#+begin_src conf http://xkcd.com/rss.xml "~NEWSFEED: XKCD" fun - https://scripter.co/categories/org/index.xml "~NEWSFEED: Scripter" orgmode - ------------------------- - -------YOUTUBE----------- - ------------------------- +#+end_src + +** Youtube +#+begin_src conf https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA "~YOUTUBE: Bryan Lunduke" youtube unix https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YOUTUBE: Luke Smith" youtube unix + https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YOUTUBE: Greg Hurrell" youtube unix + https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YOUTUBE: Thoughtbot" youtube unix + https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YOUTUBE: Chat sceptique" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YOUTUBE: Hygiène Mentale" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YOUTUBE: Domain of Science" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YOUTUBE: 2veritasium" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YOUTUBE: ScienceEtonnante" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YOUTUBE: Veritasium" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YOUTUBE: EmacsCast" youtube emacs https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YOUTUBE: Emacsrocks" youtube emacs https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YOUTUBE: John Kitchin" youtube emacs + https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YOUTUBE: Brian Douglas" youtube control https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YOUTUBE: Steve Brunton" youtube control - https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YOUTUBE: Hygiène Mentale" youtube science - https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YOUTUBE: Domain of Science" youtube science https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YOUTUBE: BostonDynamics" youtube control - https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YOUTUBE: Greg Hurrell" youtube vim unix - https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YOUTUBE: Thoughtbot" youtube unix https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YOUTUBE: How To Mechatronics" youtube control - https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YOUTUBE: 2veritasium" youtube science - https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YOUTUBE: ScienceEtonnante" youtube science + https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YOUTUBE: Jipihorn" youtube acoustic - https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YOUTUBE: Veritasium" youtube science - ------------------------- - -------REDDIT------------ - ------------------------- - https://www.reddit.com/r/linux/.rss "~REDDIT: r/linux" reddit linux - https://www.reddit.com/r/emacs/.rss "~REDDIT: r/emacs" reddit emacs - ------------------------- - -------GIT_REPOS--------- - ------------------------- - https://github.com/LukeSmithxyz.atom "~GITHUB: LukeSmithxyz" github unix - ------------------------- - -------ARCHLINUX--------- - ------------------------- - https://www.archlinux.org/feeds/packages/added/ "~ARCH: Packages Added" - https://www.archlinux.org/feeds/packages/removed/ "~ARCH: Packages Removed" - https://aur.archlinux.org/rss/ "~ARCH: Packages Added (AUR)" - https://wiki.archlinux.org/api.php?hidebots=1&urlversion=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss "~ARCH: Arch Wiki" #+end_src diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index aa1413e..52f3e62 100644 --- a/dotfiles/polybar.org +++ b/dotfiles/polybar.org @@ -1,7 +1,9 @@ #+TITLE: Polybar Configuration +:DRAWER: #+PROPERTY: header-args+ :comments both #+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :tangle ~/.config/polybar/config +:END: * Colors #+begin_src conf @@ -56,7 +58,7 @@ enable-ipc = true override-redirect = false bottom = false - fixed-center = true + fixed-center = false width = 100% height = 27 @@ -65,7 +67,7 @@ background = ${colors.background} foreground = ${colors.foreground} - line-size = 3 + line-size = 2 border-size = 0 @@ -79,60 +81,13 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-2 = Weather Icons:size=10;1 - modules-left = i3 - modules-center = mpd pulseaudio - modules-right = dunst unread_mail cpu battery temperature date + modules-left = i3 xwindow + modules-center = + modules-right = pulseaudio wired-network wireless-network xbacklight nordvpn dunst 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] - 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 = Hack 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 = filesystem nordvpn chromecast screenshot weather emacs caffeine redshift - - # tray-position = right - # tray-padding = 2 - #tray-transparent = true - #tray-background = #0063ff - - #cursor-click = pointer - #cursor-scroll = ns-resize + tray-padding = 0 + tray-background = ${colors.background} #+END_SRC * Show Windows Title @@ -142,38 +97,6 @@ label = %title:0:30:...% #+END_SRC -* Current Layout 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 = %{Fcolors.blue}%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] @@ -288,21 +211,6 @@ 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] @@ -310,8 +218,8 @@ interval = 1 # Open google calendar on left right - date = %{A1:$BROWSER https\://calendar.google.com/ &:} %d-%m%{A} - date-alt = "%{A1:$BROWSER https\://calendar.google.com/ &:} %d-%m-%Y%{A}" + date = %{A1:termite -e "ikhal" &:} %d-%m%{A} + date-alt = "%{A1:termite -e \"ikhal\" &:} %d-%m-%Y%{A}" time =  %H:%M time-alt =  %H:%M:%S @@ -430,7 +338,7 @@ label-font = 2 format-underline = ${colors.background} - click-left = termite -e "tmuxinator start neomutt" & + click-left = termite -e "tmux -L neomutt attach" & format =