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
19 :header-args+: :tangle ~/.config/compton.conf
22 #+begin_src conf :tangle no
24 shadow = false; # Enabled client-side shadows on windows.
25 no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
26 no-dnd-shadow = true; # Don't draw shadows on DND windows.
27 clear-shadow = true; # Zero the part of the shadow's mask behind the
28 # window. Fix some weirdness with ARGB windows.
29 shadow-radius = 5; # The blur radius for shadows. (default 12)
30 shadow-offset-x = -5; # The left offset for shadows. (default -15)
31 shadow-offset-y = -5; # The top offset for shadows. (default -15)
32 # shadow-opacity = 0.7; # The translucency for shadows. (default .75)
33 # shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
34 # shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
35 # shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
36 shadow-exclude = [ "n:e:Notification", "class_g = 'Chromium'", "class_g = 'Dmenu'", "class_g = 'Firefox' && argb" ]; # Exclude conditions for shadows.
37 # shadow-exclude = "n:e:Notification";
38 #shadow-exclude = [ "_GTK_FRAME_EXTENTS@:c" ] # Fix dual shadow on some gtk3 powered applications
39 shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
40 # (see also: --detect-rounded-corners)
43 menu-opacity = 1.0; # The opacity for menus. (default 1.0)
44 #inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0)
45 # active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
46 frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0)
47 # inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
48 # value of _NET_WM_OPACITY. Bad choice.
49 alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
50 # it may result in less X resource usage,
51 # Yet fading may look bad.
52 #inactive-dim = 0.5; # Dim inactive windows. (0.0 - 1.0)
53 #inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
54 # blur-background = true; # Blur background of transparent windows.
55 # Bad performance with X Render backend.
56 # GLX backend is preferred.
57 # blur-background-frame = true; # Blur background of opaque windows with transparent
59 blur-background-fixed = true; # Do not let blur radius adjust based on window opacity.
60 blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
61 # Exclude conditions for background blur.
64 fading = false; # Fade windows during opacity changes.
65 fade-delta = 3; # The time between steps in a fade in milliseconds. (default 10).
66 fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
67 fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
68 # no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
69 fade-exclude = [ ]; # Exclude conditions for fading.
72 backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
73 # much faster but depends on a sane driver.
74 mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
75 mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
76 use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
77 # instead of using FocusIn/Out events. Usually more reliable but
78 # depends on a EWMH-compliant WM.
79 detect-rounded-corners = false; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on.
80 detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
81 # managers not passing _NET_WM_OPACITY of client windows to frame
83 refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
84 vsync = "drm"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
85 # See man page for more details.
86 dbe = false; # Enable DBE painting mode. Rarely needed.
87 paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
88 sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
89 # Incompatible with certain VSync methods.
90 unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
91 # detected, to maximize performance for full-screen windows.
92 focus-exclude = [ ]; # A list of conditions of windows that should always be considered
94 detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
95 # the same group focused at the same time.
96 detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
97 invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
99 # GLX backend # GLX backend fine-tune options. See man page for more info.
100 glx-no-stencil = true; # Recommended.
101 glx-copy-from-front = false; # Useful with --glx-swap-method,
102 # glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
103 # glx-no-rebind-pixmap = true; # Recommended if it works.
104 glx-no-rebind-pixmap = true; # Recommended if it works.
105 #glx-swap-method = "4"; # See man page.
106 glx-swap-method = "4"; # See man page.
108 # Window type settings
111 tooltip = { fade = true; shadow = false; opacity = 1; focus = true; };
112 menu = { shadow = false; };
113 dropdown_menu = { shadow = false; };
114 popup_menu = { shadow = false; };
115 utility = { shadow = false; };
116 # fade: Fade the particular type of windows.
117 # shadow: Give those windows shadow
118 # opacity: Default opacity for the type of windows.
119 # focus: Whether to always consider windows of this type focused.
125 :header-args+: :tangle "/sudo::/etc/dovecot/dovecot.conf"
132 log_path = /var/log/dovecot.log
133 info_log_path = /var/log/dovecot-info.log
136 disable_plaintext_auth = no
139 auth_mechanisms = plain
143 args = /etc/dovecot/passwd
148 args = uid=amin gid=amin home=/home/amin/mail/%d/%n
149 default_fields = mail=maildir:/home/amin/mail/%d/%n/mail
152 # mail_home = /home/amin/mail/%d/%n
153 # mail_location = maildir:/home/amin/mail/%d/%n/mail:LAYOUT=fs:INBOX=/home/amin/mail/%d/%n/mail/Inbox
160 mail_plugins = $mail_plugins fts fts_lucene
164 fts_lucene = whitespace_chars=@.
171 :header-args+: :tangle ~/.config/dunst/dunstrc
176 #font = Ubuntu Mono 10.5
177 font = Inconsolata 11
179 # Path to default icons.
180 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/
185 # <s>strikethrough<s/>
188 # The format of the message. Possible variables are:
192 # %i iconname (including its path)
193 # %I iconname (without its path)
194 # %p progress value if set ([ 0%] to [100%]) or nothing
196 format = "<b>%s</b>\n%b"
197 # Sort messages by urgency
199 # Show how many messages are currently hidden (because of geometry)
201 # Alignment of message text.
202 # Possible values are "left", "center" and "right"
204 # The frequency with wich text that is longer than the notification
205 # window allows bounces back and forth.
206 # This option conflicts with 'word_wrap'.
207 # Set to 0 to disable
209 # show age of message if message is older than show_age_threshold seconds.
210 # set to -1 to disable
211 show_age_threshold = -1
212 # split notifications into multiple lines if they don't fit into geometry
214 # ignore newlines '\n' in notifications
216 # The geometry of the message window.
217 # geometry [{width}]x{height}][+/-{x}+/-{y}]
218 # The height is measured in number of notifications everything else in pixels. If the width
219 # is omitted but the height is given ("-geometry x2"), the message window
220 # expands over the whole screen (dmenu-like). If width is 0,
221 # the window expands to the longest message displayed.
222 # A positive x is measured from the left, a negative from the
223 # right side of the screen. Y is measured from the top and down respectevly.
224 # The width can be negative. In this case the actual width is the
225 # screen width minus the width defined in within the geometry option.
226 #geometry = "410x12-12+12"
227 #geometry = "0x0-30-30"
228 geometry = "260x12-30-30"
229 # The transparency of the window. range: [0; 100]
230 # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
232 # Don't remove messages, if the user is idle (no mouse or keyboard input)
233 # for longer than idle_threshold seconds.
234 # Set to 0 to disable.
236 # Which monitor should the notifications be displayed on.
238 # Display notification on focused monitor. Possible modes are:
239 # mouse: follow mouse pointer
240 # keyboard: follow window with keyboard focus
241 # none: don't follow anything
243 # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
244 # This should be the case for almost all modern windowmanagers.
246 # If this option is set to mouse or keyboard, the monitor option will be
249 # should a notification popped up from history be sticky or
250 # timeout as if it would normally do.
252 # The height of a single line. If the height is smaller than the font height,
253 # it will get raised to the font height.
254 # This adds empty space above and under the text.
257 show_indicators = yes
259 # Draw a line of 'separatpr_height' pixel height between two notifications.
260 # Set to 0 to disable
262 # padding between text and separator
265 horizontal_padding = 8
266 # Define a color for the separator.
267 # possible values are:
268 # * auto: dunst tries to find a color fitting to the background
269 # * foreground: use the same color as the foreground
270 # * frame: use the same color as the frame.
271 # * anything else will be interpreted as a X color
272 separator_color = foreground
273 # print a notification on startup
274 # This is mainly for error detection, since dbus (re-)starts dunst
275 # automatically after a crash.
276 startup_notification = false
278 #dmenu = /usr/bin/dmenu -p dunst:
279 dmenu = /usr/bin/rofi -dmenu -p dunst:
280 # browser for opening urls in context menu
281 browser = /usr/bin/firefox -new-tab
286 # shortcuts are specified as [modifier+][modifier+]...key
287 # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3'
288 # and 'mod4' (windows-key)
289 # xev might be helpful to find names for keys
292 # close all notifications
293 close_all = ctrl+shift+space
294 # redisplay last message(s)
295 # On the US keyboard layout 'grave' is normally above TAB and left of '1'.
296 history = ctrl+shift+h
298 context = ctrl+shift+period
300 # IMPORTANT: colors have to be defined in quotation marks.
301 # Otherwise the '#' and following would be interpreted as a comment.
302 background = "#1d2a30"
303 foreground = "#71c2af"
306 background = "#1d2a30"
307 foreground = "#71c2af"
310 background = "#1d2a30"
311 foreground = "#ff9982"
314 # Every section that isn't one of the above is interpreted as a rules
315 # to override settings for certain messages.
316 # Messages can be matched by 'appname', 'summary', 'body' or 'icon'
317 # and you can override the 'timeout', 'urgency', 'foreground', 'background'
319 # Shell-like globbing will get expanded.
322 # you can specify a script that gets run when the rule matches by setting
323 # the 'script' option.
324 # The script will be called as follows:
325 # script appname summary body icon urgency
326 # where urgency can be "LOW", "NORMAL" or "CRITICAL".
328 # NOTE: if you don't want a notification to be displayed, set the format to ""
329 # NOTE: It might be helpful to run dunst -print in a terminal in order to find
330 # fitting options for rules.
333 # script = dunst_espeak.sh
335 # summary = "*script*"
336 # script = dunst_test.sh
338 ## This notification will not be displayed
343 # summary = "*signed on*"
348 # summary = *signed off*
358 # summary = *twitter.com*
362 summary = *Brightness*
368 :header-args+: :tangle ~/.config/fontconfig/fonts.conf :comments none
372 <?xml version="1.0"?>
373 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
375 <match target="font">
376 <edit mode="assign" name="rgba">
380 <match target="font">
381 <edit mode="assign" name="hinting">
385 <match target="font">
386 <edit mode="assign" name="hintstyle">
387 <const>hintslight</const>
390 <match target="font">
391 <edit mode="assign" name="antialias">
395 <match target="font">
396 <edit mode="assign" name="lcdfilter">
397 <const>lcddefault</const>
402 <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) -->
403 <alias binding="same">
404 <family>Helvetica</family>
406 <family>Liberation Sans</family>
416 :header-args+: :tangle ~/.getmail/getmailrc
421 type = SimplePOP3SSLRetriever
422 server = fencepost.gnu.org
424 password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg")
430 path = ~/mail/gnu/Inbox/
433 # type = MDA_external
434 # path = /usr/lib/dovecot/deliver
435 # arguments = ('-d', 'amin@aminb.org')
443 :header-args+: :tangle ~/.config/systemd/user/getmail.service
446 #+begin_src conf :tangle no
448 Description=getmail service
452 ExecStart=/usr/bin/getmail
453 StandardOutput=syslog
459 :header-args+: :tangle ~/.config/systemd/user/getmail.timer
462 #+begin_src conf :tangle no
464 Description=getmail timer
472 WantedBy=timers.target
479 :header-args+: :tangle ~/.gitconfig
486 email = bandali@gnu.org
487 signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
501 autocrlf = input # CRLF -> LF on commit
502 editor = emacsclient -t
503 excludesfile = ~/.gitignore_global
516 git = !exec git # handle nested git calls, e.g. git git status
517 aliases = config --get-regexp '^alias\\.'
529 nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
530 nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
543 remote = magenta bold
552 # showUntrackedFiles = all
567 smtpserver = fencepost.gnu.org
575 :header-args+: :tangle ~/.gitignore_global
590 :header-args+: :tangle ~/.gnupg/gpg-agent.conf
594 default-cache-ttl 43200
597 default-cache-ttl-ssh 10800
598 max-cache-ttl-ssh 10800
600 # pinentry-program /usr/bin/pinentry-qt
607 :header-args+: :tangle ~/.gtkrc-2.0
611 gtk-theme-name="Greybird"
612 gtk-icon-theme-name="Paper"
613 gtk-font-name="Ubuntu 10"
615 # gtk-key-theme-name = "Emacs"
620 :header-args+: :tangle ~/.config/gtk-3.0/settings.ini
623 #+begin_src conf :tangle no
625 gtk-icon-theme-name = Paper
626 # gtk-theme-name = Adwaita
628 gtk-theme-name = Greybird
629 # gtk-theme-name = Arc-Darker
630 # gtk-theme-name = Numix-ArchBlue
632 gtk-font-name = Ubuntu 10
633 # gtk-key-theme-name = Emacs
636 ** [[https://github.com/Leinnan/i3gs][i3gs]]
638 :header-args+: :tangle ~/.config/i3gs/config
641 #+begin_src conf :comments none :tangle no
642 borders_width=0 0 2 0
647 #title=<span weight='heavy' fgcolor='#7FDBFF'> </span>
648 #borders_color=#7FDBFF
652 title=<span weight='heavy' fgcolor='#3D9970'> </span>
653 borders_color=#3D9970
657 #title=<span weight='heavy' fgcolor='#2ECC40'> </span>
658 #borders_color=#2ECC40
662 #title=<span weight='heavy' fgcolor='#01FF70'> </span>
663 #borders_color=#01FF70
667 title=<span weight='heavy' fgcolor='#7FDBFF'></span>
668 borders_color=#7FDBFF
672 command=battery-percentage-time
673 title=<span weight='heavy' fgcolor='#39CCCC'> </span>
674 borders_color=#39CCCC
678 title=<span weight='heavy' fgcolor='#01FF70'> </span>
679 borders_color=#01FF70
683 command=date '+%-I:%M, %a %b %d '
684 title=<span weight='heavy' fgcolor='#FFDC00'> </span>
685 borders_color=#FFDC00
691 :header-args+: :tangle ~/.config/i3status/config
694 #+begin_src conf :comments none
695 # i3status configuration file.
696 # see "man i3status" for documentation.
698 # It is important that this file is edited as UTF-8.
699 # The following line should contain a sharp s:
701 # If the above line is not correctly displayed, fix your editor first!
706 output_format = "i3bar"
711 order += "disk /data"
712 # order += "wireless _first_"
713 order += "ethernet _first_"
715 order += "volume master"
717 order += "tztime local"
720 format_up = "W:%quality %essid %ip"
721 format_down = "W: down"
725 # if you use %speed, i3status requires root privileges
726 format_up = "E: %ip (%speed)"
727 format_down = "E: down"
731 format = "%status %percentage %remaining (%consumption)"
732 path = "/sys/class/power_supply/BAT%d/uevent"
734 threshold_type = "percentage"
735 last_full_capacity = true
736 integer_battery_capacity = true
741 format = "%-I:%M%P %a %b %d"
746 format_muted = "🔇 %volume"
759 format = "/data %avail"
767 :header-args+: :tangle ~/.mbsyncrc
780 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin.gpg"
783 IMAPStore amin-remote
786 IMAPAccount amin-dovecot
790 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin-dovecot.gpg"
802 IMAPAccount uwaterloo
803 Host connect.uwaterloo.ca
805 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
808 IMAPStore uwaterloo-remote
811 IMAPAccount uwaterloo-dovecot
814 User abandali@uwaterloo.ca
815 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-dovecot.gpg"
818 IMAPStore uwaterloo-local
819 Account uwaterloo-dovecot
822 Master :uwaterloo-remote:
823 Slave :uwaterloo-local:
829 :header-args+: :tangle ~/.config/systemd/user/mbsync.service
832 #+begin_src conf :tangle no
834 Description=mbsync service
838 ExecStart=/usr/bin/mbsync -Va
839 StandardOutput=syslog
845 :header-args+: :tangle ~/.config/systemd/user/mbsync.timer
848 #+begin_src conf :tangle no
850 Description=mbsync timer
858 WantedBy=timers.target
863 :header-args+: :tangle ~/.latexmkrc
867 $pdf_previewer = "start zathura %O %S";
868 $clean_ext = "aux out";
870 # $pdf_update_method = 4;
871 # $pdf_update_command = "zathura %O %S";
873 # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
874 # by Ctrl+click in the PDF.
875 # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
877 # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
882 Improve XPS 15 9560's touchpad experience.
884 # begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
885 #+begin_src conf :tangle no
887 Identifier "libinput touchpad catchall"
890 Option "ClickMethod" "clickfinger"
891 Option "NaturalScrolling" "true"
892 Option "Tapping" "on"
893 Option "TappingButtonMap" "lrm"
899 #+begin_src conf :tangle /sudo::/etc/mkinitcpio.conf :comments none
902 # The following modules are loaded before any boot hooks are
903 # run. Advanced users may wish to specify all system modules
904 # in this array. For instance:
905 # MODULES=(piix ide_disk reiserfs)
909 # This setting includes any additional binaries a given user may
910 # wish into the CPIO image. This is run last, so it may be used to
911 # override the actual binaries included by a given hook
912 # BINARIES are dependency parsed, so you may safely ignore libraries
916 # This setting is similar to BINARIES above, however, files are added
917 # as-is and are not parsed in any way. This is useful for config files.
921 # This is the most important setting in this file. The HOOKS control the
922 # modules and scripts added to the image, and what happens at boot time.
923 # Order is important, and it is recommended that you do not change the
924 # order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
925 # help on a given hook.
926 # 'base' is _required_ unless you know precisely what you are doing.
927 # 'udev' is _required_ in order to automatically load modules
928 # 'filesystems' is _required_ unless you specify your fs modules in MODULES
930 ## This setup specifies all modules in the MODULES setting above.
931 ## No raid, lvm2, or encrypted root is needed.
934 ## This setup will autodetect all modules for your system and should
935 ## work as a sane default
936 # HOOKS=(base udev autodetect block filesystems)
938 ## This setup will generate a 'full' image which supports most systems.
939 ## No autodetection is done.
940 # HOOKS=(base udev block filesystems)
942 ## This setup assembles a pata mdadm array with an encrypted root FS.
943 ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
944 # HOOKS=(base udev block mdadm encrypt filesystems)
946 ## This setup loads an lvm2 volume group on a usb device.
947 # HOOKS=(base udev block lvm2 filesystems)
949 ## NOTE: If you have /usr on a separate partition, you MUST include the
950 # usr, fsck and shutdown hooks.
951 HOOKS=(base udev autodetect modconf block keyboard encrypt lvm2 resume filesystems fsck)
954 # Use this to compress the initramfs image. By default, gzip compression
955 # is used. Use 'cat' to create an uncompressed image.
963 # COMPRESSION_OPTIONS
964 # Additional options for the compressor
965 #COMPRESSION_OPTIONS=()
970 :header-args+: :tangle ~/.config/mpd/mpd.conf
974 # An example configuration file for MPD.
975 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
978 # Files and directories #######################################################
980 # This setting controls the top directory which MPD will search to discover the
981 # available audio files and add them to the daemon's online database. This
982 # setting defaults to the XDG directory, otherwise the music directory will be
983 # be disabled and audio files will only be accepted over ipc socket (using
984 # file:// protocol) or streaming files over an accepted protocol.
986 music_directory "~/usr/music"
988 # This setting sets the MPD internal playlist directory. The purpose of this
989 # directory is storage for playlists created by MPD. The server will use
990 # playlist files not created by the server but only if they are in the MPD
991 # format. This setting defaults to playlist saving being disabled.
993 playlist_directory "~/.mpd/playlists"
995 # This setting sets the location of the MPD database. This file is used to
996 # load the database at server start up and store the database while the
997 # server is not up. This setting defaults to disabled which will allow
998 # MPD to accept files over ipc socket (using file:// protocol) or streaming
999 # files over an accepted protocol.
1001 db_file "~/.mpd/database"
1003 # These settings are the locations for the daemon log files for the daemon.
1004 # These logs are great for troubleshooting, depending on your log_level
1007 # The special value "syslog" makes MPD use the local syslog daemon. This
1008 # setting defaults to logging to syslog, otherwise logging is disabled.
1010 log_file "~/.mpd/log"
1012 # This setting sets the location of the file which stores the process ID
1013 # for use of mpd --kill and some init scripts. This setting is disabled by
1014 # default and the pid file will not be stored.
1016 pid_file "~/.mpd/pid"
1018 # This setting sets the location of the file which contains information about
1019 # most variables to get MPD back into the same general shape it was in before
1020 # it was brought down. This setting is disabled by default and the server
1021 # state will be reset on server start up.
1023 state_file "~/.mpd/state"
1025 # The location of the sticker database. This is a database which
1026 # manages dynamic information attached to songs.
1028 sticker_file "~/.mpd/sticker.sql"
1030 ###############################################################################
1033 # General music daemon options ################################################
1035 # This setting specifies the user that MPD will run as. MPD should never run as
1036 # root and you may use this setting to make MPD change its user ID after
1037 # initialization. This setting is disabled by default and MPD is run as the
1042 # This setting specifies the group that MPD will run as. If not specified
1043 # primary group of user specified with "user" setting will be used (if set).
1044 # This is useful if MPD needs to be a member of group such as "audio" to
1045 # have permission to use sound card.
1049 # This setting sets the address for the daemon to listen on. Careful attention
1050 # should be paid if this is assigned to anything other then the default, any.
1051 # This setting can deny access to control of the daemon. Not effective if
1052 # systemd socket activiation is in use.
1055 #bind_to_address "any"
1057 # And for Unix Socket
1058 #bind_to_address "~/.mpd/socket"
1060 # This setting is the TCP port that is desired for the daemon to get assigned
1065 # This setting controls the type of information which is logged. Available
1066 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
1067 # argument is recommended for troubleshooting, though can quickly stretch
1068 # available resources on limited hardware storage.
1070 #log_level "default"
1072 # If you have a problem with your MP3s ending abruptly it is recommended that
1073 # you set this argument to "no" to attempt to fix the problem. If this solves
1074 # the problem, it is highly recommended to fix the MP3 files with vbrfix
1075 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
1076 # point gapless MP3 playback can be enabled.
1078 #gapless_mp3_playback "yes"
1080 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
1081 # of starting playback after startup.
1083 #restore_paused "no"
1085 # This setting enables MPD to create playlists in a format usable by other
1088 #save_absolute_paths_in_playlists "no"
1090 # This setting defines a list of tag types that will be extracted during the
1091 # audio file discovery process. The complete list of possible values can be
1092 # found in the user manual.
1093 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
1095 # This setting enables automatic update of MPD's database when files in
1096 # music_directory are changed.
1100 # Limit the depth of the directories being watched, 0 means only watch
1101 # the music directory itself. There is no limit by default.
1103 #auto_update_depth "3"
1105 ###############################################################################
1108 # Symbolic link behavior ######################################################
1110 # If this setting is set to "yes", MPD will discover audio files by following
1111 # symbolic links outside of the configured music_directory.
1113 #follow_outside_symlinks "yes"
1115 # If this setting is set to "yes", MPD will discover audio files by following
1116 # symbolic links inside of the configured music_directory.
1118 #follow_inside_symlinks "yes"
1120 ###############################################################################
1123 # Zeroconf / Avahi Service Discovery ##########################################
1125 # If this setting is set to "yes", service information will be published with
1128 #zeroconf_enabled "yes"
1130 # The argument to this setting will be the Zeroconf / Avahi unique name for
1131 # this MPD server on the network.
1133 #zeroconf_name "Music Player"
1135 ###############################################################################
1138 # Permissions #################################################################
1140 # If this setting is set, MPD will require password authorization. The password
1141 # setting can be specified multiple times for different password profiles.
1143 #password "password@read,add,control,admin"
1145 # This setting specifies the permissions a user has who has not yet logged in.
1147 #default_permissions "read,add,control,admin"
1149 ###############################################################################
1152 # Database #######################################################################
1157 # host "other.mpd.host"
1161 # Input #######################################################################
1166 # proxy "proxy.isp.com:8080"
1168 # proxy_password "password"
1172 ###############################################################################
1174 # Audio Output ################################################################
1185 path "/tmp/mpd.fifo"
1189 # MPD supports various audio output types, as well as playing through multiple
1190 # audio outputs at the same time, through multiple audio_output settings
1191 # blocks. Setting this block is optional, though the server will only attempt
1192 # autodetection for one sound card.
1194 # An example of an ALSA output:
1198 # name "My ALSA Device"
1199 ## device "hw:0,0" # optional
1200 ## mixer_type "hardware" # optional
1201 ## mixer_device "default" # optional
1202 ## mixer_control "PCM" # optional
1203 ## mixer_index "0" # optional
1206 # An example of an OSS output:
1210 # name "My OSS Device"
1211 ## device "/dev/dsp" # optional
1212 ## mixer_type "hardware" # optional
1213 ## mixer_device "/dev/mixer" # optional
1214 ## mixer_control "PCM" # optional
1217 # An example of a shout output (for streaming to Icecast):
1221 # encoder "vorbis" # optional
1222 # name "My Shout Stream"
1229 # format "44100:16:1"
1230 ## protocol "icecast2" # optional
1231 ## user "source" # optional
1232 ## description "My Stream Description" # optional
1233 ## url "http://example.com" # optional
1234 ## genre "jazz" # optional
1235 ## public "no" # optional
1236 ## timeout "2" # optional
1237 ## mixer_type "software" # optional
1240 # An example of a recorder output:
1244 # name "My recorder"
1245 # encoder "vorbis" # optional, vorbis or lame
1246 # path "/var/lib/mpd/recorder/mpd.ogg"
1247 ## quality "5.0" # do not define if bitrate is defined
1248 # bitrate "128" # do not define if quality is defined
1249 # format "44100:16:1"
1252 # An example of a httpd output (built-in HTTP streaming server):
1256 # name "My HTTP Stream"
1257 # encoder "vorbis" # optional, vorbis or lame
1259 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
1260 ## quality "5.0" # do not define if bitrate is defined
1261 # bitrate "128" # do not define if quality is defined
1262 # format "44100:16:1"
1263 # max_clients "0" # optional 0=no limit
1266 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
1270 # name "My Pulse Output"
1271 ## server "remote_server" # optional
1272 ## sink "remote_server_sink" # optional
1275 # An example of a winmm output (Windows multimedia API).
1279 # name "My WinMM output"
1280 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1282 ## device "0" # optional
1283 ## mixer_type "hardware" # optional
1286 # An example of an openal output.
1290 # name "My OpenAL output"
1291 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1294 # An example of an sndio output.
1298 # name "sndio output"
1299 # mixer_type "software"
1302 # An example of an OS X output:
1306 # name "My OS X Device"
1307 ## device "Built-in Output" # optional
1308 ## channel_map "-1,-1,0,1" # optional
1311 ## Example "pipe" output:
1316 # command "aplay -f cd 2>/dev/null"
1317 ## Or if you're want to use AudioCompress
1318 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
1319 ## Or to send raw PCM stream through PCM:
1320 # command "nc example.org 8765"
1321 # format "44100:16:2"
1324 ## An example of a null output (for no audio output):
1328 # name "My Null Output"
1329 # mixer_type "none" # optional
1332 ###############################################################################
1335 # Normalization automatic volume adjustments ##################################
1337 # This setting specifies the type of ReplayGain to use. This setting can have
1338 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
1339 # chooses between "track" and "album" depending on the current state of
1340 # random playback. If random playback is enabled then "track" mode is used.
1341 # See <http://www.replaygain.org> for more details about ReplayGain.
1342 # This setting is off by default.
1346 # This setting sets the pre-amp used for files that have ReplayGain tags. By
1347 # default this setting is disabled.
1349 #replaygain_preamp "0"
1351 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1352 # By default this setting is disabled.
1354 #replaygain_missing_preamp "0"
1356 # This setting enables or disables ReplayGain limiting.
1357 # MPD calculates actual amplification based on the ReplayGain tags
1358 # and replaygain_preamp / replaygain_missing_preamp setting.
1359 # If replaygain_limit is enabled MPD will never amplify audio signal
1360 # above its original level. If replaygain_limit is disabled such amplification
1361 # might occur. By default this setting is enabled.
1363 #replaygain_limit "yes"
1365 # This setting enables on-the-fly normalization volume adjustment. This will
1366 # result in the volume of all playing audio to be adjusted so the output has
1367 # equal "loudness". This setting is disabled by default.
1369 #volume_normalization "no"
1371 ###############################################################################
1373 # Character Encoding ##########################################################
1375 # If file or directory names do not display correctly for your locale then you
1376 # may need to modify this setting.
1378 #filesystem_charset "UTF-8"
1380 ###############################################################################
1385 :header-args+: :tangle ~/.msmtprc
1389 # Set default values for all following accounts.
1394 #tls_trust_file /etc/ssl/certs/ca-certificates.crt
1395 logfile ~/.msmtp.log
1400 # use `msmtp -a aminb --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1401 tls_fingerprint DE:5F:73:0C:F7:9A:7B:1D:55:AA:49:28:E7:28:49:24:A4:08:55:00:7A:7E:D8:7F:30:06:26:24:11:29:61:07
1405 passwordeval gpg2 --no-tty -q -d ~/.passwd/amin.gpg
1407 account bandali-me : aminb
1408 from amin@bandali.me
1412 host fencepost.gnu.org
1413 # use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1414 tls_fingerprint FB:DB:E3:7D:96:22:22:20:9F:4A:FD:70:96:99:50:5C:39:B2:29:D9:47:47:52:A8:5A:4A:DF:70:9D:21:DE:C4
1416 from bandali@gnu.org
1418 passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
1421 account gnu-aminb : gnu
1423 account gnu-amin : gnu
1425 account gnu-mab : gnu
1430 host connect.uwaterloo.ca
1432 from abandali@uwaterloo.ca
1434 passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg
1435 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1437 # Set a default account
1438 account default : aminb
1445 :header-args+: :tangle ~/.ncmpcpp/config
1448 #+begin_src conf :tangle no
1449 ##############################################################
1450 ## This is the example configuration file. Copy it to ##
1451 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1452 ## and set up your preferences. ##
1453 ##############################################################
1455 ##### directories ######
1457 ## Directory for storing ncmpcpp related files.
1458 ## Changing it is useful if you want to store
1459 ## everything somewhere else and provide command
1460 ## line setting for alternative location to config
1461 ## file which defines that while launching ncmpcpp.
1464 ncmpcpp_directory = ~/.ncmpcpp
1467 ## Directory for storing downloaded lyrics. It
1468 ## defaults to ~/.lyrics since other MPD clients
1469 ## (eg. ncmpc) also use that location.
1472 #lyrics_directory = ~/.lyrics
1474 ##### connection settings #####
1476 #mpd_host = localhost
1480 #mpd_connection_timeout = 5
1482 ## Needed for tag editor and file operations to work.
1484 mpd_music_dir = ~/usr/music
1486 #mpd_crossfade_time = 5
1488 ##### music visualizer #####
1490 ## Note: In order to make music visualizer work you'll
1491 ## need to use mpd fifo output, whose format parameter
1492 ## has to be set to 44100:16:1 for mono visualization
1493 ## or 44100:16:2 for stereo visualization. Example
1494 ## configuration (it has to be put into mpd.conf):
1498 ## name "Visualizer feed"
1499 ## path "/tmp/mpd.fifo"
1500 ## format "44100:16:2"
1504 visualizer_fifo_path = /tmp/mpd.fifo
1507 ## Note: Below parameter is needed for ncmpcpp
1508 ## to determine which output provides data for
1509 ## visualizer and thus allow syncing between
1510 ## visualization and sound as currently there
1511 ## are some problems with it.
1514 visualizer_output_name = my fifo
1517 ## If you set format to 44100:16:2, make it 'yes'.
1519 visualizer_in_stereo = yes
1522 ## Multiply received samples by given value. Very
1523 ## useful for proper visualization of quiet music.
1525 #visualizer_sample_multiplier = 1
1528 ## Note: Below parameter defines how often ncmpcpp
1529 ## has to "synchronize" visualizer and audio outputs.
1530 ## 30 seconds is optimal value, but if you experience
1531 ## synchronization problems, set it to lower value.
1532 ## Keep in mind that sane values start with >=10.
1535 visualizer_sync_interval = 30
1538 ## Note: To enable spectrum frequency visualization
1539 ## you need to compile ncmpcpp with fftw3 support.
1542 ## Available values: spectrum, wave, wave_filled, ellipse.
1544 visualizer_type = spectrum
1546 #visualizer_look = ●▮
1547 visualizer_look = "●•"
1549 #visualizer_color = blue, cyan, green, yellow, magenta, red
1551 ## Alternative subset of 256 colors for terminals that support it.
1553 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1555 ##### system encoding #####
1557 ## ncmpcpp should detect your charset encoding
1558 ## but if it failed to do so, you can specify
1559 ## charset encoding you are using here.
1561 ## Note: You can see whether your ncmpcpp build
1562 ## supports charset detection by checking output
1563 ## of `ncmpcpp --version`.
1565 ## Note: Since MPD uses UTF-8 by default, setting
1566 ## this option makes sense only if your encoding
1570 #system_encoding = ""
1574 ## Time of inactivity (in seconds) after playlist
1575 ## highlighting will be disabled (0 = always on).
1577 #playlist_disable_highlight_delay = 5
1579 ## Defines how long messages are supposed to be visible.
1581 #message_delay_time = 5
1583 ##### song format #####
1585 ## For a song format you can use:
1591 ## %A - album artist
1595 ## %n - track number (01/12 -> 01)
1596 ## %N - full track info (01/12 -> 01/12)
1603 ## $R - begin right alignment
1605 ## If you want to make sure that a part of the format is displayed
1606 ## only when certain tags are present, you can archieve it by
1607 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1608 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1609 ## It is also possible to define a list of alternatives by providing
1610 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
1611 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1614 ## Note: If you want to set limit on maximal length of a tag, just
1615 ## put the appropriate number between % and character that defines
1616 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1618 ## In addition, formats support markers used for text attributes.
1619 ## They are followed by character '$'. After that you can put:
1621 ## - 0 - default window color (discards all other colors)
1630 ## - 9 - end of current color
1632 ## - u - underline text
1633 ## - r - reverse colors
1634 ## - a - use alternative character set
1636 ## If you don't want to use a non-color attribute anymore, just put it
1637 ## again, but this time insert character '/' between '$' and attribute
1638 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1639 ## or filename with reversed colors.
1641 ## If you want to use 256 colors and/or background colors in formats
1642 ## (the naming scheme is described below in section about color
1643 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
1644 ## the artist tag to one of the non-standard colors and make it have
1645 ## yellow background, you need to write $(197_yellow)%a$(end). Note
1646 ## that for standard colors this is interchangable with attributes
1649 ## Note: colors can be nested.
1652 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1654 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1656 #song_library_format = {%n - }{%t}|{%f}
1659 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1661 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1663 #now_playing_prefix = $b
1665 #now_playing_suffix = $/b
1667 #browser_playlist_prefix = "$2playlist$9 "
1669 #selected_item_prefix = $6
1671 #selected_item_suffix = $9
1673 #modified_item_prefix = $3> $9
1676 ## Note: attributes are not supported for the following variables.
1678 #song_window_title_format = {%a - }{%t}|{%f}
1680 ## Note: Below variables are used for sorting songs in browser.
1681 ## The sort mode determines how songs are sorted, and can be used
1682 ## in combination with a sort format to specify a custom sorting format.
1683 ## Available values for browser_sort_mode are "name", "mtime", "format"
1687 #browser_sort_mode = name
1689 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1691 ##### columns settings #####
1693 ## syntax of song columns list format is "column column etc."
1695 ## - syntax for each column is:
1697 ## (width of the column)[color of the column]{displayed tag}
1699 ## Note: Width is by default in %, if you want a column to
1700 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1701 ## will be the column that take 10% of screen (so the real width
1702 ## will depend on actual screen size), whereas (10f)[white]{a}
1703 ## will take 10 terminal cells, no matter how wide the screen is.
1705 ## - color is optional (if you want the default one,
1706 ## leave the field empty).
1708 ## Note: You can give a column additional attributes by putting appropriate
1709 ## character after displayed tag character. Available attributes are:
1711 ## - r - column will be right aligned
1712 ## - E - if tag is empty, empty tag marker won't be displayed
1716 ## - give a column custom name by putting it after attributes,
1717 ## separated with character ':', e.g. {lr:Length} gives you
1718 ## right aligned column of lengths named "Length".
1720 ## - define sequence of tags, that have to be displayed in case
1721 ## predecessor is empty in a way similar to the one in classic
1722 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1723 ## creates column named "Owner" that tries to display artist
1724 ## tag and then composer and performer if previous ones are
1728 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1730 ##### various settings #####
1733 ## Note: Custom command that will be executed each
1734 ## time song changes. Useful for notifications etc.
1736 #execute_on_song_change = ""
1738 #playlist_show_mpd_host = no
1740 #playlist_show_remaining_time = no
1742 #playlist_shorten_total_times = no
1744 #playlist_separate_albums = no
1747 ## Note: Possible display modes: classic, columns.
1749 #playlist_display_mode = columns
1751 #browser_display_mode = classic
1753 #search_engine_display_mode = classic
1755 #playlist_editor_display_mode = classic
1757 #discard_colors_if_item_is_selected = yes
1759 #incremental_seeking = yes
1763 #volume_change_step = 2
1765 #autocenter_mode = no
1767 #centered_cursor = no
1770 ## Note: You can specify third character which will
1771 ## be used to build 'empty' part of progressbar.
1773 #progressbar_look = =>
1774 progressbar_look = "─╼╶"
1775 #progressbar_look = "─⊙╶"
1777 #progressbar_boldness = yes
1779 ## Available values: database, playlist.
1781 #default_place_to_search_in = database
1783 ## Available values: classic, alternative.
1785 #user_interface = classic
1787 #data_fetching_delay = yes
1789 ## Available values: artist, album_artist, date, genre, composer, performer.
1791 #media_library_primary_tag = artist
1793 ## Available values: wrapped, normal.
1795 #default_find_mode = wrapped
1797 #default_tag_editor_pattern = %n - %t
1799 #header_visibility = yes
1801 #statusbar_visibility = yes
1803 #titles_visibility = yes
1805 #header_text_scrolling = yes
1807 #cyclic_scrolling = no
1811 #follow_now_playing_lyrics = no
1813 #fetch_lyrics_for_current_song_in_background = no
1815 #store_lyrics_in_song_dir = no
1817 #generate_win32_compatible_filenames = yes
1819 #allow_for_physical_item_deletion = no
1822 ## Note: If you set this variable, ncmpcpp will try to
1823 ## get info from last.fm in language you set and if it
1824 ## fails, it will fall back to english. Otherwise it will
1825 ## use english the first time.
1827 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1829 #lastfm_preferred_language = en
1831 #show_hidden_files_in_local_browser = no
1834 ## How shall screen switcher work?
1836 ## - "previous" - switch between the current and previous screen.
1837 ## - "screen1,...,screenN" - switch between given sequence of screens.
1839 ## Screens available for use: help, playlist, browser, search_engine,
1840 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1842 #screen_switcher_mode = playlist, browser
1845 ## Note: You can define startup screen
1846 ## by choosing screen from the list above.
1848 #startup_screen = playlist
1851 ## Note: You can define startup slave screen
1852 ## by choosing screen from the list above or
1853 ## an empty value for no slave screen.
1855 #startup_slave_screen = ""
1857 #startup_slave_screen_focus = no
1860 ## Default width of locked screen (in %).
1861 ## Acceptable values are from 20 to 80.
1864 #locked_screen_width_part = 50
1866 #ask_for_locked_screen_width_part = yes
1868 #jump_to_now_playing_song_at_start = yes
1870 #ask_before_clearing_playlists = yes
1872 #clock_display_seconds = no
1874 #display_volume_level = yes
1876 #display_bitrate = no
1878 #display_remaining_time = no
1880 ## Available values: none, basic, extended, perl.
1882 #regular_expressions = perl
1885 ## Note: If below is enabled, ncmpcpp will ignore leading
1886 ## "The" word while sorting items in browser, tags in
1887 ## media library, etc.
1889 #ignore_leading_the = no
1891 #block_search_constraints_change_if_items_found = yes
1893 #mouse_support = yes
1895 #mouse_list_scroll_whole_page = yes
1897 #empty_tag_marker = <empty>
1899 #tags_separator = " | "
1901 #tag_editor_extended_numeration = no
1903 #media_library_sort_by_mtime = no
1905 #enable_window_title = yes
1908 ## Note: You can choose default search mode for search
1909 ## engine. Available modes are:
1911 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1912 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1913 ## but if your mpd is on a remote machine, downloading big database
1914 ## to process it can take a while
1915 ## - 3 - match only exact values (this mode uses mpd function for searching
1916 ## in database and local one for searching in current playlist)
1919 #search_engine_default_search_mode = 1
1921 #external_editor = nano
1923 ## Note: set to yes if external editor is a console application.
1925 #use_console_editor = yes
1927 ##### colors definitions #####
1929 ## It is possible to set a background color by setting a color
1930 ## value "<foreground>_<background>", e.g. red_black will set
1931 ## foregound color to red and background color to black.
1933 ## In addition, for terminals that support 256 colors it
1934 ## is possible to set one of them by using a number in range
1935 ## [1, 256] instead of color name, e.g. numerical value
1936 ## corresponding to red_black is 2_1. To find out if the
1937 ## terminal supports 256 colors, run ncmpcpp and check out
1938 ## the bottom of the help screen for list of available colors
1939 ## and their numerical values.
1941 ## Note: due to technical limitations of ncurses, if 256 colors
1942 ## are used, it is possible to either use only the colors with
1943 ## default background color, or all pairs from 1_1 up to 254_127,
1944 ## depending on the ncurses version used.
1947 #colors_enabled = yes
1949 #empty_tag_color = cyan
1951 #header_window_color = default
1953 #volume_color = default
1955 #state_line_color = default
1957 #state_flags_color = default
1959 #main_window_color = yellow
1965 #main_window_highlight_color = yellow
1967 #progressbar_color = black
1969 #progressbar_elapsed_color = green
1971 #statusbar_color = default
1973 #alternative_ui_separator_color = black
1975 #active_column_color = red
1977 #window_border_color = green
1979 #active_window_border = red
1985 :header-args+: :tangle ~/.ncmpcpp/bindings
1988 #+begin_src conf :tangle no
2013 move_sort_order_down
2022 :header-args+: :tangle ~/.notmuch-config
2026 # .notmuch-config - Configuration file for the notmuch mail system
2028 # For more information about notmuch, see https://notmuchmail.org
2030 # Database configuration
2032 # The only value supported here is 'path' which should be the top-level
2033 # directory where your mail currently exists and to where mail will be
2034 # delivered in the future. Files should be individual email messages.
2035 # Notmuch will store its database within a sub-directory of the path
2036 # configured here named ".notmuch".
2039 path=/home/amin/oldmail
2041 # User configuration
2043 # Here is where you can let notmuch know how you would like to be
2044 # addressed. Valid settings are
2046 # name Your full name.
2047 # primary_email Your primary email address.
2048 # other_email A list (separated by ';') of other email addresses
2049 # at which you receive email.
2051 # Notmuch will use the various email addresses configured here when
2052 # formatting replies. It will avoid including your own addresses in the
2053 # recipient list of replies, and will set the From address based on the
2054 # address to which the original email was addressed.
2058 primary_email=amin@aminb.org
2059 other_email=bandali@gnu.org;abandali@uwaterloo.ca;
2061 # Configuration for "notmuch new"
2063 # The following options are supported here:
2065 # tags A list (separated by ';') of the tags that will be
2066 # added to all messages incorporated by "notmuch new".
2068 # ignore A list (separated by ';') of file and directory names
2069 # that will not be searched for messages by "notmuch new".
2071 # NOTE: *Every* file/directory that goes by one of those
2072 # names will be ignored, independent of its depth/location
2073 # in the mail store.
2078 ignore=.uidvalidity;.mbsyncstate;/.*/dovecot*/
2080 # Search configuration
2082 # The following option is supported here:
2085 # A ;-separated list of tags that will be excluded from
2086 # search results by default. Using an excluded tag in a
2087 # query will override that exclusion.
2090 exclude_tags=deleted;spam;
2092 # Maildir compatibility configuration
2094 # The following option is supported here:
2096 # synchronize_flags Valid values are true and false.
2098 # If true, then the following maildir flags (in message filenames)
2099 # will be synchronized with the corresponding notmuch tags:
2107 # S unread (added when 'S' flag is not present)
2109 # The "notmuch new" command will notice flag changes in filenames
2110 # and update tags, while the "notmuch tag" and "notmuch restore"
2111 # commands will notice tag changes and update flags in filenames
2114 synchronize_flags=true
2116 # Cryptography related configuration
2118 # The following option is supported here:
2121 # binary name or full path to invoke gpg.
2129 :header-args+: :tangle ~/mail/.notmuch/hooks/pre-new :shebang "#!/bin/sh"
2133 touch /tmp/gnusieve.log
2134 sieve-filter -eW -o postmaster_address=postmaster@aminb.org \
2135 -o mail_location=maildir:$MAILDIR/gnu:LAYOUT=fs:INBOX=$MAILDIR/gnu/Inbox ~/sieve/gnu.sieve INBOX delete &>>/tmp/gnusieve.log
2140 :header-args+: :tangle ~/mail/.notmuch/hooks/post-new :shebang "#!/bin/sh"
2144 # apply sent tag to messages sent by me
2145 notmuch tag -new +sent -- from:amin@aminb.org or from:bandali@gnu.org or from:aminb@gnu.org or from:amin@gnu.org or from:mab@gnu.org or from:abandali@uwaterloo.ca
2148 notmuch tag -latest -- tag:latest
2149 notmuch tag +inbox +unread +latest -new -- tag:new
2152 # apply tags to lists
2155 notmuch tag -inbox +lists/hackernewsletter -- folder:amin/lists/hackernewsletter
2156 notmuch tag -inbox +lists/haskell-weekly -- folder:amin/lists/haskell-weekly
2158 notmuch tag -inbox +pay -- folder:amin/pay
2159 notmuch tag -inbox +banking -- folder:amin/banking
2160 notmuch tag -inbox +work -- folder:amin/work
2164 notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136
2165 notmuch tag -inbox +uw/cs846 -- folder:uwaterloo/lists/cs846
2166 notmuch tag -inbox +uw/ece750 -- folder:uwaterloo/lists/ece750
2167 notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212
2168 notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463
2170 notmuch tag -inbox +lists/alloytools -- folder:uwaterloo/lists/alloytools
2171 notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle
2172 notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA
2173 notmuch tag -inbox +lists/math-grad -- folder:uwaterloo/lists/Math-grad
2174 notmuch tag -inbox +lists/scs-grads -- folder:uwaterloo/lists/scs-grads
2175 notmuch tag -inbox +lists/watform-students -- folder:uwaterloo/lists/Watform-students
2179 notmuch tag -inbox +l/emacs-devel -- folder:gnu/l/emacs-devel
2180 notmuch tag -inbox +l/emacs-orgmode -- folder:gnu/l/emacs-orgmode
2181 notmuch tag -inbox +l/emacsconf-discuss -- folder:gnu/l/emacsconf-discuss
2182 notmuch tag -inbox +l/fencepost-users -- folder:gnu/l/fencepost-users
2183 notmuch tag -inbox +l/guix-devel -- folder:gnu/l/guix-devel
2184 notmuch tag -inbox +l/guile-devel -- folder:gnu/l/guile-devel
2185 notmuch tag -inbox +l/help-gnu-emacs -- folder:gnu/l/help-gnu-emacs
2186 notmuch tag -inbox +l/info-gnu-emacs -- folder:gnu/l/info-gnu-emacs
2187 notmuch tag -inbox +l/www-commits -- folder:gnu/l/www-commits
2188 notmuch tag -inbox +l/www-discuss -- folder:gnu/l/www-discuss
2189 notmuch tag -inbox +webmasters -- folder:gnu/webmasters
2191 notmuch tag -inbox +l/deepspec -- folder:gnu/l/deepspec
2192 notmuch tag -inbox +l/haskell-cafe -- folder:gnu/l/haskell-cafe
2193 notmuch tag -inbox +l/haskell-art -- folder:gnu/l/haskell-art
2194 notmuch tag -inbox +l/notmuch -- folder:gnu/l/notmuch
2196 notmuch tag -inbox +l/~aminb/test-priv -- folder:gnu/l/~aminb/test-priv
2197 notmuch tag -inbox +l/~sircmpwn/sr.ht-admins -- folder:gnu/l/~sircmpwn/sr.ht-admins
2198 notmuch tag -inbox +l/~sircmpwn/sr.ht-announce -- folder:gnu/l/~sircmpwn/sr.ht-announce
2199 notmuch tag -inbox +l/~sircmpwn/sr.ht-dev -- folder:gnu/l/~sircmpwn/sr.ht-dev
2200 notmuch tag -inbox +l/~sircmpwn/sr.ht-discuss -- folder:gnu/l/~sircmpwn/sr.ht-discuss
2203 notmuch tag -inbox -unread +archive/notmuch -- path:archive/notmuch/**
2204 notmuch tag -inbox -unread +archive/emacs-devel -- path:archive/emacs-devel/**
2209 :header-args+: :tangle ~/.config/systemd/user/notmuch.service
2212 #+begin_src conf :tangle no
2214 Description=notmuch service
2218 ExecStart=/usr/bin/notmuch new
2219 StandardOutput=syslog
2220 StandardError=syslog
2225 :header-args+: :tangle ~/.config/systemd/user/notmuch.timer
2228 #+begin_src conf :tangle no
2230 Description=notmuch timer
2235 Unit=notmuch.service
2238 WantedBy=timers.target
2244 :header-args+: :tangle ~/mail/aminb.org/amin/sieve/amin.sieve :comments none
2248 require ["regex", "variables", "fileinto", "envelope",
2249 "mailbox", "imap4flags", "include"];
2253 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
2254 fileinto :create "gnu.webmasters";
2258 include :personal "lists";
2263 :header-args+: :tangle ~/mail/aminb.org/amin/sieve/lists.sieve :comments none
2267 require ["regex", "variables", "fileinto", "envelope",
2268 "mailbox", "imap4flags", "include"];
2272 header :contains "list-id"
2273 [ "<emacs-devel.gnu.org>"
2274 , "<emacs-orgmode.gnu.org>"
2275 , "<emacsconf-discuss.gnu.org>"
2276 , "<fencepost-users.gnu.org>"
2277 , "<guix-devel.gnu.org>"
2278 , "<guile-devel.gnu.org>"
2279 , "<help-gnu-emacs.gnu.org>"
2280 , "<info-gnu-emacs.gnu.org>"
2281 , "<info-guix.gnu.org>"
2282 , "<www-commits.gnu.org>"
2283 , "<www-discuss.gnu.org>"
2284 , "<deepspec.lists.cs.princeton.edu>"
2285 , "<haskell-cafe.haskell.org>"
2286 , "<haskell-art.we.lurk.org>"
2287 , "<notmuch.notmuchmail.org>"
2289 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
2290 set :lower "listname" "${1}";
2291 fileinto :create "gnu.${listname}";
2296 # sr.ht lists, with dots ('.') omitted
2298 header :contains "list-id"
2299 [ "<~bandali/public-inbox@lists.sr.ht>"
2300 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
2301 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
2302 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
2303 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
2305 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
2306 set :lower "username" "${1}";
2307 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
2308 fileinto :create "gnu.${username}.${listname}";
2316 :header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service"
2321 Description=Powertop tunings
2324 ExecStart=/usr/bin/powertop --auto-tune
2325 RemainAfterExit=true
2328 WantedBy=multi-user.target
2333 :header-args+: :tangle ~/.config/redshift.conf :comments none
2337 ; Global settings for redshift
2339 ; Set the day and night screen temperatures (Neutral is 6500K)
2350 ; Enable/Disable a smooth transition between day and night
2351 ; 0 will cause a direct change from day to night screen temperature.
2352 ; 1 will gradually increase or decrease the screen temperature.
2355 ; Set the screen brightness. Default is 1.0.
2357 ; It is also possible to use different settings for day and night
2358 ; since version 1.8.
2360 ;brightness-night=0.4
2361 ; Set the screen gamma (for all colors, or each color channel
2366 ; This can also be set individually for day and night since
2368 ;gamma-day=0.8:0.7:0.8
2371 ; Set the location-provider: 'geoclue2' or 'manual'
2372 ; type 'redshift -l list' to see possible values.
2373 ; The location provider settings are in a different section.
2374 ;location-provider=manual
2375 location-provider=geoclue2
2377 ; Set the adjustment-method: 'randr', 'vidmode'
2378 ; type 'redshift -m list' to see all possible values.
2379 ; 'randr' is the preferred method, 'vidmode' is an older API.
2380 ; but works in some cases when 'randr' does not.
2381 ; The adjustment method settings are in a different section.
2382 adjustment-method=randr
2384 ; Configuration of the location-provider:
2385 ; type 'redshift -l PROVIDER:help' to see the settings.
2386 ; ex: 'redshift -l manual:help'
2387 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
2388 ; are negative numbers.
2393 ; Configuration of the adjustment-method
2394 ; type 'redshift -m METHOD:help' to see the settings.
2395 ; ex: 'redshift -m randr:help'
2396 ; In this example, randr is configured to adjust screen 1.
2397 ; Note that the numbering starts from 0, so this is actually the
2398 ; second screen. If this option is not specified, Redshift will try
2399 ; to adjust _all_ screens.
2406 :header-args+: :tangle ~/.config/rofi/config
2410 ! rofi.font: Ubuntu Mono 13
2411 ! rofi.font: Inconsolata 16
2412 ! rofi.font: Iosevka 13
2413 ! rofi.font: Source Code Pro 11
2414 rofi.font: Source Code Pro 10.5
2415 rofi.modi: run,window
2423 !rofi.theme: /usr/share/rofi/themes//Arc.rasi
2424 !rofi.theme: /usr/share/rofi/themes//Paper.rasi
2425 !rofi.theme: /usr/share/rofi/themes//sidebar.rasi
2427 rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi
2432 :header-args+: :tangle ~/.config/rofi-pass/config
2436 # permanently set alternative root dir
2437 # root=/path/to/root
2439 # rofi command. Make sure to have "$@" as last argument
2441 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
2442 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
2445 # xdotool needs the keyboard layout to be set using setxkbmap
2446 # You can do this in your autostart scripts (e.g. xinitrc)
2448 # If for some reason, you cannot do this, you can set the command here.
2449 # and set fix_layout to true
2458 USERNAME_field='user'
2459 AUTOTYPE_field='autotype'
2461 # delay to be used for :delay keyword
2464 ## Programs to be used
2473 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
2476 default_autotype='user :tab pass'
2478 # color of the help messages
2479 # leave empty for autodetection
2480 help_color="#4872FF"
2482 # Clipboard settings
2483 # Possible options: primary, clipboard, both
2486 # Options for generating new password entries
2487 # default_user is also used for password files that have no user field.
2489 default_user2=aminban
2492 # Custom Keybindings
2516 :header-args+: :tangle ~/.config/sway/config
2530 set $menu rofi -show run -display-run '> ' -display-window ' 🗔 '
2532 ### Output configuration
2534 # Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
2535 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
2537 # Example configuration:
2539 # output HDMI-A-1 resolution 1920x1080 position 1920,0
2541 # You can get the names of your outputs by running: swaymsg -t get_outputs
2543 ### Idle configuration
2546 timeout 120 '[ -f ~/.nosleep ] || swaymsg "output * dpms off"' \
2547 resume '[ -f ~/.nosleep ] || swaymsg "output * dpms on"' \
2555 bindsym $mod+Return exec $term -name floating
2556 bindsym $mod+Shift+Return exec $term
2557 for_window [class="URxvt" instance="floating"] floating enable
2559 # kill focused window
2560 bindsym $mod+Shift+q kill
2562 # start your launcher
2563 bindsym $mod+d exec $menu
2566 bindsym $mod2+space exec rofi-pass
2568 # Drag floating windows by holding down $mod and left mouse button.
2569 # Resize them with right mouse button + $mod.
2570 # Despite the name, also works for non-floating windows.
2571 # Change normal to inverse to use left mouse button for resizing and right
2572 # mouse button for dragging.
2573 floating_modifier $mod normal
2575 # reload the configuration file
2576 bindsym $mod+Shift+c reload
2578 # exit sway (logs you out of your wayland session)
2579 # bindsym $mod+Shift+e exit
2581 bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
2582 bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
2583 bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
2585 bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
2586 bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
2587 bindsym XF86AudioMute exec pamixer --toggle-mute
2588 bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
2590 bindsym $mod+Shift+apostrophe exec rofi-remmina.py # choose remmina connection
2592 # original sway workspace switch and window move
2593 bindsym $mod+bracketleft workspace prev
2594 bindsym $mod+bracketright workspace next
2595 bindsym $mod+braceleft move container to workspace prev
2596 bindsym $mod+braceright move container to workspace next
2598 # bspwm-esque workspace switch and window move
2599 bindsym $mod2+bracketleft exec sway-ws-util switch prev
2600 bindsym $mod2+bracketright exec sway-ws-util switch next
2601 bindsym $mod2+braceleft exec sway-ws-util move prev follow
2602 bindsym $mod2+braceright exec sway-ws-util move next follow
2606 # Move your focus around
2607 bindsym $mod+$left focus left
2608 bindsym $mod+$down focus down
2609 bindsym $mod+$up focus up
2610 bindsym $mod+$right focus right
2611 # or use $mod+[up|down|left|right]
2612 bindsym $mod+Left focus left
2613 bindsym $mod+Down focus down
2614 bindsym $mod+Up focus up
2615 bindsym $mod+Right focus right
2617 # _move_ the focused window with the same, but add Shift
2618 bindsym $mod+Shift+$left move left
2619 bindsym $mod+Shift+$down move down
2620 bindsym $mod+Shift+$up move up
2621 bindsym $mod+Shift+$right move right
2622 # ditto, with arrow keys
2623 bindsym $mod+Shift+Left move left
2624 bindsym $mod+Shift+Down move down
2625 bindsym $mod+Shift+Up move up
2626 bindsym $mod+Shift+Right move right
2630 # switch to workspace
2631 bindsym $mod+1 workspace 1
2632 bindsym $mod+2 workspace 2
2633 bindsym $mod+3 workspace 3
2634 bindsym $mod+4 workspace 4
2635 bindsym $mod+5 workspace 5
2636 bindsym $mod+6 workspace 6
2637 bindsym $mod+7 workspace 7
2638 bindsym $mod+8 workspace 8
2639 bindsym $mod+9 workspace 9
2640 bindsym $mod+0 workspace 10
2641 # move focused container to workspace
2642 bindsym $mod+Shift+1 move container to workspace 1
2643 bindsym $mod+Shift+2 move container to workspace 2
2644 bindsym $mod+Shift+3 move container to workspace 3
2645 bindsym $mod+Shift+4 move container to workspace 4
2646 bindsym $mod+Shift+5 move container to workspace 5
2647 bindsym $mod+Shift+6 move container to workspace 6
2648 bindsym $mod+Shift+7 move container to workspace 7
2649 bindsym $mod+Shift+8 move container to workspace 8
2650 bindsym $mod+Shift+9 move container to workspace 9
2651 bindsym $mod+Shift+0 move container to workspace 10
2652 # Note: workspaces can have any name you want, not just numbers.
2653 # We just use 1-10 as the default.
2657 # You can "split" the current object of your focus with
2658 # $mod+b or $mod+v, for horizontal and vertical splits
2660 bindsym $mod+b splith
2661 bindsym $mod+v splitv
2663 # Switch the current container between different layout styles
2664 bindsym $mod+s layout stacking
2665 bindsym $mod+w layout tabbed
2666 bindsym $mod+e layout toggle split
2668 # Make the current focus fullscreen
2669 bindsym $mod+f fullscreen
2671 # Toggle sticky-ness of the current (floating) window
2672 bindsym $mod+$mod2+space sticky toggle
2674 # Toggle the current focus between tiling and floating mode
2675 bindsym $mod+Shift+space floating toggle
2677 # Swap focus between the tiling area and the floating area
2678 bindsym $mod+space focus mode_toggle
2680 # move focus to the parent container
2681 bindsym $mod+a focus parent
2685 # Sway has a "scratchpad", which is a bag of holding for windows.
2686 # You can send windows there and get them back later.
2688 # Move the currently focused window to the scratchpad
2689 bindsym $mod+Shift+minus move scratchpad
2691 # Show the next scratchpad window or hide the focused scratchpad window.
2692 # If there are multiple scratchpad windows, this command cycles through them.
2693 bindsym $mod+minus scratchpad show
2695 # Resizing containers:
2698 # left will shrink the containers width
2699 # right will grow the containers width
2700 # up will shrink the containers height
2701 # down will grow the containers height
2702 bindsym $left resize shrink width 10px
2703 bindsym $down resize grow height 10px
2704 bindsym $up resize shrink height 10px
2705 bindsym $right resize grow width 10px
2707 # ditto, with arrow keys
2708 bindsym Left resize shrink width 10px
2709 bindsym Down resize grow height 10px
2710 bindsym Up resize shrink height 10px
2711 bindsym Right resize grow width 10px
2713 # return to default mode
2714 bindsym Return mode "default"
2715 bindsym Escape mode "default"
2717 bindsym $mod+Shift+r mode "resize"
2723 set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown
2724 mode "$mode_system" {
2725 bindsym l exec swaylock, mode "default"
2726 bindsym e exec swaymsg exit, mode "default"
2727 bindsym s exec systemctl suspend, mode "default"
2728 bindsym h exec systemctl hibernate, mode "default"
2729 bindsym r exec systemctl reboot, mode "default"
2730 bindsym Shift+s exec systemctl poweroff -i, mode "default"
2732 # back to normal: Enter, Escape, or q
2733 bindsym Return mode "default"
2734 bindsym Escape mode "default"
2735 bindsym q mode "default"
2737 # bindsym XF86PowerOff mode "$mode_system"
2738 bindsym $mod+Shift+e mode "$mode_system"
2744 bindsym $mod+$mod2+p exec ([ ! -e ~/.nosleep ] && touch ~/.nosleep || rm ~/.nosleep) && killall -USR1 i3status
2750 bindsym $mod+Shift+n mode notifications
2751 mode notifications {
2752 bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default
2753 bindsym d exec makoctl dismiss; mode default
2754 bindsym Shift+d exec makoctl dismiss -a; mode default
2756 bindsym Escape mode default
2757 bindsym q mode default
2764 bindsym $mod+Shift+s mode screenshot
2766 bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2767 bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2769 bindsym Escape mode default
2770 bindsym q mode default
2774 # Window configurations
2776 for_window [class="mpv"] floating enable
2777 for_window [class="TelegramDesktop"] floating enable
2778 for_window [app_id="pavucontrol"] floating enable
2779 for_window [app_id="meld"] floating enable
2780 for_window [app_id="nm-connection-editor"] floating enable
2785 # Read `man 5 sway-bar` for more information about this section.
2791 inactive_workspace #21212100 #21212100 #5c5c5c
2793 status_command i3status | my-i3status.py
2796 # font pango: benis uushi 9
2797 # font pango: Ubuntu Mono 11
2798 # font pango: Inconsolata 11
2799 font pango: DejaVu Sans Mono 9
2800 # font pango: Liberation Mono 9
2802 exec xrdb .Xresources
2803 # exec pgrep -x "systemd-inhibit" || \
2804 # systemd-inhibit --what=handle-power-key --who=aminb \
2805 # --why="Handle power button in sway" sleep infinity
2806 exec mako 2>&1 >/tmp/mako.log
2807 exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
2809 include /etc/sway/config.d/*
2810 include ~/.config/sway/`hostname`
2812 exec systemd-notify --ready || true
2818 :header-args+: :tangle ~/.config/sway/langa
2822 input "2:7:SynPS/2_Synaptics_TouchPad" {
2826 natural_scroll enabled
2827 click_method clickfinger
2830 input "1:1:AT_Translated_Set_2_keyboard" {
2834 xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
2840 :header-args+: :tangle ~/.config/sway/shemshak
2844 input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
2847 natural_scroll enabled
2848 middle_emulation enabled
2849 click_method clickfinger
2852 input "1:1:AT_Translated_Set_2_keyboard" {
2856 xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
2861 :header-args+: :tangle ~/.config/swaylock/config
2865 image=/home/amin/usr/pics/wp/wp2445784-blurred-wallpapers.jpg
2870 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
2872 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
2881 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
2882 # ------------------------------------------------------------------------------
2883 # tlp - Parameters for power saving
2884 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
2886 # Hint: some features are disabled by default, remove the leading # to enable
2889 # Set to 0 to disable, 1 to enable TLP.
2892 # Operation mode when no power supply can be detected: AC, BAT.
2893 # Concerns some desktop and embedded hardware only.
2896 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2897 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2898 TLP_PERSISTENT_DEFAULT=0
2900 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2901 # Non-zero value enables, zero disables laptop mode.
2902 DISK_IDLE_SECS_ON_AC=0
2903 DISK_IDLE_SECS_ON_BAT=2
2905 # Dirty page values (timeouts in secs).
2906 MAX_LOST_WORK_SECS_ON_AC=15
2907 MAX_LOST_WORK_SECS_ON_BAT=60
2909 # Hint: CPU parameters below are disabled by default, remove the leading #
2910 # to enable them, otherwise kernel default values are used.
2912 # Select a CPU frequency scaling governor.
2913 # Intel Core i processor with intel_pstate driver:
2914 # powersave(*), performance.
2915 # Older hardware with acpi-cpufreq driver:
2916 # ondemand(*), powersave, performance, conservative, schedutil.
2917 # (*) is recommended.
2918 # Hint: use tlp-stat -p to show the active driver and available governors.
2920 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2921 # efficient for *almost all* workloads and therefore kernel and most
2922 # distributions have chosen them as defaults. If you still want to change,
2923 # you should know what you're doing! You *must* disable your distribution's
2924 # governor settings or conflicts will occur.
2925 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2926 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2928 # Set the min/max frequency available for the scaling governor.
2929 # Possible values strongly depend on your CPU. For available frequencies see
2930 # the output of tlp-stat -p.
2931 #CPU_SCALING_MIN_FREQ_ON_AC=0
2932 #CPU_SCALING_MAX_FREQ_ON_AC=0
2933 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2934 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2936 # Set energy performance hints (HWP) for Intel P-state governor:
2937 # performance, balance_performance, default, balance_power, power
2938 # Values are given in order of increasing power saving.
2939 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2940 CPU_HWP_ON_AC=balance_performance
2941 CPU_HWP_ON_BAT=balance_power
2943 # Set Intel P-state performance: 0..100 (%).
2944 # Limit the max/min P-state to control the power dissipation of the CPU.
2945 # Values are stated as a percentage of the available performance.
2946 # Requires an Intel Core i processor with intel_pstate driver.
2947 #CPU_MIN_PERF_ON_AC=0
2948 #CPU_MAX_PERF_ON_AC=100
2949 #CPU_MIN_PERF_ON_BAT=0
2950 #CPU_MAX_PERF_ON_BAT=30
2952 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2953 # Requires an Intel Core i processor.
2955 # - This may conflict with your distribution's governor settings
2956 # - A value of 1 does *not* activate boosting, it just allows it
2960 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2961 # 0=disable, 1=enable.
2962 SCHED_POWERSAVE_ON_AC=0
2963 SCHED_POWERSAVE_ON_BAT=1
2965 # Kernel NMI Watchdog:
2966 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2969 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2970 # Frequency voltage pairs are written to:
2971 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2972 # CAUTION: only use this, if you thoroughly understand what you are doing!
2973 #PHC_CONTROLS="F:V F:V F:V F:V"
2975 # Set CPU performance versus energy savings policy:
2976 # performance, balance-performance, default, balance-power, power.
2977 # Values are given in order of increasing power saving.
2978 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2979 ENERGY_PERF_POLICY_ON_AC=performance
2980 ENERGY_PERF_POLICY_ON_BAT=balance-power
2982 # Disk devices; separate multiple devices with spaces (default: sda).
2983 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2984 DISK_DEVICES="sda sdb"
2986 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2987 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2988 # Separate values for multiple disks with spaces. Use the special value 'keep'
2989 # to keep the hardware default for the particular disk.
2990 DISK_APM_LEVEL_ON_AC="254 254"
2991 DISK_APM_LEVEL_ON_BAT="128 128"
2993 # Hard disk spin down timeout:
2994 # 0: spin down disabled
2995 # 1..240: timeouts from 5s to 20min (in units of 5s)
2996 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2997 # See 'man hdparm' for details.
2998 # Separate values for multiple disks with spaces. Use the special value 'keep'
2999 # to keep the hardware default for the particular disk.
3000 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
3001 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
3003 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
3004 # Separate values for multiple disks with spaces. Use the special value 'keep'
3005 # to keep the kernel default scheduler for the particular disk.
3006 #DISK_IOSCHED="cfq cfq"
3008 # AHCI link power management (ALPM) for disk devices:
3009 # min_power, med_power_with_dipm(*), medium_power, max_performance.
3010 # (*) Kernel >= 4.15 required, then recommended.
3011 # Multiple values separated with spaces are tried sequentially until success.
3012 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
3013 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
3015 # Exclude host devices from AHCI link power management.
3016 # Separate multiple hosts with spaces.
3017 #SATA_LINKPWR_BLACKLIST="host1"
3019 # Runtime Power Management for AHCI host and disks devices:
3020 # on=disable, auto=enable.
3021 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
3022 #AHCI_RUNTIME_PM_ON_AC=on
3023 #AHCI_RUNTIME_PM_ON_BAT=on
3025 # Seconds of inactivity before disk is suspended.
3026 AHCI_RUNTIME_PM_TIMEOUT=15
3028 # PCI Express Active State Power Management (PCIe ASPM):
3029 # default, performance, powersave.
3030 PCIE_ASPM_ON_AC=performance
3031 PCIE_ASPM_ON_BAT=powersave
3033 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
3034 # auto = mid on BAT, high on AC; default = use hardware defaults.
3035 RADEON_POWER_PROFILE_ON_AC=high
3036 RADEON_POWER_PROFILE_ON_BAT=low
3038 # Radeon dynamic power management method (DPM): battery, performance.
3039 RADEON_DPM_STATE_ON_AC=performance
3040 RADEON_DPM_STATE_ON_BAT=battery
3042 # Radeon DPM performance level: auto, low, high; auto is recommended.
3043 RADEON_DPM_PERF_LEVEL_ON_AC=auto
3044 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
3046 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
3050 # Disable wake on LAN: Y/N.
3053 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
3054 # A value of 0 disables, >=1 enables power saving (recommended: 1).
3055 SOUND_POWER_SAVE_ON_AC=0
3056 SOUND_POWER_SAVE_ON_BAT=0
3058 # Disable controller too (HDA only): Y/N.
3059 SOUND_POWER_SAVE_CONTROLLER=N
3061 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
3062 # Drive can be powered on again by releasing (and reinserting) the eject lever
3063 # or by pressing the disc eject button on newer models.
3064 # Note: an UltraBay/MediaBay hard disk is never powered off.
3065 BAY_POWEROFF_ON_AC=0
3066 BAY_POWEROFF_ON_BAT=0
3067 # Optical drive device to power off (default sr0).
3070 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
3072 RUNTIME_PM_ON_BAT=auto
3074 # Exclude PCI(e) device adresses the following list from Runtime PM
3075 # (separate with spaces). Use lspci to get the adresses (1st column).
3076 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
3078 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
3079 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
3080 # prevents accidential power-on of dGPU in hybrid graphics setups.
3081 # Use "" to disable the feature completely.
3082 # Separate multiple drivers with spaces.
3083 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
3085 # Set to 0 to disable, 1 to enable USB autosuspend feature.
3088 # Exclude listed devices from USB autosuspend (separate with spaces).
3089 # Use lsusb to get the ids.
3090 # Note: input devices (usbhid) are excluded automatically
3091 #USB_BLACKLIST="1111:2222 3333:4444"
3093 # Bluetooth devices are excluded from USB autosuspend:
3094 # 0=do not exclude, 1=exclude.
3095 USB_BLACKLIST_BTUSB=0
3097 # Phone devices are excluded from USB autosuspend:
3098 # 0=do not exclude, 1=exclude (enable charging).
3099 USB_BLACKLIST_PHONE=0
3101 # Printers are excluded from USB autosuspend:
3102 # 0=do not exclude, 1=exclude.
3103 USB_BLACKLIST_PRINTER=1
3105 # WWAN devices are excluded from USB autosuspend:
3106 # 0=do not exclude, 1=exclude.
3107 USB_BLACKLIST_WWAN=1
3109 # Include listed devices into USB autosuspend even if already excluded
3110 # by the blacklists above (separate with spaces).
3111 # Use lsusb to get the ids.
3112 #USB_WHITELIST="1111:2222 3333:4444"
3114 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3115 # (workaround for USB devices that cause shutdown problems).
3116 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3118 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3119 # on system startup: 0=disable, 1=enable.
3120 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3121 # are ignored when this is enabled!
3122 #RESTORE_DEVICE_STATE_ON_STARTUP=0
3123 RESTORE_DEVICE_STATE_ON_STARTUP=0
3125 # Radio devices to disable on startup: bluetooth, wifi, wwan.
3126 # Separate multiple devices with spaces.
3127 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3128 DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
3130 # Radio devices to enable on startup: bluetooth, wifi, wwan.
3131 # Separate multiple devices with spaces.
3132 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3134 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3135 # (workaround for devices that are blocking shutdown).
3136 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3138 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3139 # (to prevent other operating systems from missing radios).
3140 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3142 # Radio devices to enable on AC: bluetooth, wifi, wwan.
3143 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3145 # Radio devices to disable on battery: bluetooth, wifi, wwan.
3146 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3148 # Radio devices to disable on battery when not in use (not connected):
3149 # bluetooth, wifi, wwan.
3150 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3152 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3153 # required). Charging starts when the remaining capacity falls below the
3154 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3155 # Main / Internal battery (values in %)
3156 #START_CHARGE_THRESH_BAT0=75
3157 #STOP_CHARGE_THRESH_BAT0=80
3158 # Ultrabay / Slice / Replaceable battery (values in %)
3159 #START_CHARGE_THRESH_BAT1=75
3160 #STOP_CHARGE_THRESH_BAT1=80
3162 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3163 #RESTORE_THRESHOLDS_ON_BAT=1
3165 # ------------------------------------------------------------------------------
3166 # tlp-rdw - Parameters for the radio device wizard
3167 # Possible devices: bluetooth, wifi, wwan.
3170 # - Parameters are disabled by default, remove the leading # to enable them
3171 # - Separate multiple radio devices with spaces
3173 # Radio devices to disable on connect.
3174 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3175 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3176 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3178 # Radio devices to enable on disconnect.
3179 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3180 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3181 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3183 # Radio devices to enable/disable when docked.
3184 #DEVICES_TO_ENABLE_ON_DOCK=""
3185 #DEVICES_TO_DISABLE_ON_DOCK=""
3187 # Radio devices to enable/disable when undocked.
3188 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3189 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3194 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
3195 # ------------------------------------------------------------------------------
3196 # tlp - Parameters for power saving
3197 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
3199 # Hint: some features are disabled by default, remove the leading # to enable
3202 # Set to 0 to disable, 1 to enable TLP.
3205 # Operation mode when no power supply can be detected: AC, BAT.
3206 # Concerns some desktop and embedded hardware only.
3209 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
3210 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
3211 TLP_PERSISTENT_DEFAULT=0
3213 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
3214 # Non-zero value enables, zero disables laptop mode.
3215 DISK_IDLE_SECS_ON_AC=0
3216 DISK_IDLE_SECS_ON_BAT=2
3218 # Dirty page values (timeouts in secs).
3219 MAX_LOST_WORK_SECS_ON_AC=15
3220 MAX_LOST_WORK_SECS_ON_BAT=60
3222 # Hint: CPU parameters below are disabled by default, remove the leading #
3223 # to enable them, otherwise kernel default values are used.
3225 # Select a CPU frequency scaling governor.
3226 # Intel Core i processor with intel_pstate driver:
3227 # powersave(*), performance.
3228 # Older hardware with acpi-cpufreq driver:
3229 # ondemand(*), powersave, performance, conservative, schedutil.
3230 # (*) is recommended.
3231 # Hint: use tlp-stat -p to show the active driver and available governors.
3233 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
3234 # efficient for *almost all* workloads and therefore kernel and most
3235 # distributions have chosen them as defaults. If you still want to change,
3236 # you should know what you're doing! You *must* disable your distribution's
3237 # governor settings or conflicts will occur.
3238 #CPU_SCALING_GOVERNOR_ON_AC=powersave
3239 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
3241 # Set the min/max frequency available for the scaling governor.
3242 # Possible values strongly depend on your CPU. For available frequencies see
3243 # the output of tlp-stat -p.
3244 #CPU_SCALING_MIN_FREQ_ON_AC=0
3245 #CPU_SCALING_MAX_FREQ_ON_AC=0
3246 #CPU_SCALING_MIN_FREQ_ON_BAT=0
3247 #CPU_SCALING_MAX_FREQ_ON_BAT=0
3249 # Set energy performance hints (HWP) for Intel P-state governor:
3250 # performance, balance_performance, default, balance_power, power
3251 # Values are given in order of increasing power saving.
3252 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
3253 CPU_HWP_ON_AC=balance_performance
3254 CPU_HWP_ON_BAT=balance_power
3256 # Set Intel P-state performance: 0..100 (%).
3257 # Limit the max/min P-state to control the power dissipation of the CPU.
3258 # Values are stated as a percentage of the available performance.
3259 # Requires an Intel Core i processor with intel_pstate driver.
3260 #CPU_MIN_PERF_ON_AC=0
3261 #CPU_MAX_PERF_ON_AC=100
3262 #CPU_MIN_PERF_ON_BAT=0
3263 #CPU_MAX_PERF_ON_BAT=30
3265 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
3266 # Requires an Intel Core i processor.
3268 # - This may conflict with your distribution's governor settings
3269 # - A value of 1 does *not* activate boosting, it just allows it
3273 # Minimize number of used CPU cores/hyper-threads under light load conditions:
3274 # 0=disable, 1=enable.
3275 SCHED_POWERSAVE_ON_AC=0
3276 SCHED_POWERSAVE_ON_BAT=1
3278 # Kernel NMI Watchdog:
3279 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
3282 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
3283 # Frequency voltage pairs are written to:
3284 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
3285 # CAUTION: only use this, if you thoroughly understand what you are doing!
3286 #PHC_CONTROLS="F:V F:V F:V F:V"
3288 # Set CPU performance versus energy savings policy:
3289 # performance, balance-performance, default, balance-power, power.
3290 # Values are given in order of increasing power saving.
3291 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
3292 ENERGY_PERF_POLICY_ON_AC=performance
3293 ENERGY_PERF_POLICY_ON_BAT=balance-power
3295 # Disk devices; separate multiple devices with spaces (default: sda).
3296 # Devices can be specified by disk ID also (lookup with: tlp diskid).
3297 DISK_DEVICES="sda sdb"
3299 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
3300 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
3301 # Separate values for multiple disks with spaces. Use the special value 'keep'
3302 # to keep the hardware default for the particular disk.
3303 DISK_APM_LEVEL_ON_AC="254 254"
3304 DISK_APM_LEVEL_ON_BAT="128 128"
3306 # Hard disk spin down timeout:
3307 # 0: spin down disabled
3308 # 1..240: timeouts from 5s to 20min (in units of 5s)
3309 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
3310 # See 'man hdparm' for details.
3311 # Separate values for multiple disks with spaces. Use the special value 'keep'
3312 # to keep the hardware default for the particular disk.
3313 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
3314 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
3316 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
3317 # Separate values for multiple disks with spaces. Use the special value 'keep'
3318 # to keep the kernel default scheduler for the particular disk.
3319 #DISK_IOSCHED="cfq cfq"
3321 # AHCI link power management (ALPM) for disk devices:
3322 # min_power, med_power_with_dipm(*), medium_power, max_performance.
3323 # (*) Kernel >= 4.15 required, then recommended.
3324 # Multiple values separated with spaces are tried sequentially until success.
3325 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
3326 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
3328 # Exclude host devices from AHCI link power management.
3329 # Separate multiple hosts with spaces.
3330 #SATA_LINKPWR_BLACKLIST="host1"
3332 # Runtime Power Management for AHCI host and disks devices:
3333 # on=disable, auto=enable.
3334 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
3335 #AHCI_RUNTIME_PM_ON_AC=on
3336 #AHCI_RUNTIME_PM_ON_BAT=on
3338 # Seconds of inactivity before disk is suspended.
3339 AHCI_RUNTIME_PM_TIMEOUT=15
3341 # PCI Express Active State Power Management (PCIe ASPM):
3342 # default, performance, powersave.
3343 PCIE_ASPM_ON_AC=performance
3344 PCIE_ASPM_ON_BAT=powersave
3346 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
3347 # auto = mid on BAT, high on AC; default = use hardware defaults.
3348 RADEON_POWER_PROFILE_ON_AC=high
3349 RADEON_POWER_PROFILE_ON_BAT=low
3351 # Radeon dynamic power management method (DPM): battery, performance.
3352 RADEON_DPM_STATE_ON_AC=performance
3353 RADEON_DPM_STATE_ON_BAT=battery
3355 # Radeon DPM performance level: auto, low, high; auto is recommended.
3356 RADEON_DPM_PERF_LEVEL_ON_AC=auto
3357 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
3359 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
3363 # Disable wake on LAN: Y/N.
3366 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
3367 # A value of 0 disables, >=1 enables power saving (recommended: 1).
3368 SOUND_POWER_SAVE_ON_AC=0
3369 SOUND_POWER_SAVE_ON_BAT=0
3371 # Disable controller too (HDA only): Y/N.
3372 SOUND_POWER_SAVE_CONTROLLER=N
3374 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
3375 # Drive can be powered on again by releasing (and reinserting) the eject lever
3376 # or by pressing the disc eject button on newer models.
3377 # Note: an UltraBay/MediaBay hard disk is never powered off.
3378 BAY_POWEROFF_ON_AC=0
3379 BAY_POWEROFF_ON_BAT=0
3380 # Optical drive device to power off (default sr0).
3383 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
3385 RUNTIME_PM_ON_BAT=auto
3387 # Exclude PCI(e) device adresses the following list from Runtime PM
3388 # (separate with spaces). Use lspci to get the adresses (1st column).
3389 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
3390 RUNTIME_PM_BLACKLIST="01:00.0"
3392 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
3393 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
3394 # prevents accidential power-on of dGPU in hybrid graphics setups.
3395 # Use "" to disable the feature completely.
3396 # Separate multiple drivers with spaces.
3397 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
3399 # Set to 0 to disable, 1 to enable USB autosuspend feature.
3402 # Exclude listed devices from USB autosuspend (separate with spaces).
3403 # Use lsusb to get the ids.
3404 # Note: input devices (usbhid) are excluded automatically
3405 #USB_BLACKLIST="1111:2222 3333:4444"
3407 # Bluetooth devices are excluded from USB autosuspend:
3408 # 0=do not exclude, 1=exclude.
3409 USB_BLACKLIST_BTUSB=0
3411 # Phone devices are excluded from USB autosuspend:
3412 # 0=do not exclude, 1=exclude (enable charging).
3413 USB_BLACKLIST_PHONE=0
3415 # Printers are excluded from USB autosuspend:
3416 # 0=do not exclude, 1=exclude.
3417 USB_BLACKLIST_PRINTER=1
3419 # WWAN devices are excluded from USB autosuspend:
3420 # 0=do not exclude, 1=exclude.
3421 USB_BLACKLIST_WWAN=1
3423 # Include listed devices into USB autosuspend even if already excluded
3424 # by the blacklists above (separate with spaces).
3425 # Use lsusb to get the ids.
3426 #USB_WHITELIST="1111:2222 3333:4444"
3428 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3429 # (workaround for USB devices that cause shutdown problems).
3430 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3432 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3433 # on system startup: 0=disable, 1=enable.
3434 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3435 # are ignored when this is enabled!
3436 #RESTORE_DEVICE_STATE_ON_STARTUP=0
3437 RESTORE_DEVICE_STATE_ON_STARTUP=1
3439 # Radio devices to disable on startup: bluetooth, wifi, wwan.
3440 # Separate multiple devices with spaces.
3441 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3443 # Radio devices to enable on startup: bluetooth, wifi, wwan.
3444 # Separate multiple devices with spaces.
3445 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3447 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3448 # (workaround for devices that are blocking shutdown).
3449 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3451 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3452 # (to prevent other operating systems from missing radios).
3453 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3455 # Radio devices to enable on AC: bluetooth, wifi, wwan.
3456 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3458 # Radio devices to disable on battery: bluetooth, wifi, wwan.
3459 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3461 # Radio devices to disable on battery when not in use (not connected):
3462 # bluetooth, wifi, wwan.
3463 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3465 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3466 # required). Charging starts when the remaining capacity falls below the
3467 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3468 # Main / Internal battery (values in %)
3469 #START_CHARGE_THRESH_BAT0=75
3470 #STOP_CHARGE_THRESH_BAT0=80
3471 # Ultrabay / Slice / Replaceable battery (values in %)
3472 #START_CHARGE_THRESH_BAT1=75
3473 #STOP_CHARGE_THRESH_BAT1=80
3475 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3476 #RESTORE_THRESHOLDS_ON_BAT=1
3478 # ------------------------------------------------------------------------------
3479 # tlp-rdw - Parameters for the radio device wizard
3480 # Possible devices: bluetooth, wifi, wwan.
3483 # - Parameters are disabled by default, remove the leading # to enable them
3484 # - Separate multiple radio devices with spaces
3486 # Radio devices to disable on connect.
3487 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3488 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3489 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3491 # Radio devices to enable on disconnect.
3492 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3493 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3494 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3496 # Radio devices to enable/disable when docked.
3497 #DEVICES_TO_ENABLE_ON_DOCK=""
3498 #DEVICES_TO_DISABLE_ON_DOCK=""
3500 # Radio devices to enable/disable when undocked.
3501 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3502 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3509 :header-args+: :tangle ~/.xprofile
3512 =~/.xprofile= is similar in style to =~/.xinitrc=, but on the
3513 contrary, it's automatically sourced by LightDM, my display manager of
3516 #+begin_src sh :tangle no
3517 xset -b # disable bell
3518 xset r rate 200 45 # repeat delay (ms) and rate (repeats/sec)
3520 # setxkbmap -option compose:ralt
3522 setxkbmap -option ctrl:nocaps # turn capslock into control
3523 setxkbmap -option altwin:swap_alt_win # swap alt and super
3525 if [ $(hostname) = "plasma" ]
3527 setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt
3530 if [ $(hostname) = "enigma" ]
3532 xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt
3535 light -Scrs "intel_backlight" 2
3537 source $HOME/.zprofile
3539 export _JAVA_AWT_WM_NONREPARENTING=1
3540 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
3542 if [ $(hostname) = "plasma" ]
3554 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3557 #+begin_src conf-xdefaults
3558 #include ".Xresources.d/fonts"
3559 ! #include ".Xresources.d/colors"
3560 #include ".Xresources.d/emacs"
3561 #include ".Xresources.d/rxvt-unicode"
3568 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3571 #+begin_src conf-xdefaults
3572 Xft.lcdfilter: lcddefault
3576 Xft.hintstyle: hintslight
3577 ! Xft.hintstyle: hintfull
3584 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors")
3587 #+begin_src conf-xdefaults :tangle no
3588 #include "gruvbox-light.xresources"
3589 ! #include "gruvbox-dark.xresources"
3590 #include "gruvbox-urxvt256.xresources"
3593 #+begin_src conf-xdefaults :tangle no
3594 ! -----------------------------------------------------------------------------
3595 ! File: gruvbox-light.xresources
3596 ! Description: Retro groove colorscheme generalized
3597 ! Author: morhetz <morhetz@gmail.com>
3598 ! Source: https://github.com/morhetz/gruvbox-generalized
3599 ! Last Modified: 6 Sep 2014
3600 ! -----------------------------------------------------------------------------
3602 ! hard contrast: *background: #f9f5d7
3603 *background: #fbf1c7
3604 ! soft contrast: *background: #f2e5bc
3605 *foreground: #3c3836
3615 ! DarkYellow + Yellow
3621 ! DarkMagenta + Magenta
3632 #+begin_src conf-xdefaults :tangle no
3633 ! -----------------------------------------------------------------------------
3634 ! File: gruvbox-dark.xresources
3635 ! Description: Retro groove colorscheme generalized
3636 ! Author: morhetz <morhetz@gmail.com>
3637 ! Source: https://github.com/morhetz/gruvbox-generalized
3638 ! Last Modified: 6 Sep 2014
3639 ! -----------------------------------------------------------------------------
3641 ! hard contrast: *background: #1d2021
3642 *background: #282828
3643 ! soft contrast: *background: #32302f
3644 *foreground: #ebdbb2
3654 ! DarkYellow + Yellow
3660 ! DarkMagenta + Magenta
3671 #+begin_src conf-xdefaults :tangle no
3672 ! -----------------------------------------------------------------------------
3673 ! File: gruvbox-urxvt256.xresources
3674 ! Description: Retro groove colorscheme generalized
3675 ! Author: morhetz <morhetz@gmail.com>
3676 ! Source: https://github.com/morhetz/gruvbox-generalized
3677 ! Last Modified: 13 Dec 2013
3678 ! -----------------------------------------------------------------------------
3680 URxvt.color24: #076678
3681 URxvt.color66: #427b58
3682 URxvt.color88: #9d0006
3683 URxvt.color96: #8f3f71
3684 URxvt.color100: #79740e
3685 URxvt.color108: #8ec07c
3686 URxvt.color109: #83a598
3687 URxvt.color130: #af3a03
3688 URxvt.color136: #b57614
3689 URxvt.color142: #b8bb26
3690 URxvt.color167: #fb4934
3691 URxvt.color175: #d3869b
3692 URxvt.color208: #fe8019
3693 URxvt.color214: #fabd2f
3694 URxvt.color223: #ebdbb2
3695 URxvt.color228: #f2e5bc
3696 URxvt.color229: #fbf1c7
3697 URxvt.color230: #f9f5d7
3698 URxvt.color234: #1d2021
3699 URxvt.color235: #282828
3700 URxvt.color236: #32302f
3701 URxvt.color237: #3c3836
3702 URxvt.color239: #504945
3703 URxvt.color241: #665c54
3704 URxvt.color243: #7c6f64
3705 URxvt.color244: #928374
3706 URxvt.color245: #928374
3707 URxvt.color246: #a89984
3708 URxvt.color248: #bdae93
3709 URxvt.color250: #d5c4a1
3714 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3717 #+begin_src conf-xdefaults
3720 Emacs.verticalScrollBars: off
3721 Emacs.cursorBlink: off
3722 Emacs.FontBackend: xft,x
3723 ! Emacs.font: Ubuntu Mono-12
3724 ! Emacs.font: Triplicate T4C-11
3725 ! Emacs.font: Ubuntu Mono-10.5
3726 ! Emacs.font: Ubuntu Mono-12
3727 ! Emacs.font: Iosevka-11
3729 ! Emacs.font: Fira Mono:size=15
3730 ! Emacs.font: DejaVu Sans Mono:size=15
3731 ! Emacs.font: Inconsolata:size=17
3732 ! Emacs.font: Inconsolata:size=16
3733 ! Emacs.font: Inconsolata LGC:size=14
3734 ! Emacs.font: Source Code Pro Medium-10.5
3735 Emacs.font: Source Code Pro:size=14
3736 ! Emacs.font: Ubuntu Mono:size=16
3737 ! Emacs.font: Iosevka:size=16
3742 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3745 #+begin_src conf-xdefaults
3747 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3748 URxvt.boldFont: xft:source code pro:semibold:pixelsize=14:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
3749 URxvt.italicFont: xft:source code pro:italic:pixelsize=14:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
3750 URxvt.bolditalicFont: xft:source code pro:semibold:italic:pixelsize=14:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
3752 URxvt.xftAntialias: true
3753 URxvt.letterSpace: 0
3756 URxvt.loginShell: true
3757 URxvt.saveLines: 100000
3758 URxvt.internalBorder: 3
3760 URxvt.scrollBar: false
3761 URxvt.scrollStyle: rxvt
3762 URxvt*scrollTtyOutput: false
3763 URxvt*scrollWithBuffer: true
3764 URxvt*scrollTtyKeypress: true
3765 URxvt.keysym.Shift-Up: command:\033]720;1\007
3766 URxvt.keysym.Shift-Down: command:\033]721;1\007
3768 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3769 URxvt.url-select.launcher: firefox
3770 URxvt.url-select.underline: true
3771 URxvt.keysym.M-u: perl:url-select:select_next
3772 URxvt.keysym.M-Escape: perl:keyboard-select:activate
3773 URxvt.keysym.M-s: perl:keyboard-select:search
3774 URxvt.url-launcher: /usr/bin/firefox
3775 URxvt.matcher.button: 1
3776 URxvt.iso14755: false
3777 URxvt.iso14755_53: false
3778 URxvt.keysym.M-c: perl:clipboard:copy
3779 URxvt.keysym.M-v: perl:clipboard:paste
3780 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3781 URxvt.keysym.C-Up: font-size:increase
3782 URxvt.keysym.C-Down: font-size:decrease
3783 URxvt.keysym.C-S-Up: font-size:incglobal
3784 URxvt.keysym.C-S-Down: font-size:decglobal
3785 URxvt.keysym.C-equal: font-size:reset
3786 !URxvt.keysym.C-question: font-size:show
3788 URxvt.iconFile: /usr/share/icons/Paper/48x48/apps/utilities-terminal.png
3790 !urxvt*foreground: white
3791 !urxvt*background: black
3810 !URxvt.foreground: #C8C8C8
3811 !URxvt.background: #FFFFFF
3831 !! orange (replaces cyan)
3838 ! Tango colour theme for rxvt-unicode
3839 URxvt.background: #FFFFFF
3840 URxvt.foreground: #000000
3843 URxvt.color0: #2E3436
3844 URxvt.color8: #757773
3847 URxvt.color1: #CC0000
3848 URxvt.color9: #EF2929
3851 URxvt.color2: #4E9A06
3852 URxvt.color10: #8AE234
3855 URxvt.color3: #C4A000
3856 URxvt.color11: #FCE94F
3859 URxvt.color4: #3465A4
3860 URxvt.color12: #729FCF
3863 URxvt.color5: #75507B
3864 URxvt.color13: #AD7FA8
3867 !URxvt.color6: #06989A
3868 !URxvt.color14: #34E2E2
3869 ! orange (replaces cyan)
3874 URxvt.color7: #D3D7CF
3875 URxvt.color15: #EEEEEC
3878 *** xkb us_ab keyboard layout
3880 #+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none
3881 default partial alphanumeric_keys
3882 xkb_symbols "us_ab" {
3884 name[Group1]= "English (US)(aminb)";
3886 key <MENU> { [ Alt_R ] };
3892 :header-args+: :tangle ~/.config/user-dirs.dirs
3896 XDG_DESKTOP_DIR="$HOME/Desktop"
3897 XDG_DOCUMENTS_DIR="$HOME/usr/docs"
3898 XDG_DOWNLOAD_DIR="$HOME/usr/dls"
3899 XDG_MUSIC_DIR="$HOME/usr/music"
3900 XDG_PICTURES_DIR="$HOME/usr/pics"
3901 XDG_PUBLICSHARE_DIR="$HOME/usr/Public"
3902 XDG_TEMPLATES_DIR="$HOME/usr/Templates"
3903 XDG_VIDEOS_DIR="$HOME/usr/vids"
3908 :header-args+: :tangle ~/.config/zathura/zathurarc
3912 set smooth-scroll true
3913 set selection-clipboard clipboard
3915 set default-bg "#272727"
3916 set statusbar-bg "#272727"
3917 set inputbar-bg "#373737"
3922 My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
3923 [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
3928 :header-args+: :tangle ~/.zimrc
3940 # Select what modules you would like enabled.
3941 # The second line of modules may depend on options set by modules in the first
3942 # line. These dependencies are noted on the respective module's README.md.
3943 zmodules=(directory environment git git-info history input ssh utility custom \
3944 syntax-highlighting history-substring-search prompt completion)
3955 # Set your desired prompt here
3956 zprompt_theme='pure'
3957 #PURE_PROMPT_SYMBOL=λ
3958 #PURE_PROMPT_SYMBOL=δ
3959 PURE_PROMPT_SYMBOL=➜
3965 # set an optional host-specific filename for the completion cache file
3966 # if none is provided, the default '.zcompdump' is used.
3967 #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
3973 # Uncomment to enable command correction prompts
3974 # See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
3981 # Set the string below to the desired terminal title format string.
3982 # The terminal title is redrawn upon directory change, however, variables like
3983 # ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
3984 # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
3985 # The example below uses the following format: 'username@host:/current/directory'
3986 ztermtitle='%n@%m:%~'
3992 # Uncomment to enable double-dot expansion.
3993 # This appends '../' to your input for each '.' you type after an initial '..'
3994 #zdouble_dot_expand='true'
3997 # Syntax-Highlighting
4000 # This determines what highlighters will be used with the syntax-highlighting module.
4001 # Documentation of the highlighters can be found here:
4002 # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
4003 # For (u)rxvt, termite and gnome-terminal users,
4004 # removing the 'cursor' highlighter will fix the disappearing cursor problem
4005 #zhighlighters=(main brackets cursor)
4006 zhighlighters=(main brackets pattern)
4012 # Load these ssh identities with the ssh module
4013 zssh_ids=(id_ed25519_bandali)
4019 # Set (optional) pacman front-end.
4020 zpacman_frontend='yay'
4022 # Load any helper scripts as defined here
4023 #zpacman_helper=(aur)
4030 :header-args+: :tangle ~/.zlogin
4035 # User configuration sourced by login shells
4039 [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
4045 :header-args+: :tangle ~/.zprofile
4049 #PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
4050 #PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
4051 export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH
4052 export XDG_CONFIG_HOME=$HOME/.config
4053 export XDG_DATA_HOME=$HOME/.local/share
4054 export XDG_DATA_DIRS=/usr/local/share:/usr/share
4055 export MAILDIR="$HOME/mail"
4057 #export MATHMODELS=$HOME/src/eiffel/mathmodels
4058 #export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
4059 #export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
4062 #export JAVA_HOME=/usr/lib/jvm/default
4063 #export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
4064 #export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
4065 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
4067 #export PATH="$HOME/usr/build/pvs:$PATH"
4068 #export SBCLISP_HOME=/usr/share/sbcl-source
4069 #export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
4071 export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
4073 #export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
4074 #export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
4076 export NIXPKGS=$HOME/src/git/nixpkgs
4078 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
4080 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
4081 export PATH="/$HOME/.config/guix/current/bin${PATH:+:}$PATH"
4082 export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
4083 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
4084 export GIT_SSL_CAINFO="$SSL_CERT_FILE"
4089 :header-args+: :tangle ~/.zshenv
4093 # Ensure that a non-login, non-interactive shell has a defined environment.
4094 if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
4095 source "${ZDOTDIR:-$HOME}/.zprofile"
4101 :header-args+: :tangle ~/.zshrc
4105 # Bash-like navigation
4106 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
4107 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4108 export WORDCHARS='*?[]~=&;!#$%^(){}<>'
4109 #ZLE_SPACE_SUFFIX_CHARS=$'|&'
4111 #disable -r time # disable shell reserved word
4112 #alias time='time -p' # -p for POSIX output
4114 # rehash if last command was pacaur or pacman
4115 # (so that zsh picks up changes in $PATH immediately)
4116 TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
4119 # User configuration sourced by interactive shells
4122 # Define zim location
4123 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
4126 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
4128 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
4129 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
4133 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
4134 # source ~/.zsh/zsh-autopair/autopair.zsh
4139 source /usr/share/fzf/key-bindings.zsh
4140 source /usr/share/fzf/completion.zsh
4142 # Accept history selection instead of putting it on
4144 fzf-history-widget-accept() {
4148 #zle -N fzf-history-widget-accept
4149 #bindkey '^R' fzf-history-widget-accept
4152 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
4158 alias mpv="mpv --ytdl-format mp4"
4162 alias jcl=journalctl
4163 alias m="mbsync uwaterloo; mbsync amin"
4164 alias best="youtube-dl -f best"
4171 git clone https://aur.archlinux.org/${1}.git
4183 This section contains various useful scripts and the ones used by the
4184 programs above. For instance, =toggle-tablet= for switching to and
4185 from tablet mode on my X220T, =toggle-presentation-mode= for toggling
4186 Xfce's presentation mode which keeps the screen awake, and
4187 =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
4188 exact brightness value.
4190 ** battery-percentage-time
4192 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
4195 #+begin_src sh :tangle no
4198 dbus-send --print-reply=literal --system \
4199 --dest=org.freedesktop.UPower \
4200 /org/freedesktop/UPower/devices/battery_BAT0 \
4201 org.freedesktop.DBus.Properties.Get \
4202 string:org.freedesktop.UPower.Device \
4203 string:"${label}" | awk '{print $3}'
4206 perc=$(dbus_send 'Percentage')
4207 state=$(dbus_send 'State')
4209 if [ "$state" -eq 2 ]; then # Discharging
4210 secs=$(dbus_send 'TimeToEmpty')
4211 elif [ "$state" -eq 1 ]; then # Charging
4212 secs=$(dbus_send 'TimeToFull')
4215 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
4220 :header-args+: :tangle ~/.local/bin/my-i3status.py :shebang "#!/usr/bin/env python2"
4223 #+begin_src python :comments none
4224 # -*- coding: utf-8 -*-
4226 # This script is a simple wrapper which prefixes each i3status line with custom
4227 # information. It is based on:
4228 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
4230 # In ~/.i3status.conf, add the following line:
4231 # output_format = "i3bar"
4232 # in the 'general' section.
4233 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
4234 # status_command i3status | my-i3status.py
4235 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
4237 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
4238 # © 2018 Amin Bandali <bandali@gnu.org>
4240 # This program is free software. It comes without any warranty, to the extent
4241 # permitted by applicable law. You can redistribute it and/or modify it under
4242 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
4243 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
4251 """ Return true if ~/.nosleep exists. """
4252 return os.path.isfile(os.path.expanduser("~/.nosleep"))
4254 def print_line(message):
4255 """ Non-buffered printing to stdout. """
4256 sys.stdout.write(message + '\n')
4260 """ Interrupted respecting reader for stdin. """
4261 # try reading a line, removing any extra whitespace
4263 line = sys.stdin.readline().strip()
4264 # i3status sends EOF, or an empty line
4269 except KeyboardInterrupt:
4272 if __name__ == '__main__':
4273 # Skip the first line which contains the version header.
4274 print_line(read_line())
4276 # The second line contains the start of the infinite array.
4277 print_line(read_line())
4280 line, prefix = read_line(), ''
4281 # ignore comma at start of lines
4282 if line.startswith(','):
4283 line, prefix = line[1:], ','
4286 j = json.loads(line)
4287 # insert information into the start of the json, but could be anywhere
4288 j.insert(0, {'full_text' : '🖵 ', 'name' : 'nosleep'})
4289 # and echo back new encoded json
4290 print_line(prefix+json.dumps(j))
4292 print_line(prefix+line)
4297 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
4302 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
4303 [ -n "$val" ] && light -S $val
4308 :header-args+: :tangle ~/.local/bin/rofi-remmina.py :shebang "#!/usr/bin/env python2"
4314 from subprocess import Popen, PIPE
4316 remmina_dir = os.path.expanduser("~/.local/share/remmina")
4320 for f in os.listdir(remmina_dir):
4321 fp = os.path.join(remmina_dir, f)
4322 c = ConfigParser.ConfigParser()
4324 n = c.get('remmina', 'name')
4327 lines = max(min(15, len(fdict)), 1);
4328 width = len(max(fdict.keys(), key=len))
4329 rofi = Popen(["rofi", "-i", "-dmenu", \
4330 "-l", str(lines), "-width", str(width), \
4331 "-p", "connection"], stdout=PIPE, stdin=PIPE)
4332 selected = rofi.communicate("\n" \
4333 .join(fdict.keys()) \
4334 .encode("utf-8"))[0] \
4339 r = Popen(["remmina", "-c", fdict[selected]])
4345 :header-args+: :tangle ~/.local/bin/s :shebang "#!/bin/bash"
4349 export _JAVA_AWT_WM_NONREPARENTING=1
4350 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
4352 source $HOME/.zprofile
4358 :header-args+: :tangle ~/.local/bin/sway-ws-util :shebang "#!/bin/bash"
4362 curr_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true).name')
4363 [[ $curr_ws -eq 1 ]] && prev_ws=10 || prev_ws=$((curr_ws-1))
4364 [[ $curr_ws -eq 10 ]] && next_ws=1 || next_ws=$((curr_ws+1))
4368 if [ "$1" = "switch" ] || [ "$1" = "move" ]; then
4370 if [ "$2" = "prev" ]; then
4372 elif [ "$2" = "next" ]; then
4375 echo "Usage: $0 $1 {prev|next} [follow]"
4379 echo "Usage: $0 {switch|move} {prev|next} [follow]"
4383 if [ "$op" = "switch" ]; then
4384 sway workspace "$dest_ws"
4385 elif [ "$op" = "move" ]; then
4386 sway move container to workspace "$dest_ws"
4387 if [ "$3" = "follow" ]; then
4388 sway workspace "$dest_ws"
4395 :header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash"
4398 #+begin_src bash :tangle no
4399 lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"
4401 if [ "$lang" = "us" ]; then
4405 # xmodmap $HOME/.Xmodmap
4409 ** toggle-presentation-mode
4411 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
4414 #+begin_src bash :tangle no
4415 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
4420 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash"
4423 This script toggles between a 'normal' mode and a 'tablet' mode, doing
4426 - rotates the screen using =xrandr=, so that rotating the physical
4427 display of my X220t would have the laptop's battery on the right
4429 - enables touch screen,
4430 - properly rotates the stylus pen and touch screen pointers, and
4431 - toggles between RGB and Vertical BGR sub-pixel order.
4433 #+begin_src bash :tangle no
4434 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
4435 0) # Screen is not rotated, we should rotate it right (90°)
4437 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
4438 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
4439 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
4440 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
4442 1) # Currently top is rotated right, we should set it normal (0°)
4444 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
4445 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
4446 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
4447 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
4450 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
4458 :header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
4461 #+begin_src python :tangle no
4462 import gnomekeyring as gk
4463 # list_item_ids_sync('login')[0] == 1L
4464 gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
4469 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
4472 #+begin_src sh :tangle no
4473 cur_vol=$(pamixer --get-volume)
4475 if [ $(pamixer --get-mute) = true ]; then
4476 printf 'mt \n' "$cur_vol"
4478 printf '%02d \n' "$cur_vol"
4484 My little wallpaper changer script.
4488 :header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash"
4491 #+begin_src bash :tangle no
4496 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4499 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4502 echo $"Usage: $0 {day|night}"
4509 :header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash"
4512 #+begin_src bash :tangle no
4521 echo "Did not find 'sed', script cannot continue."
4526 echo "Did not find rofi, there is no point to continue."
4531 # Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
4532 # Repeated calls should leave the config clean-ish
4534 function set_theme()
4536 CDIR="${HOME}/.config/rofi/"
4537 if [ ! -d "${CDIR}" ]
4541 if [ -f "${CDIR}/config" ]
4543 ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
4545 echo "rofi.theme: ${1}" >> "${CDIR}/config"
4549 if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ]
4551 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4552 xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources
4553 set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi"
4555 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4556 xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources
4557 set_theme "/usr/share/rofi/themes//gruvbox-light.rasi"
4563 :header-args+: :tangle ~/.config/systemd/user/wp.service
4566 #+begin_src conf :tangle no
4568 Description=wallpaper service
4572 ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto
4577 :header-args+: :tangle ~/.config/systemd/user/wp.timer
4580 #+begin_src conf :tangle no
4583 Description=wallpaper timer
4591 WantedBy=timers.target
4596 :header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
4602 zathura --synctex-forward "$pos" "$pdffile" || \
4604 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
4605 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )
4611 :header-args+: :tangle ~/.local/bin/eat-em :shebang "#!/bin/sh"
4615 # Original Posted at http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4616 # [ESC] character in original post removed here.
4618 # ANSI Color -- use these variables to easily have different color
4619 # and format output. Make sure to output the reset sequence after
4620 # colors (f = foreground, b = background), and use the 'off'
4621 # feature for anything you turn on.
4625 esc="$(echo -en '\e')"
4627 blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
4628 yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
4629 cyanf="${esc}[36m"; whitef="${esc}[37m"
4631 blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
4632 yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
4633 cyanb="${esc}[46m"; whiteb="${esc}[47m"
4635 boldon="${esc}[1m"; boldoff="${esc}[22m"
4636 italicson="${esc}[3m"; italicsoff="${esc}[23m"
4637 ulon="${esc}[4m"; uloff="${esc}[24m"
4638 invon="${esc}[7m"; invoff="${esc}[27m"
4643 # note in this first use that switching colors doesn't require a reset
4644 # first - the new color overrides the old one.
4652 ${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset}
4653 ${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}
4654 ${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}
4655 ${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset}
4656 ${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset}
4657 ${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset}
4659 ${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset}
4660 ${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}
4661 ${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}
4662 ${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset}
4663 ${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset}
4664 ${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset}
4671 :header-args+: :tangle ~/.local/bin/invade-em :shebang "#!/bin/bash"
4676 # ANSI color scheme script featuring Space Invaders
4678 # Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4679 # Modified by lolilolicon
4685 printf -v $j$i %b "\e[${!j}${i}m"
4693 $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4694 $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4695 $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
4696 $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
4698 $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4699 $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4700 $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
4701 $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst