2 #+property: header-args :comments link :mkdirp yes :results silent
6 This org file contains the configuration files of pretty much every
7 program I use. The files are tangled (i.e. exported, or derived) from
8 this file using =org-babel=.
10 Note: This file is best viewed inside Emacs with org mode.
14 This section contains the configuration files (dotfiles) of various
17 ** [[https://github.com/afewmail/afew][afew]]
19 :header-args+: :tangle ~/.config/afew/config
23 an initial tagging script for notmuch mail
27 # This is the default filter chain
32 [ArchiveSentMailsFilter]
37 #query = 'folder:amin/lists/.haskell-cafe'
38 #tags = +lists;+lists/haskell-cafe
39 #message = lists/haskell-cafe
42 #query = 'folder:amin/lists/.haskell-weekly'
43 #tags = +lists;+lists/haskell-weekly
44 #message = lists/haskell-weekly
47 #query = 'folder:amin/lists/.hackernewsletter'
48 #tags = +lists;+lists/hackernewsletter
49 #message = lists/hackernewsletter
53 #folder_blacklist = Inbox
54 #maildir_separator = /.
55 #folder_transforms = Drafts:draft Junk:spam Trash:deleted Sent:sent Archive:archive lists/haskell-cafe:lists/haskell-cafe
62 :header-args+: :tangle ~/.config/bspwm/bspwmrc :shebang "#!/bin/sh"
70 sleep 0.5 && pasystray --notify=all &
72 bspc monitor -d I II III IV V VI VII VIII IX X
73 #bspc monitor eDP-1 -d I II III IV V
74 #bspc monitor HDMI-1 -d VI VII VIII IX X
76 #bspc config border_width 2
77 #bspc config window_gap 8
78 bspc config window_gap 0
80 bspc config bottom_padding 26
82 bspc config split_ratio 0.52
83 bspc config borderless_monocle true
84 bspc config gapless_monocle true
85 bspc config click_to_focus button1
86 bspc config directional_focus_tightness low
88 bspc rule -a Firefox desktop='^1' follow=on
89 bspc rule -a Nightly desktop='^1' follow=on
90 bspc rule -a Emacs desktop='^2' state=tiled follow=on
91 #bspc rule -a Chromium desktop='^4' follow=on
92 bspc rule -a URxvt state=floating
93 bspc rule -a URxvt:tiled state=tiled
94 bspc rule -a Connman-gtk state=floating
95 bspc rule -a Xfce4-panel state=floating
96 bspc rule -a TelegramDesktop state=floating
97 bspc rule -a Ec state=floating
98 bspc rule -a Pavucontrol state=floating
99 bspc rule -a Eog state=floating
100 bspc rule -a Seahorse state=floating
101 bspc rule -a mpv state=floating
102 bspc rule -a Evince state=floating
103 bspc rule -a Meld state=floating
104 bspc rule -a Autokey-gtk state=floating
105 bspc rule -a Mousepad state=floating
106 bspc rule -a Wrapper-1.0 state=floating
107 bspc rule -a File-roller state=floating
108 bspc rule -a Gnome-disks state=floating
109 bspc rule -a Termite state=floating
110 bspc rule -a Termite:tiled state=tiled
111 bspc rule -a Thunderbird:Calendar state=floating
112 bspc rule -a Audacity state=floating
113 bspc rule -a Proof state=floating # pvs x-show-proof
114 bspc rule -a Nm-connection-editor state=floating
115 bspc rule -a Wire state=floating
116 bspc rule -a discord state=floating
117 bspc rule -a X2goclient state=floating
118 bspc rule -a SimpleScreenRecorder state=floating
119 bspc rule -a Gimp state=floating
120 bspc rule -a Wrapper-2.0 state=floating
121 bspc rule -a Zathura state=tiled
126 :header-args+: :tangle ~/.config/sxhkd/sxhkdrc
131 # wm independent hotkeys
135 super + {_,shift} + Return
136 urxvt{_, -name tiled}
138 #super + {_,shift} + Return
139 # termite{_, --name=tiled}
143 rofi -show run -display-run '> ' -display-window ' 🗔 '
146 xfce4-popup-whiskermenu
150 rofi -show window -display-run '> ' -display-window ' 🗔 '
162 # chromium -incognito
168 # make sxhkd reload its configuration files:
173 XF86Audio{Raise,Lower}Volume
174 pamixer --allow-boost --{in,de}crease 5
178 pamixer --toggle-mute
181 XF86Audio{Play,Prev,Next}
182 mpc {toggle,prev,next}
186 light-locker-command -l
188 # Toggle keyboard layout
192 # Toggle Xfce presentation mode
194 toggle-presentation-mode
197 XF86MonBrightness{Up,Down}
203 # keyboard brightness
204 #XF86KbdBrightness{Up,Down}
211 # quit bspwm normally
219 # alternate between the tiled and monocle layout
223 # send the newest marked node to the newest preselected node
225 bspc node newest.marked.local -n newest.!automatic.local
227 # swap the current node and the biggest node
235 # set the window state
236 super + {t,shift + t,s,f}
237 bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
240 super + ctrl + {m,x,y,z}
241 bspc node -g {marked,locked,sticky,private}
247 # focus the node in the given direction
248 super + {_,shift + }{h,j,k,l}
249 bspc node -{f,s} {west,south,north,east}
251 # focus the node for the given path jump
252 super + {p,b,comma,period}
253 bspc node -f @{parent,brother,first,second}
255 # focus the next/previous node in the current desktop
256 super + {_,shift + }c
257 bspc node -f {next,prev}.local
259 # focus the next/previous desktop in the current monitor
260 super + bracket{left,right}
261 bspc desktop -f {prev,next}.local
263 # send to next/prev desktop
264 super + shift + bracket{left,right}
265 bspc node -d {prev,next} --follow
267 # focus the last node/desktop
269 bspc {node,desktop} -f last
271 # focus the older or newer node in the focus history
274 bspc node {older,newer} -f; \
277 # focus or send to the given desktop
278 super + {_,shift + }{1-9,0}
279 bspc {desktop -f,node -d} '^{1-9,10}'
285 # preselect the direction
286 super + ctrl + {h,j,k,l}
287 bspc node -p {west,south,north,east}
289 # preselect the ratio
293 # cancel the preselection for the focused node
297 # cancel the preselection for the focused desktop
298 super + ctrl + shift + space
299 bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
305 # expand a window by moving one of its side outward
306 super + alt + {h,j,k,l}
307 bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
309 # contract a window by moving one of its side inward
310 super + alt + shift + {h,j,k,l}
311 bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
313 # move a floating window
314 super + {Left,Down,Up,Right}
315 bspc node -v {-20 0,0 20,0 -20,20 0}
317 #alt + bracket{left,right}
318 # xdotool key --clearmodifiers ctrl+Page_{Up,Down}
323 :header-args+: :tangle ~/.config/compton.conf
328 shadow = false; # Enabled client-side shadows on windows.
329 no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
330 no-dnd-shadow = true; # Don't draw shadows on DND windows.
331 clear-shadow = true; # Zero the part of the shadow's mask behind the
332 # window. Fix some weirdness with ARGB windows.
333 shadow-radius = 5; # The blur radius for shadows. (default 12)
334 shadow-offset-x = -5; # The left offset for shadows. (default -15)
335 shadow-offset-y = -5; # The top offset for shadows. (default -15)
336 # shadow-opacity = 0.7; # The translucency for shadows. (default .75)
337 # shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
338 # shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
339 # shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
340 shadow-exclude = [ "n:e:Notification", "class_g = 'Chromium'", "class_g = 'Dmenu'", "class_g = 'Firefox' && argb" ]; # Exclude conditions for shadows.
341 # shadow-exclude = "n:e:Notification";
342 #shadow-exclude = [ "_GTK_FRAME_EXTENTS@:c" ] # Fix dual shadow on some gtk3 powered applications
343 shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
344 # (see also: --detect-rounded-corners)
347 menu-opacity = 1.0; # The opacity for menus. (default 1.0)
348 #inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0)
349 # active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
350 frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0)
351 # inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
352 # value of _NET_WM_OPACITY. Bad choice.
353 alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
354 # it may result in less X resource usage,
355 # Yet fading may look bad.
356 #inactive-dim = 0.5; # Dim inactive windows. (0.0 - 1.0)
357 #inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
358 # blur-background = true; # Blur background of transparent windows.
359 # Bad performance with X Render backend.
360 # GLX backend is preferred.
361 # blur-background-frame = true; # Blur background of opaque windows with transparent
363 blur-background-fixed = true; # Do not let blur radius adjust based on window opacity.
364 blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
365 # Exclude conditions for background blur.
368 fading = false; # Fade windows during opacity changes.
369 fade-delta = 3; # The time between steps in a fade in milliseconds. (default 10).
370 fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
371 fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
372 # no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
373 fade-exclude = [ ]; # Exclude conditions for fading.
376 backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
377 # much faster but depends on a sane driver.
378 mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
379 mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
380 use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
381 # instead of using FocusIn/Out events. Usually more reliable but
382 # depends on a EWMH-compliant WM.
383 detect-rounded-corners = false; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on.
384 detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
385 # managers not passing _NET_WM_OPACITY of client windows to frame
387 refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
388 vsync = "drm"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
389 # See man page for more details.
390 dbe = false; # Enable DBE painting mode. Rarely needed.
391 paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
392 sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
393 # Incompatible with certain VSync methods.
394 unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
395 # detected, to maximize performance for full-screen windows.
396 focus-exclude = [ ]; # A list of conditions of windows that should always be considered
398 detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
399 # the same group focused at the same time.
400 detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
401 invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
403 # GLX backend # GLX backend fine-tune options. See man page for more info.
404 glx-no-stencil = true; # Recommended.
405 glx-copy-from-front = false; # Useful with --glx-swap-method,
406 # glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
407 # glx-no-rebind-pixmap = true; # Recommended if it works.
408 glx-no-rebind-pixmap = true; # Recommended if it works.
409 #glx-swap-method = "4"; # See man page.
410 glx-swap-method = "4"; # See man page.
412 # Window type settings
415 tooltip = { fade = true; shadow = false; opacity = 1; focus = true; };
416 menu = { shadow = false; };
417 dropdown_menu = { shadow = false; };
418 popup_menu = { shadow = false; };
419 utility = { shadow = false; };
420 # fade: Fade the particular type of windows.
421 # shadow: Give those windows shadow
422 # opacity: Default opacity for the type of windows.
423 # focus: Whether to always consider windows of this type focused.
429 :header-args+: :tangle ~/.config/dunst/dunstrc
434 #font = Ubuntu Mono 10.5
435 font = Inconsolata 11
437 # Path to default icons.
438 icon_folders = /usr/share/icons/Moka/16x16/status/:/usr/share/icons/Moka/16x16/devices/:/usr/share/icons/Faba-Mono/16x16/status/:/usr/share/icons/Faba-Mono/16x16/devices/:/usr/share/icons/Moka/16x16/actions/:/usr/share/icons/Moka/16x16/categories/:/usr/share/icons/Moka/16x16/mimetypes/:/usr/share/icons/Moka/16x16/apps/:/usr/share/icons/Moka/16x16/places/:/usr/share/icons/Paper/16x16/status/
443 # <s>strikethrough<s/>
446 # The format of the message. Possible variables are:
450 # %i iconname (including its path)
451 # %I iconname (without its path)
452 # %p progress value if set ([ 0%] to [100%]) or nothing
454 format = "<b>%s</b>\n%b"
455 # Sort messages by urgency
457 # Show how many messages are currently hidden (because of geometry)
459 # Alignment of message text.
460 # Possible values are "left", "center" and "right"
462 # The frequency with wich text that is longer than the notification
463 # window allows bounces back and forth.
464 # This option conflicts with 'word_wrap'.
465 # Set to 0 to disable
467 # show age of message if message is older than show_age_threshold seconds.
468 # set to -1 to disable
469 show_age_threshold = -1
470 # split notifications into multiple lines if they don't fit into geometry
472 # ignore newlines '\n' in notifications
474 # The geometry of the message window.
475 # geometry [{width}]x{height}][+/-{x}+/-{y}]
476 # The height is measured in number of notifications everything else in pixels. If the width
477 # is omitted but the height is given ("-geometry x2"), the message window
478 # expands over the whole screen (dmenu-like). If width is 0,
479 # the window expands to the longest message displayed.
480 # A positive x is measured from the left, a negative from the
481 # right side of the screen. Y is measured from the top and down respectevly.
482 # The width can be negative. In this case the actual width is the
483 # screen width minus the width defined in within the geometry option.
484 #geometry = "410x12-12+12"
485 #geometry = "0x0-30-30"
486 geometry = "260x12-30-30"
487 # The transparency of the window. range: [0; 100]
488 # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
490 # Don't remove messages, if the user is idle (no mouse or keyboard input)
491 # for longer than idle_threshold seconds.
492 # Set to 0 to disable.
494 # Which monitor should the notifications be displayed on.
496 # Display notification on focused monitor. Possible modes are:
497 # mouse: follow mouse pointer
498 # keyboard: follow window with keyboard focus
499 # none: don't follow anything
501 # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
502 # This should be the case for almost all modern windowmanagers.
504 # If this option is set to mouse or keyboard, the monitor option will be
507 # should a notification popped up from history be sticky or
508 # timeout as if it would normally do.
510 # The height of a single line. If the height is smaller than the font height,
511 # it will get raised to the font height.
512 # This adds empty space above and under the text.
515 show_indicators = yes
517 # Draw a line of 'separatpr_height' pixel height between two notifications.
518 # Set to 0 to disable
520 # padding between text and separator
523 horizontal_padding = 8
524 # Define a color for the separator.
525 # possible values are:
526 # * auto: dunst tries to find a color fitting to the background
527 # * foreground: use the same color as the foreground
528 # * frame: use the same color as the frame.
529 # * anything else will be interpreted as a X color
530 separator_color = foreground
531 # print a notification on startup
532 # This is mainly for error detection, since dbus (re-)starts dunst
533 # automatically after a crash.
534 startup_notification = false
536 #dmenu = /usr/bin/dmenu -p dunst:
537 dmenu = /usr/bin/rofi -dmenu -p dunst:
538 # browser for opening urls in context menu
539 browser = /usr/bin/firefox -new-tab
544 # shortcuts are specified as [modifier+][modifier+]...key
545 # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3'
546 # and 'mod4' (windows-key)
547 # xev might be helpful to find names for keys
550 # close all notifications
551 close_all = ctrl+shift+space
552 # redisplay last message(s)
553 # On the US keyboard layout 'grave' is normally above TAB and left of '1'.
554 history = ctrl+shift+h
556 context = ctrl+shift+period
558 # IMPORTANT: colors have to be defined in quotation marks.
559 # Otherwise the '#' and following would be interpreted as a comment.
560 background = "#1d2a30"
561 foreground = "#71c2af"
564 background = "#1d2a30"
565 foreground = "#71c2af"
568 background = "#1d2a30"
569 foreground = "#ff9982"
572 # Every section that isn't one of the above is interpreted as a rules
573 # to override settings for certain messages.
574 # Messages can be matched by 'appname', 'summary', 'body' or 'icon'
575 # and you can override the 'timeout', 'urgency', 'foreground', 'background'
577 # Shell-like globbing will get expanded.
580 # you can specify a script that gets run when the rule matches by setting
581 # the 'script' option.
582 # The script will be called as follows:
583 # script appname summary body icon urgency
584 # where urgency can be "LOW", "NORMAL" or "CRITICAL".
586 # NOTE: if you don't want a notification to be displayed, set the format to ""
587 # NOTE: It might be helpful to run dunst -print in a terminal in order to find
588 # fitting options for rules.
591 # script = dunst_espeak.sh
593 # summary = "*script*"
594 # script = dunst_test.sh
596 ## This notification will not be displayed
601 # summary = "*signed on*"
606 # summary = *signed off*
616 # summary = *twitter.com*
620 summary = *Brightness*
626 :header-args+: :tangle ~/.config/fontconfig/fonts.conf
630 <?xml version="1.0"?>
631 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
633 <match target="font">
634 <edit mode="assign" name="rgba">
638 <match target="font">
639 <edit mode="assign" name="hinting">
643 <match target="font">
644 <edit mode="assign" name="hintstyle">
645 <const>hintslight</const>
648 <match target="font">
649 <edit mode="assign" name="antialias">
653 <match target="font">
654 <edit mode="assign" name="lcdfilter">
655 <const>lcddefault</const>
660 <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) -->
661 <alias binding="same">
662 <family>Helvetica</family>
664 <family>Liberation Sans</family>
674 :header-args+: :tangle ~/.gitconfig
681 email = amin@aminb.org
682 # signingkey = 4E05246AB0BF7FFB
696 autocrlf = input # CRLF -> LF on commit
697 editor = emacsclient -t
698 excludesfile = ~/.gitignore_global
711 git = !exec git # handle nested git calls, e.g. git git status
712 aliases = config --get-regexp '^alias\\.'
736 remote = magenta bold
745 # showUntrackedFiles = all
758 :header-args+: :tangle ~/.gitignore_global
773 :header-args+: :tangle ~/.latexmkrc
777 $pdf_previewer = "start zathura %O %S";
778 $clean_ext = "aux out";
780 # $pdf_update_method = 4;
781 # $pdf_update_command = "zathura %O %S";
783 # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
784 # by Ctrl+click in the PDF.
785 # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
787 # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
794 :header-args+: :tangle ~/.getmail/getmailrc
799 type = SimplePOP3SSLRetriever
800 server = fencepost.gnu.org
802 password_command = ("gpg2", "--no-tty", "-q", "-d", "~/.passwd/gnu.gpg")
808 path = ~/mail/gnu/Inbox/
816 :header-args+: :tangle ~/.config/systemd/user/getmail.service
819 #+begin_src conf :tangle no
821 Description=getmail service
825 ExecStart=/usr/bin/getmail
826 StandardOutput=syslog
832 :header-args+: :tangle ~/.config/systemd/user/getmail.timer
835 #+begin_src conf :tangle no
837 Description=getmail timer
845 WantedBy=timers.target
850 :header-args+: :tangle ~/.gnupg/gpg-agent.conf
854 default-cache-ttl 43200
857 default-cache-ttl-ssh 10800
858 max-cache-ttl-ssh 10800
860 # pinentry-program /usr/bin/pinentry-qt
867 :header-args+: :tangle ~/.gtkrc-2.0
871 gtk-theme-name="Greybird"
872 gtk-icon-theme-name="Paper"
873 gtk-font-name="Ubuntu 10"
875 # gtk-key-theme-name = "Emacs"
880 :header-args+: :tangle ~/.config/gtk-3.0/settings.ini
883 #+begin_src conf :tangle no
885 gtk-icon-theme-name = Paper
886 # gtk-theme-name = Adwaita
888 gtk-theme-name = Greybird
889 # gtk-theme-name = Arc-Darker
890 # gtk-theme-name = Numix-ArchBlue
892 gtk-font-name = Ubuntu 10
893 # gtk-key-theme-name = Emacs
900 :header-args+: :tangle ~/.mbsyncrc
911 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin.gpg"
914 IMAPStore amin-remote
917 MaildirStore amin-local
919 Inbox ~/mail/amin/Inbox
930 IMAPAccount uwaterloo
931 Host connect.uwaterloo.ca
933 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
936 IMAPStore uwaterloo-remote
939 MaildirStore uwaterloo-local
940 Path ~/mail/uwaterloo/
941 Inbox ~/mail/uwaterloo/Inbox
945 Master :uwaterloo-remote:
946 Slave :uwaterloo-local:
954 :header-args+: :tangle ~/.config/systemd/user/mbsync.service
957 #+begin_src conf :tangle no
959 Description=mbsync service
963 ExecStart=/usr/bin/mbsync -Va
964 StandardOutput=syslog
970 :header-args+: :tangle ~/.config/systemd/user/mbsync.timer
973 #+begin_src conf :tangle no
975 Description=mbsync timer
983 WantedBy=timers.target
988 :header-args+: :tangle ~/.config/mpd/mpd.conf
992 # An example configuration file for MPD.
993 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
996 # Files and directories #######################################################
998 # This setting controls the top directory which MPD will search to discover the
999 # available audio files and add them to the daemon's online database. This
1000 # setting defaults to the XDG directory, otherwise the music directory will be
1001 # be disabled and audio files will only be accepted over ipc socket (using
1002 # file:// protocol) or streaming files over an accepted protocol.
1004 music_directory "~/usr/music"
1006 # This setting sets the MPD internal playlist directory. The purpose of this
1007 # directory is storage for playlists created by MPD. The server will use
1008 # playlist files not created by the server but only if they are in the MPD
1009 # format. This setting defaults to playlist saving being disabled.
1011 playlist_directory "~/.mpd/playlists"
1013 # This setting sets the location of the MPD database. This file is used to
1014 # load the database at server start up and store the database while the
1015 # server is not up. This setting defaults to disabled which will allow
1016 # MPD to accept files over ipc socket (using file:// protocol) or streaming
1017 # files over an accepted protocol.
1019 db_file "~/.mpd/database"
1021 # These settings are the locations for the daemon log files for the daemon.
1022 # These logs are great for troubleshooting, depending on your log_level
1025 # The special value "syslog" makes MPD use the local syslog daemon. This
1026 # setting defaults to logging to syslog, otherwise logging is disabled.
1028 log_file "~/.mpd/log"
1030 # This setting sets the location of the file which stores the process ID
1031 # for use of mpd --kill and some init scripts. This setting is disabled by
1032 # default and the pid file will not be stored.
1034 pid_file "~/.mpd/pid"
1036 # This setting sets the location of the file which contains information about
1037 # most variables to get MPD back into the same general shape it was in before
1038 # it was brought down. This setting is disabled by default and the server
1039 # state will be reset on server start up.
1041 state_file "~/.mpd/state"
1043 # The location of the sticker database. This is a database which
1044 # manages dynamic information attached to songs.
1046 sticker_file "~/.mpd/sticker.sql"
1048 ###############################################################################
1051 # General music daemon options ################################################
1053 # This setting specifies the user that MPD will run as. MPD should never run as
1054 # root and you may use this setting to make MPD change its user ID after
1055 # initialization. This setting is disabled by default and MPD is run as the
1060 # This setting specifies the group that MPD will run as. If not specified
1061 # primary group of user specified with "user" setting will be used (if set).
1062 # This is useful if MPD needs to be a member of group such as "audio" to
1063 # have permission to use sound card.
1067 # This setting sets the address for the daemon to listen on. Careful attention
1068 # should be paid if this is assigned to anything other then the default, any.
1069 # This setting can deny access to control of the daemon. Not effective if
1070 # systemd socket activiation is in use.
1073 #bind_to_address "any"
1075 # And for Unix Socket
1076 #bind_to_address "~/.mpd/socket"
1078 # This setting is the TCP port that is desired for the daemon to get assigned
1083 # This setting controls the type of information which is logged. Available
1084 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
1085 # argument is recommended for troubleshooting, though can quickly stretch
1086 # available resources on limited hardware storage.
1088 #log_level "default"
1090 # If you have a problem with your MP3s ending abruptly it is recommended that
1091 # you set this argument to "no" to attempt to fix the problem. If this solves
1092 # the problem, it is highly recommended to fix the MP3 files with vbrfix
1093 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
1094 # point gapless MP3 playback can be enabled.
1096 #gapless_mp3_playback "yes"
1098 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
1099 # of starting playback after startup.
1101 #restore_paused "no"
1103 # This setting enables MPD to create playlists in a format usable by other
1106 #save_absolute_paths_in_playlists "no"
1108 # This setting defines a list of tag types that will be extracted during the
1109 # audio file discovery process. The complete list of possible values can be
1110 # found in the user manual.
1111 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
1113 # This setting enables automatic update of MPD's database when files in
1114 # music_directory are changed.
1118 # Limit the depth of the directories being watched, 0 means only watch
1119 # the music directory itself. There is no limit by default.
1121 #auto_update_depth "3"
1123 ###############################################################################
1126 # Symbolic link behavior ######################################################
1128 # If this setting is set to "yes", MPD will discover audio files by following
1129 # symbolic links outside of the configured music_directory.
1131 #follow_outside_symlinks "yes"
1133 # If this setting is set to "yes", MPD will discover audio files by following
1134 # symbolic links inside of the configured music_directory.
1136 #follow_inside_symlinks "yes"
1138 ###############################################################################
1141 # Zeroconf / Avahi Service Discovery ##########################################
1143 # If this setting is set to "yes", service information will be published with
1146 #zeroconf_enabled "yes"
1148 # The argument to this setting will be the Zeroconf / Avahi unique name for
1149 # this MPD server on the network.
1151 #zeroconf_name "Music Player"
1153 ###############################################################################
1156 # Permissions #################################################################
1158 # If this setting is set, MPD will require password authorization. The password
1159 # setting can be specified multiple times for different password profiles.
1161 #password "password@read,add,control,admin"
1163 # This setting specifies the permissions a user has who has not yet logged in.
1165 #default_permissions "read,add,control,admin"
1167 ###############################################################################
1170 # Database #######################################################################
1175 # host "other.mpd.host"
1179 # Input #######################################################################
1184 # proxy "proxy.isp.com:8080"
1186 # proxy_password "password"
1190 ###############################################################################
1192 # Audio Output ################################################################
1203 path "/tmp/mpd.fifo"
1207 # MPD supports various audio output types, as well as playing through multiple
1208 # audio outputs at the same time, through multiple audio_output settings
1209 # blocks. Setting this block is optional, though the server will only attempt
1210 # autodetection for one sound card.
1212 # An example of an ALSA output:
1216 # name "My ALSA Device"
1217 ## device "hw:0,0" # optional
1218 ## mixer_type "hardware" # optional
1219 ## mixer_device "default" # optional
1220 ## mixer_control "PCM" # optional
1221 ## mixer_index "0" # optional
1224 # An example of an OSS output:
1228 # name "My OSS Device"
1229 ## device "/dev/dsp" # optional
1230 ## mixer_type "hardware" # optional
1231 ## mixer_device "/dev/mixer" # optional
1232 ## mixer_control "PCM" # optional
1235 # An example of a shout output (for streaming to Icecast):
1239 # encoder "vorbis" # optional
1240 # name "My Shout Stream"
1247 # format "44100:16:1"
1248 ## protocol "icecast2" # optional
1249 ## user "source" # optional
1250 ## description "My Stream Description" # optional
1251 ## url "http://example.com" # optional
1252 ## genre "jazz" # optional
1253 ## public "no" # optional
1254 ## timeout "2" # optional
1255 ## mixer_type "software" # optional
1258 # An example of a recorder output:
1262 # name "My recorder"
1263 # encoder "vorbis" # optional, vorbis or lame
1264 # path "/var/lib/mpd/recorder/mpd.ogg"
1265 ## quality "5.0" # do not define if bitrate is defined
1266 # bitrate "128" # do not define if quality is defined
1267 # format "44100:16:1"
1270 # An example of a httpd output (built-in HTTP streaming server):
1274 # name "My HTTP Stream"
1275 # encoder "vorbis" # optional, vorbis or lame
1277 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
1278 ## quality "5.0" # do not define if bitrate is defined
1279 # bitrate "128" # do not define if quality is defined
1280 # format "44100:16:1"
1281 # max_clients "0" # optional 0=no limit
1284 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
1288 # name "My Pulse Output"
1289 ## server "remote_server" # optional
1290 ## sink "remote_server_sink" # optional
1293 # An example of a winmm output (Windows multimedia API).
1297 # name "My WinMM output"
1298 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1300 ## device "0" # optional
1301 ## mixer_type "hardware" # optional
1304 # An example of an openal output.
1308 # name "My OpenAL output"
1309 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1312 # An example of an sndio output.
1316 # name "sndio output"
1317 # mixer_type "software"
1320 # An example of an OS X output:
1324 # name "My OS X Device"
1325 ## device "Built-in Output" # optional
1326 ## channel_map "-1,-1,0,1" # optional
1329 ## Example "pipe" output:
1334 # command "aplay -f cd 2>/dev/null"
1335 ## Or if you're want to use AudioCompress
1336 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
1337 ## Or to send raw PCM stream through PCM:
1338 # command "nc example.org 8765"
1339 # format "44100:16:2"
1342 ## An example of a null output (for no audio output):
1346 # name "My Null Output"
1347 # mixer_type "none" # optional
1350 ###############################################################################
1353 # Normalization automatic volume adjustments ##################################
1355 # This setting specifies the type of ReplayGain to use. This setting can have
1356 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
1357 # chooses between "track" and "album" depending on the current state of
1358 # random playback. If random playback is enabled then "track" mode is used.
1359 # See <http://www.replaygain.org> for more details about ReplayGain.
1360 # This setting is off by default.
1364 # This setting sets the pre-amp used for files that have ReplayGain tags. By
1365 # default this setting is disabled.
1367 #replaygain_preamp "0"
1369 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1370 # By default this setting is disabled.
1372 #replaygain_missing_preamp "0"
1374 # This setting enables or disables ReplayGain limiting.
1375 # MPD calculates actual amplification based on the ReplayGain tags
1376 # and replaygain_preamp / replaygain_missing_preamp setting.
1377 # If replaygain_limit is enabled MPD will never amplify audio signal
1378 # above its original level. If replaygain_limit is disabled such amplification
1379 # might occur. By default this setting is enabled.
1381 #replaygain_limit "yes"
1383 # This setting enables on-the-fly normalization volume adjustment. This will
1384 # result in the volume of all playing audio to be adjusted so the output has
1385 # equal "loudness". This setting is disabled by default.
1387 #volume_normalization "no"
1389 ###############################################################################
1391 # Character Encoding ##########################################################
1393 # If file or directory names do not display correctly for your locale then you
1394 # may need to modify this setting.
1396 #filesystem_charset "UTF-8"
1398 ###############################################################################
1403 :header-args+: :tangle ~/.msmtprc
1407 # Set default values for all following accounts.
1412 #tls_trust_file /etc/ssl/certs/ca-certificates.crt
1413 logfile ~/.msmtp.log
1418 tls_fingerprint BB:98:B3:02:83:B0:E0:C3:49:3E:C2:B2:A8:60:62:78:03:B3:5D:B3:BD:B8:0A:39:BB:E4:B0:66:D1:CF:D1:6B
1422 passwordeval gpg2 --no-tty -q -d ~/.passwd/amin.gpg
1426 host fencepost.gnu.org
1427 tls_fingerprint 94:0E:37:EB:EA:44:5A:4B:B6:6F:16:3D:6C:7E:7E:44:2D:93:61:C1:FE:82:A8:29:5E:3C:12:4E:2D:BE:0E:2C
1431 passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
1435 host connect.uwaterloo.ca
1437 from abandali@uwaterloo.ca
1439 passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg
1440 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1442 # uwaterloo (friendly address)
1443 account uwaterloo-friendly : uwaterloo
1444 from amin.bandali@uwaterloo.ca
1446 # Set a default account
1447 account default : aminb
1454 :header-args+: :tangle ~/.ncmpcpp/config
1457 #+begin_src conf :tangle no
1458 ##############################################################
1459 ## This is the example configuration file. Copy it to ##
1460 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1461 ## and set up your preferences. ##
1462 ##############################################################
1464 ##### directories ######
1466 ## Directory for storing ncmpcpp related files.
1467 ## Changing it is useful if you want to store
1468 ## everything somewhere else and provide command
1469 ## line setting for alternative location to config
1470 ## file which defines that while launching ncmpcpp.
1473 ncmpcpp_directory = ~/.ncmpcpp
1476 ## Directory for storing downloaded lyrics. It
1477 ## defaults to ~/.lyrics since other MPD clients
1478 ## (eg. ncmpc) also use that location.
1481 #lyrics_directory = ~/.lyrics
1483 ##### connection settings #####
1485 #mpd_host = localhost
1489 #mpd_connection_timeout = 5
1491 ## Needed for tag editor and file operations to work.
1493 mpd_music_dir = ~/usr/music
1495 #mpd_crossfade_time = 5
1497 ##### music visualizer #####
1499 ## Note: In order to make music visualizer work you'll
1500 ## need to use mpd fifo output, whose format parameter
1501 ## has to be set to 44100:16:1 for mono visualization
1502 ## or 44100:16:2 for stereo visualization. Example
1503 ## configuration (it has to be put into mpd.conf):
1507 ## name "Visualizer feed"
1508 ## path "/tmp/mpd.fifo"
1509 ## format "44100:16:2"
1513 visualizer_fifo_path = /tmp/mpd.fifo
1516 ## Note: Below parameter is needed for ncmpcpp
1517 ## to determine which output provides data for
1518 ## visualizer and thus allow syncing between
1519 ## visualization and sound as currently there
1520 ## are some problems with it.
1523 visualizer_output_name = my fifo
1526 ## If you set format to 44100:16:2, make it 'yes'.
1528 visualizer_in_stereo = yes
1531 ## Multiply received samples by given value. Very
1532 ## useful for proper visualization of quiet music.
1534 #visualizer_sample_multiplier = 1
1537 ## Note: Below parameter defines how often ncmpcpp
1538 ## has to "synchronize" visualizer and audio outputs.
1539 ## 30 seconds is optimal value, but if you experience
1540 ## synchronization problems, set it to lower value.
1541 ## Keep in mind that sane values start with >=10.
1544 visualizer_sync_interval = 30
1547 ## Note: To enable spectrum frequency visualization
1548 ## you need to compile ncmpcpp with fftw3 support.
1551 ## Available values: spectrum, wave, wave_filled, ellipse.
1553 visualizer_type = spectrum
1555 #visualizer_look = ●▮
1556 visualizer_look = "●•"
1558 #visualizer_color = blue, cyan, green, yellow, magenta, red
1560 ## Alternative subset of 256 colors for terminals that support it.
1562 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1564 ##### system encoding #####
1566 ## ncmpcpp should detect your charset encoding
1567 ## but if it failed to do so, you can specify
1568 ## charset encoding you are using here.
1570 ## Note: You can see whether your ncmpcpp build
1571 ## supports charset detection by checking output
1572 ## of `ncmpcpp --version`.
1574 ## Note: Since MPD uses UTF-8 by default, setting
1575 ## this option makes sense only if your encoding
1579 #system_encoding = ""
1583 ## Time of inactivity (in seconds) after playlist
1584 ## highlighting will be disabled (0 = always on).
1586 #playlist_disable_highlight_delay = 5
1588 ## Defines how long messages are supposed to be visible.
1590 #message_delay_time = 5
1592 ##### song format #####
1594 ## For a song format you can use:
1600 ## %A - album artist
1604 ## %n - track number (01/12 -> 01)
1605 ## %N - full track info (01/12 -> 01/12)
1612 ## $R - begin right alignment
1614 ## If you want to make sure that a part of the format is displayed
1615 ## only when certain tags are present, you can archieve it by
1616 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1617 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1618 ## It is also possible to define a list of alternatives by providing
1619 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
1620 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1623 ## Note: If you want to set limit on maximal length of a tag, just
1624 ## put the appropriate number between % and character that defines
1625 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1627 ## In addition, formats support markers used for text attributes.
1628 ## They are followed by character '$'. After that you can put:
1630 ## - 0 - default window color (discards all other colors)
1639 ## - 9 - end of current color
1641 ## - u - underline text
1642 ## - r - reverse colors
1643 ## - a - use alternative character set
1645 ## If you don't want to use a non-color attribute anymore, just put it
1646 ## again, but this time insert character '/' between '$' and attribute
1647 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1648 ## or filename with reversed colors.
1650 ## If you want to use 256 colors and/or background colors in formats
1651 ## (the naming scheme is described below in section about color
1652 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
1653 ## the artist tag to one of the non-standard colors and make it have
1654 ## yellow background, you need to write $(197_yellow)%a$(end). Note
1655 ## that for standard colors this is interchangable with attributes
1658 ## Note: colors can be nested.
1661 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1663 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1665 #song_library_format = {%n - }{%t}|{%f}
1668 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1670 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1672 #now_playing_prefix = $b
1674 #now_playing_suffix = $/b
1676 #browser_playlist_prefix = "$2playlist$9 "
1678 #selected_item_prefix = $6
1680 #selected_item_suffix = $9
1682 #modified_item_prefix = $3> $9
1685 ## Note: attributes are not supported for the following variables.
1687 #song_window_title_format = {%a - }{%t}|{%f}
1689 ## Note: Below variables are used for sorting songs in browser.
1690 ## The sort mode determines how songs are sorted, and can be used
1691 ## in combination with a sort format to specify a custom sorting format.
1692 ## Available values for browser_sort_mode are "name", "mtime", "format"
1696 #browser_sort_mode = name
1698 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1700 ##### columns settings #####
1702 ## syntax of song columns list format is "column column etc."
1704 ## - syntax for each column is:
1706 ## (width of the column)[color of the column]{displayed tag}
1708 ## Note: Width is by default in %, if you want a column to
1709 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1710 ## will be the column that take 10% of screen (so the real width
1711 ## will depend on actual screen size), whereas (10f)[white]{a}
1712 ## will take 10 terminal cells, no matter how wide the screen is.
1714 ## - color is optional (if you want the default one,
1715 ## leave the field empty).
1717 ## Note: You can give a column additional attributes by putting appropriate
1718 ## character after displayed tag character. Available attributes are:
1720 ## - r - column will be right aligned
1721 ## - E - if tag is empty, empty tag marker won't be displayed
1725 ## - give a column custom name by putting it after attributes,
1726 ## separated with character ':', e.g. {lr:Length} gives you
1727 ## right aligned column of lengths named "Length".
1729 ## - define sequence of tags, that have to be displayed in case
1730 ## predecessor is empty in a way similar to the one in classic
1731 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1732 ## creates column named "Owner" that tries to display artist
1733 ## tag and then composer and performer if previous ones are
1737 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1739 ##### various settings #####
1742 ## Note: Custom command that will be executed each
1743 ## time song changes. Useful for notifications etc.
1745 #execute_on_song_change = ""
1747 #playlist_show_mpd_host = no
1749 #playlist_show_remaining_time = no
1751 #playlist_shorten_total_times = no
1753 #playlist_separate_albums = no
1756 ## Note: Possible display modes: classic, columns.
1758 #playlist_display_mode = columns
1760 #browser_display_mode = classic
1762 #search_engine_display_mode = classic
1764 #playlist_editor_display_mode = classic
1766 #discard_colors_if_item_is_selected = yes
1768 #incremental_seeking = yes
1772 #volume_change_step = 2
1774 #autocenter_mode = no
1776 #centered_cursor = no
1779 ## Note: You can specify third character which will
1780 ## be used to build 'empty' part of progressbar.
1782 #progressbar_look = =>
1783 progressbar_look = "─╼╶"
1784 #progressbar_look = "─⊙╶"
1786 #progressbar_boldness = yes
1788 ## Available values: database, playlist.
1790 #default_place_to_search_in = database
1792 ## Available values: classic, alternative.
1794 #user_interface = classic
1796 #data_fetching_delay = yes
1798 ## Available values: artist, album_artist, date, genre, composer, performer.
1800 #media_library_primary_tag = artist
1802 ## Available values: wrapped, normal.
1804 #default_find_mode = wrapped
1806 #default_tag_editor_pattern = %n - %t
1808 #header_visibility = yes
1810 #statusbar_visibility = yes
1812 #titles_visibility = yes
1814 #header_text_scrolling = yes
1816 #cyclic_scrolling = no
1820 #follow_now_playing_lyrics = no
1822 #fetch_lyrics_for_current_song_in_background = no
1824 #store_lyrics_in_song_dir = no
1826 #generate_win32_compatible_filenames = yes
1828 #allow_for_physical_item_deletion = no
1831 ## Note: If you set this variable, ncmpcpp will try to
1832 ## get info from last.fm in language you set and if it
1833 ## fails, it will fall back to english. Otherwise it will
1834 ## use english the first time.
1836 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1838 #lastfm_preferred_language = en
1840 #show_hidden_files_in_local_browser = no
1843 ## How shall screen switcher work?
1845 ## - "previous" - switch between the current and previous screen.
1846 ## - "screen1,...,screenN" - switch between given sequence of screens.
1848 ## Screens available for use: help, playlist, browser, search_engine,
1849 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1851 #screen_switcher_mode = playlist, browser
1854 ## Note: You can define startup screen
1855 ## by choosing screen from the list above.
1857 #startup_screen = playlist
1860 ## Note: You can define startup slave screen
1861 ## by choosing screen from the list above or
1862 ## an empty value for no slave screen.
1864 #startup_slave_screen = ""
1866 #startup_slave_screen_focus = no
1869 ## Default width of locked screen (in %).
1870 ## Acceptable values are from 20 to 80.
1873 #locked_screen_width_part = 50
1875 #ask_for_locked_screen_width_part = yes
1877 #jump_to_now_playing_song_at_start = yes
1879 #ask_before_clearing_playlists = yes
1881 #clock_display_seconds = no
1883 #display_volume_level = yes
1885 #display_bitrate = no
1887 #display_remaining_time = no
1889 ## Available values: none, basic, extended, perl.
1891 #regular_expressions = perl
1894 ## Note: If below is enabled, ncmpcpp will ignore leading
1895 ## "The" word while sorting items in browser, tags in
1896 ## media library, etc.
1898 #ignore_leading_the = no
1900 #block_search_constraints_change_if_items_found = yes
1902 #mouse_support = yes
1904 #mouse_list_scroll_whole_page = yes
1906 #empty_tag_marker = <empty>
1908 #tags_separator = " | "
1910 #tag_editor_extended_numeration = no
1912 #media_library_sort_by_mtime = no
1914 #enable_window_title = yes
1917 ## Note: You can choose default search mode for search
1918 ## engine. Available modes are:
1920 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1921 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1922 ## but if your mpd is on a remote machine, downloading big database
1923 ## to process it can take a while
1924 ## - 3 - match only exact values (this mode uses mpd function for searching
1925 ## in database and local one for searching in current playlist)
1928 #search_engine_default_search_mode = 1
1930 #external_editor = nano
1932 ## Note: set to yes if external editor is a console application.
1934 #use_console_editor = yes
1936 ##### colors definitions #####
1938 ## It is possible to set a background color by setting a color
1939 ## value "<foreground>_<background>", e.g. red_black will set
1940 ## foregound color to red and background color to black.
1942 ## In addition, for terminals that support 256 colors it
1943 ## is possible to set one of them by using a number in range
1944 ## [1, 256] instead of color name, e.g. numerical value
1945 ## corresponding to red_black is 2_1. To find out if the
1946 ## terminal supports 256 colors, run ncmpcpp and check out
1947 ## the bottom of the help screen for list of available colors
1948 ## and their numerical values.
1950 ## Note: due to technical limitations of ncurses, if 256 colors
1951 ## are used, it is possible to either use only the colors with
1952 ## default background color, or all pairs from 1_1 up to 254_127,
1953 ## depending on the ncurses version used.
1956 #colors_enabled = yes
1958 #empty_tag_color = cyan
1960 #header_window_color = default
1962 #volume_color = default
1964 #state_line_color = default
1966 #state_flags_color = default
1968 #main_window_color = yellow
1974 #main_window_highlight_color = yellow
1976 #progressbar_color = black
1978 #progressbar_elapsed_color = green
1980 #statusbar_color = default
1982 #alternative_ui_separator_color = black
1984 #active_column_color = red
1986 #window_border_color = green
1988 #active_window_border = red
1994 :header-args+: :tangle ~/.ncmpcpp/bindings
1997 #+begin_src conf :tangle no
2022 move_sort_order_down
2031 :header-args+: :tangle ~/.notmuch-config
2035 # .notmuch-config - Configuration file for the notmuch mail system
2037 # For more information about notmuch, see https://notmuchmail.org
2039 # Database configuration
2041 # The only value supported here is 'path' which should be the top-level
2042 # directory where your mail currently exists and to where mail will be
2043 # delivered in the future. Files should be individual email messages.
2044 # Notmuch will store its database within a sub-directory of the path
2045 # configured here named ".notmuch".
2048 path=/home/amin/mail
2050 # User configuration
2052 # Here is where you can let notmuch know how you would like to be
2053 # addressed. Valid settings are
2055 # name Your full name.
2056 # primary_email Your primary email address.
2057 # other_email A list (separated by ';') of other email addresses
2058 # at which you receive email.
2060 # Notmuch will use the various email addresses configured here when
2061 # formatting replies. It will avoid including your own addresses in the
2062 # recipient list of replies, and will set the From address based on the
2063 # address to which the original email was addressed.
2067 primary_email=amin@aminb.org
2068 other_email=amin.bandali@uwaterloo.ca;mbandali@uwaterloo.ca;aminb@gnu.org;
2070 # Configuration for "notmuch new"
2072 # The following options are supported here:
2074 # tags A list (separated by ';') of the tags that will be
2075 # added to all messages incorporated by "notmuch new".
2077 # ignore A list (separated by ';') of file and directory names
2078 # that will not be searched for messages by "notmuch new".
2080 # NOTE: *Every* file/directory that goes by one of those
2081 # names will be ignored, independent of its depth/location
2082 # in the mail store.
2087 ignore=.uidvalidity;.mbsyncstate
2089 # Search configuration
2091 # The following option is supported here:
2094 # A ;-separated list of tags that will be excluded from
2095 # search results by default. Using an excluded tag in a
2096 # query will override that exclusion.
2099 exclude_tags=deleted;spam;
2101 # Maildir compatibility configuration
2103 # The following option is supported here:
2105 # synchronize_flags Valid values are true and false.
2107 # If true, then the following maildir flags (in message filenames)
2108 # will be synchronized with the corresponding notmuch tags:
2116 # S unread (added when 'S' flag is not present)
2118 # The "notmuch new" command will notice flag changes in filenames
2119 # and update tags, while the "notmuch tag" and "notmuch restore"
2120 # commands will notice tag changes and update flags in filenames
2123 synchronize_flags=true
2125 # Cryptography related configuration
2127 # The following option is supported here:
2130 # binary name or full path to invoke gpg.
2138 :header-args+: :tangle ~/mail/.notmuch/hooks/post-new :shebang "#!/bin/sh"
2144 # apply tags to lists
2145 notmuch tag +lists +lists/deepspec -- folder:amin/lists/deepspec
2146 notmuch tag +lists +lists/haskell-cafe -- folder:amin/lists/haskell-cafe
2147 notmuch tag +lists +lists/haskell-weekly -- folder:amin/lists/haskell-weekly
2148 notmuch tag +lists +lists/hackernewsletter -- folder:amin/lists/hackernewsletter
2149 notmuch tag +lists +lists/notmuch -- folder:amin/lists/notmuch
2150 notmuch tag +lists +lists/info-gnu-emacs -- folder:amin/lists/info-gnu-emacs
2151 notmuch tag +lists +lists/help-gnu-emacs -- folder:amin/lists/help-gnu-emacs
2152 notmuch tag +lists +lists/emacs-devel -- folder:amin/lists/emacs-devel
2157 :header-args+: :tangle ~/.config/systemd/user/notmuch.service
2160 #+begin_src conf :tangle no
2162 Description=notmuch service
2166 ExecStart=/usr/bin/notmuch new
2167 StandardOutput=syslog
2168 StandardError=syslog
2173 :header-args+: :tangle ~/.config/systemd/user/notmuch.timer
2176 #+begin_src conf :tangle no
2178 Description=notmuch timer
2183 Unit=notmuch.service
2186 WantedBy=timers.target
2193 :header-args+: :tangle ~/.offlineimaprc
2196 #+begin_src conf :tangle no
2198 pythonfile = ~/.offlineimap.py
2199 accounts = Gmail, aminb
2203 localrepository = GmailL
2204 remoterepository = GmailR
2207 localrepository = aminbL
2208 remoterepository = aminbR
2212 localfolders = ~/Maildir/Gmail
2216 remotehost = imap.gmail.com
2217 remoteusereval = mailuser("gmail")
2218 remotepasseval = mailpasswd("gmail")
2219 sslcacertfile = /etc/ssl/certs/ca-certificates.crt
2221 folderfilter = lambda foldername: foldername not in '[Gmail]/All Mail'
2227 localfolders = ~/Maildir/aminb
2231 remotehost = mail.aminb.org
2232 remoteusereval = mailuser("aminb")
2233 remotepasseval = mailpasswd("aminb")
2234 sslcacertfile = /etc/ssl/certs/ca-certificates.crt
2236 folderfilter = lambda foldername: foldername not in 'dovecot.sieve'
2243 :header-args+: :tangle ~/.offlineimap.py
2246 #+begin_src python :tangle no
2250 def mailpasswd(acct):
2251 acct = os.path.basename(acct)
2252 path = "/home/amin/.passwd/%s.gpg" % acct
2253 args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
2255 return subprocess.check_output(args).strip()
2256 except subprocess.CalledProcessError:
2260 acct = os.path.basename(acct)
2261 path = "/home/amin/.passwd/%s" % acct
2262 args = ["cat", path]
2264 return subprocess.check_output(args).strip()
2265 except subprocess.CalledProcessError:
2268 def prime_gpg_agent():
2272 ret = (mailpasswd("prime") == "prime")
2274 from offlineimap.ui import getglobalui
2275 sys.stderr.write("Error reading in passwords. Terminating.\n")
2276 getglobalui().terminate()
2287 :header-args+: :tangle ~/.config/polybar/config
2290 #+begin_src conf :tangle no
2291 ;=====================================================
2293 ; To learn more about how to configure Polybar
2294 ; go to https://github.com/jaagr/polybar
2296 ; The README contains alot of information
2298 ;=====================================================
2301 ;background = ${xrdb:color0:#222}
2303 background-alt = #444
2304 ;foreground = ${xrdb:color7:#222}
2306 foreground-alt = #888
2312 ;monitor = ${env:MONITOR:HDMI-1}
2320 background = ${colors.background}
2321 foreground = ${colors.foreground}
2327 border-color = #00000000
2332 module-margin-left = 2
2333 module-margin-right = 2
2335 font-0 = Ubuntu:fontformat=truetype:antialias=true:pixelsize=9;1
2336 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
2337 font-2 = Wuncon Siji:pixelsize=10;1
2338 font-3 = FontAwesome:pixelsize=10;1
2340 modules-left = bspwm xwindow
2342 modules-right = volume filesystem mail xkeyboard memory cpu temperature date powermenu
2344 tray-position = right
2346 ;tray-transparent = true
2347 ;tray-background = #0063ff
2352 ;override-redirect = true
2354 scroll-up = bspwm-desknext
2355 scroll-down = bspwm-deskprev
2358 type = internal/xwindow
2359 label = %title:0:50:...%
2362 type = internal/xkeyboard
2363 blacklist-0 = num lock
2365 format-prefix = " "
2366 format-prefix-foreground = ${colors.foreground-alt}
2367 format-prefix-underline = ${colors.secondary}
2369 label-layout = %layout%
2370 label-layout-underline = ${colors.secondary}
2372 label-indicator-padding = 2
2373 label-indicator-margin = 1
2374 label-indicator-background = ${colors.secondary}
2375 label-indicator-underline = ${colors.secondary}
2383 label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
2384 label-unmounted = %mountpoint% not mounted
2385 label-unmounted-foreground = ${colors.foreground-alt}
2388 type = internal/bspwm
2390 label-focused = %index%
2391 label-focused-background = ${colors.background-alt}
2392 label-focused-underline= ${colors.primary}
2393 label-focused-padding = 2
2395 label-occupied = %index%
2396 label-occupied-padding = 2
2398 label-urgent = %index%!
2399 label-urgent-background = ${colors.alert}
2400 label-urgent-padding = 2
2402 label-empty = %index%
2403 label-empty-foreground = ${colors.foreground-alt}
2404 label-empty-padding = 2
2408 format = <label-state> <label-mode>
2410 wrapping-scroll = false
2412 ; Only show workspaces on the same output as the bar
2413 ;pin-workspaces = true
2415 label-mode-padding = 2
2416 label-mode-foreground = #000
2417 label-mode-background = ${colors.primary}
2419 ; focused = Active workspace on focused monitor
2420 label-focused = %index%
2421 label-focused-background = ${module/bspwm.label-focused-background}
2422 label-focused-underline = ${module/bspwm.label-focused-underline}
2423 label-focused-padding = ${module/bspwm.label-focused-padding}
2425 ; unfocused = Inactive workspace on any monitor
2426 label-unfocused = %index%
2427 label-unfocused-padding = ${module/bspwm.label-occupied-padding}
2429 ; visible = Active workspace on unfocused monitor
2430 label-visible = %index%
2431 label-visible-background = ${self.label-focused-background}
2432 label-visible-underline = ${self.label-focused-underline}
2433 label-visible-padding = ${self.label-focused-padding}
2435 ; urgent = Workspace with urgency hint set
2436 label-urgent = %index%
2437 label-urgent-background = ${module/bspwm.label-urgent-background}
2438 label-urgent-padding = ${module/bspwm.label-urgent-padding}
2442 format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
2450 label-song-maxlen = 25
2451 label-song-ellipsis = true
2454 type = internal/xbacklight
2456 format = <label> <bar>
2461 bar-indicator-foreground = #ff
2462 bar-indicator-font = 2
2465 bar-fill-foreground = #9f78e1
2468 bar-empty-foreground = ${colors.foreground-alt}
2470 [module/backlight-acpi]
2471 inherit = module/xbacklight
2472 type = internal/backlight
2473 ;card = intel_backlight
2474 card = mba6x_backlight
2479 format-prefix = " "
2480 format-prefix-foreground = ${colors.foreground-alt}
2481 format-underline = #f90000
2482 label = %percentage%%
2485 type = internal/memory
2487 format-prefix = " "
2488 format-prefix-foreground = ${colors.foreground-alt}
2489 format-underline = #4bffdc
2490 label = %percentage_used%%
2493 type = internal/network
2497 format-connected = <ramp-signal> <label-connected>
2498 format-connected-underline = #9f78e1
2499 label-connected = %essid%
2501 format-disconnected =
2502 ;format-disconnected = <label-disconnected>
2503 ;format-disconnected-underline = ${self.format-connected-underline}
2504 ;label-disconnected = %ifname% disconnected
2505 ;label-disconnected-foreground = ${colors.foreground-alt}
2512 ramp-signal-foreground = ${colors.foreground-alt}
2515 type = internal/network
2519 format-connected-underline = #55aa55
2520 format-connected-prefix = " "
2521 format-connected-prefix-foreground = ${colors.foreground-alt}
2522 label-connected = %local_ip%
2524 format-disconnected =
2525 ;format-disconnected = <label-disconnected>
2526 ;format-disconnected-underline = ${self.format-connected-underline}
2527 ;label-disconnected = %ifname% disconnected
2528 ;label-disconnected-foreground = ${colors.foreground-alt}
2531 type = internal/date
2535 date-alt = " %Y-%m-%d"
2541 format-prefix-foreground = ${colors.foreground-alt}
2542 format-underline = #0a6cf5
2544 label = %date% %time%
2547 type = internal/volume
2549 format-volume = <label-volume> <bar-volume>
2551 label-volume-foreground = ${root.foreground}
2553 format-muted-prefix = " "
2554 format-muted-foreground = ${colors.foreground-alt}
2557 bar-volume-width = 10
2558 bar-volume-foreground-0 = #55aa55
2559 bar-volume-foreground-1 = #55aa55
2560 bar-volume-foreground-2 = #55aa55
2561 bar-volume-foreground-3 = #55aa55
2562 bar-volume-foreground-4 = #55aa55
2563 bar-volume-foreground-5 = #f5a70a
2564 bar-volume-foreground-6 = #ff5555
2565 bar-volume-gradient = false
2566 bar-volume-indicator = |
2567 bar-volume-indicator-font = 2
2569 bar-volume-fill-font = 2
2570 bar-volume-empty = ─
2571 bar-volume-empty-font = 2
2572 bar-volume-empty-foreground = ${colors.foreground-alt}
2575 type = internal/battery
2580 format-charging = <animation-charging> <label-charging>
2581 format-charging-underline = #ffb52a
2583 format-discharging = <ramp-capacity> <label-discharging>
2584 format-discharging-underline = ${self.format-charging-underline}
2586 format-full-prefix = " "
2587 format-full-prefix-foreground = ${colors.foreground-alt}
2588 format-full-underline = ${self.format-charging-underline}
2593 ramp-capacity-foreground = ${colors.foreground-alt}
2595 animation-charging-0 =
2596 animation-charging-1 =
2597 animation-charging-2 =
2598 animation-charging-foreground = ${colors.foreground-alt}
2599 animation-charging-framerate = 750
2601 [module/temperature]
2602 type = internal/temperature
2604 warn-temperature = 66
2606 format = <ramp> <label>
2607 format-underline = #f50a4d
2608 format-warn = <ramp> <label-warn>
2609 format-warn-underline = ${self.format-underline}
2611 label = %temperature%
2612 label-warn = %temperature%
2613 label-warn-foreground = ${colors.secondary}
2618 ramp-foreground = ${colors.foreground-alt}
2626 label-open-foreground = ${colors.secondary}
2627 label-close = cancel
2628 label-close-foreground = ${colors.secondary}
2630 label-separator-foreground = ${colors.foreground-alt}
2633 menu-0-0-exec = menu-open-1
2634 menu-0-1 = power off
2635 menu-0-1-exec = menu-open-2
2638 menu-1-0-exec = menu-open-0
2640 menu-1-1-exec = sudo reboot
2642 menu-2-0 = power off
2643 menu-2-0-exec = sudo poweroff
2645 menu-2-1-exec = menu-open-0
2648 type = custom/script
2651 format-prefix = " "
2652 format-prefix-foreground = ${colors.foreground-alt}
2653 format-underline = #0a6cf5
2654 exec = notmuch count tag:unread
2657 screenchange-reload = true
2658 ;compositing-background = xor
2659 ;compositing-background = screen
2660 ;compositing-foreground = source
2661 ;compositing-border = over
2672 :header-args+: :tangle ~/.local/bin/polybar-launch :shebang "#!/usr/bin/env sh"
2675 #+begin_src sh :tangle no
2676 # Terminate already running bar instances
2679 # Wait until the processes have been shut down
2680 while pgrep -x polybar >/dev/null; do sleep 1; done
2685 echo "Bars launched..."
2690 :header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service"
2695 Description=Powertop tunings
2698 ExecStart=/usr/bin/powertop --auto-tune
2699 RemainAfterExit=true
2702 WantedBy=multi-user.target
2709 :header-args+: :tangle ~/.config/ranger/rc.conf
2712 #+begin_src conf :tangle no
2713 # ===================================================================
2714 # This file contains the default startup commands for ranger.
2715 # To change them, it is recommended to create the file
2716 # ~/.config/ranger/rc.conf and add your custom commands there.
2718 # If you copy this whole file there, you may want to set the environment
2719 # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
2721 # The purpose of this file is mainly to define keybindings and settings.
2722 # For running more complex python code, please create a plugin in "plugins/" or
2723 # a command in "commands.py".
2725 # Each line is a command that will be run before the user interface
2726 # is initialized. As a result, you can not use commands which rely
2727 # on the UI such as :delete or :mark.
2728 # ===================================================================
2730 # ===================================================================
2732 # ===================================================================
2734 # How many columns are there, and what are their relative widths?
2735 set column_ratios 1,3,4
2737 # Which files should be hidden? (regular expression)
2738 set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
2740 # Show hidden files? You can toggle this by typing 'zh'
2741 set show_hidden false
2743 # Ask for a confirmation when running the "delete" command?
2744 # Valid values are "always" (default), "never", "multiple"
2745 # With "multiple", ranger will ask only if you delete multiple files at once.
2746 set confirm_on_delete multiple
2748 # Which script is used to generate file previews?
2749 # ranger ships with scope.sh, a script that calls external programs (see
2750 # README for dependencies) to preview images, archives, etc.
2751 set preview_script ~/.config/ranger/scope.sh
2753 # Use the external preview script or display simple plain text previews?
2754 set use_preview_script true
2756 # Open all images in this directory when running certain image viewers
2757 # like feh or sxiv? You can still open selected files by marking them.
2758 set open_all_images true
2760 # Be aware of version control systems and display information.
2763 # State of the three backends git, hg, bzr. The possible states are
2764 # disabled, local (only show local info), enabled (show local and remote
2766 set vcs_backend_git enabled
2767 set vcs_backend_hg disabled
2768 set vcs_backend_bzr disabled
2770 # Preview images in full color with the external command "w3mimgpreview"?
2771 # This requires the console web browser "w3m" and a supported terminal.
2772 # It has been successfully tested with "xterm" and "urxvt" without tmux.
2773 set preview_images true
2775 # Use a unicode "..." character to mark cut-off filenames?
2776 set unicode_ellipsis false
2778 # Show dotfiles in the bookmark preview box?
2779 set show_hidden_bookmarks true
2781 # Which colorscheme to use? These colorschemes are available by default:
2782 # default, jungle, snow
2783 set colorscheme default
2785 # Preview files on the rightmost column?
2786 # And collapse (shrink) the last column if there is nothing to preview?
2787 set preview_files true
2788 set preview_directories true
2789 set collapse_preview true
2791 # Save the console history on exit?
2792 set save_console_history true
2794 # Draw the status bar on top of the browser window (default: bottom)
2795 set status_bar_on_top false
2797 # Draw a progress bar in the status bar which displays the average state of all
2798 # currently running tasks which support progress bars?
2799 set draw_progress_bar_in_status_bar true
2801 # Draw borders around columns?
2802 set draw_borders true
2804 # Display the directory name in tabs?
2805 set dirname_in_tabs false
2807 # Enable the mouse support?
2808 set mouse_enabled true
2810 # Display the file size in the main column or status bar?
2811 set display_size_in_main_column true
2812 set display_size_in_status_bar true
2814 # Display files tags in all columns or only in main column?
2815 set display_tags_in_all_columns true
2817 # Set a title for the window?
2818 set update_title false
2820 # Set the title to "ranger" in the tmux program?
2821 set update_tmux_title false
2823 # Shorten the title if it gets long? The number defines how many
2824 # directories are displayed at once, 0 turns off this feature.
2827 # Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
2828 set tilde_in_titlebar false
2830 # How many directory-changes or console-commands should be kept in history?
2831 set max_history_size 20
2832 set max_console_history_size 50
2834 # Try to keep so much space between the top/bottom border when scrolling:
2837 # Flush the input after each key hit? (Noticable when ranger lags)
2840 # Padding on the right when there's no preview?
2841 # This allows you to click into the space to run the file.
2842 set padding_right true
2844 # Save bookmarks (used with mX and `X) instantly?
2845 # This helps to synchronize bookmarks between multiple ranger
2846 # instances but leads to *slight* performance loss.
2847 # When false, bookmarks are saved when ranger is exited.
2848 set autosave_bookmarks true
2850 # You can display the "real" cumulative size of directories by using the
2851 # command :get_cumulative_size or typing "dc". The size is expensive to
2852 # calculate and will not be updated automatically. You can choose
2853 # to update it automatically though by turning on this option:
2854 set autoupdate_cumulative_size false
2856 # Turning this on makes sense for screen readers:
2857 set show_cursor false
2859 # One of: size, basename, mtime, type
2862 # Additional sorting options
2863 set sort_reverse false
2864 set sort_case_insensitive true
2865 set sort_directories_first true
2867 # Enable this if key combinations with the Alt Key don't work for you.
2868 # (Especially on xterm)
2869 set xterm_alt_key false
2871 # ===================================================================
2873 # ===================================================================
2874 # You can set local options that only affect a single directory.
2877 # setlocal path=~/downloads sort mtime
2879 # ===================================================================
2880 # == Command Aliases in the Console
2881 # ===================================================================
2889 alias filter scout -prt
2890 alias find scout -aet
2891 alias mark scout -mr
2892 alias unmark scout -Mr
2893 alias search scout -rs
2894 alias search_inc scout -rts
2895 alias travel scout -aefiklst
2897 # ===================================================================
2898 # == Define keys for the browser
2899 # ===================================================================
2908 map <C-l> redraw_window
2910 map <esc> change_mode normal
2921 map @ console -p6 shell %%s
2922 map # console shell -p
2924 map r chain draw_possible_programs; console open_with
2931 map "<any> tag_toggle tag=%any
2932 map <Space> mark_files toggle=True
2933 map v mark_files all=True toggle=True
2934 map uv mark_files all=True val=False
2935 map V toggle_visual_mode
2936 map uV toggle_visual_mode reverse=True
2938 # For the nostalgics: Midnight Commander bindings
2940 map <F3> display_file
2944 map <F7> console mkdir
2945 map <F8> console delete
2948 # In case you work on a keyboard with dvorak layout
2950 map <DOWN> move down=1
2951 map <LEFT> move left=1
2952 map <RIGHT> move right=1
2953 map <HOME> move to=0
2954 map <END> move to=-1
2955 map <PAGEDOWN> move down=1 pages=True
2956 map <PAGEUP> move up=1 pages=True
2957 map <CR> move right=1
2958 map <DELETE> console delete
2959 map <INSERT> console touch
2968 copymap <PAGEDOWN> <C-F>
2969 copymap <PAGEUP> <C-B>
2971 map J move down=0.5 pages=True
2972 map K move up=0.5 pages=True
2980 map [ move_parent -1
2995 map gR eval fm.cd(ranger.RANGERDIR)
2997 map g? cd /usr/share/doc/ranger
3001 map du shell -p du --max-depth=1 -h --apparent-size
3002 map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
3003 map yp shell -d echo -n %d/%f | xsel -i
3004 map yd shell -d echo -n %d | xsel -i
3005 map yn shell -d echo -n %f | xsel -i
3007 # Filesystem Operations
3010 map cw console rename
3011 map A eval fm.open_console('rename ' + fm.thisfile.basename)
3012 map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7)
3015 map po paste overwrite=True
3016 map pl paste_symlink relative=False
3017 map pL paste_symlink relative=True
3018 map phl paste_hardlink
3019 map pht paste_hardlinked_subtree
3024 map dr cut mode=remove
3028 map ya copy mode=add
3029 map yr copy mode=remove
3031 # Temporary workarounds
3032 map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
3033 map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
3034 map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
3035 map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
3036 map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
3037 map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
3038 map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
3039 map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
3042 map / console search
3044 map N search_next forward=False
3045 map ct search_next order=tag
3046 map cs search_next order=size
3047 map ci search_next order=mimetype
3048 map cc search_next order=ctime
3049 map cm search_next order=mtime
3050 map ca search_next order=atime
3055 map <TAB> tab_move 1
3056 map <S-TAB> tab_move -1
3057 map <A-Right> tab_move 1
3058 map <A-Left> tab_move -1
3064 map <a-1> tab_open 1
3065 map <a-2> tab_open 2
3066 map <a-3> tab_open 3
3067 map <a-4> tab_open 4
3068 map <a-5> tab_open 5
3069 map <a-6> tab_open 6
3070 map <a-7> tab_open 7
3071 map <a-8> tab_open 8
3072 map <a-9> tab_open 9
3075 map or toggle_option sort_reverse
3076 map os chain set sort=size; set sort_reverse=False
3077 map ob chain set sort=basename; set sort_reverse=False
3078 map on chain set sort=natural; set sort_reverse=False
3079 map om chain set sort=mtime; set sort_reverse=False
3080 map oc chain set sort=ctime; set sort_reverse=False
3081 map oa chain set sort=atime; set sort_reverse=False
3082 map ot chain set sort=type; set sort_reverse=False
3084 map oS chain set sort=size; set sort_reverse=True
3085 map oB chain set sort=basename; set sort_reverse=True
3086 map oN chain set sort=natural; set sort_reverse=True
3087 map oM chain set sort=mtime; set sort_reverse=True
3088 map oC chain set sort=ctime; set sort_reverse=True
3089 map oA chain set sort=atime; set sort_reverse=True
3090 map oT chain set sort=type; set sort_reverse=True
3092 map dc get_cumulative_size
3095 map zc toggle_option collapse_preview
3096 map zd toggle_option sort_directories_first
3097 map zh toggle_option show_hidden
3098 map <C-h> toggle_option show_hidden
3099 map zi toggle_option flushinput
3100 map zm toggle_option mouse_enabled
3101 map zp toggle_option preview_files
3102 map zP toggle_option preview_directories
3103 map zs toggle_option sort_case_insensitive
3104 map zu toggle_option autoupdate_cumulative_size
3105 map zv toggle_option use_preview_script
3106 map zf console filter
3109 map `<any> enter_bookmark %any
3110 map '<any> enter_bookmark %any
3111 map m<any> set_bookmark %any
3112 map um<any> unset_bookmark %any
3114 map m<bg> draw_bookmarks
3115 copymap m<bg> um<bg> `<bg> '<bg>
3117 # Generate all the chmod bindings with some python help:
3118 eval for arg in "rwxXst": cmd("map +u{0} shell -d chmod u+{0} %s".format(arg))
3119 eval for arg in "rwxXst": cmd("map +g{0} shell -d chmod g+{0} %s".format(arg))
3120 eval for arg in "rwxXst": cmd("map +o{0} shell -d chmod o+{0} %s".format(arg))
3121 eval for arg in "rwxXst": cmd("map +a{0} shell -d chmod a+{0} %s".format(arg))
3122 eval for arg in "rwxXst": cmd("map +{0} shell -d chmod u+{0} %s".format(arg))
3124 eval for arg in "rwxXst": cmd("map -u{0} shell -d chmod u-{0} %s".format(arg))
3125 eval for arg in "rwxXst": cmd("map -g{0} shell -d chmod g-{0} %s".format(arg))
3126 eval for arg in "rwxXst": cmd("map -o{0} shell -d chmod o-{0} %s".format(arg))
3127 eval for arg in "rwxXst": cmd("map -a{0} shell -d chmod a-{0} %s".format(arg))
3128 eval for arg in "rwxXst": cmd("map -{0} shell -d chmod u-{0} %s".format(arg))
3130 # ===================================================================
3131 # == Define keys for the console
3132 # ===================================================================
3133 # Note: Unmapped keys are passed directly to the console.
3136 cmap <tab> eval fm.ui.console.tab()
3137 cmap <s-tab> eval fm.ui.console.tab(-1)
3138 cmap <ESC> eval fm.ui.console.close()
3139 cmap <CR> eval fm.ui.console.execute()
3140 cmap <C-l> redraw_window
3142 copycmap <ESC> <C-c>
3146 cmap <up> eval fm.ui.console.history_move(-1)
3147 cmap <down> eval fm.ui.console.history_move(1)
3148 cmap <left> eval fm.ui.console.move(left=1)
3149 cmap <right> eval fm.ui.console.move(right=1)
3150 cmap <home> eval fm.ui.console.move(right=0, absolute=True)
3151 cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
3154 cmap <backspace> eval fm.ui.console.delete(-1)
3155 cmap <delete> eval fm.ui.console.delete(0)
3156 cmap <C-w> eval fm.ui.console.delete_word()
3157 cmap <C-k> eval fm.ui.console.delete_rest(1)
3158 cmap <C-u> eval fm.ui.console.delete_rest(-1)
3159 cmap <C-y> eval fm.ui.console.paste()
3161 # And of course the emacs way
3163 copycmap <down> <C-n>
3164 copycmap <left> <C-b>
3165 copycmap <right> <C-f>
3166 copycmap <home> <C-a>
3167 copycmap <end> <C-e>
3168 copycmap <delete> <C-d>
3169 copycmap <backspace> <C-h>
3171 # Note: There are multiple ways to express backspaces. <backspace> (code 263)
3172 # and <backspace2> (code 127). To be sure, use both.
3173 copycmap <backspace> <backspace2>
3175 # This special expression allows typing in numerals:
3176 cmap <allow_quantifiers> false
3178 # ===================================================================
3179 # == Pager Keybindings
3180 # ===================================================================
3183 pmap <down> pager_move down=1
3184 pmap <up> pager_move up=1
3185 pmap <left> pager_move left=4
3186 pmap <right> pager_move right=4
3187 pmap <home> pager_move to=0
3188 pmap <end> pager_move to=-1
3189 pmap <pagedown> pager_move down=1.0 pages=True
3190 pmap <pageup> pager_move up=1.0 pages=True
3191 pmap <C-d> pager_move down=0.5 pages=True
3192 pmap <C-u> pager_move up=0.5 pages=True
3194 copypmap <UP> k <C-p>
3195 copypmap <DOWN> j <C-n> <CR>
3202 copypmap <PAGEDOWN> n f <C-F> <Space>
3203 copypmap <PAGEUP> p b <C-B>
3206 pmap <ESC> pager_close
3207 copypmap <ESC> q Q i <F3>
3210 # ===================================================================
3211 # == Taskview Keybindings
3212 # ===================================================================
3215 tmap <up> taskview_move up=1
3216 tmap <down> taskview_move down=1
3217 tmap <home> taskview_move to=0
3218 tmap <end> taskview_move to=-1
3219 tmap <pagedown> taskview_move down=1.0 pages=True
3220 tmap <pageup> taskview_move up=1.0 pages=True
3221 tmap <C-d> taskview_move down=0.5 pages=True
3222 tmap <C-u> taskview_move up=0.5 pages=True
3224 copytmap <UP> k <C-p>
3225 copytmap <DOWN> j <C-n> <CR>
3229 copytmap <PAGEDOWN> n f <C-F> <Space>
3230 copytmap <PAGEUP> p b <C-B>
3232 # Changing priority and deleting tasks
3233 tmap J eval -q fm.ui.taskview.task_move(-1)
3234 tmap K eval -q fm.ui.taskview.task_move(0)
3235 tmap dd eval -q fm.ui.taskview.task_remove()
3236 tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
3237 tmap <pageup> eval -q fm.ui.taskview.task_move(0)
3238 tmap <delete> eval -q fm.ui.taskview.task_remove()
3241 tmap <ESC> taskview_close
3242 copytmap <ESC> q Q w <C-c>
3247 :header-args+: :tangle ~/.config/ranger/scope.sh :shebang "#!/usr/bin/env sh"
3250 #+begin_src sh :tangle no
3251 # ranger supports enhanced previews. If the option "use_preview_script"
3252 # is set to True and this file exists, this script will be called and its
3253 # output is displayed in ranger. ANSI color codes are supported.
3255 # NOTES: This script is considered a configuration file. If you upgrade
3256 # ranger, it will be left untouched. (You must update it yourself.)
3257 # Also, ranger disables STDIN here, so interactive scripts won't work properly
3259 # Meanings of exit codes:
3260 # code | meaning | action of ranger
3261 # -----+------------+-------------------------------------------
3262 # 0 | success | success. display stdout as preview
3263 # 1 | no preview | failure. display no preview at all
3264 # 2 | plain text | display the plain content of the file
3265 # 3 | fix width | success. Don't reload when width changes
3266 # 4 | fix height | success. Don't reload when height changes
3267 # 5 | fix both | success. Don't ever reload
3269 # Meaningful aliases for arguments:
3270 path="$1" # Full path of the selected file
3271 width="$2" # Width of the preview pane (number of fitting characters)
3272 height="$3" # Height of the preview pane (number of fitting characters)
3274 maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
3276 # Find out something about the file:
3277 mimetype=$(file --mime-type -Lb "$path")
3278 extension=${path##*.}
3281 # runs a command and saves its output into $output. Useful if you need
3282 # the return value AND want to use the output in a pipe
3283 try() { output=$(eval '"$@"'); }
3285 # writes the output of the previouosly used "try" command
3286 dump() { echo "$output"; }
3288 # a common post-processing function used after most commands
3289 trim() { head -n "$maxln"; }
3291 # wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
3292 highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }
3294 case "$extension" in
3295 # Archive extensions:
3296 7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
3297 rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
3298 try als "$path" && { dump | trim; exit 0; }
3299 try acat "$path" && { dump | trim; exit 3; }
3300 try bsdtar -lf "$path" && { dump | trim; exit 0; }
3303 try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
3306 try pdftotext -l 10 -nopgbrk -q "$path" - && \
3307 { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
3310 try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
3313 try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
3314 try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
3315 try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
3316 ;; # fall back to highlight/cat if the text browsers fail
3320 # Syntax highlight for text files:
3322 try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;;
3323 # Ascii-previews of images:
3325 img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
3326 # Display information about media files:
3328 exiftool "$path" && exit 5
3329 # Use sed to remove spaces so the output fits into the narrow window
3330 try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
3338 :header-args+: :tangle ~/.config/redshift.conf
3342 ; Global settings for redshift
3344 ; Set the day and night screen temperatures (Neutral is 6500K)
3355 ; Enable/Disable a smooth transition between day and night
3356 ; 0 will cause a direct change from day to night screen temperature.
3357 ; 1 will gradually increase or decrease the screen temperature.
3360 ; Set the screen brightness. Default is 1.0.
3362 ; It is also possible to use different settings for day and night
3363 ; since version 1.8.
3365 ;brightness-night=0.4
3366 ; Set the screen gamma (for all colors, or each color channel
3371 ; This can also be set individually for day and night since
3373 ;gamma-day=0.8:0.7:0.8
3376 ; Set the location-provider: 'geoclue2' or 'manual'
3377 ; type 'redshift -l list' to see possible values.
3378 ; The location provider settings are in a different section.
3379 ;location-provider=manual
3380 location-provider=geoclue2
3382 ; Set the adjustment-method: 'randr', 'vidmode'
3383 ; type 'redshift -m list' to see all possible values.
3384 ; 'randr' is the preferred method, 'vidmode' is an older API.
3385 ; but works in some cases when 'randr' does not.
3386 ; The adjustment method settings are in a different section.
3387 adjustment-method=randr
3389 ; Configuration of the location-provider:
3390 ; type 'redshift -l PROVIDER:help' to see the settings.
3391 ; ex: 'redshift -l manual:help'
3392 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
3393 ; are negative numbers.
3398 ; Configuration of the adjustment-method
3399 ; type 'redshift -m METHOD:help' to see the settings.
3400 ; ex: 'redshift -m randr:help'
3401 ; In this example, randr is configured to adjust screen 1.
3402 ; Note that the numbering starts from 0, so this is actually the
3403 ; second screen. If this option is not specified, Redshift will try
3404 ; to adjust _all_ screens.
3411 :header-args+: :tangle ~/.config/rofi/config
3415 rofi.font: Ubuntu Mono 13
3416 ! rofi.font: Inconsolata 16
3417 ! rofi.font: Iosevka 13
3418 ! rofi.font: Source Code Pro 11
3419 rofi.modi: run,window
3427 !rofi.theme: /usr/share/rofi/themes//Arc.rasi
3428 !rofi.theme: /usr/share/rofi/themes//Paper.rasi
3429 !rofi.theme: /usr/share/rofi/themes//sidebar.rasi
3431 rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi
3436 :header-args+: :tangle ~/.config/rofi-pass/config
3440 # permanently set alternative root dir
3441 # root=/path/to/root
3443 # rofi command. Make sure to have "$@" as last argument
3445 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
3446 rofi -i -no-auto-select "$@"
3449 # xdotool needs the keyboard layout to be set using setxkbmap
3450 # You can do this in your autostart scripts (e.g. xinitrc)
3452 # If for some reason, you cannot do this, you can set the command here.
3453 # and set fix_layout to true
3462 USERNAME_field='user'
3463 AUTOTYPE_field='autotype'
3465 # delay to be used for :delay keyword
3468 ## Programs to be used
3477 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
3480 default_autotype='user :tab pass'
3482 # color of the help messages
3483 # leave empty for autodetection
3484 help_color="#4872FF"
3486 # Clipboard settings
3487 # Possible options: primary, clipboard, both
3490 # Options for generating new password entries
3491 # default_user is also used for password files that have no user field.
3493 default_user2=aminban
3496 # Custom Keybindings
3520 :header-args+: :tangle ~/.xprofile
3523 =~/.xprofile= is similar in style to =~/.xinitrc=, but on the
3524 contrary, it's automatically sourced by LightDM, my display manager of
3528 xset -b # disable bell
3530 # setxkbmap -option compose:ralt
3532 setxkbmap -option ctrl:nocaps # turn capslock into control
3533 setxkbmap -option altwin:swap_alt_win # swap alt and super
3535 if [ $(hostname) = "plasma" ]
3537 setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt
3540 if [ $(hostname) = "enigma" ]
3542 xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt
3545 light -Scrs "intel_backlight" 2
3547 source $HOME/.zprofile
3549 export _JAVA_AWT_WM_NONREPARENTING=1
3550 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
3552 # unlock-def-gk.py &
3554 if [ $(hostname) = "plasma" ]
3557 elif [ $(hostname) = "enigma" ]
3567 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3570 #+begin_src conf-xdefaults
3571 #include ".Xresources.d/fonts"
3572 ! #include ".Xresources.d/colors"
3573 #include ".Xresources.d/emacs"
3574 #include ".Xresources.d/rxvt-unicode"
3581 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3584 #+begin_src conf-xdefaults
3585 Xft.lcdfilter: lcddefault
3589 Xft.hintstyle: hintslight
3590 ! Xft.hintstyle: hintfull
3597 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors")
3600 #+begin_src conf-xdefaults :tangle no
3601 #include "gruvbox-light.xresources"
3602 ! #include "gruvbox-dark.xresources"
3603 #include "gruvbox-urxvt256.xresources"
3606 #+begin_src conf-xdefaults :tangle no
3607 ! -----------------------------------------------------------------------------
3608 ! File: gruvbox-light.xresources
3609 ! Description: Retro groove colorscheme generalized
3610 ! Author: morhetz <morhetz@gmail.com>
3611 ! Source: https://github.com/morhetz/gruvbox-generalized
3612 ! Last Modified: 6 Sep 2014
3613 ! -----------------------------------------------------------------------------
3615 ! hard contrast: *background: #f9f5d7
3616 *background: #fbf1c7
3617 ! soft contrast: *background: #f2e5bc
3618 *foreground: #3c3836
3628 ! DarkYellow + Yellow
3634 ! DarkMagenta + Magenta
3645 #+begin_src conf-xdefaults :tangle no
3646 ! -----------------------------------------------------------------------------
3647 ! File: gruvbox-dark.xresources
3648 ! Description: Retro groove colorscheme generalized
3649 ! Author: morhetz <morhetz@gmail.com>
3650 ! Source: https://github.com/morhetz/gruvbox-generalized
3651 ! Last Modified: 6 Sep 2014
3652 ! -----------------------------------------------------------------------------
3654 ! hard contrast: *background: #1d2021
3655 *background: #282828
3656 ! soft contrast: *background: #32302f
3657 *foreground: #ebdbb2
3667 ! DarkYellow + Yellow
3673 ! DarkMagenta + Magenta
3684 #+begin_src conf-xdefaults :tangle no
3685 ! -----------------------------------------------------------------------------
3686 ! File: gruvbox-urxvt256.xresources
3687 ! Description: Retro groove colorscheme generalized
3688 ! Author: morhetz <morhetz@gmail.com>
3689 ! Source: https://github.com/morhetz/gruvbox-generalized
3690 ! Last Modified: 13 Dec 2013
3691 ! -----------------------------------------------------------------------------
3693 URxvt.color24: #076678
3694 URxvt.color66: #427b58
3695 URxvt.color88: #9d0006
3696 URxvt.color96: #8f3f71
3697 URxvt.color100: #79740e
3698 URxvt.color108: #8ec07c
3699 URxvt.color109: #83a598
3700 URxvt.color130: #af3a03
3701 URxvt.color136: #b57614
3702 URxvt.color142: #b8bb26
3703 URxvt.color167: #fb4934
3704 URxvt.color175: #d3869b
3705 URxvt.color208: #fe8019
3706 URxvt.color214: #fabd2f
3707 URxvt.color223: #ebdbb2
3708 URxvt.color228: #f2e5bc
3709 URxvt.color229: #fbf1c7
3710 URxvt.color230: #f9f5d7
3711 URxvt.color234: #1d2021
3712 URxvt.color235: #282828
3713 URxvt.color236: #32302f
3714 URxvt.color237: #3c3836
3715 URxvt.color239: #504945
3716 URxvt.color241: #665c54
3717 URxvt.color243: #7c6f64
3718 URxvt.color244: #928374
3719 URxvt.color245: #928374
3720 URxvt.color246: #a89984
3721 URxvt.color248: #bdae93
3722 URxvt.color250: #d5c4a1
3727 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3730 #+begin_src conf-xdefaults
3733 Emacs.verticalScrollBars: off
3734 Emacs.cursorBlink: off
3735 Emacs.FontBackend: xft,x
3736 ! Emacs.font: Ubuntu Mono-12
3737 ! Emacs.font: Triplicate T4C-11
3738 ! Emacs.font: Ubuntu Mono-10.5
3739 ! Emacs.font: Ubuntu Mono-12
3740 ! Emacs.font: Iosevka-11
3742 ! Emacs.font: Fira Mono:size=15
3743 ! Emacs.font: DejaVu Sans Mono:size=15
3744 ! Emacs.font: Inconsolata:size=17
3745 ! Emacs.font: Inconsolata:size=16
3746 ! Emacs.font: Inconsolata LGC:size=14
3747 ! Emacs.font: Source Code Pro Medium-10.5
3748 Emacs.font: Ubuntu Mono:size=16
3749 ! Emacs.font: Iosevka:size=16
3754 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3757 #+begin_src conf-xdefaults
3759 URxvt.font: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3760 URxvt.boldFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
3761 URxvt.italicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
3762 URxvt.bolditalicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
3764 URxvt.xftAntialias: true
3765 URxvt.letterSpace: 0
3768 URxvt.loginShell: true
3769 URxvt.saveLines: 100000
3770 URxvt.internalBorder: 3
3772 URxvt.scrollBar: false
3773 URxvt.scrollStyle: rxvt
3774 URxvt*scrollTtyOutput: false
3775 URxvt*scrollWithBuffer: true
3776 URxvt*scrollTtyKeypress: true
3777 URxvt.keysym.Shift-Up: command:\033]720;1\007
3778 URxvt.keysym.Shift-Down: command:\033]721;1\007
3780 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3781 URxvt.perl-ext: bidi
3782 URxvt.bidi.enabled: 1
3783 URxvt.url-select.launcher: firefox
3784 URxvt.url-select.underline: true
3785 URxvt.keysym.M-u: perl:url-select:select_next
3786 URxvt.keysym.M-Escape: perl:keyboard-select:activate
3787 URxvt.keysym.M-s: perl:keyboard-select:search
3788 URxvt.url-launcher: /usr/bin/firefox
3789 URxvt.matcher.button: 1
3790 URxvt.iso14755: false
3791 URxvt.iso14755_53: false
3792 URxvt.keysym.M-c: perl:clipboard:copy
3793 URxvt.keysym.M-v: perl:clipboard:paste
3794 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3795 URxvt.keysym.C-Up: font-size:increase
3796 URxvt.keysym.C-Down: font-size:decrease
3797 URxvt.keysym.C-S-Up: font-size:incglobal
3798 URxvt.keysym.C-S-Down: font-size:decglobal
3799 URxvt.keysym.C-equal: font-size:reset
3800 !URxvt.keysym.C-question: font-size:show
3802 URxvt.iconFile: /usr/share/icons/Paper/48x48/apps/utilities-terminal.png
3804 !urxvt*foreground: white
3805 !urxvt*background: black
3824 !URxvt.foreground: #C8C8C8
3825 !URxvt.background: #FFFFFF
3845 !! orange (replaces cyan)
3852 ! Tango colour theme for rxvt-unicode
3853 URxvt.background: #FFFFFF
3854 URxvt.foreground: #000000
3857 URxvt.color0: #2E3436
3858 URxvt.color8: #757773
3861 URxvt.color1: #CC0000
3862 URxvt.color9: #EF2929
3865 URxvt.color2: #4E9A06
3866 URxvt.color10: #8AE234
3869 URxvt.color3: #C4A000
3870 URxvt.color11: #FCE94F
3873 URxvt.color4: #3465A4
3874 URxvt.color12: #729FCF
3877 URxvt.color5: #75507B
3878 URxvt.color13: #AD7FA8
3881 !URxvt.color6: #06989A
3882 !URxvt.color14: #34E2E2
3883 ! orange (replaces cyan)
3888 URxvt.color7: #D3D7CF
3889 URxvt.color15: #EEEEEC
3894 :header-args+: :tangle ~/.config/user-dirs.dirs
3898 XDG_DESKTOP_DIR="$HOME/Desktop"
3899 XDG_DOCUMENTS_DIR="$HOME/usr/docs"
3900 XDG_DOWNLOAD_DIR="$HOME/usr/dls"
3901 XDG_MUSIC_DIR="$HOME/usr/music"
3902 XDG_PICTURES_DIR="$HOME/usr/pics"
3903 XDG_PUBLICSHARE_DIR="$HOME/usr/Public"
3904 XDG_TEMPLATES_DIR="$HOME/usr/Templates"
3905 XDG_VIDEOS_DIR="$HOME/usr/vids"
3910 :header-args+: :tangle ~/.config/zathura/zathurarc
3914 set smooth-scroll true
3915 set selection-clipboard clipboard
3917 set default-bg "#272727"
3918 set statusbar-bg "#272727"
3919 set inputbar-bg "#373737"
3924 My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
3925 [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
3930 :header-args+: :tangle ~/.zimrc
3944 # Select what modules you would like enabled.
3945 # The second line of modules may depend on options set by modules in the first
3946 # line. These dependencies are noted on the respective module's README.md.
3947 zmodules=(directory environment git git-info history input ssh utility custom \
3948 syntax-highlighting history-substring-search prompt completion)
3959 # Set your desired prompt here
3960 zprompt_theme='pure'
3961 #PURE_PROMPT_SYMBOL=λ
3962 #PURE_PROMPT_SYMBOL=δ
3963 PURE_PROMPT_SYMBOL=➜
3969 # set an optional host-specific filename for the completion cache file
3970 # if none is provided, the default '.zcompdump' is used.
3971 #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
3977 # Uncomment to enable command correction prompts
3978 # See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
3985 # Set the string below to the desired terminal title format string.
3986 # The terminal title is redrawn upon directory change, however, variables like
3987 # ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
3988 # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
3989 # The example below uses the following format: 'username@host:/current/directory'
3990 ztermtitle='%n@%m:%~'
3996 # Uncomment to enable double-dot expansion.
3997 # This appends '../' to your input for each '.' you type after an initial '..'
3998 #zdouble_dot_expand='true'
4001 # Syntax-Highlighting
4004 # This determines what highlighters will be used with the syntax-highlighting module.
4005 # Documentation of the highlighters can be found here:
4006 # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
4007 # For (u)rxvt, termite and gnome-terminal users,
4008 # removing the 'cursor' highlighter will fix the disappearing cursor problem
4009 #zhighlighters=(main brackets cursor)
4010 zhighlighters=(main brackets pattern)
4017 # Load these ssh identities with the ssh module
4018 zssh_ids=(id_rsa plasma_id_rsa id_ed25519 id_rsa_aur)
4025 # Set (optional) pacman front-end.
4026 zpacman_frontend='yay'
4028 # Load any helper scripts as defined here
4029 #zpacman_helper=(aur)
4034 :header-args+: :tangle ~/.zlogin
4041 # User configuration sourced by login shells
4045 [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
4050 :header-args+: :tangle ~/.zprofile
4054 #PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
4055 #PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
4056 export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$PATH
4057 export XDG_CONFIG_HOME=$HOME/.config
4058 export XDG_DATA_HOME=$HOME/.local/share
4059 export XDG_DATA_DIRS=/usr/local/share:/usr/share
4060 export MAILDIR="$HOME/mail"
4062 #export MATHMODELS=$HOME/src/eiffel/mathmodels
4063 #export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
4064 #export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
4067 #export JAVA_HOME=/usr/lib/jvm/default
4068 #export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
4069 #export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
4070 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
4072 #export PATH="$HOME/usr/build/pvs:$PATH"
4073 #export SBCLISP_HOME=/usr/share/sbcl-source
4074 #export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
4076 export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
4078 #export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
4079 #export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
4081 #if [ -e /home/amin/.nix-profile/etc/profile.d/nix.sh ]; then . /home/amin/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
4086 :header-args+: :tangle ~/.zshenv
4090 # Ensure that a non-login, non-interactive shell has a defined environment.
4091 if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
4092 source "${ZDOTDIR:-$HOME}/.zprofile"
4098 :header-args+: :tangle ~/.zshrc
4102 # Bash-like navigation
4103 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
4104 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4105 export WORDCHARS='*?[]~=&;!#$%^(){}<>'
4106 #ZLE_SPACE_SUFFIX_CHARS=$'|&'
4108 #disable -r time # disable shell reserved word
4109 #alias time='time -p' # -p for POSIX output
4111 # rehash if last command was pacaur or pacman
4112 # (so that zsh picks up changes in $PATH immediately)
4113 TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
4116 # User configuration sourced by interactive shells
4119 # Change default zim location
4120 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
4123 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
4125 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
4126 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
4130 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
4131 source ~/.zsh/zsh-autopair/autopair.zsh
4136 source /usr/share/fzf/key-bindings.zsh
4137 source /usr/share/fzf/completion.zsh
4139 # Accept history selection instead of putting it on
4141 fzf-history-widget-accept() {
4145 #zle -N fzf-history-widget-accept
4146 #bindkey '^R' fzf-history-widget-accept
4149 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
4155 alias mpv="mpv --ytdl-format mp4"
4159 alias jcl=journalctl
4160 alias m="mbsync -Va; getmail; notmuch new"
4161 alias best="youtube-dl -f best"
4162 alias ace="mosh amin@ace.aminb.org"
4163 alias nix="ssh amin@aminb.org"
4167 git clone https://aur.archlinux.org/${1}.git
4178 This section contains various useful scripts and the ones used by the
4179 programs above. For instance, =toggle-tablet= for switching to and
4180 from tablet mode on my X220T, =toggle-presentation-mode= for toggling
4181 Xfce's presentation mode which keeps the screen awake, and
4182 =rofi-light= a small utility that uses [[https://github.com/DaveDavenport/rofi][Rofi]] to ask and [[https://github.com/haikarainen/light][light]] to set an
4183 exact brightness value.
4187 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
4192 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
4198 :header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash"
4202 lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"
4204 if [ "$lang" = "us" ]; then
4208 # xmodmap $HOME/.Xmodmap
4212 ** toggle-presentation-mode
4214 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
4218 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
4223 :header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
4227 import gnomekeyring as gk
4228 # list_item_ids_sync('login')[0] == 1L
4229 gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
4234 My little wallpaper changer script.
4238 :header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash"
4241 #+begin_src bash :tangle no
4246 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4249 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4252 echo $"Usage: $0 {day|night}"
4259 :header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash"
4262 #+begin_src bash :tangle no
4271 echo "Did not find 'sed', script cannot continue."
4276 echo "Did not find rofi, there is no point to continue."
4281 # Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
4282 # Repeated calls should leave the config clean-ish
4284 function set_theme()
4286 CDIR="${HOME}/.config/rofi/"
4287 if [ ! -d "${CDIR}" ]
4291 if [ -f "${CDIR}/config" ]
4293 ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
4295 echo "rofi.theme: ${1}" >> "${CDIR}/config"
4299 if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ]
4301 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4302 xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources
4303 set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi"
4305 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4306 xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources
4307 set_theme "/usr/share/rofi/themes//gruvbox-light.rasi"
4313 :header-args+: :tangle ~/.config/systemd/user/wp.service
4316 #+begin_src conf :tangle no
4318 Description=wallpaper service
4322 ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto
4327 :header-args+: :tangle ~/.config/systemd/user/wp.timer
4330 #+begin_src conf :tangle no
4333 Description=wallpaper timer
4341 WantedBy=timers.target
4346 :header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
4352 zathura --synctex-forward "$pos" "$pdffile" || \
4354 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
4355 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )
4361 :header-args+: :tangle ~/.local/bin/eat-em :shebang "#!/bin/sh"
4365 # Original Posted at http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4366 # [ESC] character in original post removed here.
4368 # ANSI Color -- use these variables to easily have different color
4369 # and format output. Make sure to output the reset sequence after
4370 # colors (f = foreground, b = background), and use the 'off'
4371 # feature for anything you turn on.
4375 esc="$(echo -en '\e')"
4377 blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
4378 yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
4379 cyanf="${esc}[36m"; whitef="${esc}[37m"
4381 blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
4382 yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
4383 cyanb="${esc}[46m"; whiteb="${esc}[47m"
4385 boldon="${esc}[1m"; boldoff="${esc}[22m"
4386 italicson="${esc}[3m"; italicsoff="${esc}[23m"
4387 ulon="${esc}[4m"; uloff="${esc}[24m"
4388 invon="${esc}[7m"; invoff="${esc}[27m"
4393 # note in this first use that switching colors doesn't require a reset
4394 # first - the new color overrides the old one.
4402 ${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset}
4403 ${yellowf}▄█████████▀▀${reset} ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄${reset} ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄${reset} ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄${reset} ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄${reset} ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
4404 ${yellowf}███████▀${reset} ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███${reset} ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███${reset} ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███${reset} ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███${reset} ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
4405 ${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset}
4406 ${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset}
4407 ${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset}
4409 ${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset}
4410 ${boldon}${yellowf}▄█████████▀▀ ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄ ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄ ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄ ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄ ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
4411 ${boldon}${yellowf}███████▀ ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███ ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███ ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███ ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███ ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
4412 ${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset}
4413 ${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset}
4414 ${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset}
4421 :header-args+: :tangle ~/.local/bin/invade-em :shebang "#!/bin/bash"
4426 # ANSI color scheme script featuring Space Invaders
4428 # Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4429 # Modified by lolilolicon
4435 printf -v $j$i %b "\e[${!j}${i}m"
4443 $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4444 $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4445 $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
4446 $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
4448 $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4449 $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4450 $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
4451 $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst