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/
438 :header-args+: :tangle ~/.config/systemd/user/getmail.service
441 #+begin_src conf :tangle no
443 Description=getmail service
447 ExecStart=/usr/bin/getmail
448 StandardOutput=syslog
454 :header-args+: :tangle ~/.config/systemd/user/getmail.timer
457 #+begin_src conf :tangle no
459 Description=getmail timer
467 WantedBy=timers.target
474 :header-args+: :tangle ~/.gitconfig
481 email = bandali@gnu.org
482 signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
496 autocrlf = input # CRLF -> LF on commit
497 editor = emacsclient -t
498 excludesfile = ~/.gitignore_global
511 git = !exec git # handle nested git calls, e.g. git git status
512 aliases = config --get-regexp '^alias\\.'
524 nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
525 nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
538 remote = magenta bold
547 # showUntrackedFiles = all
562 smtpserver = fencepost.gnu.org
570 :header-args+: :tangle ~/.gitignore_global
585 :header-args+: :tangle ~/.gnupg/gpg-agent.conf
589 default-cache-ttl 43200
592 default-cache-ttl-ssh 10800
593 max-cache-ttl-ssh 10800
595 # pinentry-program /usr/bin/pinentry-qt
602 :header-args+: :tangle ~/.gtkrc-2.0
606 gtk-theme-name="Greybird"
607 gtk-icon-theme-name="Paper"
608 gtk-font-name="Ubuntu 10"
610 # gtk-key-theme-name = "Emacs"
615 :header-args+: :tangle ~/.config/gtk-3.0/settings.ini
618 #+begin_src conf :tangle no
620 gtk-icon-theme-name = Paper
621 # gtk-theme-name = Adwaita
623 gtk-theme-name = Greybird
624 # gtk-theme-name = Arc-Darker
625 # gtk-theme-name = Numix-ArchBlue
627 gtk-font-name = Ubuntu 10
628 # gtk-key-theme-name = Emacs
631 ** [[https://github.com/Leinnan/i3gs][i3gs]]
633 :header-args+: :tangle ~/.config/i3gs/config
636 #+begin_src conf :comments none :tangle no
637 borders_width=0 0 2 0
642 #title=<span weight='heavy' fgcolor='#7FDBFF'> </span>
643 #borders_color=#7FDBFF
647 title=<span weight='heavy' fgcolor='#3D9970'> </span>
648 borders_color=#3D9970
652 #title=<span weight='heavy' fgcolor='#2ECC40'> </span>
653 #borders_color=#2ECC40
657 #title=<span weight='heavy' fgcolor='#01FF70'> </span>
658 #borders_color=#01FF70
662 title=<span weight='heavy' fgcolor='#7FDBFF'></span>
663 borders_color=#7FDBFF
667 command=battery-percentage-time
668 title=<span weight='heavy' fgcolor='#39CCCC'> </span>
669 borders_color=#39CCCC
673 title=<span weight='heavy' fgcolor='#01FF70'> </span>
674 borders_color=#01FF70
678 command=date '+%-I:%M, %a %b %d '
679 title=<span weight='heavy' fgcolor='#FFDC00'> </span>
680 borders_color=#FFDC00
686 :header-args+: :tangle ~/.config/i3status/config
689 #+begin_src conf :comments none
690 # i3status configuration file.
691 # see "man i3status" for documentation.
693 # It is important that this file is edited as UTF-8.
694 # The following line should contain a sharp s:
696 # If the above line is not correctly displayed, fix your editor first!
701 output_format = "i3bar"
706 order += "disk /data"
707 order += "wireless _first_"
708 order += "ethernet _first_"
710 order += "volume master"
712 order += "tztime local"
715 format_up = "W:%quality %essid %ip"
716 format_down = "W: down"
720 # if you use %speed, i3status requires root privileges
721 format_up = "E: %ip (%speed)"
722 format_down = "E: down"
726 format = "%status %percentage %remaining (%consumption)"
727 path = "/sys/class/power_supply/BAT%d/uevent"
729 threshold_type = "percentage"
730 last_full_capacity = true
731 integer_battery_capacity = true
736 format = "%-I:%M%P %a %b %d"
741 format_muted = "🔇 %volume"
754 format = "/data %avail"
762 :header-args+: :tangle ~/.mbsyncrc
775 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin.gpg"
778 IMAPStore amin-remote
781 IMAPAccount amin-dovecot
785 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin-dovecot.gpg"
797 IMAPAccount uwaterloo
798 Host connect.uwaterloo.ca
800 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
803 IMAPStore uwaterloo-remote
806 IMAPAccount uwaterloo-dovecot
809 User abandali@uwaterloo.ca
810 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-dovecot.gpg"
813 IMAPStore uwaterloo-local
814 Account uwaterloo-dovecot
817 Master :uwaterloo-remote:
818 Slave :uwaterloo-local:
824 :header-args+: :tangle ~/.config/systemd/user/mbsync.service
827 #+begin_src conf :tangle no
829 Description=mbsync service
833 ExecStart=/usr/bin/mbsync -Va
834 StandardOutput=syslog
840 :header-args+: :tangle ~/.config/systemd/user/mbsync.timer
843 #+begin_src conf :tangle no
845 Description=mbsync timer
853 WantedBy=timers.target
858 :header-args+: :tangle ~/.latexmkrc
862 $pdf_previewer = "start zathura %O %S";
863 $clean_ext = "aux out";
865 # $pdf_update_method = 4;
866 # $pdf_update_command = "zathura %O %S";
868 # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
869 # by Ctrl+click in the PDF.
870 # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
872 # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
877 Improve XPS 15 9560's touchpad experience.
879 # begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
880 #+begin_src conf :tangle no
882 Identifier "libinput touchpad catchall"
885 Option "ClickMethod" "clickfinger"
886 Option "NaturalScrolling" "true"
887 Option "Tapping" "on"
888 Option "TappingButtonMap" "lrm"
894 :header-args+: :tangle ~/.config/mpd/mpd.conf
898 # An example configuration file for MPD.
899 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
902 # Files and directories #######################################################
904 # This setting controls the top directory which MPD will search to discover the
905 # available audio files and add them to the daemon's online database. This
906 # setting defaults to the XDG directory, otherwise the music directory will be
907 # be disabled and audio files will only be accepted over ipc socket (using
908 # file:// protocol) or streaming files over an accepted protocol.
910 music_directory "~/usr/music"
912 # This setting sets the MPD internal playlist directory. The purpose of this
913 # directory is storage for playlists created by MPD. The server will use
914 # playlist files not created by the server but only if they are in the MPD
915 # format. This setting defaults to playlist saving being disabled.
917 playlist_directory "~/.mpd/playlists"
919 # This setting sets the location of the MPD database. This file is used to
920 # load the database at server start up and store the database while the
921 # server is not up. This setting defaults to disabled which will allow
922 # MPD to accept files over ipc socket (using file:// protocol) or streaming
923 # files over an accepted protocol.
925 db_file "~/.mpd/database"
927 # These settings are the locations for the daemon log files for the daemon.
928 # These logs are great for troubleshooting, depending on your log_level
931 # The special value "syslog" makes MPD use the local syslog daemon. This
932 # setting defaults to logging to syslog, otherwise logging is disabled.
934 log_file "~/.mpd/log"
936 # This setting sets the location of the file which stores the process ID
937 # for use of mpd --kill and some init scripts. This setting is disabled by
938 # default and the pid file will not be stored.
940 pid_file "~/.mpd/pid"
942 # This setting sets the location of the file which contains information about
943 # most variables to get MPD back into the same general shape it was in before
944 # it was brought down. This setting is disabled by default and the server
945 # state will be reset on server start up.
947 state_file "~/.mpd/state"
949 # The location of the sticker database. This is a database which
950 # manages dynamic information attached to songs.
952 sticker_file "~/.mpd/sticker.sql"
954 ###############################################################################
957 # General music daemon options ################################################
959 # This setting specifies the user that MPD will run as. MPD should never run as
960 # root and you may use this setting to make MPD change its user ID after
961 # initialization. This setting is disabled by default and MPD is run as the
966 # This setting specifies the group that MPD will run as. If not specified
967 # primary group of user specified with "user" setting will be used (if set).
968 # This is useful if MPD needs to be a member of group such as "audio" to
969 # have permission to use sound card.
973 # This setting sets the address for the daemon to listen on. Careful attention
974 # should be paid if this is assigned to anything other then the default, any.
975 # This setting can deny access to control of the daemon. Not effective if
976 # systemd socket activiation is in use.
979 #bind_to_address "any"
981 # And for Unix Socket
982 #bind_to_address "~/.mpd/socket"
984 # This setting is the TCP port that is desired for the daemon to get assigned
989 # This setting controls the type of information which is logged. Available
990 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
991 # argument is recommended for troubleshooting, though can quickly stretch
992 # available resources on limited hardware storage.
996 # If you have a problem with your MP3s ending abruptly it is recommended that
997 # you set this argument to "no" to attempt to fix the problem. If this solves
998 # the problem, it is highly recommended to fix the MP3 files with vbrfix
999 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
1000 # point gapless MP3 playback can be enabled.
1002 #gapless_mp3_playback "yes"
1004 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
1005 # of starting playback after startup.
1007 #restore_paused "no"
1009 # This setting enables MPD to create playlists in a format usable by other
1012 #save_absolute_paths_in_playlists "no"
1014 # This setting defines a list of tag types that will be extracted during the
1015 # audio file discovery process. The complete list of possible values can be
1016 # found in the user manual.
1017 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
1019 # This setting enables automatic update of MPD's database when files in
1020 # music_directory are changed.
1024 # Limit the depth of the directories being watched, 0 means only watch
1025 # the music directory itself. There is no limit by default.
1027 #auto_update_depth "3"
1029 ###############################################################################
1032 # Symbolic link behavior ######################################################
1034 # If this setting is set to "yes", MPD will discover audio files by following
1035 # symbolic links outside of the configured music_directory.
1037 #follow_outside_symlinks "yes"
1039 # If this setting is set to "yes", MPD will discover audio files by following
1040 # symbolic links inside of the configured music_directory.
1042 #follow_inside_symlinks "yes"
1044 ###############################################################################
1047 # Zeroconf / Avahi Service Discovery ##########################################
1049 # If this setting is set to "yes", service information will be published with
1052 #zeroconf_enabled "yes"
1054 # The argument to this setting will be the Zeroconf / Avahi unique name for
1055 # this MPD server on the network.
1057 #zeroconf_name "Music Player"
1059 ###############################################################################
1062 # Permissions #################################################################
1064 # If this setting is set, MPD will require password authorization. The password
1065 # setting can be specified multiple times for different password profiles.
1067 #password "password@read,add,control,admin"
1069 # This setting specifies the permissions a user has who has not yet logged in.
1071 #default_permissions "read,add,control,admin"
1073 ###############################################################################
1076 # Database #######################################################################
1081 # host "other.mpd.host"
1085 # Input #######################################################################
1090 # proxy "proxy.isp.com:8080"
1092 # proxy_password "password"
1096 ###############################################################################
1098 # Audio Output ################################################################
1109 path "/tmp/mpd.fifo"
1113 # MPD supports various audio output types, as well as playing through multiple
1114 # audio outputs at the same time, through multiple audio_output settings
1115 # blocks. Setting this block is optional, though the server will only attempt
1116 # autodetection for one sound card.
1118 # An example of an ALSA output:
1122 # name "My ALSA Device"
1123 ## device "hw:0,0" # optional
1124 ## mixer_type "hardware" # optional
1125 ## mixer_device "default" # optional
1126 ## mixer_control "PCM" # optional
1127 ## mixer_index "0" # optional
1130 # An example of an OSS output:
1134 # name "My OSS Device"
1135 ## device "/dev/dsp" # optional
1136 ## mixer_type "hardware" # optional
1137 ## mixer_device "/dev/mixer" # optional
1138 ## mixer_control "PCM" # optional
1141 # An example of a shout output (for streaming to Icecast):
1145 # encoder "vorbis" # optional
1146 # name "My Shout Stream"
1153 # format "44100:16:1"
1154 ## protocol "icecast2" # optional
1155 ## user "source" # optional
1156 ## description "My Stream Description" # optional
1157 ## url "http://example.com" # optional
1158 ## genre "jazz" # optional
1159 ## public "no" # optional
1160 ## timeout "2" # optional
1161 ## mixer_type "software" # optional
1164 # An example of a recorder output:
1168 # name "My recorder"
1169 # encoder "vorbis" # optional, vorbis or lame
1170 # path "/var/lib/mpd/recorder/mpd.ogg"
1171 ## quality "5.0" # do not define if bitrate is defined
1172 # bitrate "128" # do not define if quality is defined
1173 # format "44100:16:1"
1176 # An example of a httpd output (built-in HTTP streaming server):
1180 # name "My HTTP Stream"
1181 # encoder "vorbis" # optional, vorbis or lame
1183 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
1184 ## quality "5.0" # do not define if bitrate is defined
1185 # bitrate "128" # do not define if quality is defined
1186 # format "44100:16:1"
1187 # max_clients "0" # optional 0=no limit
1190 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
1194 # name "My Pulse Output"
1195 ## server "remote_server" # optional
1196 ## sink "remote_server_sink" # optional
1199 # An example of a winmm output (Windows multimedia API).
1203 # name "My WinMM output"
1204 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1206 ## device "0" # optional
1207 ## mixer_type "hardware" # optional
1210 # An example of an openal output.
1214 # name "My OpenAL output"
1215 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1218 # An example of an sndio output.
1222 # name "sndio output"
1223 # mixer_type "software"
1226 # An example of an OS X output:
1230 # name "My OS X Device"
1231 ## device "Built-in Output" # optional
1232 ## channel_map "-1,-1,0,1" # optional
1235 ## Example "pipe" output:
1240 # command "aplay -f cd 2>/dev/null"
1241 ## Or if you're want to use AudioCompress
1242 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
1243 ## Or to send raw PCM stream through PCM:
1244 # command "nc example.org 8765"
1245 # format "44100:16:2"
1248 ## An example of a null output (for no audio output):
1252 # name "My Null Output"
1253 # mixer_type "none" # optional
1256 ###############################################################################
1259 # Normalization automatic volume adjustments ##################################
1261 # This setting specifies the type of ReplayGain to use. This setting can have
1262 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
1263 # chooses between "track" and "album" depending on the current state of
1264 # random playback. If random playback is enabled then "track" mode is used.
1265 # See <http://www.replaygain.org> for more details about ReplayGain.
1266 # This setting is off by default.
1270 # This setting sets the pre-amp used for files that have ReplayGain tags. By
1271 # default this setting is disabled.
1273 #replaygain_preamp "0"
1275 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1276 # By default this setting is disabled.
1278 #replaygain_missing_preamp "0"
1280 # This setting enables or disables ReplayGain limiting.
1281 # MPD calculates actual amplification based on the ReplayGain tags
1282 # and replaygain_preamp / replaygain_missing_preamp setting.
1283 # If replaygain_limit is enabled MPD will never amplify audio signal
1284 # above its original level. If replaygain_limit is disabled such amplification
1285 # might occur. By default this setting is enabled.
1287 #replaygain_limit "yes"
1289 # This setting enables on-the-fly normalization volume adjustment. This will
1290 # result in the volume of all playing audio to be adjusted so the output has
1291 # equal "loudness". This setting is disabled by default.
1293 #volume_normalization "no"
1295 ###############################################################################
1297 # Character Encoding ##########################################################
1299 # If file or directory names do not display correctly for your locale then you
1300 # may need to modify this setting.
1302 #filesystem_charset "UTF-8"
1304 ###############################################################################
1309 :header-args+: :tangle ~/.msmtprc
1313 # Set default values for all following accounts.
1318 #tls_trust_file /etc/ssl/certs/ca-certificates.crt
1319 logfile ~/.msmtp.log
1324 # use `msmtp -a aminb --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1325 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
1329 passwordeval gpg2 --no-tty -q -d ~/.passwd/amin.gpg
1331 account bandali-me : aminb
1332 from amin@bandali.me
1336 host fencepost.gnu.org
1337 # use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1338 tls_fingerprint 93:59:52:1D:A6:95:13:31:7C:81:ED:DB:A5:BA:B5:2B:C8:BC:38:3E:71:A5:DF:8C:80:46:C1:E0:5D:2D:F4:E3
1340 from bandali@gnu.org
1342 passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
1345 account gnu-aminb : gnu
1347 account gnu-amin : gnu
1349 account gnu-mab : gnu
1354 host connect.uwaterloo.ca
1356 from abandali@uwaterloo.ca
1358 passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg
1359 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1361 # Set a default account
1362 account default : aminb
1369 :header-args+: :tangle ~/.ncmpcpp/config
1372 #+begin_src conf :tangle no
1373 ##############################################################
1374 ## This is the example configuration file. Copy it to ##
1375 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1376 ## and set up your preferences. ##
1377 ##############################################################
1379 ##### directories ######
1381 ## Directory for storing ncmpcpp related files.
1382 ## Changing it is useful if you want to store
1383 ## everything somewhere else and provide command
1384 ## line setting for alternative location to config
1385 ## file which defines that while launching ncmpcpp.
1388 ncmpcpp_directory = ~/.ncmpcpp
1391 ## Directory for storing downloaded lyrics. It
1392 ## defaults to ~/.lyrics since other MPD clients
1393 ## (eg. ncmpc) also use that location.
1396 #lyrics_directory = ~/.lyrics
1398 ##### connection settings #####
1400 #mpd_host = localhost
1404 #mpd_connection_timeout = 5
1406 ## Needed for tag editor and file operations to work.
1408 mpd_music_dir = ~/usr/music
1410 #mpd_crossfade_time = 5
1412 ##### music visualizer #####
1414 ## Note: In order to make music visualizer work you'll
1415 ## need to use mpd fifo output, whose format parameter
1416 ## has to be set to 44100:16:1 for mono visualization
1417 ## or 44100:16:2 for stereo visualization. Example
1418 ## configuration (it has to be put into mpd.conf):
1422 ## name "Visualizer feed"
1423 ## path "/tmp/mpd.fifo"
1424 ## format "44100:16:2"
1428 visualizer_fifo_path = /tmp/mpd.fifo
1431 ## Note: Below parameter is needed for ncmpcpp
1432 ## to determine which output provides data for
1433 ## visualizer and thus allow syncing between
1434 ## visualization and sound as currently there
1435 ## are some problems with it.
1438 visualizer_output_name = my fifo
1441 ## If you set format to 44100:16:2, make it 'yes'.
1443 visualizer_in_stereo = yes
1446 ## Multiply received samples by given value. Very
1447 ## useful for proper visualization of quiet music.
1449 #visualizer_sample_multiplier = 1
1452 ## Note: Below parameter defines how often ncmpcpp
1453 ## has to "synchronize" visualizer and audio outputs.
1454 ## 30 seconds is optimal value, but if you experience
1455 ## synchronization problems, set it to lower value.
1456 ## Keep in mind that sane values start with >=10.
1459 visualizer_sync_interval = 30
1462 ## Note: To enable spectrum frequency visualization
1463 ## you need to compile ncmpcpp with fftw3 support.
1466 ## Available values: spectrum, wave, wave_filled, ellipse.
1468 visualizer_type = spectrum
1470 #visualizer_look = ●▮
1471 visualizer_look = "●•"
1473 #visualizer_color = blue, cyan, green, yellow, magenta, red
1475 ## Alternative subset of 256 colors for terminals that support it.
1477 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1479 ##### system encoding #####
1481 ## ncmpcpp should detect your charset encoding
1482 ## but if it failed to do so, you can specify
1483 ## charset encoding you are using here.
1485 ## Note: You can see whether your ncmpcpp build
1486 ## supports charset detection by checking output
1487 ## of `ncmpcpp --version`.
1489 ## Note: Since MPD uses UTF-8 by default, setting
1490 ## this option makes sense only if your encoding
1494 #system_encoding = ""
1498 ## Time of inactivity (in seconds) after playlist
1499 ## highlighting will be disabled (0 = always on).
1501 #playlist_disable_highlight_delay = 5
1503 ## Defines how long messages are supposed to be visible.
1505 #message_delay_time = 5
1507 ##### song format #####
1509 ## For a song format you can use:
1515 ## %A - album artist
1519 ## %n - track number (01/12 -> 01)
1520 ## %N - full track info (01/12 -> 01/12)
1527 ## $R - begin right alignment
1529 ## If you want to make sure that a part of the format is displayed
1530 ## only when certain tags are present, you can archieve it by
1531 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1532 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1533 ## It is also possible to define a list of alternatives by providing
1534 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
1535 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1538 ## Note: If you want to set limit on maximal length of a tag, just
1539 ## put the appropriate number between % and character that defines
1540 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1542 ## In addition, formats support markers used for text attributes.
1543 ## They are followed by character '$'. After that you can put:
1545 ## - 0 - default window color (discards all other colors)
1554 ## - 9 - end of current color
1556 ## - u - underline text
1557 ## - r - reverse colors
1558 ## - a - use alternative character set
1560 ## If you don't want to use a non-color attribute anymore, just put it
1561 ## again, but this time insert character '/' between '$' and attribute
1562 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1563 ## or filename with reversed colors.
1565 ## If you want to use 256 colors and/or background colors in formats
1566 ## (the naming scheme is described below in section about color
1567 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
1568 ## the artist tag to one of the non-standard colors and make it have
1569 ## yellow background, you need to write $(197_yellow)%a$(end). Note
1570 ## that for standard colors this is interchangable with attributes
1573 ## Note: colors can be nested.
1576 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1578 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1580 #song_library_format = {%n - }{%t}|{%f}
1583 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1585 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1587 #now_playing_prefix = $b
1589 #now_playing_suffix = $/b
1591 #browser_playlist_prefix = "$2playlist$9 "
1593 #selected_item_prefix = $6
1595 #selected_item_suffix = $9
1597 #modified_item_prefix = $3> $9
1600 ## Note: attributes are not supported for the following variables.
1602 #song_window_title_format = {%a - }{%t}|{%f}
1604 ## Note: Below variables are used for sorting songs in browser.
1605 ## The sort mode determines how songs are sorted, and can be used
1606 ## in combination with a sort format to specify a custom sorting format.
1607 ## Available values for browser_sort_mode are "name", "mtime", "format"
1611 #browser_sort_mode = name
1613 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1615 ##### columns settings #####
1617 ## syntax of song columns list format is "column column etc."
1619 ## - syntax for each column is:
1621 ## (width of the column)[color of the column]{displayed tag}
1623 ## Note: Width is by default in %, if you want a column to
1624 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1625 ## will be the column that take 10% of screen (so the real width
1626 ## will depend on actual screen size), whereas (10f)[white]{a}
1627 ## will take 10 terminal cells, no matter how wide the screen is.
1629 ## - color is optional (if you want the default one,
1630 ## leave the field empty).
1632 ## Note: You can give a column additional attributes by putting appropriate
1633 ## character after displayed tag character. Available attributes are:
1635 ## - r - column will be right aligned
1636 ## - E - if tag is empty, empty tag marker won't be displayed
1640 ## - give a column custom name by putting it after attributes,
1641 ## separated with character ':', e.g. {lr:Length} gives you
1642 ## right aligned column of lengths named "Length".
1644 ## - define sequence of tags, that have to be displayed in case
1645 ## predecessor is empty in a way similar to the one in classic
1646 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1647 ## creates column named "Owner" that tries to display artist
1648 ## tag and then composer and performer if previous ones are
1652 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1654 ##### various settings #####
1657 ## Note: Custom command that will be executed each
1658 ## time song changes. Useful for notifications etc.
1660 #execute_on_song_change = ""
1662 #playlist_show_mpd_host = no
1664 #playlist_show_remaining_time = no
1666 #playlist_shorten_total_times = no
1668 #playlist_separate_albums = no
1671 ## Note: Possible display modes: classic, columns.
1673 #playlist_display_mode = columns
1675 #browser_display_mode = classic
1677 #search_engine_display_mode = classic
1679 #playlist_editor_display_mode = classic
1681 #discard_colors_if_item_is_selected = yes
1683 #incremental_seeking = yes
1687 #volume_change_step = 2
1689 #autocenter_mode = no
1691 #centered_cursor = no
1694 ## Note: You can specify third character which will
1695 ## be used to build 'empty' part of progressbar.
1697 #progressbar_look = =>
1698 progressbar_look = "─╼╶"
1699 #progressbar_look = "─⊙╶"
1701 #progressbar_boldness = yes
1703 ## Available values: database, playlist.
1705 #default_place_to_search_in = database
1707 ## Available values: classic, alternative.
1709 #user_interface = classic
1711 #data_fetching_delay = yes
1713 ## Available values: artist, album_artist, date, genre, composer, performer.
1715 #media_library_primary_tag = artist
1717 ## Available values: wrapped, normal.
1719 #default_find_mode = wrapped
1721 #default_tag_editor_pattern = %n - %t
1723 #header_visibility = yes
1725 #statusbar_visibility = yes
1727 #titles_visibility = yes
1729 #header_text_scrolling = yes
1731 #cyclic_scrolling = no
1735 #follow_now_playing_lyrics = no
1737 #fetch_lyrics_for_current_song_in_background = no
1739 #store_lyrics_in_song_dir = no
1741 #generate_win32_compatible_filenames = yes
1743 #allow_for_physical_item_deletion = no
1746 ## Note: If you set this variable, ncmpcpp will try to
1747 ## get info from last.fm in language you set and if it
1748 ## fails, it will fall back to english. Otherwise it will
1749 ## use english the first time.
1751 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1753 #lastfm_preferred_language = en
1755 #show_hidden_files_in_local_browser = no
1758 ## How shall screen switcher work?
1760 ## - "previous" - switch between the current and previous screen.
1761 ## - "screen1,...,screenN" - switch between given sequence of screens.
1763 ## Screens available for use: help, playlist, browser, search_engine,
1764 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1766 #screen_switcher_mode = playlist, browser
1769 ## Note: You can define startup screen
1770 ## by choosing screen from the list above.
1772 #startup_screen = playlist
1775 ## Note: You can define startup slave screen
1776 ## by choosing screen from the list above or
1777 ## an empty value for no slave screen.
1779 #startup_slave_screen = ""
1781 #startup_slave_screen_focus = no
1784 ## Default width of locked screen (in %).
1785 ## Acceptable values are from 20 to 80.
1788 #locked_screen_width_part = 50
1790 #ask_for_locked_screen_width_part = yes
1792 #jump_to_now_playing_song_at_start = yes
1794 #ask_before_clearing_playlists = yes
1796 #clock_display_seconds = no
1798 #display_volume_level = yes
1800 #display_bitrate = no
1802 #display_remaining_time = no
1804 ## Available values: none, basic, extended, perl.
1806 #regular_expressions = perl
1809 ## Note: If below is enabled, ncmpcpp will ignore leading
1810 ## "The" word while sorting items in browser, tags in
1811 ## media library, etc.
1813 #ignore_leading_the = no
1815 #block_search_constraints_change_if_items_found = yes
1817 #mouse_support = yes
1819 #mouse_list_scroll_whole_page = yes
1821 #empty_tag_marker = <empty>
1823 #tags_separator = " | "
1825 #tag_editor_extended_numeration = no
1827 #media_library_sort_by_mtime = no
1829 #enable_window_title = yes
1832 ## Note: You can choose default search mode for search
1833 ## engine. Available modes are:
1835 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1836 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1837 ## but if your mpd is on a remote machine, downloading big database
1838 ## to process it can take a while
1839 ## - 3 - match only exact values (this mode uses mpd function for searching
1840 ## in database and local one for searching in current playlist)
1843 #search_engine_default_search_mode = 1
1845 #external_editor = nano
1847 ## Note: set to yes if external editor is a console application.
1849 #use_console_editor = yes
1851 ##### colors definitions #####
1853 ## It is possible to set a background color by setting a color
1854 ## value "<foreground>_<background>", e.g. red_black will set
1855 ## foregound color to red and background color to black.
1857 ## In addition, for terminals that support 256 colors it
1858 ## is possible to set one of them by using a number in range
1859 ## [1, 256] instead of color name, e.g. numerical value
1860 ## corresponding to red_black is 2_1. To find out if the
1861 ## terminal supports 256 colors, run ncmpcpp and check out
1862 ## the bottom of the help screen for list of available colors
1863 ## and their numerical values.
1865 ## Note: due to technical limitations of ncurses, if 256 colors
1866 ## are used, it is possible to either use only the colors with
1867 ## default background color, or all pairs from 1_1 up to 254_127,
1868 ## depending on the ncurses version used.
1871 #colors_enabled = yes
1873 #empty_tag_color = cyan
1875 #header_window_color = default
1877 #volume_color = default
1879 #state_line_color = default
1881 #state_flags_color = default
1883 #main_window_color = yellow
1889 #main_window_highlight_color = yellow
1891 #progressbar_color = black
1893 #progressbar_elapsed_color = green
1895 #statusbar_color = default
1897 #alternative_ui_separator_color = black
1899 #active_column_color = red
1901 #window_border_color = green
1903 #active_window_border = red
1909 :header-args+: :tangle ~/.ncmpcpp/bindings
1912 #+begin_src conf :tangle no
1937 move_sort_order_down
1946 :header-args+: :tangle ~/.notmuch-config
1950 # .notmuch-config - Configuration file for the notmuch mail system
1952 # For more information about notmuch, see https://notmuchmail.org
1954 # Database configuration
1956 # The only value supported here is 'path' which should be the top-level
1957 # directory where your mail currently exists and to where mail will be
1958 # delivered in the future. Files should be individual email messages.
1959 # Notmuch will store its database within a sub-directory of the path
1960 # configured here named ".notmuch".
1963 path=/home/amin/oldmail
1965 # User configuration
1967 # Here is where you can let notmuch know how you would like to be
1968 # addressed. Valid settings are
1970 # name Your full name.
1971 # primary_email Your primary email address.
1972 # other_email A list (separated by ';') of other email addresses
1973 # at which you receive email.
1975 # Notmuch will use the various email addresses configured here when
1976 # formatting replies. It will avoid including your own addresses in the
1977 # recipient list of replies, and will set the From address based on the
1978 # address to which the original email was addressed.
1982 primary_email=amin@aminb.org
1983 other_email=bandali@gnu.org;abandali@uwaterloo.ca;
1985 # Configuration for "notmuch new"
1987 # The following options are supported here:
1989 # tags A list (separated by ';') of the tags that will be
1990 # added to all messages incorporated by "notmuch new".
1992 # ignore A list (separated by ';') of file and directory names
1993 # that will not be searched for messages by "notmuch new".
1995 # NOTE: *Every* file/directory that goes by one of those
1996 # names will be ignored, independent of its depth/location
1997 # in the mail store.
2002 ignore=.uidvalidity;.mbsyncstate;/.*/dovecot*/
2004 # Search configuration
2006 # The following option is supported here:
2009 # A ;-separated list of tags that will be excluded from
2010 # search results by default. Using an excluded tag in a
2011 # query will override that exclusion.
2014 exclude_tags=deleted;spam;
2016 # Maildir compatibility configuration
2018 # The following option is supported here:
2020 # synchronize_flags Valid values are true and false.
2022 # If true, then the following maildir flags (in message filenames)
2023 # will be synchronized with the corresponding notmuch tags:
2031 # S unread (added when 'S' flag is not present)
2033 # The "notmuch new" command will notice flag changes in filenames
2034 # and update tags, while the "notmuch tag" and "notmuch restore"
2035 # commands will notice tag changes and update flags in filenames
2038 synchronize_flags=true
2040 # Cryptography related configuration
2042 # The following option is supported here:
2045 # binary name or full path to invoke gpg.
2053 :header-args+: :tangle ~/mail/.notmuch/hooks/pre-new :shebang "#!/bin/sh"
2057 touch /tmp/gnusieve.log
2058 sieve-filter -eW -o postmaster_address=postmaster@aminb.org \
2059 -o mail_location=maildir:$MAILDIR/gnu:LAYOUT=fs:INBOX=$MAILDIR/gnu/Inbox ~/sieve/gnu.sieve INBOX delete &>>/tmp/gnusieve.log
2064 :header-args+: :tangle ~/mail/.notmuch/hooks/post-new :shebang "#!/bin/sh"
2068 # apply sent tag to messages sent by me
2069 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
2072 notmuch tag -latest -- tag:latest
2073 notmuch tag +inbox +unread +latest -new -- tag:new
2076 # apply tags to lists
2079 notmuch tag -inbox +lists/hackernewsletter -- folder:amin/lists/hackernewsletter
2080 notmuch tag -inbox +lists/haskell-weekly -- folder:amin/lists/haskell-weekly
2082 notmuch tag -inbox +pay -- folder:amin/pay
2083 notmuch tag -inbox +banking -- folder:amin/banking
2084 notmuch tag -inbox +work -- folder:amin/work
2088 notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136
2089 notmuch tag -inbox +uw/cs846 -- folder:uwaterloo/lists/cs846
2090 notmuch tag -inbox +uw/ece750 -- folder:uwaterloo/lists/ece750
2091 notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212
2092 notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463
2094 notmuch tag -inbox +lists/alloytools -- folder:uwaterloo/lists/alloytools
2095 notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle
2096 notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA
2097 notmuch tag -inbox +lists/math-grad -- folder:uwaterloo/lists/Math-grad
2098 notmuch tag -inbox +lists/scs-grads -- folder:uwaterloo/lists/scs-grads
2099 notmuch tag -inbox +lists/watform-students -- folder:uwaterloo/lists/Watform-students
2103 notmuch tag -inbox +l/emacs-devel -- folder:gnu/l/emacs-devel
2104 notmuch tag -inbox +l/emacs-orgmode -- folder:gnu/l/emacs-orgmode
2105 notmuch tag -inbox +l/emacsconf-discuss -- folder:gnu/l/emacsconf-discuss
2106 notmuch tag -inbox +l/fencepost-users -- folder:gnu/l/fencepost-users
2107 notmuch tag -inbox +l/guix-devel -- folder:gnu/l/guix-devel
2108 notmuch tag -inbox +l/guile-devel -- folder:gnu/l/guile-devel
2109 notmuch tag -inbox +l/help-gnu-emacs -- folder:gnu/l/help-gnu-emacs
2110 notmuch tag -inbox +l/info-gnu-emacs -- folder:gnu/l/info-gnu-emacs
2111 notmuch tag -inbox +l/www-commits -- folder:gnu/l/www-commits
2112 notmuch tag -inbox +l/www-discuss -- folder:gnu/l/www-discuss
2113 notmuch tag -inbox +webmasters -- folder:gnu/webmasters
2115 notmuch tag -inbox +l/deepspec -- folder:gnu/l/deepspec
2116 notmuch tag -inbox +l/haskell-cafe -- folder:gnu/l/haskell-cafe
2117 notmuch tag -inbox +l/haskell-art -- folder:gnu/l/haskell-art
2118 notmuch tag -inbox +l/notmuch -- folder:gnu/l/notmuch
2120 notmuch tag -inbox +l/~aminb/test-priv -- folder:gnu/l/~aminb/test-priv
2121 notmuch tag -inbox +l/~sircmpwn/sr.ht-admins -- folder:gnu/l/~sircmpwn/sr.ht-admins
2122 notmuch tag -inbox +l/~sircmpwn/sr.ht-announce -- folder:gnu/l/~sircmpwn/sr.ht-announce
2123 notmuch tag -inbox +l/~sircmpwn/sr.ht-dev -- folder:gnu/l/~sircmpwn/sr.ht-dev
2124 notmuch tag -inbox +l/~sircmpwn/sr.ht-discuss -- folder:gnu/l/~sircmpwn/sr.ht-discuss
2127 notmuch tag -inbox -unread +archive/notmuch -- path:archive/notmuch/**
2128 notmuch tag -inbox -unread +archive/emacs-devel -- path:archive/emacs-devel/**
2133 :header-args+: :tangle ~/.config/systemd/user/notmuch.service
2136 #+begin_src conf :tangle no
2138 Description=notmuch service
2142 ExecStart=/usr/bin/notmuch new
2143 StandardOutput=syslog
2144 StandardError=syslog
2149 :header-args+: :tangle ~/.config/systemd/user/notmuch.timer
2152 #+begin_src conf :tangle no
2154 Description=notmuch timer
2159 Unit=notmuch.service
2162 WantedBy=timers.target
2168 :header-args+: :tangle ~/mail/aminb.org/amin/sieve/amin.sieve :comments none
2172 require ["regex", "variables", "fileinto", "envelope",
2173 "mailbox", "imap4flags", "include"];
2177 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
2178 fileinto :create "gnu.webmasters";
2182 include :personal "lists";
2187 :header-args+: :tangle ~/mail/aminb.org/amin/sieve/lists.sieve :comments none
2191 require ["regex", "variables", "fileinto", "envelope",
2192 "mailbox", "imap4flags", "include"];
2196 header :contains "list-id"
2197 [ "<emacs-devel.gnu.org>"
2198 , "<emacs-orgmode.gnu.org>"
2199 , "<emacsconf-discuss.gnu.org>"
2200 , "<fencepost-users.gnu.org>"
2201 , "<guix-devel.gnu.org>"
2202 , "<guile-devel.gnu.org>"
2203 , "<help-gnu-emacs.gnu.org>"
2204 , "<info-gnu-emacs.gnu.org>"
2205 , "<info-guix.gnu.org>"
2206 , "<www-commits.gnu.org>"
2207 , "<www-discuss.gnu.org>"
2208 , "<deepspec.lists.cs.princeton.edu>"
2209 , "<haskell-cafe.haskell.org>"
2210 , "<haskell-art.we.lurk.org>"
2211 , "<notmuch.notmuchmail.org>"
2213 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
2214 set :lower "listname" "${1}";
2215 fileinto :create "gnu.${listname}";
2220 # sr.ht lists, with dots ('.') omitted
2222 header :contains "list-id"
2223 [ "<~bandali/public-inbox@lists.sr.ht>"
2224 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
2225 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
2226 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
2227 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
2229 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
2230 set :lower "username" "${1}";
2231 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
2232 fileinto :create "gnu.${username}.${listname}";
2240 :header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service"
2245 Description=Powertop tunings
2248 ExecStart=/usr/bin/powertop --auto-tune
2249 RemainAfterExit=true
2252 WantedBy=multi-user.target
2257 :header-args+: :tangle ~/.config/redshift.conf :comments none
2261 ; Global settings for redshift
2263 ; Set the day and night screen temperatures (Neutral is 6500K)
2274 ; Enable/Disable a smooth transition between day and night
2275 ; 0 will cause a direct change from day to night screen temperature.
2276 ; 1 will gradually increase or decrease the screen temperature.
2279 ; Set the screen brightness. Default is 1.0.
2281 ; It is also possible to use different settings for day and night
2282 ; since version 1.8.
2284 ;brightness-night=0.4
2285 ; Set the screen gamma (for all colors, or each color channel
2290 ; This can also be set individually for day and night since
2292 ;gamma-day=0.8:0.7:0.8
2295 ; Set the location-provider: 'geoclue2' or 'manual'
2296 ; type 'redshift -l list' to see possible values.
2297 ; The location provider settings are in a different section.
2298 ;location-provider=manual
2299 location-provider=geoclue2
2301 ; Set the adjustment-method: 'randr', 'vidmode'
2302 ; type 'redshift -m list' to see all possible values.
2303 ; 'randr' is the preferred method, 'vidmode' is an older API.
2304 ; but works in some cases when 'randr' does not.
2305 ; The adjustment method settings are in a different section.
2306 adjustment-method=randr
2308 ; Configuration of the location-provider:
2309 ; type 'redshift -l PROVIDER:help' to see the settings.
2310 ; ex: 'redshift -l manual:help'
2311 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
2312 ; are negative numbers.
2317 ; Configuration of the adjustment-method
2318 ; type 'redshift -m METHOD:help' to see the settings.
2319 ; ex: 'redshift -m randr:help'
2320 ; In this example, randr is configured to adjust screen 1.
2321 ; Note that the numbering starts from 0, so this is actually the
2322 ; second screen. If this option is not specified, Redshift will try
2323 ; to adjust _all_ screens.
2330 :header-args+: :tangle ~/.config/rofi/config
2334 ! rofi.font: Ubuntu Mono 13
2335 ! rofi.font: Inconsolata 16
2336 ! rofi.font: Iosevka 13
2337 ! rofi.font: Source Code Pro 11
2338 rofi.font: Source Code Pro 10.5
2339 rofi.modi: run,window
2347 !rofi.theme: /usr/share/rofi/themes//Arc.rasi
2348 !rofi.theme: /usr/share/rofi/themes//Paper.rasi
2349 !rofi.theme: /usr/share/rofi/themes//sidebar.rasi
2351 rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi
2356 :header-args+: :tangle ~/.config/rofi-pass/config
2360 # permanently set alternative root dir
2361 # root=/path/to/root
2363 # rofi command. Make sure to have "$@" as last argument
2365 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
2366 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
2369 # xdotool needs the keyboard layout to be set using setxkbmap
2370 # You can do this in your autostart scripts (e.g. xinitrc)
2372 # If for some reason, you cannot do this, you can set the command here.
2373 # and set fix_layout to true
2382 USERNAME_field='user'
2383 AUTOTYPE_field='autotype'
2385 # delay to be used for :delay keyword
2388 ## Programs to be used
2397 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
2400 default_autotype='user :tab pass'
2402 # color of the help messages
2403 # leave empty for autodetection
2404 help_color="#4872FF"
2406 # Clipboard settings
2407 # Possible options: primary, clipboard, both
2410 # Options for generating new password entries
2411 # default_user is also used for password files that have no user field.
2413 default_user2=aminban
2416 # Custom Keybindings
2440 :header-args+: :tangle ~/.config/sway/config
2454 set $menu rofi -show run -display-run '> ' -display-window ' 🗔 '
2456 ### Output configuration
2458 # Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
2459 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
2461 # Example configuration:
2463 # output HDMI-A-1 resolution 1920x1080 position 1920,0
2465 # You can get the names of your outputs by running: swaymsg -t get_outputs
2467 ### Idle configuration
2470 timeout 120 '[ -f ~/.nosleep ] || swaymsg "output * dpms off"' \
2471 resume '[ -f ~/.nosleep ] || swaymsg "output * dpms on"' \
2479 bindsym $mod+Return exec $term -name floating
2480 bindsym $mod+Shift+Return exec $term
2481 for_window [class="URxvt" instance="floating"] floating enable
2483 # kill focused window
2484 bindsym $mod+Shift+q kill
2486 # start your launcher
2487 bindsym $mod+d exec $menu
2490 bindsym $mod2+space exec rofi-pass
2492 # Drag floating windows by holding down $mod and left mouse button.
2493 # Resize them with right mouse button + $mod.
2494 # Despite the name, also works for non-floating windows.
2495 # Change normal to inverse to use left mouse button for resizing and right
2496 # mouse button for dragging.
2497 floating_modifier $mod normal
2499 # reload the configuration file
2500 bindsym $mod+Shift+c reload
2502 # exit sway (logs you out of your wayland session)
2503 # bindsym $mod+Shift+e exit
2505 bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
2506 bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
2507 bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
2509 bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
2510 bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
2511 bindsym XF86AudioMute exec pamixer --toggle-mute
2512 bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
2514 bindsym $mod+Shift+apostrophe exec rofi-remmina.py # choose remmina connection
2516 # original sway workspace switch and window move
2517 bindsym $mod+bracketleft workspace prev
2518 bindsym $mod+bracketright workspace next
2519 bindsym $mod+braceleft move container to workspace prev
2520 bindsym $mod+braceright move container to workspace next
2522 # bspwm-esque workspace switch and window move
2523 bindsym $mod2+bracketleft exec sway-ws-util switch prev
2524 bindsym $mod2+bracketright exec sway-ws-util switch next
2525 bindsym $mod2+braceleft exec sway-ws-util move prev follow
2526 bindsym $mod2+braceright exec sway-ws-util move next follow
2530 # Move your focus around
2531 bindsym $mod+$left focus left
2532 bindsym $mod+$down focus down
2533 bindsym $mod+$up focus up
2534 bindsym $mod+$right focus right
2535 # or use $mod+[up|down|left|right]
2536 bindsym $mod+Left focus left
2537 bindsym $mod+Down focus down
2538 bindsym $mod+Up focus up
2539 bindsym $mod+Right focus right
2541 # _move_ the focused window with the same, but add Shift
2542 bindsym $mod+Shift+$left move left
2543 bindsym $mod+Shift+$down move down
2544 bindsym $mod+Shift+$up move up
2545 bindsym $mod+Shift+$right move right
2546 # ditto, with arrow keys
2547 bindsym $mod+Shift+Left move left
2548 bindsym $mod+Shift+Down move down
2549 bindsym $mod+Shift+Up move up
2550 bindsym $mod+Shift+Right move right
2554 # switch to workspace
2555 bindsym $mod+1 workspace 1
2556 bindsym $mod+2 workspace 2
2557 bindsym $mod+3 workspace 3
2558 bindsym $mod+4 workspace 4
2559 bindsym $mod+5 workspace 5
2560 bindsym $mod+6 workspace 6
2561 bindsym $mod+7 workspace 7
2562 bindsym $mod+8 workspace 8
2563 bindsym $mod+9 workspace 9
2564 bindsym $mod+0 workspace 10
2565 # move focused container to workspace
2566 bindsym $mod+Shift+1 move container to workspace 1
2567 bindsym $mod+Shift+2 move container to workspace 2
2568 bindsym $mod+Shift+3 move container to workspace 3
2569 bindsym $mod+Shift+4 move container to workspace 4
2570 bindsym $mod+Shift+5 move container to workspace 5
2571 bindsym $mod+Shift+6 move container to workspace 6
2572 bindsym $mod+Shift+7 move container to workspace 7
2573 bindsym $mod+Shift+8 move container to workspace 8
2574 bindsym $mod+Shift+9 move container to workspace 9
2575 bindsym $mod+Shift+0 move container to workspace 10
2576 # Note: workspaces can have any name you want, not just numbers.
2577 # We just use 1-10 as the default.
2581 # You can "split" the current object of your focus with
2582 # $mod+b or $mod+v, for horizontal and vertical splits
2584 bindsym $mod+b splith
2585 bindsym $mod+v splitv
2587 # Switch the current container between different layout styles
2588 bindsym $mod+s layout stacking
2589 bindsym $mod+w layout tabbed
2590 bindsym $mod+e layout toggle split
2592 # Make the current focus fullscreen
2593 bindsym $mod+f fullscreen
2595 # Toggle sticky-ness of the current (floating) window
2596 bindsym $mod+$mod2+space sticky toggle
2598 # Toggle the current focus between tiling and floating mode
2599 bindsym $mod+Shift+space floating toggle
2601 # Swap focus between the tiling area and the floating area
2602 bindsym $mod+space focus mode_toggle
2604 # move focus to the parent container
2605 bindsym $mod+a focus parent
2609 # Sway has a "scratchpad", which is a bag of holding for windows.
2610 # You can send windows there and get them back later.
2612 # Move the currently focused window to the scratchpad
2613 bindsym $mod+Shift+minus move scratchpad
2615 # Show the next scratchpad window or hide the focused scratchpad window.
2616 # If there are multiple scratchpad windows, this command cycles through them.
2617 bindsym $mod+minus scratchpad show
2619 # Resizing containers:
2622 # left will shrink the containers width
2623 # right will grow the containers width
2624 # up will shrink the containers height
2625 # down will grow the containers height
2626 bindsym $left resize shrink width 10px
2627 bindsym $down resize grow height 10px
2628 bindsym $up resize shrink height 10px
2629 bindsym $right resize grow width 10px
2631 # ditto, with arrow keys
2632 bindsym Left resize shrink width 10px
2633 bindsym Down resize grow height 10px
2634 bindsym Up resize shrink height 10px
2635 bindsym Right resize grow width 10px
2637 # return to default mode
2638 bindsym Return mode "default"
2639 bindsym Escape mode "default"
2641 bindsym $mod+Shift+r mode "resize"
2647 set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown
2648 mode "$mode_system" {
2649 bindsym l exec swaylock, mode "default"
2650 bindsym e exec swaymsg exit, mode "default"
2651 bindsym s exec systemctl suspend, mode "default"
2652 bindsym h exec systemctl hibernate, mode "default"
2653 bindsym r exec systemctl reboot, mode "default"
2654 bindsym Shift+s exec systemctl poweroff -i, mode "default"
2656 # back to normal: Enter, Escape, or q
2657 bindsym Return mode "default"
2658 bindsym Escape mode "default"
2659 bindsym q mode "default"
2661 # bindsym XF86PowerOff mode "$mode_system"
2662 bindsym $mod+Shift+e mode "$mode_system"
2668 bindsym $mod+$mod2+p exec ([ ! -e ~/.nosleep ] && touch ~/.nosleep || rm ~/.nosleep) && killall -USR1 i3status
2674 bindsym $mod+Shift+n mode notifications
2675 mode notifications {
2676 bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default
2677 bindsym d exec makoctl dismiss; mode default
2678 bindsym Shift+d exec makoctl dismiss -a; mode default
2680 bindsym Escape mode default
2681 bindsym q mode default
2688 bindsym $mod+Shift+s mode screenshot
2690 bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2691 bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2693 bindsym Escape mode default
2694 bindsym q mode default
2700 # Read `man 5 sway-bar` for more information about this section.
2706 inactive_workspace #21212100 #21212100 #5c5c5c
2708 status_command i3status | my-i3status.py
2711 # font pango: benis uushi 9
2712 # font pango: Ubuntu Mono 11
2713 # font pango: Inconsolata 11
2714 font pango: DejaVu Sans Mono 9
2715 # font pango: Liberation Mono 9
2717 exec xrdb .Xresources
2718 # exec pgrep -x "systemd-inhibit" || \
2719 # systemd-inhibit --what=handle-power-key --who=aminb \
2720 # --why="Handle power button in sway" sleep infinity
2721 exec mako 2>&1 >/tmp/mako.log
2722 exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
2724 include /etc/sway/config.d/*
2725 include ~/.config/sway/`hostname`
2727 exec systemd-notify --ready || true
2733 :header-args+: :tangle ~/.config/sway/langa
2737 input "2:7:SynPS/2_Synaptics_TouchPad" {
2741 natural_scroll enabled
2742 click_method clickfinger
2745 input "1:1:AT_Translated_Set_2_keyboard" {
2749 xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
2755 :header-args+: :tangle ~/.config/sway/shemshak
2759 input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
2762 natural_scroll enabled
2763 middle_emulation enabled
2764 click_method clickfinger
2767 input "1:1:AT_Translated_Set_2_keyboard" {
2771 xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
2776 :header-args+: :tangle ~/.config/swaylock/config
2780 image=/home/amin/usr/pics/wp/wp2445784-blurred-wallpapers.jpg
2788 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
2789 # ------------------------------------------------------------------------------
2790 # tlp - Parameters for power saving
2791 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
2793 # Hint: some features are disabled by default, remove the leading # to enable
2796 # Set to 0 to disable, 1 to enable TLP.
2799 # Operation mode when no power supply can be detected: AC, BAT.
2800 # Concerns some desktop and embedded hardware only.
2803 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2804 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2805 TLP_PERSISTENT_DEFAULT=0
2807 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2808 # Non-zero value enables, zero disables laptop mode.
2809 DISK_IDLE_SECS_ON_AC=0
2810 DISK_IDLE_SECS_ON_BAT=2
2812 # Dirty page values (timeouts in secs).
2813 MAX_LOST_WORK_SECS_ON_AC=15
2814 MAX_LOST_WORK_SECS_ON_BAT=60
2816 # Hint: CPU parameters below are disabled by default, remove the leading #
2817 # to enable them, otherwise kernel default values are used.
2819 # Select a CPU frequency scaling governor.
2820 # Intel Core i processor with intel_pstate driver:
2821 # powersave(*), performance.
2822 # Older hardware with acpi-cpufreq driver:
2823 # ondemand(*), powersave, performance, conservative, schedutil.
2824 # (*) is recommended.
2825 # Hint: use tlp-stat -p to show the active driver and available governors.
2827 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2828 # efficient for *almost all* workloads and therefore kernel and most
2829 # distributions have chosen them as defaults. If you still want to change,
2830 # you should know what you're doing! You *must* disable your distribution's
2831 # governor settings or conflicts will occur.
2832 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2833 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2835 # Set the min/max frequency available for the scaling governor.
2836 # Possible values strongly depend on your CPU. For available frequencies see
2837 # the output of tlp-stat -p.
2838 #CPU_SCALING_MIN_FREQ_ON_AC=0
2839 #CPU_SCALING_MAX_FREQ_ON_AC=0
2840 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2841 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2843 # Set energy performance hints (HWP) for Intel P-state governor:
2844 # performance, balance_performance, default, balance_power, power
2845 # Values are given in order of increasing power saving.
2846 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2847 CPU_HWP_ON_AC=balance_performance
2848 CPU_HWP_ON_BAT=balance_power
2850 # Set Intel P-state performance: 0..100 (%).
2851 # Limit the max/min P-state to control the power dissipation of the CPU.
2852 # Values are stated as a percentage of the available performance.
2853 # Requires an Intel Core i processor with intel_pstate driver.
2854 #CPU_MIN_PERF_ON_AC=0
2855 #CPU_MAX_PERF_ON_AC=100
2856 #CPU_MIN_PERF_ON_BAT=0
2857 #CPU_MAX_PERF_ON_BAT=30
2859 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2860 # Requires an Intel Core i processor.
2862 # - This may conflict with your distribution's governor settings
2863 # - A value of 1 does *not* activate boosting, it just allows it
2867 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2868 # 0=disable, 1=enable.
2869 SCHED_POWERSAVE_ON_AC=0
2870 SCHED_POWERSAVE_ON_BAT=1
2872 # Kernel NMI Watchdog:
2873 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2876 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2877 # Frequency voltage pairs are written to:
2878 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2879 # CAUTION: only use this, if you thoroughly understand what you are doing!
2880 #PHC_CONTROLS="F:V F:V F:V F:V"
2882 # Set CPU performance versus energy savings policy:
2883 # performance, balance-performance, default, balance-power, power.
2884 # Values are given in order of increasing power saving.
2885 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2886 ENERGY_PERF_POLICY_ON_AC=performance
2887 ENERGY_PERF_POLICY_ON_BAT=balance-power
2889 # Disk devices; separate multiple devices with spaces (default: sda).
2890 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2891 DISK_DEVICES="sda sdb"
2893 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2894 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2895 # Separate values for multiple disks with spaces. Use the special value 'keep'
2896 # to keep the hardware default for the particular disk.
2897 DISK_APM_LEVEL_ON_AC="254 254"
2898 DISK_APM_LEVEL_ON_BAT="128 128"
2900 # Hard disk spin down timeout:
2901 # 0: spin down disabled
2902 # 1..240: timeouts from 5s to 20min (in units of 5s)
2903 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2904 # See 'man hdparm' for details.
2905 # Separate values for multiple disks with spaces. Use the special value 'keep'
2906 # to keep the hardware default for the particular disk.
2907 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2908 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2910 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
2911 # Separate values for multiple disks with spaces. Use the special value 'keep'
2912 # to keep the kernel default scheduler for the particular disk.
2913 #DISK_IOSCHED="cfq cfq"
2915 # AHCI link power management (ALPM) for disk devices:
2916 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2917 # (*) Kernel >= 4.15 required, then recommended.
2918 # Multiple values separated with spaces are tried sequentially until success.
2919 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2920 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2922 # Exclude host devices from AHCI link power management.
2923 # Separate multiple hosts with spaces.
2924 #SATA_LINKPWR_BLACKLIST="host1"
2926 # Runtime Power Management for AHCI host and disks devices:
2927 # on=disable, auto=enable.
2928 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
2929 #AHCI_RUNTIME_PM_ON_AC=on
2930 #AHCI_RUNTIME_PM_ON_BAT=on
2932 # Seconds of inactivity before disk is suspended.
2933 AHCI_RUNTIME_PM_TIMEOUT=15
2935 # PCI Express Active State Power Management (PCIe ASPM):
2936 # default, performance, powersave.
2937 PCIE_ASPM_ON_AC=performance
2938 PCIE_ASPM_ON_BAT=powersave
2940 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2941 # auto = mid on BAT, high on AC; default = use hardware defaults.
2942 RADEON_POWER_PROFILE_ON_AC=high
2943 RADEON_POWER_PROFILE_ON_BAT=low
2945 # Radeon dynamic power management method (DPM): battery, performance.
2946 RADEON_DPM_STATE_ON_AC=performance
2947 RADEON_DPM_STATE_ON_BAT=battery
2949 # Radeon DPM performance level: auto, low, high; auto is recommended.
2950 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2951 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2953 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2957 # Disable wake on LAN: Y/N.
2960 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2961 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2962 SOUND_POWER_SAVE_ON_AC=0
2963 SOUND_POWER_SAVE_ON_BAT=0
2965 # Disable controller too (HDA only): Y/N.
2966 SOUND_POWER_SAVE_CONTROLLER=N
2968 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2969 # Drive can be powered on again by releasing (and reinserting) the eject lever
2970 # or by pressing the disc eject button on newer models.
2971 # Note: an UltraBay/MediaBay hard disk is never powered off.
2972 BAY_POWEROFF_ON_AC=0
2973 BAY_POWEROFF_ON_BAT=0
2974 # Optical drive device to power off (default sr0).
2977 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2979 RUNTIME_PM_ON_BAT=auto
2981 # Exclude PCI(e) device adresses the following list from Runtime PM
2982 # (separate with spaces). Use lspci to get the adresses (1st column).
2983 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2985 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2986 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2987 # prevents accidential power-on of dGPU in hybrid graphics setups.
2988 # Use "" to disable the feature completely.
2989 # Separate multiple drivers with spaces.
2990 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
2992 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2995 # Exclude listed devices from USB autosuspend (separate with spaces).
2996 # Use lsusb to get the ids.
2997 # Note: input devices (usbhid) are excluded automatically
2998 #USB_BLACKLIST="1111:2222 3333:4444"
3000 # Bluetooth devices are excluded from USB autosuspend:
3001 # 0=do not exclude, 1=exclude.
3002 USB_BLACKLIST_BTUSB=0
3004 # Phone devices are excluded from USB autosuspend:
3005 # 0=do not exclude, 1=exclude (enable charging).
3006 USB_BLACKLIST_PHONE=0
3008 # Printers are excluded from USB autosuspend:
3009 # 0=do not exclude, 1=exclude.
3010 USB_BLACKLIST_PRINTER=1
3012 # WWAN devices are excluded from USB autosuspend:
3013 # 0=do not exclude, 1=exclude.
3014 USB_BLACKLIST_WWAN=1
3016 # Include listed devices into USB autosuspend even if already excluded
3017 # by the blacklists above (separate with spaces).
3018 # Use lsusb to get the ids.
3019 #USB_WHITELIST="1111:2222 3333:4444"
3021 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3022 # (workaround for USB devices that cause shutdown problems).
3023 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3025 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3026 # on system startup: 0=disable, 1=enable.
3027 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3028 # are ignored when this is enabled!
3029 #RESTORE_DEVICE_STATE_ON_STARTUP=0
3030 RESTORE_DEVICE_STATE_ON_STARTUP=0
3032 # Radio devices to disable on startup: bluetooth, wifi, wwan.
3033 # Separate multiple devices with spaces.
3034 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3035 DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
3037 # Radio devices to enable on startup: bluetooth, wifi, wwan.
3038 # Separate multiple devices with spaces.
3039 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3041 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3042 # (workaround for devices that are blocking shutdown).
3043 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3045 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3046 # (to prevent other operating systems from missing radios).
3047 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3049 # Radio devices to enable on AC: bluetooth, wifi, wwan.
3050 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3052 # Radio devices to disable on battery: bluetooth, wifi, wwan.
3053 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3055 # Radio devices to disable on battery when not in use (not connected):
3056 # bluetooth, wifi, wwan.
3057 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3059 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3060 # required). Charging starts when the remaining capacity falls below the
3061 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3062 # Main / Internal battery (values in %)
3063 #START_CHARGE_THRESH_BAT0=75
3064 #STOP_CHARGE_THRESH_BAT0=80
3065 # Ultrabay / Slice / Replaceable battery (values in %)
3066 #START_CHARGE_THRESH_BAT1=75
3067 #STOP_CHARGE_THRESH_BAT1=80
3069 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3070 #RESTORE_THRESHOLDS_ON_BAT=1
3072 # ------------------------------------------------------------------------------
3073 # tlp-rdw - Parameters for the radio device wizard
3074 # Possible devices: bluetooth, wifi, wwan.
3077 # - Parameters are disabled by default, remove the leading # to enable them
3078 # - Separate multiple radio devices with spaces
3080 # Radio devices to disable on connect.
3081 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3082 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3083 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3085 # Radio devices to enable on disconnect.
3086 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3087 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3088 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3090 # Radio devices to enable/disable when docked.
3091 #DEVICES_TO_ENABLE_ON_DOCK=""
3092 #DEVICES_TO_DISABLE_ON_DOCK=""
3094 # Radio devices to enable/disable when undocked.
3095 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3096 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3101 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
3102 # ------------------------------------------------------------------------------
3103 # tlp - Parameters for power saving
3104 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
3106 # Hint: some features are disabled by default, remove the leading # to enable
3109 # Set to 0 to disable, 1 to enable TLP.
3112 # Operation mode when no power supply can be detected: AC, BAT.
3113 # Concerns some desktop and embedded hardware only.
3116 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
3117 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
3118 TLP_PERSISTENT_DEFAULT=0
3120 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
3121 # Non-zero value enables, zero disables laptop mode.
3122 DISK_IDLE_SECS_ON_AC=0
3123 DISK_IDLE_SECS_ON_BAT=2
3125 # Dirty page values (timeouts in secs).
3126 MAX_LOST_WORK_SECS_ON_AC=15
3127 MAX_LOST_WORK_SECS_ON_BAT=60
3129 # Hint: CPU parameters below are disabled by default, remove the leading #
3130 # to enable them, otherwise kernel default values are used.
3132 # Select a CPU frequency scaling governor.
3133 # Intel Core i processor with intel_pstate driver:
3134 # powersave(*), performance.
3135 # Older hardware with acpi-cpufreq driver:
3136 # ondemand(*), powersave, performance, conservative, schedutil.
3137 # (*) is recommended.
3138 # Hint: use tlp-stat -p to show the active driver and available governors.
3140 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
3141 # efficient for *almost all* workloads and therefore kernel and most
3142 # distributions have chosen them as defaults. If you still want to change,
3143 # you should know what you're doing! You *must* disable your distribution's
3144 # governor settings or conflicts will occur.
3145 #CPU_SCALING_GOVERNOR_ON_AC=powersave
3146 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
3148 # Set the min/max frequency available for the scaling governor.
3149 # Possible values strongly depend on your CPU. For available frequencies see
3150 # the output of tlp-stat -p.
3151 #CPU_SCALING_MIN_FREQ_ON_AC=0
3152 #CPU_SCALING_MAX_FREQ_ON_AC=0
3153 #CPU_SCALING_MIN_FREQ_ON_BAT=0
3154 #CPU_SCALING_MAX_FREQ_ON_BAT=0
3156 # Set energy performance hints (HWP) for Intel P-state governor:
3157 # performance, balance_performance, default, balance_power, power
3158 # Values are given in order of increasing power saving.
3159 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
3160 CPU_HWP_ON_AC=balance_performance
3161 CPU_HWP_ON_BAT=balance_power
3163 # Set Intel P-state performance: 0..100 (%).
3164 # Limit the max/min P-state to control the power dissipation of the CPU.
3165 # Values are stated as a percentage of the available performance.
3166 # Requires an Intel Core i processor with intel_pstate driver.
3167 #CPU_MIN_PERF_ON_AC=0
3168 #CPU_MAX_PERF_ON_AC=100
3169 #CPU_MIN_PERF_ON_BAT=0
3170 #CPU_MAX_PERF_ON_BAT=30
3172 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
3173 # Requires an Intel Core i processor.
3175 # - This may conflict with your distribution's governor settings
3176 # - A value of 1 does *not* activate boosting, it just allows it
3180 # Minimize number of used CPU cores/hyper-threads under light load conditions:
3181 # 0=disable, 1=enable.
3182 SCHED_POWERSAVE_ON_AC=0
3183 SCHED_POWERSAVE_ON_BAT=1
3185 # Kernel NMI Watchdog:
3186 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
3189 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
3190 # Frequency voltage pairs are written to:
3191 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
3192 # CAUTION: only use this, if you thoroughly understand what you are doing!
3193 #PHC_CONTROLS="F:V F:V F:V F:V"
3195 # Set CPU performance versus energy savings policy:
3196 # performance, balance-performance, default, balance-power, power.
3197 # Values are given in order of increasing power saving.
3198 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
3199 ENERGY_PERF_POLICY_ON_AC=performance
3200 ENERGY_PERF_POLICY_ON_BAT=balance-power
3202 # Disk devices; separate multiple devices with spaces (default: sda).
3203 # Devices can be specified by disk ID also (lookup with: tlp diskid).
3204 DISK_DEVICES="sda sdb"
3206 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
3207 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
3208 # Separate values for multiple disks with spaces. Use the special value 'keep'
3209 # to keep the hardware default for the particular disk.
3210 DISK_APM_LEVEL_ON_AC="254 254"
3211 DISK_APM_LEVEL_ON_BAT="128 128"
3213 # Hard disk spin down timeout:
3214 # 0: spin down disabled
3215 # 1..240: timeouts from 5s to 20min (in units of 5s)
3216 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
3217 # See 'man hdparm' for details.
3218 # Separate values for multiple disks with spaces. Use the special value 'keep'
3219 # to keep the hardware default for the particular disk.
3220 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
3221 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
3223 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
3224 # Separate values for multiple disks with spaces. Use the special value 'keep'
3225 # to keep the kernel default scheduler for the particular disk.
3226 #DISK_IOSCHED="cfq cfq"
3228 # AHCI link power management (ALPM) for disk devices:
3229 # min_power, med_power_with_dipm(*), medium_power, max_performance.
3230 # (*) Kernel >= 4.15 required, then recommended.
3231 # Multiple values separated with spaces are tried sequentially until success.
3232 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
3233 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
3235 # Exclude host devices from AHCI link power management.
3236 # Separate multiple hosts with spaces.
3237 #SATA_LINKPWR_BLACKLIST="host1"
3239 # Runtime Power Management for AHCI host and disks devices:
3240 # on=disable, auto=enable.
3241 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
3242 #AHCI_RUNTIME_PM_ON_AC=on
3243 #AHCI_RUNTIME_PM_ON_BAT=on
3245 # Seconds of inactivity before disk is suspended.
3246 AHCI_RUNTIME_PM_TIMEOUT=15
3248 # PCI Express Active State Power Management (PCIe ASPM):
3249 # default, performance, powersave.
3250 PCIE_ASPM_ON_AC=performance
3251 PCIE_ASPM_ON_BAT=powersave
3253 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
3254 # auto = mid on BAT, high on AC; default = use hardware defaults.
3255 RADEON_POWER_PROFILE_ON_AC=high
3256 RADEON_POWER_PROFILE_ON_BAT=low
3258 # Radeon dynamic power management method (DPM): battery, performance.
3259 RADEON_DPM_STATE_ON_AC=performance
3260 RADEON_DPM_STATE_ON_BAT=battery
3262 # Radeon DPM performance level: auto, low, high; auto is recommended.
3263 RADEON_DPM_PERF_LEVEL_ON_AC=auto
3264 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
3266 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
3270 # Disable wake on LAN: Y/N.
3273 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
3274 # A value of 0 disables, >=1 enables power saving (recommended: 1).
3275 SOUND_POWER_SAVE_ON_AC=0
3276 SOUND_POWER_SAVE_ON_BAT=0
3278 # Disable controller too (HDA only): Y/N.
3279 SOUND_POWER_SAVE_CONTROLLER=N
3281 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
3282 # Drive can be powered on again by releasing (and reinserting) the eject lever
3283 # or by pressing the disc eject button on newer models.
3284 # Note: an UltraBay/MediaBay hard disk is never powered off.
3285 BAY_POWEROFF_ON_AC=0
3286 BAY_POWEROFF_ON_BAT=0
3287 # Optical drive device to power off (default sr0).
3290 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
3292 RUNTIME_PM_ON_BAT=auto
3294 # Exclude PCI(e) device adresses the following list from Runtime PM
3295 # (separate with spaces). Use lspci to get the adresses (1st column).
3296 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
3297 RUNTIME_PM_BLACKLIST="01:00.0"
3299 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
3300 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
3301 # prevents accidential power-on of dGPU in hybrid graphics setups.
3302 # Use "" to disable the feature completely.
3303 # Separate multiple drivers with spaces.
3304 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
3306 # Set to 0 to disable, 1 to enable USB autosuspend feature.
3309 # Exclude listed devices from USB autosuspend (separate with spaces).
3310 # Use lsusb to get the ids.
3311 # Note: input devices (usbhid) are excluded automatically
3312 #USB_BLACKLIST="1111:2222 3333:4444"
3314 # Bluetooth devices are excluded from USB autosuspend:
3315 # 0=do not exclude, 1=exclude.
3316 USB_BLACKLIST_BTUSB=0
3318 # Phone devices are excluded from USB autosuspend:
3319 # 0=do not exclude, 1=exclude (enable charging).
3320 USB_BLACKLIST_PHONE=0
3322 # Printers are excluded from USB autosuspend:
3323 # 0=do not exclude, 1=exclude.
3324 USB_BLACKLIST_PRINTER=1
3326 # WWAN devices are excluded from USB autosuspend:
3327 # 0=do not exclude, 1=exclude.
3328 USB_BLACKLIST_WWAN=1
3330 # Include listed devices into USB autosuspend even if already excluded
3331 # by the blacklists above (separate with spaces).
3332 # Use lsusb to get the ids.
3333 #USB_WHITELIST="1111:2222 3333:4444"
3335 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3336 # (workaround for USB devices that cause shutdown problems).
3337 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3339 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3340 # on system startup: 0=disable, 1=enable.
3341 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3342 # are ignored when this is enabled!
3343 #RESTORE_DEVICE_STATE_ON_STARTUP=0
3344 RESTORE_DEVICE_STATE_ON_STARTUP=1
3346 # Radio devices to disable on startup: bluetooth, wifi, wwan.
3347 # Separate multiple devices with spaces.
3348 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3350 # Radio devices to enable on startup: bluetooth, wifi, wwan.
3351 # Separate multiple devices with spaces.
3352 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3354 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3355 # (workaround for devices that are blocking shutdown).
3356 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3358 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3359 # (to prevent other operating systems from missing radios).
3360 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3362 # Radio devices to enable on AC: bluetooth, wifi, wwan.
3363 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3365 # Radio devices to disable on battery: bluetooth, wifi, wwan.
3366 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3368 # Radio devices to disable on battery when not in use (not connected):
3369 # bluetooth, wifi, wwan.
3370 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3372 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3373 # required). Charging starts when the remaining capacity falls below the
3374 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3375 # Main / Internal battery (values in %)
3376 #START_CHARGE_THRESH_BAT0=75
3377 #STOP_CHARGE_THRESH_BAT0=80
3378 # Ultrabay / Slice / Replaceable battery (values in %)
3379 #START_CHARGE_THRESH_BAT1=75
3380 #STOP_CHARGE_THRESH_BAT1=80
3382 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3383 #RESTORE_THRESHOLDS_ON_BAT=1
3385 # ------------------------------------------------------------------------------
3386 # tlp-rdw - Parameters for the radio device wizard
3387 # Possible devices: bluetooth, wifi, wwan.
3390 # - Parameters are disabled by default, remove the leading # to enable them
3391 # - Separate multiple radio devices with spaces
3393 # Radio devices to disable on connect.
3394 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3395 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3396 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3398 # Radio devices to enable on disconnect.
3399 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3400 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3401 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3403 # Radio devices to enable/disable when docked.
3404 #DEVICES_TO_ENABLE_ON_DOCK=""
3405 #DEVICES_TO_DISABLE_ON_DOCK=""
3407 # Radio devices to enable/disable when undocked.
3408 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3409 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3416 :header-args+: :tangle ~/.xprofile
3419 =~/.xprofile= is similar in style to =~/.xinitrc=, but on the
3420 contrary, it's automatically sourced by LightDM, my display manager of
3423 #+begin_src sh :tangle no
3424 xset -b # disable bell
3425 xset r rate 200 45 # repeat delay (ms) and rate (repeats/sec)
3427 # setxkbmap -option compose:ralt
3429 setxkbmap -option ctrl:nocaps # turn capslock into control
3430 setxkbmap -option altwin:swap_alt_win # swap alt and super
3432 if [ $(hostname) = "plasma" ]
3434 setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt
3437 if [ $(hostname) = "enigma" ]
3439 xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt
3442 light -Scrs "intel_backlight" 2
3444 source $HOME/.zprofile
3446 export _JAVA_AWT_WM_NONREPARENTING=1
3447 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
3449 if [ $(hostname) = "plasma" ]
3461 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3464 #+begin_src conf-xdefaults
3465 #include ".Xresources.d/fonts"
3466 ! #include ".Xresources.d/colors"
3467 #include ".Xresources.d/emacs"
3468 #include ".Xresources.d/rxvt-unicode"
3475 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3478 #+begin_src conf-xdefaults
3479 Xft.lcdfilter: lcddefault
3483 Xft.hintstyle: hintslight
3484 ! Xft.hintstyle: hintfull
3491 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors")
3494 #+begin_src conf-xdefaults :tangle no
3495 #include "gruvbox-light.xresources"
3496 ! #include "gruvbox-dark.xresources"
3497 #include "gruvbox-urxvt256.xresources"
3500 #+begin_src conf-xdefaults :tangle no
3501 ! -----------------------------------------------------------------------------
3502 ! File: gruvbox-light.xresources
3503 ! Description: Retro groove colorscheme generalized
3504 ! Author: morhetz <morhetz@gmail.com>
3505 ! Source: https://github.com/morhetz/gruvbox-generalized
3506 ! Last Modified: 6 Sep 2014
3507 ! -----------------------------------------------------------------------------
3509 ! hard contrast: *background: #f9f5d7
3510 *background: #fbf1c7
3511 ! soft contrast: *background: #f2e5bc
3512 *foreground: #3c3836
3522 ! DarkYellow + Yellow
3528 ! DarkMagenta + Magenta
3539 #+begin_src conf-xdefaults :tangle no
3540 ! -----------------------------------------------------------------------------
3541 ! File: gruvbox-dark.xresources
3542 ! Description: Retro groove colorscheme generalized
3543 ! Author: morhetz <morhetz@gmail.com>
3544 ! Source: https://github.com/morhetz/gruvbox-generalized
3545 ! Last Modified: 6 Sep 2014
3546 ! -----------------------------------------------------------------------------
3548 ! hard contrast: *background: #1d2021
3549 *background: #282828
3550 ! soft contrast: *background: #32302f
3551 *foreground: #ebdbb2
3561 ! DarkYellow + Yellow
3567 ! DarkMagenta + Magenta
3578 #+begin_src conf-xdefaults :tangle no
3579 ! -----------------------------------------------------------------------------
3580 ! File: gruvbox-urxvt256.xresources
3581 ! Description: Retro groove colorscheme generalized
3582 ! Author: morhetz <morhetz@gmail.com>
3583 ! Source: https://github.com/morhetz/gruvbox-generalized
3584 ! Last Modified: 13 Dec 2013
3585 ! -----------------------------------------------------------------------------
3587 URxvt.color24: #076678
3588 URxvt.color66: #427b58
3589 URxvt.color88: #9d0006
3590 URxvt.color96: #8f3f71
3591 URxvt.color100: #79740e
3592 URxvt.color108: #8ec07c
3593 URxvt.color109: #83a598
3594 URxvt.color130: #af3a03
3595 URxvt.color136: #b57614
3596 URxvt.color142: #b8bb26
3597 URxvt.color167: #fb4934
3598 URxvt.color175: #d3869b
3599 URxvt.color208: #fe8019
3600 URxvt.color214: #fabd2f
3601 URxvt.color223: #ebdbb2
3602 URxvt.color228: #f2e5bc
3603 URxvt.color229: #fbf1c7
3604 URxvt.color230: #f9f5d7
3605 URxvt.color234: #1d2021
3606 URxvt.color235: #282828
3607 URxvt.color236: #32302f
3608 URxvt.color237: #3c3836
3609 URxvt.color239: #504945
3610 URxvt.color241: #665c54
3611 URxvt.color243: #7c6f64
3612 URxvt.color244: #928374
3613 URxvt.color245: #928374
3614 URxvt.color246: #a89984
3615 URxvt.color248: #bdae93
3616 URxvt.color250: #d5c4a1
3621 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3624 #+begin_src conf-xdefaults
3627 Emacs.verticalScrollBars: off
3628 Emacs.cursorBlink: off
3629 Emacs.FontBackend: xft,x
3630 ! Emacs.font: Ubuntu Mono-12
3631 ! Emacs.font: Triplicate T4C-11
3632 ! Emacs.font: Ubuntu Mono-10.5
3633 ! Emacs.font: Ubuntu Mono-12
3634 ! Emacs.font: Iosevka-11
3636 ! Emacs.font: Fira Mono:size=15
3637 ! Emacs.font: DejaVu Sans Mono:size=15
3638 ! Emacs.font: Inconsolata:size=17
3639 ! Emacs.font: Inconsolata:size=16
3640 ! Emacs.font: Inconsolata LGC:size=14
3641 ! Emacs.font: Source Code Pro Medium-10.5
3642 Emacs.font: Source Code Pro:size=14
3643 ! Emacs.font: Ubuntu Mono:size=16
3644 ! Emacs.font: Iosevka:size=16
3649 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3652 #+begin_src conf-xdefaults
3654 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3655 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
3656 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
3657 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
3659 URxvt.xftAntialias: true
3660 URxvt.letterSpace: 0
3663 URxvt.loginShell: true
3664 URxvt.saveLines: 100000
3665 URxvt.internalBorder: 3
3667 URxvt.scrollBar: false
3668 URxvt.scrollStyle: rxvt
3669 URxvt*scrollTtyOutput: false
3670 URxvt*scrollWithBuffer: true
3671 URxvt*scrollTtyKeypress: true
3672 URxvt.keysym.Shift-Up: command:\033]720;1\007
3673 URxvt.keysym.Shift-Down: command:\033]721;1\007
3675 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3676 URxvt.url-select.launcher: firefox
3677 URxvt.url-select.underline: true
3678 URxvt.keysym.M-u: perl:url-select:select_next
3679 URxvt.keysym.M-Escape: perl:keyboard-select:activate
3680 URxvt.keysym.M-s: perl:keyboard-select:search
3681 URxvt.url-launcher: /usr/bin/firefox
3682 URxvt.matcher.button: 1
3683 URxvt.iso14755: false
3684 URxvt.iso14755_53: false
3685 URxvt.keysym.M-c: perl:clipboard:copy
3686 URxvt.keysym.M-v: perl:clipboard:paste
3687 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3688 URxvt.keysym.C-Up: font-size:increase
3689 URxvt.keysym.C-Down: font-size:decrease
3690 URxvt.keysym.C-S-Up: font-size:incglobal
3691 URxvt.keysym.C-S-Down: font-size:decglobal
3692 URxvt.keysym.C-equal: font-size:reset
3693 !URxvt.keysym.C-question: font-size:show
3695 URxvt.iconFile: /usr/share/icons/Paper/48x48/apps/utilities-terminal.png
3697 !urxvt*foreground: white
3698 !urxvt*background: black
3717 !URxvt.foreground: #C8C8C8
3718 !URxvt.background: #FFFFFF
3738 !! orange (replaces cyan)
3745 ! Tango colour theme for rxvt-unicode
3746 URxvt.background: #FFFFFF
3747 URxvt.foreground: #000000
3750 URxvt.color0: #2E3436
3751 URxvt.color8: #757773
3754 URxvt.color1: #CC0000
3755 URxvt.color9: #EF2929
3758 URxvt.color2: #4E9A06
3759 URxvt.color10: #8AE234
3762 URxvt.color3: #C4A000
3763 URxvt.color11: #FCE94F
3766 URxvt.color4: #3465A4
3767 URxvt.color12: #729FCF
3770 URxvt.color5: #75507B
3771 URxvt.color13: #AD7FA8
3774 !URxvt.color6: #06989A
3775 !URxvt.color14: #34E2E2
3776 ! orange (replaces cyan)
3781 URxvt.color7: #D3D7CF
3782 URxvt.color15: #EEEEEC
3785 *** xkb us_ab keyboard layout
3787 #+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none
3788 default partial alphanumeric_keys
3789 xkb_symbols "us_ab" {
3791 name[Group1]= "English (US)(aminb)";
3793 key <MENU> { [ Alt_R ] };
3799 :header-args+: :tangle ~/.config/user-dirs.dirs
3803 XDG_DESKTOP_DIR="$HOME/Desktop"
3804 XDG_DOCUMENTS_DIR="$HOME/usr/docs"
3805 XDG_DOWNLOAD_DIR="$HOME/usr/dls"
3806 XDG_MUSIC_DIR="$HOME/usr/music"
3807 XDG_PICTURES_DIR="$HOME/usr/pics"
3808 XDG_PUBLICSHARE_DIR="$HOME/usr/Public"
3809 XDG_TEMPLATES_DIR="$HOME/usr/Templates"
3810 XDG_VIDEOS_DIR="$HOME/usr/vids"
3815 :header-args+: :tangle ~/.config/zathura/zathurarc
3819 set smooth-scroll true
3820 set selection-clipboard clipboard
3822 set default-bg "#272727"
3823 set statusbar-bg "#272727"
3824 set inputbar-bg "#373737"
3829 My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
3830 [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
3835 :header-args+: :tangle ~/.zimrc
3849 # Select what modules you would like enabled.
3850 # The second line of modules may depend on options set by modules in the first
3851 # line. These dependencies are noted on the respective module's README.md.
3852 zmodules=(directory environment git git-info history input ssh utility custom \
3853 syntax-highlighting history-substring-search prompt completion)
3864 # Set your desired prompt here
3865 zprompt_theme='pure'
3866 #PURE_PROMPT_SYMBOL=λ
3867 #PURE_PROMPT_SYMBOL=δ
3868 PURE_PROMPT_SYMBOL=➜
3874 # set an optional host-specific filename for the completion cache file
3875 # if none is provided, the default '.zcompdump' is used.
3876 #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
3882 # Uncomment to enable command correction prompts
3883 # See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
3890 # Set the string below to the desired terminal title format string.
3891 # The terminal title is redrawn upon directory change, however, variables like
3892 # ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
3893 # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
3894 # The example below uses the following format: 'username@host:/current/directory'
3895 ztermtitle='%n@%m:%~'
3901 # Uncomment to enable double-dot expansion.
3902 # This appends '../' to your input for each '.' you type after an initial '..'
3903 #zdouble_dot_expand='true'
3906 # Syntax-Highlighting
3909 # This determines what highlighters will be used with the syntax-highlighting module.
3910 # Documentation of the highlighters can be found here:
3911 # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
3912 # For (u)rxvt, termite and gnome-terminal users,
3913 # removing the 'cursor' highlighter will fix the disappearing cursor problem
3914 #zhighlighters=(main brackets cursor)
3915 zhighlighters=(main brackets pattern)
3922 # Load these ssh identities with the ssh module
3923 zssh_ids=(id_ed25519_bandali)
3930 # Set (optional) pacman front-end.
3931 zpacman_frontend='yay'
3933 # Load any helper scripts as defined here
3934 #zpacman_helper=(aur)
3939 :header-args+: :tangle ~/.zlogin
3946 # User configuration sourced by login shells
3950 [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
3955 :header-args+: :tangle ~/.zprofile
3959 #PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
3960 #PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
3961 export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH
3962 export XDG_CONFIG_HOME=$HOME/.config
3963 export XDG_DATA_HOME=$HOME/.local/share
3964 export XDG_DATA_DIRS=/usr/local/share:/usr/share
3965 export MAILDIR="$HOME/mail"
3967 #export MATHMODELS=$HOME/src/eiffel/mathmodels
3968 #export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
3969 #export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
3972 #export JAVA_HOME=/usr/lib/jvm/default
3973 #export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
3974 #export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
3975 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
3977 #export PATH="$HOME/usr/build/pvs:$PATH"
3978 #export SBCLISP_HOME=/usr/share/sbcl-source
3979 #export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
3981 export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
3983 #export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
3984 #export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
3986 export NIXPKGS=$HOME/src/git/nixpkgs
3988 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
3990 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
3991 export PATH="/$HOME/.config/guix/current/bin${PATH:+:}$PATH"
3992 export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
3993 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
3994 export GIT_SSL_CAINFO="$SSL_CERT_FILE"
3999 :header-args+: :tangle ~/.zshenv
4003 # Ensure that a non-login, non-interactive shell has a defined environment.
4004 if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
4005 source "${ZDOTDIR:-$HOME}/.zprofile"
4011 :header-args+: :tangle ~/.zshrc
4015 # Bash-like navigation
4016 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
4017 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4018 export WORDCHARS='*?[]~=&;!#$%^(){}<>'
4019 #ZLE_SPACE_SUFFIX_CHARS=$'|&'
4021 #disable -r time # disable shell reserved word
4022 #alias time='time -p' # -p for POSIX output
4024 # rehash if last command was pacaur or pacman
4025 # (so that zsh picks up changes in $PATH immediately)
4026 TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
4029 # User configuration sourced by interactive shells
4032 # Change default zim location
4033 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
4036 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
4038 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
4039 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
4043 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
4044 # source ~/.zsh/zsh-autopair/autopair.zsh
4049 source /usr/share/fzf/key-bindings.zsh
4050 source /usr/share/fzf/completion.zsh
4052 # Accept history selection instead of putting it on
4054 fzf-history-widget-accept() {
4058 #zle -N fzf-history-widget-accept
4059 #bindkey '^R' fzf-history-widget-accept
4062 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
4068 alias mpv="mpv --ytdl-format mp4"
4072 alias jcl=journalctl
4073 alias m="mbsync uwaterloo; mbsync amin"
4074 alias best="youtube-dl -f best"
4081 git clone https://aur.archlinux.org/${1}.git
4092 This section contains various useful scripts and the ones used by the
4093 programs above. For instance, =toggle-tablet= for switching to and
4094 from tablet mode on my X220T, =toggle-presentation-mode= for toggling
4095 Xfce's presentation mode which keeps the screen awake, and
4096 =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
4097 exact brightness value.
4099 ** battery-percentage-time
4101 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
4104 #+begin_src sh :tangle no
4107 dbus-send --print-reply=literal --system \
4108 --dest=org.freedesktop.UPower \
4109 /org/freedesktop/UPower/devices/battery_BAT0 \
4110 org.freedesktop.DBus.Properties.Get \
4111 string:org.freedesktop.UPower.Device \
4112 string:"${label}" | awk '{print $3}'
4115 perc=$(dbus_send 'Percentage')
4116 state=$(dbus_send 'State')
4118 if [ "$state" -eq 2 ]; then # Discharging
4119 secs=$(dbus_send 'TimeToEmpty')
4120 elif [ "$state" -eq 1 ]; then # Charging
4121 secs=$(dbus_send 'TimeToFull')
4124 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
4129 :header-args+: :tangle ~/.local/bin/my-i3status.py :shebang "#!/usr/bin/env python2"
4132 #+begin_src python :comments none
4133 # -*- coding: utf-8 -*-
4135 # This script is a simple wrapper which prefixes each i3status line with custom
4136 # information. It is based on:
4137 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
4139 # In ~/.i3status.conf, add the following line:
4140 # output_format = "i3bar"
4141 # in the 'general' section.
4142 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
4143 # status_command i3status | my-i3status.py
4144 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
4146 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
4147 # © 2018 Amin Bandali <bandali@gnu.org>
4149 # This program is free software. It comes without any warranty, to the extent
4150 # permitted by applicable law. You can redistribute it and/or modify it under
4151 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
4152 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
4160 """ Return true if ~/.nosleep exists. """
4161 return os.path.isfile(os.path.expanduser("~/.nosleep"))
4163 def print_line(message):
4164 """ Non-buffered printing to stdout. """
4165 sys.stdout.write(message + '\n')
4169 """ Interrupted respecting reader for stdin. """
4170 # try reading a line, removing any extra whitespace
4172 line = sys.stdin.readline().strip()
4173 # i3status sends EOF, or an empty line
4178 except KeyboardInterrupt:
4181 if __name__ == '__main__':
4182 # Skip the first line which contains the version header.
4183 print_line(read_line())
4185 # The second line contains the start of the infinite array.
4186 print_line(read_line())
4189 line, prefix = read_line(), ''
4190 # ignore comma at start of lines
4191 if line.startswith(','):
4192 line, prefix = line[1:], ','
4195 j = json.loads(line)
4196 # insert information into the start of the json, but could be anywhere
4197 j.insert(0, {'full_text' : '🖵 ', 'name' : 'nosleep'})
4198 # and echo back new encoded json
4199 print_line(prefix+json.dumps(j))
4201 print_line(prefix+line)
4206 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
4211 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
4212 [ -n "$val" ] && light -S $val
4217 :header-args+: :tangle ~/.local/bin/rofi-remmina.py :shebang "#!/usr/bin/env python2"
4223 from subprocess import Popen, PIPE
4225 remmina_dir = os.path.expanduser("~/.local/share/remmina")
4229 for f in os.listdir(remmina_dir):
4230 fp = os.path.join(remmina_dir, f)
4231 c = ConfigParser.ConfigParser()
4233 n = c.get('remmina', 'name')
4236 lines = max(min(15, len(fdict)), 1);
4237 width = len(max(fdict.keys(), key=len))
4238 rofi = Popen(["rofi", "-i", "-dmenu", \
4239 "-l", str(lines), "-width", str(width), \
4240 "-p", "connection"], stdout=PIPE, stdin=PIPE)
4241 selected = rofi.communicate("\n" \
4242 .join(fdict.keys()) \
4243 .encode("utf-8"))[0] \
4248 r = Popen(["remmina", "-c", fdict[selected]])
4254 :header-args+: :tangle ~/.local/bin/s :shebang "#!/bin/bash"
4258 export _JAVA_AWT_WM_NONREPARENTING=1
4259 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
4261 source $HOME/.zprofile
4267 :header-args+: :tangle ~/.local/bin/sway-ws-util :shebang "#!/bin/bash"
4271 curr_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true).name')
4272 [[ $curr_ws -eq 1 ]] && prev_ws=10 || prev_ws=$((curr_ws-1))
4273 [[ $curr_ws -eq 10 ]] && next_ws=1 || next_ws=$((curr_ws+1))
4277 if [ "$1" = "switch" ] || [ "$1" = "move" ]; then
4279 if [ "$2" = "prev" ]; then
4281 elif [ "$2" = "next" ]; then
4284 echo "Usage: $0 $1 {prev|next} [follow]"
4288 echo "Usage: $0 {switch|move} {prev|next} [follow]"
4292 if [ "$op" = "switch" ]; then
4293 sway workspace "$dest_ws"
4294 elif [ "$op" = "move" ]; then
4295 sway move container to workspace "$dest_ws"
4296 if [ "$3" = "follow" ]; then
4297 sway workspace "$dest_ws"
4304 :header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash"
4307 #+begin_src bash :tangle no
4308 lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"
4310 if [ "$lang" = "us" ]; then
4314 # xmodmap $HOME/.Xmodmap
4318 ** toggle-presentation-mode
4320 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
4323 #+begin_src bash :tangle no
4324 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
4329 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash"
4332 This script toggles between a 'normal' mode and a 'tablet' mode, doing
4335 - rotates the screen using =xrandr=, so that rotating the physical
4336 display of my X220t would have the laptop's battery on the right
4338 - enables touch screen,
4339 - properly rotates the stylus pen and touch screen pointers, and
4340 - toggles between RGB and Vertical BGR sub-pixel order.
4342 #+begin_src bash :tangle no
4343 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
4344 0) # Screen is not rotated, we should rotate it right (90°)
4346 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
4347 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
4348 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
4349 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
4351 1) # Currently top is rotated right, we should set it normal (0°)
4353 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
4354 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
4355 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
4356 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
4359 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
4367 :header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
4370 #+begin_src python :tangle no
4371 import gnomekeyring as gk
4372 # list_item_ids_sync('login')[0] == 1L
4373 gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
4378 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
4381 #+begin_src sh :tangle no
4382 cur_vol=$(pamixer --get-volume)
4384 if [ $(pamixer --get-mute) = true ]; then
4385 printf 'mt \n' "$cur_vol"
4387 printf '%02d \n' "$cur_vol"
4393 My little wallpaper changer script.
4397 :header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash"
4400 #+begin_src bash :tangle no
4405 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4408 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4411 echo $"Usage: $0 {day|night}"
4418 :header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash"
4421 #+begin_src bash :tangle no
4430 echo "Did not find 'sed', script cannot continue."
4435 echo "Did not find rofi, there is no point to continue."
4440 # Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
4441 # Repeated calls should leave the config clean-ish
4443 function set_theme()
4445 CDIR="${HOME}/.config/rofi/"
4446 if [ ! -d "${CDIR}" ]
4450 if [ -f "${CDIR}/config" ]
4452 ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
4454 echo "rofi.theme: ${1}" >> "${CDIR}/config"
4458 if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ]
4460 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4461 xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources
4462 set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi"
4464 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4465 xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources
4466 set_theme "/usr/share/rofi/themes//gruvbox-light.rasi"
4472 :header-args+: :tangle ~/.config/systemd/user/wp.service
4475 #+begin_src conf :tangle no
4477 Description=wallpaper service
4481 ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto
4486 :header-args+: :tangle ~/.config/systemd/user/wp.timer
4489 #+begin_src conf :tangle no
4492 Description=wallpaper timer
4500 WantedBy=timers.target
4505 :header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
4511 zathura --synctex-forward "$pos" "$pdffile" || \
4513 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
4514 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )
4520 :header-args+: :tangle ~/.local/bin/eat-em :shebang "#!/bin/sh"
4524 # Original Posted at http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4525 # [ESC] character in original post removed here.
4527 # ANSI Color -- use these variables to easily have different color
4528 # and format output. Make sure to output the reset sequence after
4529 # colors (f = foreground, b = background), and use the 'off'
4530 # feature for anything you turn on.
4534 esc="$(echo -en '\e')"
4536 blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
4537 yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
4538 cyanf="${esc}[36m"; whitef="${esc}[37m"
4540 blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
4541 yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
4542 cyanb="${esc}[46m"; whiteb="${esc}[47m"
4544 boldon="${esc}[1m"; boldoff="${esc}[22m"
4545 italicson="${esc}[3m"; italicsoff="${esc}[23m"
4546 ulon="${esc}[4m"; uloff="${esc}[24m"
4547 invon="${esc}[7m"; invoff="${esc}[27m"
4552 # note in this first use that switching colors doesn't require a reset
4553 # first - the new color overrides the old one.
4561 ${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset}
4562 ${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}
4563 ${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}
4564 ${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset}
4565 ${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset}
4566 ${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset}
4568 ${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset}
4569 ${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}
4570 ${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}
4571 ${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset}
4572 ${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset}
4573 ${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset}
4580 :header-args+: :tangle ~/.local/bin/invade-em :shebang "#!/bin/bash"
4585 # ANSI color scheme script featuring Space Invaders
4587 # Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4588 # Modified by lolilolicon
4594 printf -v $j$i %b "\e[${!j}${i}m"
4602 $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4603 $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4604 $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
4605 $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
4607 $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4608 $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4609 $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
4610 $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst