853324672b142e4b85b607bb995043dce31e4658
[~bandali/configs] / rc.org
1 #+title: rc.org
2 #+property: header-args :comments link :mkdirp yes :results silent
3
4 * About
5
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=.
9
10 Note: This file is best viewed inside Emacs with org mode.
11
12 * Configs
13 :PROPERTIES:
14 :header-args+: :comments no
15 :END:
16
17 This section contains the configuration files (dotfiles) of various
18 programs I use besides GNU Emacs.
19
20 ** Fontconfig
21 :PROPERTIES:
22 :header-args+: :tangle ~/.config/fontconfig/fonts.conf
23 :END:
24
25 #+begin_src xml
26 <?xml version="1.0"?>
27 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
28 <fontconfig>
29 <match target="font">
30 <edit mode="assign" name="rgba">
31 <const>rgb</const>
32 </edit>
33 </match>
34 <match target="font">
35 <edit mode="assign" name="hinting">
36 <bool>true</bool>
37 </edit>
38 </match>
39 <match target="font">
40 <edit mode="assign" name="hintstyle">
41 <const>hintslight</const>
42 </edit>
43 </match>
44 <match target="font">
45 <edit mode="assign" name="antialias">
46 <bool>true</bool>
47 </edit>
48 </match>
49 <match target="font">
50 <edit mode="assign" name="lcdfilter">
51 <const>lcddefault</const>
52 </edit>
53 </match>
54 <dir>~/.fonts</dir>
55
56 <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) -->
57 <alias binding="same">
58 <family>Helvetica</family>
59 <prefer>
60 <family>Liberation Sans</family>
61 </prefer>
62 </alias>
63 </fontconfig>
64 #+end_src
65
66 ** getmail
67 :PROPERTIES:
68 :header-args+: :tangle ~/.config/getmail/getmailrc
69 :END:
70
71 #+begin_src conf
72 [retriever]
73 type = SimplePOP3SSLRetriever
74 server = fencepost.gnu.org
75 username = bandali
76 password_command = ("gpg", "--no-tty", "-q", "-d", "/home/bandali/.passwd/gnu.gpg")
77 port = 995
78 use_apop = True
79
80 [destination]
81 type = Maildir
82 path = ~/mail/gnu.local/bandali/mail/
83
84 # [destination]
85 # type = MDA_external
86 # path = /usr/lib/dovecot/deliver
87 # arguments = ('-e', '-f', '%(sender)', '-d', 'bandali@gnu.local')
88
89 [options]
90 read_all = false
91 delete_after = 1
92 # delete = true
93 received = false
94 delivered_to = false
95 #+end_src
96
97 ** Git
98
99 *** config
100 :PROPERTIES:
101 :header-args+: :tangle ~/.config/git/config
102 :END:
103
104 #+begin_src conf
105 [user]
106 name = Amin Bandali
107 email = bandali@gnu.org
108 signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
109
110 [commit]
111 gpgsign = true
112
113 # [format]
114 # signoff = true
115
116 [core]
117 autocrlf = input # CRLF -> LF on commit
118 editor = emacsclient -t
119 pager = "less"
120
121 [mailmap]
122 file = ~/.config/git/mailmap
123
124 [alias]
125 git = !exec git # handle nested git calls, e.g. git git status
126 aliases = config --get-regexp '^alias\\.'
127 a = add
128 s = status
129 sl = status --long
130 c = checkout
131 cb = checkout -b
132 b = branch
133 r = rebase
134 p = pull
135 pr = pull --rebase
136 ps = push
137 psf = push --force
138 nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
139 nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
140
141 [color]
142 ui = auto
143 [color "status"]
144 added = green bold
145 changed = red bold
146 untracked = red bold
147 [color "branch"]
148 current = green bold
149 remote = magenta bold
150 [color "diff"]
151 new = green bold
152 old = red bold
153
154 # [status]
155 # # showUntrackedFiles = all
156 # short=true
157 # branch=true
158
159 [github]
160 user = notbandali
161
162 [sendemail]
163 smtpuser = bandali
164 smtpserver = fencepost.gnu.org
165 smtpserverport = 587
166 smtpencryption = tls
167 annotate = yes
168
169 [transfer]
170 fsckObjects = true
171 #+end_src
172
173 *** ignore
174 :PROPERTIES:
175 :header-args+: :tangle ~/.config/git/ignore
176 :END:
177
178 #+begin_src conf
179 *.orig
180 *.py[co]
181 *.sublime-workspace
182 *~
183 .DS_Store
184 *.elc
185 *-autoloads.el
186 TAGS
187 #+end_src
188
189 *** mailmap
190 :PROPERTIES:
191 :header-args+: :tangle ~/.config/git/mailmap
192 :END:
193
194 #+begin_src conf
195 <bandali@gnu.org> <mab@gnu.org>
196 <bandali@gnu.org> <amin@gnu.org>
197 <bandali@gnu.org> <aminb@gnu.org>
198 <bandali@gnu.org> <amin@aminb.org>
199 <bandali@gnu.org> <me@aminb.org>
200 #+end_src
201
202 ** GnuPG
203 :PROPERTIES:
204 :header-args+: :tangle ~/.gnupg/gpg-agent.conf
205 :END:
206
207 #+begin_src conf
208 default-cache-ttl 43200
209 max-cache-ttl 86400
210
211 default-cache-ttl-ssh 43200
212 max-cache-ttl-ssh 86400
213
214 pinentry-program /home/bandali/.guix-profile/bin/pinentry-emacs
215 allow-emacs-pinentry
216 allow-loopback-pinentry
217 #+end_src
218
219 ** GTK
220
221 *** GTK+ 2
222 :PROPERTIES:
223 :header-args+: :tangle ~/.gtkrc-2.0
224 :END:
225
226 #+begin_src conf
227 gtk-theme-name="Xfce"
228 # gtk-icon-theme-name="elementary Xfce darker"
229 gtk-font-name="Roboto 10"
230 # gtk-font-name="Source Code Variable 10"
231 gtk-menu-images=0
232 # gtk-key-theme-name = "Emacs"
233 #+end_src
234
235 *** GTK+ 3
236 :PROPERTIES:
237 :header-args+: :tangle ~/.config/gtk-3.0/settings.ini
238 :END:
239
240 #+begin_src conf
241 [Settings]
242 gtk-icon-theme-name = Adwaita
243 # gtk-theme-name = Adwaita
244
245 gtk-theme-name = Xfce
246 # gtk-theme-name = Arc-Darker
247 # gtk-theme-name = Numix-ArchBlue
248
249 gtk-font-name = Roboto 10
250 # gtk-font-name = Source Code Variable Medium 10
251 # gtk-key-theme-name = Emacs
252 #+end_src
253
254 ** Guix
255
256 *** Channels
257 :PROPERTIES:
258 :header-args+: :tangle ~/.config/guix/channels.scm
259 :END:
260
261 #+begin_src scheme
262 (list (channel
263 (name 'guix) ; https://git.savannah.gnu.org/git/guix.git
264 (url "file:///home/bandali/src/git/guix"))
265 (channel
266 (name 'guix-bandali) ; https://git.sr.ht/~bandali/guix-bandali
267 (url "file:///home/bandali/src/git/guix-bandali")))
268 #+end_src
269
270 *** Profile manifests
271
272 To install/update the packages of the default profile, use
273 #+begin_example
274 guix package -m $MY_GUIX_MANIFESTS/main.scm
275 #+end_example
276 and for other profiles, use
277 #+begin_example
278 guix package -m $MY_GUIX_MANIFESTS/name.scm -p $MY_GUIX_PROFILES/name/name
279 #+end_example
280 where =name= is the name of the profile (e.g. =doc=, =media=, ...).
281
282 **** doc
283 :PROPERTIES:
284 :header-args+: :tangle ~/.config/guix/manifest/doc.scm
285 :END:
286
287 #+begin_src scheme
288 (specifications->manifest
289 '("libreoffice"
290 "texlive-amsfonts"
291 "texlive-base"
292 "texlive-latex-listings"
293 ;; "texlive-palatino"
294 "texlive-xcolor"
295 ))
296 #+end_src
297
298 **** main
299 :PROPERTIES:
300 :header-args+: :tangle ~/.config/guix/manifest/main.scm
301 :END:
302
303 #+begin_src scheme
304 (specifications->manifest
305 '("alsa-utils"
306 "bash-completion"
307 "cpufrequtils"
308 "cpupower"
309 "cvs"
310 "dunst"
311 "emacs"
312 "emacs-alert"
313 "emacs-amx"
314 "emacs-async"
315 "emacs-biblio-git"
316 "emacs-boxquote"
317 "emacs-company"
318 "emacs-company-ebdb"
319 "emacs-crux"
320 "emacs-dash"
321 "emacs-debbugs"
322 "emacs-diff-hl"
323 "emacs-dmenu"
324 "emacs-doom-themes"
325 "emacs-ebdb"
326 "emacs-emmet-mode"
327 ;; "emacs-emojify"
328 "emacs-erc-hl-nicks"
329 "emacs-erc-scrolltoplace"
330 "emacs-eshell-up"
331 "emacs-exec-path-from-shell"
332 "emacs-expand-region"
333 "emacs-exwm"
334 "emacs-exwm-edit"
335 "emacs-flycheck"
336 "emacs-geiser"
337 ;; "emacs-gnus-harvest"
338 "emacs-guix"
339 "emacs-helpful"
340 "emacs-hl-todo"
341 "emacs-ivy"
342 "emacs-magit"
343 "emacs-message-x"
344 "emacs-minions"
345 ;; "emacs-multi-term"
346 "emacs-multiple-cursors"
347 "emacs-mwim"
348 ;; "emacs-next"
349 ;; "emacs-next-delight"
350 "emacs-no-littering"
351 "emacs-org"
352 "emacs-org-contrib"
353 "emacs-org-ref"
354 "emacs-orgalist"
355 "emacs-page-break-lines"
356 "emacs-pass"
357 "emacs-pinentry"
358 "emacs-projectile"
359 "emacs-shrink-path-git"
360 "emacs-smart-mode-line"
361 "emacs-typo"
362 "emacs-unkillable-scratch"
363 "emacs-use-package"
364 "emacs-web-mode"
365 "emacs-which-key"
366 "emacs-yasnippet"
367 "emacs-znc-git"
368 "font-adobe-source-code-pro"
369 "font-gnu-freefont-ttf"
370 "font-google-roboto"
371 "font-liberation"
372 "font-linuxlibertine"
373 "font-sil-gentium"
374 "font-tex-gyre"
375 ;; "font-ubuntu"
376 "font-vazir"
377 "getmail"
378 "gettext"
379 "git"
380 "git:send-email"
381 "gnupg"
382 "guile"
383 "haunt"
384 "htop"
385 "hunspell"
386 "hunspell-dict-en-ca"
387 "hunspell-dict-en-us"
388 "isync"
389 "light"
390 "msmtp"
391 "ncdu"
392 "notmuch"
393 "openjdk"
394 "openssh"
395 "openssl"
396 "pass-otp"
397 "password-store"
398 "pasystray"
399 "pinentry-emacs"
400 "poppler" ; for 'pdffonts'
401 "rofi"
402 "rofi-pass"
403 "rsync"
404 "rxvt-unicode"
405 "screen"
406 "scrot"
407 "setxkbmap"
408 "strace"
409 "thinkfan"
410 "unzip"
411 "wget"
412 "xdg-user-dirs"
413 ;; "xkbcomp"
414 "xmodmap"
415 "xrdb"
416 "xset"
417 "xsetroot"))
418 #+end_src
419
420 **** media
421 :PROPERTIES:
422 :header-args+: :tangle ~/.config/guix/manifest/media.scm
423 :END:
424
425 #+begin_src scheme
426 (specifications->manifest
427 '("audacity"
428 "gimp"
429 "inkscape"
430 "mpv"
431 "youtube-dl"))
432 #+end_src
433
434 **** web
435 :PROPERTIES:
436 :header-args+: :tangle ~/.config/guix/manifest/web.scm
437 :END:
438
439 #+begin_src scheme
440 (specifications->manifest
441 '("icecat"
442 "rtv"))
443 #+end_src
444
445 *** Systems
446
447 **** chaman
448 :PROPERTIES:
449 :header-args+: :tangle ~/.config/guix/system/chaman.scm
450 :END:
451
452 #+begin_src scheme
453 (use-modules (gnu)
454 (gnu packages certs) ; for nss-certs
455 (gnu packages emacs-xyz) ; for exwm
456 (gnu packages linux)) ; for powertop
457 (use-service-modules admin desktop mail networking pm ssh xorg)
458
459 (operating-system
460 (host-name "chaman")
461 (locale "en_CA.utf8")
462 (timezone "Canada/Eastern")
463 (keyboard-layout
464 (keyboard-layout "us" "basic"))
465 (bootloader
466 (bootloader-configuration
467 (bootloader grub-bootloader)
468 (target "/dev/sda")
469 (keyboard-layout keyboard-layout)))
470 (mapped-devices
471 (list (mapped-device
472 (source
473 (uuid "283da85e-2c84-47e6-a8ca-20f4e8efb806"))
474 (target "groot")
475 (type luks-device-mapping))
476 (mapped-device
477 (source
478 (uuid "017ddebc-c2c3-4a0a-bda4-d47ec0bc67f0"))
479 (target "data")
480 (type luks-device-mapping))))
481 (file-systems
482 (cons* (file-system
483 (mount-point "/")
484 (device "/dev/mapper/groot")
485 (type "ext4")
486 (dependencies mapped-devices))
487 (file-system
488 (mount-point "/data")
489 (device "/dev/mapper/data")
490 (type "ext4")
491 (dependencies mapped-devices))
492 %base-file-systems))
493 (users
494 (cons* (user-account
495 (name "bandali")
496 (group "users")
497 (home-directory "/home/bandali")
498 (supplementary-groups
499 '("wheel" "netdev" "audio" "video")))
500 %base-user-accounts))
501 (packages
502 (cons* nss-certs
503 emacs-exwm
504 %base-packages))
505 (services
506 (cons*
507 (service xfce-desktop-service-type)
508 (set-xorg-configuration
509 (xorg-configuration
510 (keyboard-layout keyboard-layout)))
511 (dovecot-service
512 #:config
513 (dovecot-configuration
514 ;; (log-path "/dev/stderr")
515 (protocols (list (protocol-configuration
516 (name "imap"))))
517 (ssl? "no")
518 (listen '("127.0.0.1"))
519 (disable-plaintext-auth? #f)
520 (auth-mechanisms '("plain"))
521 (postmaster-address "bandali@gnu.local")
522 (mail-location "maildir:/home/bandali/mail/%d/%n/mail")
523 (userdbs (list (userdb-configuration
524 (driver "static")
525 (args (list "uid=bandali" "gid=users" "home=/home/bandali/mail/%d/%n")))))
526 (passdbs (list (passdb-configuration
527 (driver "passwd-file")
528 (args (list "/data/dovecot-passwd")))))))
529 (service rottlog-service-type)
530 (service thermald-service-type)
531 (service tlp-service-type
532 (tlp-configuration
533 (cpu-boost-on-ac? #t)
534 (sound-power-save-on-bat 0)
535 (sound-power-save-controller? #f)
536 ;; (usb-blacklist "0e8f:00a8") ;for some reason doesn't seem to work
537 (usb-autosuspend? #f)))
538 (simple-service 'my-powertop-auto-tune activation-service-type
539 #~(zero? (system* #$(file-append powertop "/sbin/powertop")
540 "--auto-tune")))
541 (simple-service 'light-udev-rules udev-service-type (list light))
542 %desktop-services)))
543 #+end_src
544
545 ** isync
546 :PROPERTIES:
547 :header-args+: :tangle ~/.config/isync/mbsyncrc
548 :END:
549
550 #+begin_src conf
551 # Global defaults
552 CopyArrivalDate yes
553 Create Both
554 Expunge Both
555
556 ######
557 IMAPAccount shemshak
558 Host mail.shemshak.org
559 User amin@shemshak.org
560 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak.gpg"
561 SSLType IMAPS
562
563 IMAPStore shemshak-remote
564 Account shemshak
565
566 IMAPAccount shemshak-local
567 Host 127.0.0.1
568 Port 143
569 User amin@shemshak.local
570 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak-local.gpg"
571 SSLType None
572
573 IMAPStore shemshak-local
574 Account shemshak-local
575
576 Channel shemshak
577 Master :shemshak-remote:
578 Slave :shemshak-local:
579 Patterns *
580
581 ######
582 IMAPAccount gnub
583 Host mail.shemshak.org
584 User gnu@bandali.eu.org
585 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub.gpg"
586 SSLType IMAPS
587
588 IMAPStore gnub-remote
589 Account gnub
590
591 IMAPAccount gnub-local
592 Host 127.0.0.1
593 Port 143
594 User bandali@gnu.local
595 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub-local.gpg"
596 SSLType None
597
598 IMAPStore gnub-local
599 Account gnub-local
600
601 Channel gnub
602 Master :gnub-remote:
603 Slave :gnub-local:
604 Patterns *
605
606 ######
607 IMAPAccount uwaterloo
608 Host connect.uwaterloo.ca
609 User abandali
610 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
611 SSLType IMAPS
612
613 IMAPStore uwaterloo-remote
614 Account uwaterloo
615
616 IMAPAccount uwaterloo-local
617 Host 127.0.0.1
618 Port 143
619 User abandali@uw.local
620 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-local.gpg"
621 SSLType None
622
623 IMAPStore uwaterloo-local
624 Account uwaterloo-local
625
626 Channel uwaterloo
627 Master :uwaterloo-remote:
628 Slave :uwaterloo-local:
629 Patterns *
630
631 ######
632 IMAPAccount csclub
633 Host mail.csclub.uwaterloo.ca
634 User abandali
635 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub.gpg"
636 SSLType IMAPS
637
638 IMAPStore csclub-remote
639 Account csclub
640
641 IMAPAccount csclub-local
642 Host 127.0.0.1
643 Port 143
644 User abandali@csc.uw.local
645 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub-local.gpg"
646 SSLType None
647
648 IMAPStore csclub-local
649 Account csclub-local
650
651 Channel csclub
652 Master :csclub-remote:
653 Slave :csclub-local:
654 Patterns *
655 #+end_src
656
657 ** Latexmk
658 :PROPERTIES:
659 :header-args+: :tangle ~/.config/latexmk/latexmkrc
660 :END:
661
662 #+begin_src conf
663 $pdf_previewer = "start zathura %O %S";
664 $clean_ext = "aux out";
665
666 # $pdf_update_method = 4;
667 # $pdf_update_command = "zathura %O %S";
668
669 # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
670 # by Ctrl+click in the PDF.
671 # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
672 # editor.
673 # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
674 #+end_src
675
676 ** mpd
677 :PROPERTIES:
678 :header-args+: :tangle ~/.config/mpd/mpd.conf
679 :END:
680
681 #+begin_src conf
682 # An example configuration file for MPD.
683 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
684
685
686 # Files and directories #######################################################
687 #
688 # This setting controls the top directory which MPD will search to discover the
689 # available audio files and add them to the daemon's online database. This
690 # setting defaults to the XDG directory, otherwise the music directory will be
691 # be disabled and audio files will only be accepted over ipc socket (using
692 # file:// protocol) or streaming files over an accepted protocol.
693 #
694 music_directory "~/usr/music"
695 #
696 # This setting sets the MPD internal playlist directory. The purpose of this
697 # directory is storage for playlists created by MPD. The server will use
698 # playlist files not created by the server but only if they are in the MPD
699 # format. This setting defaults to playlist saving being disabled.
700 #
701 playlist_directory "~/.mpd/playlists"
702 #
703 # This setting sets the location of the MPD database. This file is used to
704 # load the database at server start up and store the database while the
705 # server is not up. This setting defaults to disabled which will allow
706 # MPD to accept files over ipc socket (using file:// protocol) or streaming
707 # files over an accepted protocol.
708 #
709 db_file "~/.mpd/database"
710 #
711 # These settings are the locations for the daemon log files for the daemon.
712 # These logs are great for troubleshooting, depending on your log_level
713 # settings.
714 #
715 # The special value "syslog" makes MPD use the local syslog daemon. This
716 # setting defaults to logging to syslog, otherwise logging is disabled.
717 #
718 log_file "~/.mpd/log"
719 #
720 # This setting sets the location of the file which stores the process ID
721 # for use of mpd --kill and some init scripts. This setting is disabled by
722 # default and the pid file will not be stored.
723 #
724 pid_file "~/.mpd/pid"
725 #
726 # This setting sets the location of the file which contains information about
727 # most variables to get MPD back into the same general shape it was in before
728 # it was brought down. This setting is disabled by default and the server
729 # state will be reset on server start up.
730 #
731 state_file "~/.mpd/state"
732 #
733 # The location of the sticker database. This is a database which
734 # manages dynamic information attached to songs.
735 #
736 sticker_file "~/.mpd/sticker.sql"
737 #
738 ###############################################################################
739
740
741 # General music daemon options ################################################
742 #
743 # This setting specifies the user that MPD will run as. MPD should never run as
744 # root and you may use this setting to make MPD change its user ID after
745 # initialization. This setting is disabled by default and MPD is run as the
746 # current user.
747 #
748 #user "nobody"
749 #
750 # This setting specifies the group that MPD will run as. If not specified
751 # primary group of user specified with "user" setting will be used (if set).
752 # This is useful if MPD needs to be a member of group such as "audio" to
753 # have permission to use sound card.
754 #
755 #group "nogroup"
756 #
757 # This setting sets the address for the daemon to listen on. Careful attention
758 # should be paid if this is assigned to anything other then the default, any.
759 # This setting can deny access to control of the daemon. Not effective if
760 # systemd socket activiation is in use.
761 #
762 # For network
763 #bind_to_address "any"
764 #
765 # And for Unix Socket
766 #bind_to_address "~/.mpd/socket"
767 #
768 # This setting is the TCP port that is desired for the daemon to get assigned
769 # to.
770 #
771 #port "6600"
772 #
773 # This setting controls the type of information which is logged. Available
774 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
775 # argument is recommended for troubleshooting, though can quickly stretch
776 # available resources on limited hardware storage.
777 #
778 #log_level "default"
779 #
780 # If you have a problem with your MP3s ending abruptly it is recommended that
781 # you set this argument to "no" to attempt to fix the problem. If this solves
782 # the problem, it is highly recommended to fix the MP3 files with vbrfix
783 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
784 # point gapless MP3 playback can be enabled.
785 #
786 #gapless_mp3_playback "yes"
787 #
788 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
789 # of starting playback after startup.
790 #
791 #restore_paused "no"
792 #
793 # This setting enables MPD to create playlists in a format usable by other
794 # music players.
795 #
796 #save_absolute_paths_in_playlists "no"
797 #
798 # This setting defines a list of tag types that will be extracted during the
799 # audio file discovery process. The complete list of possible values can be
800 # found in the user manual.
801 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
802 #
803 # This setting enables automatic update of MPD's database when files in
804 # music_directory are changed.
805 #
806 #auto_update "yes"
807 #
808 # Limit the depth of the directories being watched, 0 means only watch
809 # the music directory itself. There is no limit by default.
810 #
811 #auto_update_depth "3"
812 #
813 ###############################################################################
814
815
816 # Symbolic link behavior ######################################################
817 #
818 # If this setting is set to "yes", MPD will discover audio files by following
819 # symbolic links outside of the configured music_directory.
820 #
821 #follow_outside_symlinks "yes"
822 #
823 # If this setting is set to "yes", MPD will discover audio files by following
824 # symbolic links inside of the configured music_directory.
825 #
826 #follow_inside_symlinks "yes"
827 #
828 ###############################################################################
829
830
831 # Zeroconf / Avahi Service Discovery ##########################################
832 #
833 # If this setting is set to "yes", service information will be published with
834 # Zeroconf / Avahi.
835 #
836 #zeroconf_enabled "yes"
837 #
838 # The argument to this setting will be the Zeroconf / Avahi unique name for
839 # this MPD server on the network.
840 #
841 #zeroconf_name "Music Player"
842 #
843 ###############################################################################
844
845
846 # Permissions #################################################################
847 #
848 # If this setting is set, MPD will require password authorization. The password
849 # setting can be specified multiple times for different password profiles.
850 #
851 #password "password@read,add,control,admin"
852 #
853 # This setting specifies the permissions a user has who has not yet logged in.
854 #
855 #default_permissions "read,add,control,admin"
856 #
857 ###############################################################################
858
859
860 # Database #######################################################################
861 #
862
863 #database {
864 # plugin "proxy"
865 # host "other.mpd.host"
866 # port "6600"
867 #}
868
869 # Input #######################################################################
870 #
871
872 input {
873 plugin "curl"
874 # proxy "proxy.isp.com:8080"
875 # proxy_user "user"
876 # proxy_password "password"
877 }
878
879 #
880 ###############################################################################
881
882 # Audio Output ################################################################
883 #
884
885 audio_output {
886 type "pulse"
887 name "pulse audio"
888 }
889
890 audio_output {
891 type "fifo"
892 name "my_fifo"
893 path "/tmp/mpd.fifo"
894 format "44100:16:2"
895 }
896
897 # MPD supports various audio output types, as well as playing through multiple
898 # audio outputs at the same time, through multiple audio_output settings
899 # blocks. Setting this block is optional, though the server will only attempt
900 # autodetection for one sound card.
901 #
902 # An example of an ALSA output:
903 #
904 #audio_output {
905 # type "alsa"
906 # name "My ALSA Device"
907 ## device "hw:0,0" # optional
908 ## mixer_type "hardware" # optional
909 ## mixer_device "default" # optional
910 ## mixer_control "PCM" # optional
911 ## mixer_index "0" # optional
912 #}
913 #
914 # An example of an OSS output:
915 #
916 #audio_output {
917 # type "oss"
918 # name "My OSS Device"
919 ## device "/dev/dsp" # optional
920 ## mixer_type "hardware" # optional
921 ## mixer_device "/dev/mixer" # optional
922 ## mixer_control "PCM" # optional
923 #}
924 #
925 # An example of a shout output (for streaming to Icecast):
926 #
927 #audio_output {
928 # type "shout"
929 # encoder "vorbis" # optional
930 # name "My Shout Stream"
931 # host "localhost"
932 # port "8000"
933 # mount "/mpd.ogg"
934 # password "hackme"
935 # quality "5.0"
936 # bitrate "128"
937 # format "44100:16:1"
938 ## protocol "icecast2" # optional
939 ## user "source" # optional
940 ## description "My Stream Description" # optional
941 ## url "http://example.com" # optional
942 ## genre "jazz" # optional
943 ## public "no" # optional
944 ## timeout "2" # optional
945 ## mixer_type "software" # optional
946 #}
947 #
948 # An example of a recorder output:
949 #
950 #audio_output {
951 # type "recorder"
952 # name "My recorder"
953 # encoder "vorbis" # optional, vorbis or lame
954 # path "/var/lib/mpd/recorder/mpd.ogg"
955 ## quality "5.0" # do not define if bitrate is defined
956 # bitrate "128" # do not define if quality is defined
957 # format "44100:16:1"
958 #}
959 #
960 # An example of a httpd output (built-in HTTP streaming server):
961 #
962 #audio_output {
963 # type "httpd"
964 # name "My HTTP Stream"
965 # encoder "vorbis" # optional, vorbis or lame
966 # port "8000"
967 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
968 ## quality "5.0" # do not define if bitrate is defined
969 # bitrate "128" # do not define if quality is defined
970 # format "44100:16:1"
971 # max_clients "0" # optional 0=no limit
972 #}
973 #
974 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
975 #
976 #audio_output {
977 # type "pulse"
978 # name "My Pulse Output"
979 ## server "remote_server" # optional
980 ## sink "remote_server_sink" # optional
981 #}
982 #
983 # An example of a winmm output (Windows multimedia API).
984 #
985 #audio_output {
986 # type "winmm"
987 # name "My WinMM output"
988 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
989 # or
990 ## device "0" # optional
991 ## mixer_type "hardware" # optional
992 #}
993 #
994 # An example of an openal output.
995 #
996 #audio_output {
997 # type "openal"
998 # name "My OpenAL output"
999 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1000 #}
1001 #
1002 # An example of an sndio output.
1003 #
1004 #audio_output {
1005 # type "sndio"
1006 # name "sndio output"
1007 # mixer_type "software"
1008 #}
1009 #
1010 # An example of an OS X output:
1011 #
1012 #audio_output {
1013 # type "osx"
1014 # name "My OS X Device"
1015 ## device "Built-in Output" # optional
1016 ## channel_map "-1,-1,0,1" # optional
1017 #}
1018 #
1019 ## Example "pipe" output:
1020 #
1021 #audio_output {
1022 # type "pipe"
1023 # name "my pipe"
1024 # command "aplay -f cd 2>/dev/null"
1025 ## Or if you're want to use AudioCompress
1026 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
1027 ## Or to send raw PCM stream through PCM:
1028 # command "nc example.org 8765"
1029 # format "44100:16:2"
1030 #}
1031 #
1032 ## An example of a null output (for no audio output):
1033 #
1034 #audio_output {
1035 # type "null"
1036 # name "My Null Output"
1037 # mixer_type "none" # optional
1038 #}
1039 #
1040 ###############################################################################
1041
1042
1043 # Normalization automatic volume adjustments ##################################
1044 #
1045 # This setting specifies the type of ReplayGain to use. This setting can have
1046 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
1047 # chooses between "track" and "album" depending on the current state of
1048 # random playback. If random playback is enabled then "track" mode is used.
1049 # See <http://www.replaygain.org> for more details about ReplayGain.
1050 # This setting is off by default.
1051 #
1052 #replaygain "album"
1053 #
1054 # This setting sets the pre-amp used for files that have ReplayGain tags. By
1055 # default this setting is disabled.
1056 #
1057 #replaygain_preamp "0"
1058 #
1059 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1060 # By default this setting is disabled.
1061 #
1062 #replaygain_missing_preamp "0"
1063 #
1064 # This setting enables or disables ReplayGain limiting.
1065 # MPD calculates actual amplification based on the ReplayGain tags
1066 # and replaygain_preamp / replaygain_missing_preamp setting.
1067 # If replaygain_limit is enabled MPD will never amplify audio signal
1068 # above its original level. If replaygain_limit is disabled such amplification
1069 # might occur. By default this setting is enabled.
1070 #
1071 #replaygain_limit "yes"
1072 #
1073 # This setting enables on-the-fly normalization volume adjustment. This will
1074 # result in the volume of all playing audio to be adjusted so the output has
1075 # equal "loudness". This setting is disabled by default.
1076 #
1077 #volume_normalization "no"
1078 #
1079 ###############################################################################
1080
1081 # Character Encoding ##########################################################
1082 #
1083 # If file or directory names do not display correctly for your locale then you
1084 # may need to modify this setting.
1085 #
1086 #filesystem_charset "UTF-8"
1087 #
1088 ###############################################################################
1089 #+end_src
1090
1091 ** msmtp
1092 :PROPERTIES:
1093 :header-args+: :tangle ~/.config/msmtp/config
1094 :END:
1095
1096 #+begin_src conf
1097 # Set default values for all following accounts.
1098 defaults
1099 port 587
1100 tls on
1101 auth on
1102 #tls_trust_file /etc/ssl/certs/ca-certificates.crt
1103 logfile ~/.msmtp.log
1104
1105 account shemshak
1106 host mail.shemshak.org
1107 # use `msmtp -a shemshak --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1108 tls_fingerprint 01:6F:1B:92:0A:E8:47:35:62:80:DD:17:F5:9A:9D:26:7D:59:E2:EC:69:67:36:69:2F:58:8C:89:57:66:F6:B1
1109 tls_starttls on
1110 from amin@shemshak.org
1111 user amin@shemshak.org
1112 passwordeval gpg --no-tty -q -d ~/.passwd/shemshak.gpg
1113
1114 account aminb : shemshak
1115 from amin@aminb.org
1116 account bndl : shemshak
1117 from amin@bndl.org
1118
1119 account gnu
1120 host fencepost.gnu.org
1121 # use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1122 tls_fingerprint A5:E9:14:9F:46:3E:8E:0F:09:8C:5D:21:C2:BE:DE:77:BE:8B:E7:82:6C:56:78:0C:62:CA:46:D7:18:FE:33:05
1123 tls_starttls on
1124 from bandali@gnu.org
1125 user bandali
1126 passwordeval gpg --no-tty -q -d ~/.passwd/gnu.gpg
1127
1128 account gnu-mab : gnu
1129 from mab@gnu.org
1130 account gnu-aminb : gnu
1131 from aminb@gnu.org
1132 account gnu-amin : gnu
1133 from amin@gnu.org
1134
1135 account uwaterloo
1136 host connect.uwaterloo.ca
1137 tls_starttls on
1138 from abandali@uwaterloo.ca
1139 user abandali
1140 passwordeval gpg --no-tty -q -d ~/.passwd/uwaterloo.gpg
1141 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1142
1143 account uwaterloo-friendly : uwaterloo
1144 from bandali@uwaterloo.ca
1145
1146 account csclub
1147 host mail.csclub.uwaterloo.ca
1148 tls_starttls on
1149 from abandali@csclub.uwaterloo.ca
1150 user abandali
1151 passwordeval gpg --no-tty -q -d ~/.passwd/csclub.gpg
1152 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1153
1154 account csclub-friendly : csclub
1155 from bandali@csclub.uwaterloo.ca
1156
1157 # Set a default account
1158 account default : shemshak
1159 #+end_src
1160
1161 ** ncmpcpp
1162
1163 *** config
1164 :PROPERTIES:
1165 :header-args+: :tangle ~/.ncmpcpp/config
1166 :END:
1167
1168 #+begin_src conf :tangle no
1169 ##############################################################
1170 ## This is the example configuration file. Copy it to ##
1171 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1172 ## and set up your preferences. ##
1173 ##############################################################
1174 #
1175 ##### directories ######
1176 ##
1177 ## Directory for storing ncmpcpp related files.
1178 ## Changing it is useful if you want to store
1179 ## everything somewhere else and provide command
1180 ## line setting for alternative location to config
1181 ## file which defines that while launching ncmpcpp.
1182 ##
1183 #
1184 ncmpcpp_directory = ~/.ncmpcpp
1185 #
1186 ##
1187 ## Directory for storing downloaded lyrics. It
1188 ## defaults to ~/.lyrics since other MPD clients
1189 ## (eg. ncmpc) also use that location.
1190 ##
1191 #
1192 #lyrics_directory = ~/.lyrics
1193 #
1194 ##### connection settings #####
1195 #
1196 #mpd_host = localhost
1197 #
1198 #mpd_port = 6600
1199 #
1200 #mpd_connection_timeout = 5
1201 #
1202 ## Needed for tag editor and file operations to work.
1203 ##
1204 mpd_music_dir = ~/usr/music
1205 #
1206 #mpd_crossfade_time = 5
1207 #
1208 ##### music visualizer #####
1209 ##
1210 ## Note: In order to make music visualizer work you'll
1211 ## need to use mpd fifo output, whose format parameter
1212 ## has to be set to 44100:16:1 for mono visualization
1213 ## or 44100:16:2 for stereo visualization. Example
1214 ## configuration (it has to be put into mpd.conf):
1215 ##
1216 ## audio_output {
1217 ## type "fifo"
1218 ## name "Visualizer feed"
1219 ## path "/tmp/mpd.fifo"
1220 ## format "44100:16:2"
1221 ## }
1222 ##
1223 #
1224 visualizer_fifo_path = /tmp/mpd.fifo
1225 #
1226 ##
1227 ## Note: Below parameter is needed for ncmpcpp
1228 ## to determine which output provides data for
1229 ## visualizer and thus allow syncing between
1230 ## visualization and sound as currently there
1231 ## are some problems with it.
1232 ##
1233 #
1234 visualizer_output_name = my fifo
1235 #
1236 ##
1237 ## If you set format to 44100:16:2, make it 'yes'.
1238 ##
1239 visualizer_in_stereo = yes
1240 #
1241 ##
1242 ## Multiply received samples by given value. Very
1243 ## useful for proper visualization of quiet music.
1244 ##
1245 #visualizer_sample_multiplier = 1
1246 #
1247 ##
1248 ## Note: Below parameter defines how often ncmpcpp
1249 ## has to "synchronize" visualizer and audio outputs.
1250 ## 30 seconds is optimal value, but if you experience
1251 ## synchronization problems, set it to lower value.
1252 ## Keep in mind that sane values start with >=10.
1253 ##
1254 #
1255 visualizer_sync_interval = 30
1256 #
1257 ##
1258 ## Note: To enable spectrum frequency visualization
1259 ## you need to compile ncmpcpp with fftw3 support.
1260 ##
1261 #
1262 ## Available values: spectrum, wave, wave_filled, ellipse.
1263 ##
1264 visualizer_type = spectrum
1265 #
1266 #visualizer_look = ●▮
1267 visualizer_look = "●•"
1268 #
1269 #visualizer_color = blue, cyan, green, yellow, magenta, red
1270 #
1271 ## Alternative subset of 256 colors for terminals that support it.
1272 ##
1273 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1274 #
1275 ##### system encoding #####
1276 ##
1277 ## ncmpcpp should detect your charset encoding
1278 ## but if it failed to do so, you can specify
1279 ## charset encoding you are using here.
1280 ##
1281 ## Note: You can see whether your ncmpcpp build
1282 ## supports charset detection by checking output
1283 ## of `ncmpcpp --version`.
1284 ##
1285 ## Note: Since MPD uses UTF-8 by default, setting
1286 ## this option makes sense only if your encoding
1287 ## is different.
1288 ##
1289 #
1290 #system_encoding = ""
1291 #
1292 ##### delays #####
1293 #
1294 ## Time of inactivity (in seconds) after playlist
1295 ## highlighting will be disabled (0 = always on).
1296 ##
1297 #playlist_disable_highlight_delay = 5
1298 #
1299 ## Defines how long messages are supposed to be visible.
1300 ##
1301 #message_delay_time = 5
1302 #
1303 ##### song format #####
1304 ##
1305 ## For a song format you can use:
1306 ##
1307 ## %l - length
1308 ## %f - filename
1309 ## %D - directory
1310 ## %a - artist
1311 ## %A - album artist
1312 ## %t - title
1313 ## %b - album
1314 ## %y - date
1315 ## %n - track number (01/12 -> 01)
1316 ## %N - full track info (01/12 -> 01/12)
1317 ## %g - genre
1318 ## %c - composer
1319 ## %p - performer
1320 ## %d - disc
1321 ## %C - comment
1322 ## %P - priority
1323 ## $R - begin right alignment
1324 ##
1325 ## If you want to make sure that a part of the format is displayed
1326 ## only when certain tags are present, you can archieve it by
1327 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1328 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1329 ## It is also possible to define a list of alternatives by providing
1330 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
1331 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1332 ## present.
1333 ##
1334 ## Note: If you want to set limit on maximal length of a tag, just
1335 ## put the appropriate number between % and character that defines
1336 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1337 ##
1338 ## In addition, formats support markers used for text attributes.
1339 ## They are followed by character '$'. After that you can put:
1340 ##
1341 ## - 0 - default window color (discards all other colors)
1342 ## - 1 - black
1343 ## - 2 - red
1344 ## - 3 - green
1345 ## - 4 - yellow
1346 ## - 5 - blue
1347 ## - 6 - magenta
1348 ## - 7 - cyan
1349 ## - 8 - white
1350 ## - 9 - end of current color
1351 ## - b - bold text
1352 ## - u - underline text
1353 ## - r - reverse colors
1354 ## - a - use alternative character set
1355 ##
1356 ## If you don't want to use a non-color attribute anymore, just put it
1357 ## again, but this time insert character '/' between '$' and attribute
1358 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1359 ## or filename with reversed colors.
1360 ##
1361 ## If you want to use 256 colors and/or background colors in formats
1362 ## (the naming scheme is described below in section about color
1363 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
1364 ## the artist tag to one of the non-standard colors and make it have
1365 ## yellow background, you need to write $(197_yellow)%a$(end). Note
1366 ## that for standard colors this is interchangable with attributes
1367 ## listed above.
1368 ##
1369 ## Note: colors can be nested.
1370 ##
1371 #
1372 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1373 #
1374 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1375 #
1376 #song_library_format = {%n - }{%t}|{%f}
1377 #
1378 #
1379 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1380 #
1381 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1382 #
1383 #now_playing_prefix = $b
1384 #
1385 #now_playing_suffix = $/b
1386 #
1387 #browser_playlist_prefix = "$2playlist$9 "
1388 #
1389 #selected_item_prefix = $6
1390 #
1391 #selected_item_suffix = $9
1392 #
1393 #modified_item_prefix = $3> $9
1394 #
1395 ##
1396 ## Note: attributes are not supported for the following variables.
1397 ##
1398 #song_window_title_format = {%a - }{%t}|{%f}
1399 ##
1400 ## Note: Below variables are used for sorting songs in browser.
1401 ## The sort mode determines how songs are sorted, and can be used
1402 ## in combination with a sort format to specify a custom sorting format.
1403 ## Available values for browser_sort_mode are "name", "mtime", "format"
1404 ## and "noop".
1405 ##
1406 #
1407 #browser_sort_mode = name
1408 #
1409 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1410 #
1411 ##### columns settings #####
1412 ##
1413 ## syntax of song columns list format is "column column etc."
1414 ##
1415 ## - syntax for each column is:
1416 ##
1417 ## (width of the column)[color of the column]{displayed tag}
1418 ##
1419 ## Note: Width is by default in %, if you want a column to
1420 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1421 ## will be the column that take 10% of screen (so the real width
1422 ## will depend on actual screen size), whereas (10f)[white]{a}
1423 ## will take 10 terminal cells, no matter how wide the screen is.
1424 ##
1425 ## - color is optional (if you want the default one,
1426 ## leave the field empty).
1427 ##
1428 ## Note: You can give a column additional attributes by putting appropriate
1429 ## character after displayed tag character. Available attributes are:
1430 ##
1431 ## - r - column will be right aligned
1432 ## - E - if tag is empty, empty tag marker won't be displayed
1433 ##
1434 ## You can also:
1435 ##
1436 ## - give a column custom name by putting it after attributes,
1437 ## separated with character ':', e.g. {lr:Length} gives you
1438 ## right aligned column of lengths named "Length".
1439 ##
1440 ## - define sequence of tags, that have to be displayed in case
1441 ## predecessor is empty in a way similar to the one in classic
1442 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1443 ## creates column named "Owner" that tries to display artist
1444 ## tag and then composer and performer if previous ones are
1445 ## not available.
1446 ##
1447 #
1448 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1449 #
1450 ##### various settings #####
1451 #
1452 ##
1453 ## Note: Custom command that will be executed each
1454 ## time song changes. Useful for notifications etc.
1455 ##
1456 #execute_on_song_change = ""
1457 #
1458 #playlist_show_mpd_host = no
1459 #
1460 #playlist_show_remaining_time = no
1461 #
1462 #playlist_shorten_total_times = no
1463 #
1464 #playlist_separate_albums = no
1465 #
1466 ##
1467 ## Note: Possible display modes: classic, columns.
1468 ##
1469 #playlist_display_mode = columns
1470 #
1471 #browser_display_mode = classic
1472 #
1473 #search_engine_display_mode = classic
1474 #
1475 #playlist_editor_display_mode = classic
1476 #
1477 #discard_colors_if_item_is_selected = yes
1478 #
1479 #incremental_seeking = yes
1480 #
1481 #seek_time = 1
1482 #
1483 #volume_change_step = 2
1484 #
1485 #autocenter_mode = no
1486 #
1487 #centered_cursor = no
1488 #
1489 ##
1490 ## Note: You can specify third character which will
1491 ## be used to build 'empty' part of progressbar.
1492 ##
1493 #progressbar_look = =>
1494 progressbar_look = "─╼╶"
1495 #progressbar_look = "─⊙╶"
1496 #
1497 #progressbar_boldness = yes
1498 #
1499 ## Available values: database, playlist.
1500 ##
1501 #default_place_to_search_in = database
1502 #
1503 ## Available values: classic, alternative.
1504 ##
1505 #user_interface = classic
1506 #
1507 #data_fetching_delay = yes
1508 #
1509 ## Available values: artist, album_artist, date, genre, composer, performer.
1510 ##
1511 #media_library_primary_tag = artist
1512 #
1513 ## Available values: wrapped, normal.
1514 ##
1515 #default_find_mode = wrapped
1516 #
1517 #default_tag_editor_pattern = %n - %t
1518 #
1519 #header_visibility = yes
1520 #
1521 #statusbar_visibility = yes
1522 #
1523 #titles_visibility = yes
1524 #
1525 #header_text_scrolling = yes
1526 #
1527 #cyclic_scrolling = no
1528 #
1529 #lines_scrolled = 2
1530 #
1531 #follow_now_playing_lyrics = no
1532 #
1533 #fetch_lyrics_for_current_song_in_background = no
1534 #
1535 #store_lyrics_in_song_dir = no
1536 #
1537 #generate_win32_compatible_filenames = yes
1538 #
1539 #allow_for_physical_item_deletion = no
1540 #
1541 ##
1542 ## Note: If you set this variable, ncmpcpp will try to
1543 ## get info from last.fm in language you set and if it
1544 ## fails, it will fall back to english. Otherwise it will
1545 ## use english the first time.
1546 ##
1547 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1548 ##
1549 #lastfm_preferred_language = en
1550 #
1551 #show_hidden_files_in_local_browser = no
1552 #
1553 ##
1554 ## How shall screen switcher work?
1555 ##
1556 ## - "previous" - switch between the current and previous screen.
1557 ## - "screen1,...,screenN" - switch between given sequence of screens.
1558 ##
1559 ## Screens available for use: help, playlist, browser, search_engine,
1560 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1561 ##
1562 #screen_switcher_mode = playlist, browser
1563 #
1564 ##
1565 ## Note: You can define startup screen
1566 ## by choosing screen from the list above.
1567 ##
1568 #startup_screen = playlist
1569 #
1570 ##
1571 ## Note: You can define startup slave screen
1572 ## by choosing screen from the list above or
1573 ## an empty value for no slave screen.
1574 ##
1575 #startup_slave_screen = ""
1576 #
1577 #startup_slave_screen_focus = no
1578 #
1579 ##
1580 ## Default width of locked screen (in %).
1581 ## Acceptable values are from 20 to 80.
1582 ##
1583 #
1584 #locked_screen_width_part = 50
1585 #
1586 #ask_for_locked_screen_width_part = yes
1587 #
1588 #jump_to_now_playing_song_at_start = yes
1589 #
1590 #ask_before_clearing_playlists = yes
1591 #
1592 #clock_display_seconds = no
1593 #
1594 #display_volume_level = yes
1595 #
1596 #display_bitrate = no
1597 #
1598 #display_remaining_time = no
1599 #
1600 ## Available values: none, basic, extended, perl.
1601 ##
1602 #regular_expressions = perl
1603 #
1604 ##
1605 ## Note: If below is enabled, ncmpcpp will ignore leading
1606 ## "The" word while sorting items in browser, tags in
1607 ## media library, etc.
1608 ##
1609 #ignore_leading_the = no
1610 #
1611 #block_search_constraints_change_if_items_found = yes
1612 #
1613 #mouse_support = yes
1614 #
1615 #mouse_list_scroll_whole_page = yes
1616 #
1617 #empty_tag_marker = <empty>
1618 #
1619 #tags_separator = " | "
1620 #
1621 #tag_editor_extended_numeration = no
1622 #
1623 #media_library_sort_by_mtime = no
1624 #
1625 #enable_window_title = yes
1626 #
1627 ##
1628 ## Note: You can choose default search mode for search
1629 ## engine. Available modes are:
1630 ##
1631 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1632 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1633 ## but if your mpd is on a remote machine, downloading big database
1634 ## to process it can take a while
1635 ## - 3 - match only exact values (this mode uses mpd function for searching
1636 ## in database and local one for searching in current playlist)
1637 ##
1638 #
1639 #search_engine_default_search_mode = 1
1640 #
1641 #external_editor = nano
1642 #
1643 ## Note: set to yes if external editor is a console application.
1644 ##
1645 #use_console_editor = yes
1646 #
1647 ##### colors definitions #####
1648 ##
1649 ## It is possible to set a background color by setting a color
1650 ## value "<foreground>_<background>", e.g. red_black will set
1651 ## foregound color to red and background color to black.
1652 ##
1653 ## In addition, for terminals that support 256 colors it
1654 ## is possible to set one of them by using a number in range
1655 ## [1, 256] instead of color name, e.g. numerical value
1656 ## corresponding to red_black is 2_1. To find out if the
1657 ## terminal supports 256 colors, run ncmpcpp and check out
1658 ## the bottom of the help screen for list of available colors
1659 ## and their numerical values.
1660 ##
1661 ## Note: due to technical limitations of ncurses, if 256 colors
1662 ## are used, it is possible to either use only the colors with
1663 ## default background color, or all pairs from 1_1 up to 254_127,
1664 ## depending on the ncurses version used.
1665 ##
1666 #
1667 #colors_enabled = yes
1668 #
1669 #empty_tag_color = cyan
1670 #
1671 #header_window_color = default
1672 #
1673 #volume_color = default
1674 #
1675 #state_line_color = default
1676 #
1677 #state_flags_color = default
1678 #
1679 #main_window_color = yellow
1680 #
1681 #color1 = white
1682 #
1683 #color2 = green
1684 #
1685 #main_window_highlight_color = yellow
1686 #
1687 #progressbar_color = black
1688 #
1689 #progressbar_elapsed_color = green
1690 #
1691 #statusbar_color = default
1692 #
1693 #alternative_ui_separator_color = black
1694 #
1695 #active_column_color = red
1696 #
1697 #window_border_color = green
1698 #
1699 #active_window_border = red
1700 #
1701 #+end_src
1702
1703 *** bindings
1704 :PROPERTIES:
1705 :header-args+: :tangle ~/.ncmpcpp/bindings
1706 :END:
1707
1708 #+begin_src conf :tangle no
1709 def_key "j"
1710 scroll_down
1711 def_key "k"
1712 scroll_up
1713
1714 def_key "ctrl-u"
1715 page_up
1716 def_key "ctrl-d"
1717 page_down
1718
1719 def_key "h"
1720 previous_column
1721 def_key "l"
1722 next_column
1723
1724 def_key "."
1725 show_lyrics
1726
1727 def_key "n"
1728 next_found_item
1729 def_key "N"
1730 previous_found_item
1731
1732 def_key "J"
1733 move_sort_order_down
1734 def_key "K"
1735 move_sort_order_up
1736 #+end_src
1737
1738 ** pigeonhole
1739 *** amin.sieve
1740 :PROPERTIES:
1741 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/amin.sieve :comments none
1742 :END:
1743
1744 #+begin_src conf
1745 require ["regex", "variables", "fileinto", "envelope",
1746 "mailbox", "imap4flags", "include"];
1747
1748 # webmasters
1749 if anyof (
1750 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
1751 fileinto :create "gnu.webmasters";
1752 stop;
1753 }
1754
1755 include :personal "lists";
1756 #+end_src
1757
1758 *** lists.sieve
1759 :PROPERTIES:
1760 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/lists.sieve :comments none
1761 :END:
1762
1763 #+begin_src conf
1764 require ["regex", "variables", "fileinto", "envelope",
1765 "mailbox", "imap4flags", "include"];
1766
1767 # mailing lists
1768 if anyof (
1769 header :contains "list-id"
1770 [ "<emacs-devel.gnu.org>"
1771 , "<emacs-orgmode.gnu.org>"
1772 , "<emacsconf-discuss.gnu.org>"
1773 , "<fencepost-users.gnu.org>"
1774 , "<guix-devel.gnu.org>"
1775 , "<guile-devel.gnu.org>"
1776 , "<help-gnu-emacs.gnu.org>"
1777 , "<info-gnu-emacs.gnu.org>"
1778 , "<info-guix.gnu.org>"
1779 , "<www-commits.gnu.org>"
1780 , "<www-discuss.gnu.org>"
1781 , "<deepspec.lists.cs.princeton.edu>"
1782 , "<haskell-cafe.haskell.org>"
1783 , "<haskell-art.we.lurk.org>"
1784 , "<notmuch.notmuchmail.org>"
1785 ] ) {
1786 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
1787 set :lower "listname" "${1}";
1788 fileinto :create "gnu.${listname}";
1789 stop;
1790 }
1791 }
1792
1793 # sr.ht lists, with dots ('.') omitted
1794 if anyof (
1795 header :contains "list-id"
1796 [ "<~bandali/public-inbox@lists.sr.ht>"
1797 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
1798 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
1799 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
1800 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
1801 ] ) {
1802 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
1803 set :lower "username" "${1}";
1804 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
1805 fileinto :create "gnu.${username}.${listname}";
1806 stop;
1807 }
1808 }
1809 #+end_src
1810
1811 ** Readline
1812 :PROPERTIES:
1813 :header-args+: :tangle ~/.config/readline/inputrc
1814 :END:
1815
1816 #+begin_src conf
1817 set enable-bracketed-paste on
1818
1819 set colored-stats on
1820 set colored-completion-prefix on
1821 set completion-ignore-case on
1822 set menu-complete-display-prefix on
1823 set page-completions off
1824 set show-all-if-ambiguous on
1825 set show-all-if-unmodified on
1826 set visible-stats on
1827
1828 TAB: menu-complete
1829 "\e[Z": menu-complete-backward
1830
1831 "\e[A": history-search-backward
1832 "\e[B": history-search-forward
1833 #+end_src
1834
1835 ** rofi
1836 :PROPERTIES:
1837 :header-args+: :tangle ~/.config/rofi/config
1838 :END:
1839
1840 #+begin_src conf
1841 ! rofi.font: Ubuntu Mono 13
1842 ! rofi.font: Inconsolata 16
1843 ! rofi.font: Iosevka 13
1844 ! rofi.font: Source Code Pro 11
1845 rofi.font: Source Code Pro 10.5
1846 rofi.modi: run,window
1847 ! rofi.width: 640
1848 rofi.width: 600
1849 !rofi.location: 2
1850 !rofi.yoffset: 200
1851 rofi.monitor: -1
1852 !rofi.lines: 10
1853
1854 rofi.theme: ~/.guix-profile/share/rofi/themes/gruvbox-light-hard.rasi
1855 #+end_src
1856
1857 ** rofi-pass
1858 :PROPERTIES:
1859 :header-args+: :tangle ~/.config/rofi-pass/config
1860 :END:
1861
1862 #+begin_src conf
1863 # permanently set alternative root dir
1864 # root=/path/to/root
1865
1866 # rofi command. Make sure to have "$@" as last argument
1867 _rofi () {
1868 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
1869 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
1870 }
1871
1872 # xdotool needs the keyboard layout to be set using setxkbmap
1873 # You can do this in your autostart scripts (e.g. xinitrc)
1874
1875 # If for some reason, you cannot do this, you can set the command here.
1876 # and set fix_layout to true
1877 fix_layout=false
1878
1879 layout_cmd () {
1880 setxkbmap us
1881 }
1882
1883 # fields to be used
1884 URL_field='url'
1885 USERNAME_field='user'
1886 AUTOTYPE_field='autotype'
1887
1888 # delay to be used for :delay keyword
1889 delay=2
1890
1891 ## Programs to be used
1892 # Editor
1893 EDITOR='gvim -f'
1894
1895 # Browser
1896 BROWSER='chromium'
1897
1898 ## Misc settings
1899
1900 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
1901 auto_enter='false'
1902 notify='false'
1903 default_autotype='user :tab pass'
1904
1905 # color of the help messages
1906 # leave empty for autodetection
1907 help_color="#4872FF"
1908
1909 # Clipboard settings
1910 # Possible options: primary, clipboard, both
1911 clip=primary
1912
1913 # Options for generating new password entries
1914 # default_user is also used for password files that have no user field.
1915 default_user=aminb
1916 default_user2=bandali
1917 password_length=30
1918
1919 # Custom Keybindings
1920 #autotype="Alt+1"
1921 autotype="Alt+m"
1922 type_user="Alt+2"
1923 type_pass="Alt+3"
1924 open_url="Alt+4"
1925 copy_name="Alt+u"
1926 copy_url="Alt+l"
1927 copy_pass="Alt+p"
1928 show="Alt+o"
1929 copy_entry="Alt+2"
1930 type_entry="Alt+1"
1931 copy_menu="Alt+c"
1932 action_menu="Alt+a"
1933 type_menu="Alt+t"
1934 help="Alt+h"
1935 switch="Alt+x"
1936 insert_pass="Alt+n"
1937 #+end_src
1938
1939 ** Screen
1940 :PROPERTIES:
1941 :header-args+: :tangle ~/.config/screen/screenrc
1942 :END:
1943
1944 #+begin_src screen
1945 startup_message off
1946 caption always "%{= kc}GNU Screen $USER@%H (load: %l)%-28=%{= .m}%D %d.%m.%Y %0c"
1947 #+end_src
1948
1949 ** Shell
1950
1951 *** GNU Bash
1952 :PROPERTIES:
1953 :header-args+: :tangle ~/.bashrc
1954 :END:
1955
1956 #+begin_src bash
1957 # Bash initialization for interactive non-login shells and
1958 # for remote shells (info "(bash) Bash Startup Files").
1959
1960 # Export 'SHELL' to child processes. Programs such as 'screen'
1961 # honor it and otherwise use /bin/sh.
1962 export SHELL
1963
1964 if [[ $- != *i* ]]
1965 then
1966 # We are being invoked from a non-interactive shell. If this
1967 # is an SSH session (as in "ssh host command"), source
1968 # /etc/profile so we get PATH and other essential variables.
1969 [[ -n "$SSH_CLIENT" ]] && source /etc/profile
1970
1971 # Don't do anything else.
1972 return
1973 fi
1974
1975 if [ -n "$IS_GUIX_SYSTEM" ]; then
1976 # Source the system-wide file.
1977 source /etc/bashrc
1978 fi
1979
1980 # from https://unix.stackexchange.com/a/55935
1981 b_prompt() {
1982 cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
1983 printf $cwd
1984 }
1985
1986 if [ $(id -u) == "0" ]; then
1987 PS1='`printf "\[\e[1;31m\]\$\[\e[00m\]"` '
1988 else
1989 PS1='\$ '
1990 fi
1991 PS1="\u@\h:\w/`[ -n "$GUIX_ENVIRONMENT" ] && printf \" [env]\"`\n$PS1"
1992
1993 # set terminal title
1994 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: $(b_prompt)\007"'
1995
1996 # i-beam cursor
1997 # echo -e "\033[5 q" # blinking
1998 echo -e "\033[6 q" # non-blinking
1999
2000 # various bash tweaks
2001 # append to the history file, don't overwrite it
2002 shopt -s histappend
2003 shopt -s cmdhist
2004 # check the window size after each command and, if necessary,
2005 # update the values of LINES and COLUMNS.
2006 shopt -s checkwinsize
2007 # If set, the pattern "**" used in a pathname expansion context will
2008 # match all files and zero or more directories and subdirectories.
2009 #shopt -s globstar
2010 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
2011 HISTSIZE=
2012 HISTFILESIZE=
2013 # don't put duplicate lines or lines starting with space in the
2014 # history.
2015 HISTCONTROL=ignoreboth
2016 # ignore a few very common commands and don't add them to history
2017 HISTIGNORE='ls:l:s:g:[bf]g:history'
2018 HISTTIMEFORMAT='%F %T '
2019 stty stop ""
2020
2021 # aliases
2022 alias ls='ls -p --color=auto'
2023 alias l='ls -lh' # long format and human-readable sizes
2024 alias ll='l -A' # long format, all files
2025 alias dir='dir --color=auto'
2026 alias vdir='vdir --color=auto'
2027 alias grep='grep --color=auto'
2028 alias fgrep='fgrep --color=auto'
2029 alias egrep='egrep --color=auto'
2030 alias mpv="mpv --ytdl-format mp4"
2031 alias mv="mv -iv"
2032 alias cp="cp -iv"
2033 alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
2034 alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
2035 alias m="mbsync csclub; mbsync uwaterloo; mbsync shemshak; mbsync gnub"
2036 alias best="youtube-dl -f best"
2037 alias e="$EDITOR"
2038 alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
2039
2040 aur() {
2041 cd ~/usr/builds
2042 [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
2043 cd ${1}
2044 }
2045
2046 function t {
2047 cd $(mktemp -d /tmp/$1.XXXX)
2048 }
2049
2050 # separate alias definitions file, if exists
2051 if [ -f ~/.bash_aliases ]; then
2052 . ~/.bash_aliases
2053 fi
2054
2055 # enable programmable completion features (not needed if already
2056 # enabled in /etc/bash.bashrc and if /etc/profile sources
2057 # /etc/bash.bashrc).
2058 if ! shopt -oq posix; then
2059 if [ -f /usr/share/bash-completion/bash_completion ]; then
2060 . /usr/share/bash-completion/bash_completion
2061 elif [ -f /etc/bash_completion ]; then
2062 . /etc/bash_completion
2063 fi
2064 fi
2065
2066 # source Guix shell config dirs, for vte.sh and bash completions
2067 GUIX_PROFILES=("${HOME}/.guix-profile"
2068 "${HOME}/.config/guix/current")
2069 for profile in "${GUIX_PROFILES[@]}"; do
2070 for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
2071 if [ -d "${dir}" ]; then
2072 for f in "${dir}"/*; do
2073 . $f
2074 done
2075 fi
2076 done
2077 done
2078 #+end_src
2079
2080 *** profile
2081 :PROPERTIES:
2082 :header-args+: :tangle ~/.profile
2083 :END:
2084
2085 #+begin_src sh
2086 # ~/.profile: executed by the command interpreter for login shells.
2087 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
2088 # exists.
2089
2090 # source host-specific profile
2091 if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
2092 . "$HOME/.config/profiles/$(hostname)"
2093 fi
2094
2095 export EDITOR="emacsclient -nw"
2096 export VISUAL="emcl"
2097
2098 PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
2099 PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
2100 if [ -z "$IS_GUIX_SYSTEM" ]; then
2101 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
2102 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
2103 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
2104 fi
2105 export PATH
2106 export INFOPATH
2107
2108 export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
2109 export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
2110
2111 export XDG_CONFIG_HOME="$HOME/.config"
2112 export XDG_DATA_HOME="$HOME/.local/share"
2113
2114 if [ -f "$HOME/.config/user-dirs.dirs" ]; then
2115 set -a
2116 . "$HOME/.config/user-dirs.dirs"
2117 set +a
2118 fi
2119
2120 export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
2121 export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
2122
2123 export MAILDIR="$HOME/mail"
2124 export CVS_RSH="ssh"
2125
2126 if [ -x "$(command -v go)" ]; then
2127 export GOPATH="$HOME/src/go"
2128 export PATH="$GOPATH/bin:$PATH"
2129 fi
2130
2131 # if running bash
2132 if [ -n "$BASH_VERSION" ]; then
2133 # include .bashrc if it exists
2134 if [ -f "$HOME/.bashrc" ]; then
2135 . "$HOME/.bashrc"
2136 fi
2137 fi
2138
2139 if [ -z "$IS_GUIX_SYSTEM" ]; then
2140 # if guix is installed
2141 if [ -x "$(command -v guix)" ]; then
2142 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
2143 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
2144 export SSL_CERT_DIR
2145 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
2146 else
2147 printf "it seems you forgot to \`guix install nss-certs\'\n"
2148 fi
2149 GUIX_PROFILE="$HOME/.guix-profile"
2150 . "$GUIX_PROFILE/etc/profile"
2151 unset XDG_DATA_DIRS
2152 fi
2153 fi
2154
2155 for p in $MY_GUIX_PROFILES/*; do
2156 profile=$p/$(basename "$p")
2157 if [ -f "$profile"/etc/profile ]; then
2158 GUIX_PROFILE="$profile"
2159 . "$GUIX_PROFILE"/etc/profile
2160 fi
2161 unset profile
2162 done
2163
2164 # start an ssh-agent (with guix's openssh)
2165 if [ -z "$IS_GUIX_SYSTEM" ]; then
2166 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
2167 ssh-agent > ~/.ssh-agent-thing
2168 fi
2169 if [[ ! "$SSH_AUTH_SOCK" ]]; then
2170 eval "$(<~/.ssh-agent-thing)"
2171 fi
2172 fi
2173
2174 # footenote: when on a foreign distro and using Xfce, don't forget to
2175 # disable its auto-start of gpg- and ssh-agent, by issuing
2176 # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
2177 # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
2178 # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
2179 # also, MATE does something similar with gnome-keyring-daemon:
2180 # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop
2181 #+end_src
2182
2183 *** per-host profiles
2184
2185 Host-specific profiles, sourced from =~/.profile=. Each
2186 =~/.config/profiles/HOST= file will be sourced on the machine with
2187 =hostname= of =HOST=.
2188
2189 **** chaman
2190 :PROPERTIES:
2191 :header-args+: :tangle ~/.config/profiles/chaman
2192 :END:
2193
2194 #+begin_src sh
2195 export IS_GUIX_SYSTEM=true
2196
2197 if [ -x "$(command -v xinput)" ]; then
2198 xinput --set-prop "TPPS/2 IBM TrackPoint" 'libinput Accel Speed' -0.4
2199 fi
2200
2201 setxkbmap \
2202 -layout us,ir \
2203 -option ctrl:nocaps \
2204 -option grp:shifts_toggle
2205
2206 xmodmap -e "keysym Menu = Super_R"
2207
2208 xsetroot -cursor_name left_ptr
2209 xset r rate 200 45
2210 xset b off
2211 #+end_src
2212
2213 **** darrud
2214 :PROPERTIES:
2215 :header-args+: :tangle ~/.config/profiles/darrud
2216 :END:
2217
2218 #+begin_src sh
2219 export INFOPATH="$HOME/usr/local/share/info${INFOPATH:+:}$INFOPATH"
2220 #+end_src
2221
2222 **** langa
2223 :PROPERTIES:
2224 :header-args+: :tangle ~/.config/profiles/langa
2225 :END:
2226
2227 #+begin_src sh
2228 export XDG_DATA_DIRS="/usr/share/mate:/usr/local/share/:/usr/share/"
2229 #+end_src
2230
2231 ** redshift
2232 :PROPERTIES:
2233 :header-args+: :tangle ~/.config/redshift.conf :comments none
2234 :END:
2235
2236 #+begin_src conf
2237 ; Global settings for redshift
2238 [redshift]
2239 ; Set the day and night screen temperatures (Neutral is 6500K)
2240 ;temp-day=5700
2241 ;temp-night=3500
2242
2243 ;temp-day=6500
2244 temp-day=6200
2245 ;temp-night=4800
2246 ;temp-night=5000
2247 ;temp-night=4500
2248 temp-night=4000
2249
2250 ; Enable/Disable a smooth transition between day and night
2251 ; 0 will cause a direct change from day to night screen temperature.
2252 ; 1 will gradually increase or decrease the screen temperature.
2253 transition=1
2254
2255 ; Set the screen brightness. Default is 1.0.
2256 ;brightness=0.9
2257 ; It is also possible to use different settings for day and night
2258 ; since version 1.8.
2259 ;brightness-day=0.7
2260 ;brightness-night=0.4
2261 ; Set the screen gamma (for all colors, or each color channel
2262 ; individually)
2263 ;gamma=0.8
2264 ;gamma=1.0
2265 ;gamma=0.8:0.7:0.8
2266 ; This can also be set individually for day and night since
2267 ; version 1.10.
2268 ;gamma-day=0.8:0.7:0.8
2269 ;gamma-night=0.6
2270
2271 ; Set the location-provider: 'geoclue2' or 'manual'
2272 ; type 'redshift -l list' to see possible values.
2273 ; The location provider settings are in a different section.
2274 ;location-provider=manual
2275 location-provider=geoclue2
2276
2277 ; Set the adjustment-method: 'randr', 'vidmode'
2278 ; type 'redshift -m list' to see all possible values.
2279 ; 'randr' is the preferred method, 'vidmode' is an older API.
2280 ; but works in some cases when 'randr' does not.
2281 ; The adjustment method settings are in a different section.
2282 adjustment-method=randr
2283
2284 ; Configuration of the location-provider:
2285 ; type 'redshift -l PROVIDER:help' to see the settings.
2286 ; ex: 'redshift -l manual:help'
2287 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
2288 ; are negative numbers.
2289 ;[manual]
2290 ;lat=48.1
2291 ;lon=11.6
2292
2293 ; Configuration of the adjustment-method
2294 ; type 'redshift -m METHOD:help' to see the settings.
2295 ; ex: 'redshift -m randr:help'
2296 ; In this example, randr is configured to adjust screen 1.
2297 ; Note that the numbering starts from 0, so this is actually the
2298 ; second screen. If this option is not specified, Redshift will try
2299 ; to adjust _all_ screens.
2300 ;[randr]
2301 ;screen=1
2302 #+end_src
2303
2304 ** signature
2305 :PROPERTIES:
2306 :header-args+: :tangle ~/.signature
2307 :END:
2308
2309 My email signature.
2310
2311 #+begin_src
2312 Amin Bandali
2313 Free Software activist | GNU maintainer & webmaster
2314 GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
2315 https://bandali.eu.org
2316 #+end_src
2317
2318 ** systemd
2319
2320 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
2321
2322 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
2323 [Service]
2324 TTYVTDisallocate=no
2325 #+end_src
2326
2327 ** TLP
2328
2329 *** langa
2330
2331 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
2332 # ------------------------------------------------------------------------------
2333 # tlp - Parameters for power saving
2334 # See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
2335
2336 # Notes:
2337 # - Some parameters are disabled, remove the leading '#' to enable # them;
2338 # shown values are suggestions not defaults
2339 # - Default *: intrinsic default that is effective when the parameter is missing
2340 # or disabled by a leading '#'; use PARAM="" to disable intrinsic defaults for
2341 # parameters with text string values
2342 # - Default <none>: do nothing or use kernel/hardware defaults
2343
2344 # Set to 0 to disable, 1 to enable TLP.
2345 # Default: 0
2346 TLP_ENABLE=1
2347
2348 # Operation mode when no power supply can be detected: AC, BAT.
2349 # Concerns some desktop and embedded hardware only.
2350 # Default: <none>
2351 TLP_DEFAULT_MODE=AC
2352
2353 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2354 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2355 # Default: 0
2356 TLP_PERSISTENT_DEFAULT=0
2357
2358 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2359 # Non-zero value enables, zero disables laptop mode.
2360 # Default: 0 (AC), 2 (BAT)
2361 DISK_IDLE_SECS_ON_AC=0
2362 DISK_IDLE_SECS_ON_BAT=2
2363
2364 # Dirty page values (timeouts in secs).
2365 # Default: 15 (AC + BAT)
2366 MAX_LOST_WORK_SECS_ON_AC=15
2367 MAX_LOST_WORK_SECS_ON_BAT=60
2368
2369 # Note: CPU parameters below are disabled by default, remove the leading #
2370 # to enable them, otherwise kernel defaults will be used.
2371
2372 # Select a CPU frequency scaling governor.
2373 # Intel Core i processor with intel_pstate driver:
2374 # powersave(*), performance.
2375 # Older hardware with acpi-cpufreq driver:
2376 # ondemand(*), powersave, performance, conservative, schedutil.
2377 # (*) is recommended.
2378 # Use tlp-stat -p to show the active driver and available governors.
2379 # Important:
2380 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2381 # efficient for *almost all* workloads and therefore kernel and most
2382 # distributions have chosen them as defaults. If you still want to change,
2383 # you should know what you're doing! You *must* disable your distribution's
2384 # governor settings or conflicts will occur.
2385 # Default: <none>
2386 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2387 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2388
2389 # Set the min/max frequency available for the scaling governor.
2390 # Possible values depend on your CPU. For available frequencies see
2391 # the output of tlp-stat -p.
2392 # Default: <none>
2393 #CPU_SCALING_MIN_FREQ_ON_AC=0
2394 #CPU_SCALING_MAX_FREQ_ON_AC=0
2395 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2396 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2397
2398 # Set energy performance hints (HWP) for Intel P-state governor:
2399 # performance, balance_performance, default, balance_power, power
2400 # Values are given in order of increasing power saving.
2401 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2402 # Default: <none>
2403 CPU_HWP_ON_AC=balance_performance
2404 CPU_HWP_ON_BAT=balance_power
2405
2406 # Set Intel P-state performance: 0..100 (%).
2407 # Limit the max/min P-state to control the power dissipation of the CPU.
2408 # Values are stated as a percentage of the available performance.
2409 # Requires an Intel Core i processor with intel_pstate driver.
2410 # Default: <none>
2411 #CPU_MIN_PERF_ON_AC=0
2412 #CPU_MAX_PERF_ON_AC=100
2413 #CPU_MIN_PERF_ON_BAT=0
2414 #CPU_MAX_PERF_ON_BAT=30
2415
2416 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2417 # Requires an Intel Core i processor.
2418 # Important:
2419 # - This may conflict with your distribution's governor settings
2420 # - A value of 1 does *not* activate boosting, it just allows it
2421 # Default: <none>
2422 #CPU_BOOST_ON_AC=1
2423 #CPU_BOOST_ON_BAT=0
2424
2425 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2426 # 0=disable, 1=enable.
2427 # Default: <none>
2428 SCHED_POWERSAVE_ON_AC=0
2429 SCHED_POWERSAVE_ON_BAT=1
2430
2431 # Kernel NMI Watchdog:
2432 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2433 # Default: <none>
2434 NMI_WATCHDOG=0
2435
2436 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2437 # Frequency voltage pairs are written to:
2438 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2439 # CAUTION: only use this, if you thoroughly understand what you are doing!
2440 # Default: <none>.
2441 #PHC_CONTROLS="F:V F:V F:V F:V"
2442
2443 # Set CPU performance versus energy savings policy:
2444 # performance, balance-performance, default, balance-power, power.
2445 # Values are given in order of increasing power saving.
2446 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2447 # Default: <none>
2448 ENERGY_PERF_POLICY_ON_AC=performance
2449 ENERGY_PERF_POLICY_ON_BAT=balance-power
2450
2451 # Disk devices; separate multiple devices with spaces.
2452 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2453 # Note: DISK parameters below are effective only when this option is configured.
2454 # Default: "nvme0n1 sda"
2455 DISK_DEVICES="sda sdb"
2456
2457 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2458 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2459 # Separate values for multiple disks with spaces. Use the special value 'keep'
2460 # to keep the hardware default for the particular disk.
2461 # Default: <none>
2462 DISK_APM_LEVEL_ON_AC="254 254"
2463 DISK_APM_LEVEL_ON_BAT="128 128"
2464
2465 # Hard disk spin down timeout:
2466 # 0: spin down disabled
2467 # 1..240: timeouts from 5s to 20min (in units of 5s)
2468 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2469 # See 'man hdparm' for details.
2470 # Separate values for multiple disks with spaces. Use the special value 'keep'
2471 # to keep the hardware default for the particular disk.
2472 # Default: <none>
2473 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2474 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2475
2476 # Select I/O scheduler for the disk devices.
2477 # Multi queue (blk-mq) schedulers:
2478 # mq-deadline(*), none, kyber, bfq
2479 # Single queue schedulers:
2480 # deadline(*), cfq, bfq, noop
2481 # (*) recommended.
2482 # Separate values for multiple disks with spaces. Use the special value 'keep'
2483 # to keep the kernel default scheduler for the particular disk.
2484 # Notes:
2485 # - Multi queue (blk-mq) may need kernel boot option 'scsi_mod.use_blk_mq=1'
2486 # and 'modprobe mq-deadline-iosched|kyber|bfq' on kernels < 5.0
2487 # - Single queue schedulers are legacy now and were removed together with
2488 # the old block layer in kernel 5.0
2489 # Default: keep
2490 #DISK_IOSCHED="mq-deadline mq-deadline"
2491
2492 # AHCI link power management (ALPM) for disk devices:
2493 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2494 # (*) Kernel >= 4.15 required, then recommended.
2495 # Multiple values separated with spaces are tried sequentially until success.
2496 # Default: <none>
2497 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2498 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2499
2500 # Exclude host devices from AHCI link power management.
2501 # Separate multiple hosts with spaces.
2502 # Default: <none>
2503 #SATA_LINKPWR_BLACKLIST="host1"
2504
2505 # Runtime Power Management for AHCI host and disks devices:
2506 # on=disable, auto=enable.
2507 # EXPERIMENTAL ** WARNING: auto may cause system lockups/data loss.
2508 # Default: <none>
2509 #AHCI_RUNTIME_PM_ON_AC=on
2510 #AHCI_RUNTIME_PM_ON_BAT=on
2511
2512 # Seconds of inactivity before disk is suspended.
2513 # Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated.
2514 # Default: 15
2515 AHCI_RUNTIME_PM_TIMEOUT=15
2516
2517 # PCI Express Active State Power Management (PCIe ASPM):
2518 # default(*), performance, powersave.
2519 # (*) keeps BIOS ASPM defaults (recommended)
2520 # Default: <none>
2521 #PCIE_ASPM_ON_AC=default
2522 #PCIE_ASPM_ON_BAT=default
2523
2524 # Set the min/max/turbo frequency for the Intel GPU.
2525 # Possible values depend on your hardware. For available frequencies see
2526 # the output of tlp-stat -g.
2527 # Default: <none>
2528 #INTEL_GPU_MIN_FREQ_ON_AC=0
2529 #INTEL_GPU_MIN_FREQ_ON_BAT=0
2530 #INTEL_GPU_MAX_FREQ_ON_AC=0
2531 #INTEL_GPU_MAX_FREQ_ON_BAT=0
2532 #INTEL_GPU_BOOST_FREQ_ON_AC=0
2533 #INTEL_GPU_BOOST_FREQ_ON_BAT=0
2534
2535 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2536 # auto = mid on BAT, high on AC.
2537 # Default: default
2538 RADEON_POWER_PROFILE_ON_AC=default
2539 RADEON_POWER_PROFILE_ON_BAT=default
2540
2541 # Radeon dynamic power management method (DPM): battery, performance.
2542 # Default: <none>
2543 RADEON_DPM_STATE_ON_AC=performance
2544 RADEON_DPM_STATE_ON_BAT=battery
2545
2546 # Radeon DPM performance level: auto, low, high; auto is recommended.
2547 # Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated.
2548 # Default: auto
2549 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2550 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2551
2552 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2553 # Default: <none>
2554 WIFI_PWR_ON_AC=off
2555 WIFI_PWR_ON_BAT=on
2556
2557 # Disable wake on LAN: Y/N.
2558 # Default: N
2559 WOL_DISABLE=Y
2560
2561 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2562 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2563 # Default: <none>
2564 SOUND_POWER_SAVE_ON_AC=0
2565 SOUND_POWER_SAVE_ON_BAT=0
2566
2567 # Disable controller too (HDA only): Y/N.
2568 # Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated.
2569 # Default: Y
2570 SOUND_POWER_SAVE_CONTROLLER=N
2571
2572 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2573 # Drive can be powered on again by releasing (and reinserting) the eject lever
2574 # or by pressing the disc eject button on newer models.
2575 # Note: an UltraBay/MediaBay hard disk is never powered off.
2576 # Default: 0
2577 BAY_POWEROFF_ON_AC=0
2578 BAY_POWEROFF_ON_BAT=0
2579 # Optical drive device to power off
2580 # Default: sr0
2581 BAY_DEVICE="sr0"
2582
2583 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2584 # Default: <none>
2585 RUNTIME_PM_ON_AC=on
2586 RUNTIME_PM_ON_BAT=auto
2587
2588 # Exclude PCI(e) device adresses the following list from Runtime PM
2589 # (separate with spaces). Use lspci to get the adresses (1st column).
2590 # Default: <none>
2591 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2592
2593 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2594 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2595 # prevents accidential power-on of dGPU in hybrid graphics setups.
2596 # Separate multiple drivers with spaces.
2597 # Default: "amdgpu mei_me nouveau nvidia pcieport radeon", use "" to disable
2598 # completely.
2599 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu mei_me nouveau nvidia pcieport radeon"
2600
2601 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2602 # Default: 0
2603 USB_AUTOSUSPEND=1
2604
2605 # Exclude listed devices from USB autosuspend (separate with spaces).
2606 # Use lsusb to get the ids.
2607 # Note: input devices (usbhid) are excluded automatically
2608 # Default: <none>
2609 #USB_BLACKLIST="1111:2222 3333:4444"
2610
2611 # Bluetooth devices are excluded from USB autosuspend:
2612 # 0=do not exclude, 1=exclude.
2613 # Default: 0
2614 USB_BLACKLIST_BTUSB=0
2615
2616 # Phone devices are excluded from USB autosuspend:
2617 # 0=do not exclude, 1=exclude (enable charging).
2618 # Default: 0
2619 USB_BLACKLIST_PHONE=0
2620
2621 # Printers are excluded from USB autosuspend:
2622 # 0=do not exclude, 1=exclude.
2623 # Default: 1
2624 USB_BLACKLIST_PRINTER=1
2625
2626 # WWAN devices are excluded from USB autosuspend:
2627 # 0=do not exclude, 1=exclude.
2628 # Default: 0
2629 USB_BLACKLIST_WWAN=0
2630
2631 # Include listed devices into USB autosuspend even if already excluded
2632 # by the blacklists above (separate with spaces). Use lsusb to get the ids.
2633 # Default: <none>
2634 #USB_WHITELIST="1111:2222 3333:4444"
2635
2636 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
2637 # (workaround for USB devices that cause shutdown problems).
2638 # Default: 0
2639 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
2640
2641 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
2642 # on system startup: 0=disable, 1=enable.
2643 # Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
2644 # are ignored when this is enabled.
2645 # Default: 0
2646 #RESTORE_DEVICE_STATE_ON_STARTUP=0
2647 RESTORE_DEVICE_STATE_ON_STARTUP=1
2648
2649 # Radio devices to disable on startup: bluetooth, wifi, wwan.
2650 # Separate multiple devices with spaces.
2651 # Default: <none>
2652 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
2653
2654 # Radio devices to enable on startup: bluetooth, wifi, wwan.
2655 # Separate multiple devices with spaces.
2656 # Default: <none>
2657 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
2658
2659 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
2660 # (workaround for devices that are blocking shutdown).
2661 # Default: <none>
2662 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
2663
2664 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
2665 # (to prevent other operating systems from missing radios).
2666 # Default: <none>
2667 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
2668
2669 # Radio devices to enable on AC: bluetooth, wifi, wwan.
2670 # Default: <none>
2671 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
2672
2673 # Radio devices to disable on battery: bluetooth, wifi, wwan.
2674 # Default: <none>
2675 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
2676 DEVICES_TO_DISABLE_ON_BAT="bluetooth"
2677
2678 # Radio devices to disable on battery when not in use (not connected):
2679 # bluetooth, wifi, wwan.
2680 # Default: <none>
2681 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
2682
2683 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
2684 # required). Charging starts when the remaining capacity falls below the
2685 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
2686 # Main / Internal battery (values in %)
2687 # Default: <none>
2688 #START_CHARGE_THRESH_BAT0=75
2689 #STOP_CHARGE_THRESH_BAT0=80
2690 # Ultrabay / Slice / Replaceable battery (values in %)
2691 # Default: <none>
2692 #START_CHARGE_THRESH_BAT1=75
2693 #STOP_CHARGE_THRESH_BAT1=80
2694
2695 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
2696 # Default: 0
2697 #RESTORE_THRESHOLDS_ON_BAT=1
2698
2699 # Battery feature drivers: 0=disable, 1=enable
2700 # Default: 1 (all)
2701 NATACPI_ENABLE=1
2702 TPACPI_ENABLE=1
2703 TPSMAPI_ENABLE=1
2704
2705 # ------------------------------------------------------------------------------
2706 # tlp-rdw - Parameters for the radio device wizard
2707 # Possible devices: bluetooth, wifi, wwan.
2708
2709 # Notes:
2710 # - Parameters are disabled by default, remove the leading # to enable them
2711 # - Separate multiple radio devices with spaces
2712
2713 # Default: <none> (for all parameters below)
2714
2715 # Radio devices to disable on connect.
2716 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
2717 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
2718 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
2719
2720 # Radio devices to enable on disconnect.
2721 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
2722 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
2723 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
2724
2725 # Radio devices to enable/disable when docked.
2726 #DEVICES_TO_ENABLE_ON_DOCK=""
2727 #DEVICES_TO_DISABLE_ON_DOCK=""
2728
2729 # Radio devices to enable/disable when undocked.
2730 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
2731 #DEVICES_TO_DISABLE_ON_UNDOCK=""
2732 #+end_src
2733
2734 *** shemshak
2735
2736 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
2737 # ------------------------------------------------------------------------------
2738 # tlp - Parameters for power saving
2739 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
2740
2741 # Hint: some features are disabled by default, remove the leading # to enable
2742 # them.
2743
2744 # Set to 0 to disable, 1 to enable TLP.
2745 TLP_ENABLE=1
2746
2747 # Operation mode when no power supply can be detected: AC, BAT.
2748 # Concerns some desktop and embedded hardware only.
2749 TLP_DEFAULT_MODE=AC
2750
2751 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2752 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2753 TLP_PERSISTENT_DEFAULT=0
2754
2755 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2756 # Non-zero value enables, zero disables laptop mode.
2757 DISK_IDLE_SECS_ON_AC=0
2758 DISK_IDLE_SECS_ON_BAT=2
2759
2760 # Dirty page values (timeouts in secs).
2761 MAX_LOST_WORK_SECS_ON_AC=15
2762 MAX_LOST_WORK_SECS_ON_BAT=60
2763
2764 # Hint: CPU parameters below are disabled by default, remove the leading #
2765 # to enable them, otherwise kernel default values are used.
2766
2767 # Select a CPU frequency scaling governor.
2768 # Intel Core i processor with intel_pstate driver:
2769 # powersave(*), performance.
2770 # Older hardware with acpi-cpufreq driver:
2771 # ondemand(*), powersave, performance, conservative, schedutil.
2772 # (*) is recommended.
2773 # Hint: use tlp-stat -p to show the active driver and available governors.
2774 # Important:
2775 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2776 # efficient for *almost all* workloads and therefore kernel and most
2777 # distributions have chosen them as defaults. If you still want to change,
2778 # you should know what you're doing! You *must* disable your distribution's
2779 # governor settings or conflicts will occur.
2780 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2781 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2782
2783 # Set the min/max frequency available for the scaling governor.
2784 # Possible values strongly depend on your CPU. For available frequencies see
2785 # the output of tlp-stat -p.
2786 #CPU_SCALING_MIN_FREQ_ON_AC=0
2787 #CPU_SCALING_MAX_FREQ_ON_AC=0
2788 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2789 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2790
2791 # Set energy performance hints (HWP) for Intel P-state governor:
2792 # performance, balance_performance, default, balance_power, power
2793 # Values are given in order of increasing power saving.
2794 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2795 CPU_HWP_ON_AC=balance_performance
2796 CPU_HWP_ON_BAT=balance_power
2797
2798 # Set Intel P-state performance: 0..100 (%).
2799 # Limit the max/min P-state to control the power dissipation of the CPU.
2800 # Values are stated as a percentage of the available performance.
2801 # Requires an Intel Core i processor with intel_pstate driver.
2802 #CPU_MIN_PERF_ON_AC=0
2803 #CPU_MAX_PERF_ON_AC=100
2804 #CPU_MIN_PERF_ON_BAT=0
2805 #CPU_MAX_PERF_ON_BAT=30
2806
2807 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2808 # Requires an Intel Core i processor.
2809 # Important:
2810 # - This may conflict with your distribution's governor settings
2811 # - A value of 1 does *not* activate boosting, it just allows it
2812 #CPU_BOOST_ON_AC=1
2813 #CPU_BOOST_ON_BAT=0
2814
2815 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2816 # 0=disable, 1=enable.
2817 SCHED_POWERSAVE_ON_AC=0
2818 SCHED_POWERSAVE_ON_BAT=1
2819
2820 # Kernel NMI Watchdog:
2821 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2822 NMI_WATCHDOG=0
2823
2824 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2825 # Frequency voltage pairs are written to:
2826 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2827 # CAUTION: only use this, if you thoroughly understand what you are doing!
2828 #PHC_CONTROLS="F:V F:V F:V F:V"
2829
2830 # Set CPU performance versus energy savings policy:
2831 # performance, balance-performance, default, balance-power, power.
2832 # Values are given in order of increasing power saving.
2833 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2834 ENERGY_PERF_POLICY_ON_AC=performance
2835 ENERGY_PERF_POLICY_ON_BAT=balance-power
2836
2837 # Disk devices; separate multiple devices with spaces (default: sda).
2838 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2839 DISK_DEVICES="sda sdb"
2840
2841 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2842 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2843 # Separate values for multiple disks with spaces. Use the special value 'keep'
2844 # to keep the hardware default for the particular disk.
2845 DISK_APM_LEVEL_ON_AC="254 254"
2846 DISK_APM_LEVEL_ON_BAT="128 128"
2847
2848 # Hard disk spin down timeout:
2849 # 0: spin down disabled
2850 # 1..240: timeouts from 5s to 20min (in units of 5s)
2851 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2852 # See 'man hdparm' for details.
2853 # Separate values for multiple disks with spaces. Use the special value 'keep'
2854 # to keep the hardware default for the particular disk.
2855 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2856 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2857
2858 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
2859 # Separate values for multiple disks with spaces. Use the special value 'keep'
2860 # to keep the kernel default scheduler for the particular disk.
2861 #DISK_IOSCHED="cfq cfq"
2862
2863 # AHCI link power management (ALPM) for disk devices:
2864 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2865 # (*) Kernel >= 4.15 required, then recommended.
2866 # Multiple values separated with spaces are tried sequentially until success.
2867 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2868 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2869
2870 # Exclude host devices from AHCI link power management.
2871 # Separate multiple hosts with spaces.
2872 #SATA_LINKPWR_BLACKLIST="host1"
2873
2874 # Runtime Power Management for AHCI host and disks devices:
2875 # on=disable, auto=enable.
2876 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
2877 #AHCI_RUNTIME_PM_ON_AC=on
2878 #AHCI_RUNTIME_PM_ON_BAT=on
2879
2880 # Seconds of inactivity before disk is suspended.
2881 AHCI_RUNTIME_PM_TIMEOUT=15
2882
2883 # PCI Express Active State Power Management (PCIe ASPM):
2884 # default, performance, powersave.
2885 PCIE_ASPM_ON_AC=performance
2886 PCIE_ASPM_ON_BAT=powersave
2887
2888 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2889 # auto = mid on BAT, high on AC; default = use hardware defaults.
2890 RADEON_POWER_PROFILE_ON_AC=high
2891 RADEON_POWER_PROFILE_ON_BAT=low
2892
2893 # Radeon dynamic power management method (DPM): battery, performance.
2894 RADEON_DPM_STATE_ON_AC=performance
2895 RADEON_DPM_STATE_ON_BAT=battery
2896
2897 # Radeon DPM performance level: auto, low, high; auto is recommended.
2898 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2899 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2900
2901 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2902 WIFI_PWR_ON_AC=off
2903 WIFI_PWR_ON_BAT=on
2904
2905 # Disable wake on LAN: Y/N.
2906 WOL_DISABLE=Y
2907
2908 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2909 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2910 SOUND_POWER_SAVE_ON_AC=0
2911 SOUND_POWER_SAVE_ON_BAT=0
2912
2913 # Disable controller too (HDA only): Y/N.
2914 SOUND_POWER_SAVE_CONTROLLER=N
2915
2916 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2917 # Drive can be powered on again by releasing (and reinserting) the eject lever
2918 # or by pressing the disc eject button on newer models.
2919 # Note: an UltraBay/MediaBay hard disk is never powered off.
2920 BAY_POWEROFF_ON_AC=0
2921 BAY_POWEROFF_ON_BAT=0
2922 # Optical drive device to power off (default sr0).
2923 BAY_DEVICE="sr0"
2924
2925 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2926 RUNTIME_PM_ON_AC=on
2927 RUNTIME_PM_ON_BAT=auto
2928
2929 # Exclude PCI(e) device adresses the following list from Runtime PM
2930 # (separate with spaces). Use lspci to get the adresses (1st column).
2931 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2932 RUNTIME_PM_BLACKLIST="01:00.0"
2933
2934 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2935 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2936 # prevents accidential power-on of dGPU in hybrid graphics setups.
2937 # Use "" to disable the feature completely.
2938 # Separate multiple drivers with spaces.
2939 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
2940
2941 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2942 USB_AUTOSUSPEND=1
2943
2944 # Exclude listed devices from USB autosuspend (separate with spaces).
2945 # Use lsusb to get the ids.
2946 # Note: input devices (usbhid) are excluded automatically
2947 #USB_BLACKLIST="1111:2222 3333:4444"
2948
2949 # Bluetooth devices are excluded from USB autosuspend:
2950 # 0=do not exclude, 1=exclude.
2951 USB_BLACKLIST_BTUSB=0
2952
2953 # Phone devices are excluded from USB autosuspend:
2954 # 0=do not exclude, 1=exclude (enable charging).
2955 USB_BLACKLIST_PHONE=0
2956
2957 # Printers are excluded from USB autosuspend:
2958 # 0=do not exclude, 1=exclude.
2959 USB_BLACKLIST_PRINTER=1
2960
2961 # WWAN devices are excluded from USB autosuspend:
2962 # 0=do not exclude, 1=exclude.
2963 USB_BLACKLIST_WWAN=1
2964
2965 # Include listed devices into USB autosuspend even if already excluded
2966 # by the blacklists above (separate with spaces).
2967 # Use lsusb to get the ids.
2968 #USB_WHITELIST="1111:2222 3333:4444"
2969
2970 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
2971 # (workaround for USB devices that cause shutdown problems).
2972 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
2973
2974 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
2975 # on system startup: 0=disable, 1=enable.
2976 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
2977 # are ignored when this is enabled!
2978 #RESTORE_DEVICE_STATE_ON_STARTUP=0
2979 RESTORE_DEVICE_STATE_ON_STARTUP=1
2980
2981 # Radio devices to disable on startup: bluetooth, wifi, wwan.
2982 # Separate multiple devices with spaces.
2983 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
2984
2985 # Radio devices to enable on startup: bluetooth, wifi, wwan.
2986 # Separate multiple devices with spaces.
2987 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
2988
2989 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
2990 # (workaround for devices that are blocking shutdown).
2991 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
2992
2993 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
2994 # (to prevent other operating systems from missing radios).
2995 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
2996
2997 # Radio devices to enable on AC: bluetooth, wifi, wwan.
2998 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
2999
3000 # Radio devices to disable on battery: bluetooth, wifi, wwan.
3001 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3002
3003 # Radio devices to disable on battery when not in use (not connected):
3004 # bluetooth, wifi, wwan.
3005 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3006
3007 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3008 # required). Charging starts when the remaining capacity falls below the
3009 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3010 # Main / Internal battery (values in %)
3011 #START_CHARGE_THRESH_BAT0=75
3012 #STOP_CHARGE_THRESH_BAT0=80
3013 # Ultrabay / Slice / Replaceable battery (values in %)
3014 #START_CHARGE_THRESH_BAT1=75
3015 #STOP_CHARGE_THRESH_BAT1=80
3016
3017 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3018 #RESTORE_THRESHOLDS_ON_BAT=1
3019
3020 # ------------------------------------------------------------------------------
3021 # tlp-rdw - Parameters for the radio device wizard
3022 # Possible devices: bluetooth, wifi, wwan.
3023
3024 # Hints:
3025 # - Parameters are disabled by default, remove the leading # to enable them
3026 # - Separate multiple radio devices with spaces
3027
3028 # Radio devices to disable on connect.
3029 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3030 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3031 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3032
3033 # Radio devices to enable on disconnect.
3034 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3035 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3036 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3037
3038 # Radio devices to enable/disable when docked.
3039 #DEVICES_TO_ENABLE_ON_DOCK=""
3040 #DEVICES_TO_DISABLE_ON_DOCK=""
3041
3042 # Radio devices to enable/disable when undocked.
3043 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3044 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3045 #+end_src
3046
3047 ** X
3048
3049 *** xinit
3050 :PROPERTIES:
3051 :header-args+: :tangle ~/.xinitrc
3052 :END:
3053
3054 #+begin_src sh
3055 [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
3056 #+end_src
3057
3058 *** X resources
3059
3060 #+begin_src conf-xdefaults :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3061 #include ".Xresources.d/fonts"
3062 #include ".Xresources.d/emacs"
3063 #include ".Xresources.d/rxvt-unicode"
3064 #+end_src
3065
3066 **** emacs
3067 :PROPERTIES:
3068 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3069 :END:
3070
3071 #+begin_src conf-xdefaults
3072 Emacs.menuBar: off
3073 Emacs.toolBar: off
3074 Emacs.verticalScrollBars: off
3075 Emacs.cursorBlink: off
3076 Emacs.FontBackend: xft,x
3077 ! Emacs.font: Ubuntu Mono-12
3078 ! Emacs.font: Triplicate T4C-11
3079 ! Emacs.font: Ubuntu Mono-10.5
3080 ! Emacs.font: Ubuntu Mono-12
3081 ! Emacs.font: Iosevka-11
3082
3083 ! Emacs.font: Fira Mono:size=15
3084 ! Emacs.font: DejaVu Sans Mono:size=15
3085 ! Emacs.font: Inconsolata:size=17
3086 ! Emacs.font: Inconsolata:size=16
3087 ! Emacs.font: Inconsolata LGC:size=14
3088 ! Emacs.font: Source Code Pro Medium-10.5
3089 Emacs.font: Source Code Pro Medium:size=14
3090 ! Emacs.font: Ubuntu Mono:size=16
3091 ! Emacs.font: Iosevka:size=16
3092 #+end_src
3093
3094 **** fonts
3095 :PROPERTIES:
3096 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3097 :END:
3098
3099 #+begin_src conf-xdefaults
3100 Xft.lcdfilter: lcddefault
3101 Xft.antialias: true
3102 Xft.autohint: 0
3103 Xft.hinting: true
3104 Xft.hintstyle: hintslight
3105 ! Xft.hintstyle: hintfull
3106 Xft.rgba: rgb
3107 Xft.dpi: 96
3108 #+end_src
3109
3110 **** rxvt-unicode
3111 :PROPERTIES:
3112 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3113 :END:
3114
3115 #+begin_src conf-xdefaults
3116 ! Font
3117 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3118 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
3119 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
3120 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
3121
3122 URxvt.xftAntialias: true
3123 URxvt.letterSpace: -1
3124
3125 !URxvt.depth: 0
3126 !URxvt.loginShell: true
3127 !URxvt*buffered: false
3128 URxvt.saveLines: 100000
3129 URxvt.internalBorder: 3
3130 URxvt.lineSpace: 0
3131 URxvt.scrollBar: false
3132 URxvt.scrollStyle: rxvt
3133 URxvt*scrollTtyOutput: false
3134 URxvt*scrollWithBuffer: true
3135 URxvt*scrollTtyKeypress: true
3136 URxvt.keysym.Shift-Up: command:\033]720;1\007
3137 URxvt.keysym.Shift-Down: command:\033]721;1\007
3138
3139 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3140 URxvt.url-select.launcher: firefox
3141 URxvt.url-select.underline: true
3142 URxvt.keysym.M-u: perl:url-select:select_next
3143 URxvt.keysym.M-Escape: perl:keyboard-select:activate
3144 URxvt.keysym.M-s: perl:keyboard-select:search
3145 URxvt.url-launcher: /usr/bin/abrowser
3146 URxvt.matcher.button: 1
3147 ! URxvt.iso14755: false
3148 ! URxvt.iso14755_53: false
3149 ! URxvt.keysym.M-c: perl:clipboard:copy
3150 ! URxvt.keysym.M-v: perl:clipboard:paste
3151 URxvt.keysym.M-c: eval:selection_to_clipboard
3152 URxvt.keysym.M-v: eval:paste_clipboard
3153 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3154 ! URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
3155 ! URxvt.keysym.Shift-Control-V: eval:paste_clipboard
3156 URxvt.keysym.C-Up: font-size:increase
3157 URxvt.keysym.C-Down: font-size:decrease
3158 URxvt.keysym.C-S-Up: font-size:incglobal
3159 URxvt.keysym.C-S-Down: font-size:decglobal
3160 URxvt.keysym.C-equal: font-size:reset
3161 !URxvt.keysym.C-question: font-size:show
3162
3163 !URxvt.iconFile: /usr/share/icons/elementary-xfce/apps/48/terminal.png
3164
3165 !urxvt*foreground: white
3166 !urxvt*background: black
3167
3168 !*color0: #2E3436
3169 !*color1: #a40000
3170 !*color2: #4E9A06
3171 !*color3: #C4A000
3172 !*color4: #3465A4
3173 !*color5: #75507B
3174 !*color6: #ce5c00
3175 !*color7: #babdb9
3176 !*color8: #555753
3177 !*color9: #EF2929
3178 !*color10: #8AE234
3179 !*color11: #FCE94F
3180 !*color12: #729FCF
3181 !*color13: #AD7FA8
3182 !*color14: #fcaf3e
3183 !*color15: #EEEEEC
3184
3185 !URxvt.foreground: #C8C8C8
3186 !URxvt.background: #FFFFFF
3187
3188 !! black
3189 !*color0: #2E3436
3190 !*color8: #555753
3191 !! red
3192 !*color1: #a40000
3193 !*color9: #EF2929
3194 !! green
3195 !*color2: #4E9A06
3196 !*color10: #8AE234
3197 !! yellow
3198 !*color3: #C4A000
3199 !*color11: #FCE94F
3200 !! blue
3201 !*color4: #3465A4
3202 !*color12: #729FCF
3203 !! purple
3204 !*color5: #75507B
3205 !*color13: #AD7FA8
3206 !! orange (replaces cyan)
3207 !*color6: #ce5c00
3208 !*color14: #fcaf3e
3209 !! white
3210 !*color7: #babdb9
3211 !*color15: #EEEEEC
3212
3213
3214 ! ! Solarized
3215 ! ! Base16 Solarized Light
3216 ! ! Scheme: Ethan Schoonover (http://ethanschoonover.com/solarized)
3217
3218 ! #define base00 #fdf6e3
3219 ! #define base01 #eee8d5
3220 ! #define base02 #93a1a1
3221 ! #define base03 #839496
3222 ! #define base04 #657b83
3223 ! #define base05 #586e75
3224 ! #define base06 #073642
3225 ! #define base07 #002b36
3226 ! #define base08 #dc322f
3227 ! #define base09 #cb4b16
3228 ! #define base0A #b58900
3229 ! #define base0B #859900
3230 ! #define base0C #2aa198
3231 ! #define base0D #268bd2
3232 ! #define base0E #6c71c4
3233 ! #define base0F #d33682
3234
3235 ! *foreground: base05
3236 ! #ifdef background_opacity
3237 ! *background: [background_opacity]base00
3238 ! #else
3239 ! *background: base00
3240 ! #endif
3241 ! *cursorColor: base05
3242
3243 ! *color0: base00
3244 ! *color1: base08
3245 ! *color2: base0B
3246 ! *color3: base0A
3247 ! *color4: base0D
3248 ! *color5: base0E
3249 ! *color6: base0C
3250 ! *color7: base05
3251
3252 ! *color8: base03
3253 ! *color9: base08
3254 ! *color10: base0B
3255 ! *color11: base0A
3256 ! *color12: base0D
3257 ! *color13: base0E
3258 ! *color14: base0C
3259 ! *color15: base07
3260
3261 ! ! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
3262 ! ! use 'shell' template to set these if necessary
3263 ! *color16: base09
3264 ! *color17: base0F
3265 ! *color18: base01
3266 ! *color19: base02
3267 ! *color20: base04
3268 ! *color21: base06
3269
3270
3271 ! Tango colour theme for rxvt-unicode
3272 URxvt.background: #FFFFFF
3273 URxvt.foreground: #000000
3274
3275 ! Black
3276 URxvt.color0: #2E3436
3277 URxvt.color8: #757773
3278
3279 ! Red
3280 URxvt.color1: #CC0000
3281 URxvt.color9: #EF2929
3282
3283 ! Green
3284 URxvt.color2: #4E9A06
3285 URxvt.color10: #8AE234
3286
3287 ! Yellow
3288 URxvt.color3: #C4A000
3289 URxvt.color11: #FCE94F
3290
3291 ! Blue
3292 URxvt.color4: #3465A4
3293 URxvt.color12: #729FCF
3294
3295 ! Magenta
3296 URxvt.color5: #75507B
3297 URxvt.color13: #AD7FA8
3298
3299 !! Cyan
3300 !URxvt.color6: #06989A
3301 !URxvt.color14: #34E2E2
3302 ! orange (replaces cyan)
3303 ,,*color6: #ce5c00
3304 ,,*color14: #fcaf3e
3305
3306 ! White
3307 URxvt.color7: #D3D7CF
3308 URxvt.color15: #EEEEEC
3309 #+end_src
3310
3311 *** ~/.xsession
3312 :PROPERTIES:
3313 :header-args+: :tangle ~/.xsession :tangle-mode (identity #o755)
3314 :END:
3315
3316 For custom session on Debian. See https://wiki.debian.org/Xsession.
3317
3318 #+begin_src sh
3319 if [ -f "$HOME/.xinitrc" ]; then
3320 . "$HOME/.xinitrc"
3321 fi
3322
3323 [ -f "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" ] && /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd &
3324 [ -x "$(command -v light-locker)" ] && light-locker --lock-on-suspend &
3325 [ -x "$(command -v pasystray)" ] && pasystray -a &
3326 [ -x "$(command -v nm-applet)" ] && nm-applet &
3327 [ -x "$(command -v compton)" ] && compton &
3328 [ -x "$(command -v dunst)" ] && dunst &
3329 [ -x "$(command -v emacs)" ] && exec ssh-agent exwm -ib 0
3330 #+end_src
3331
3332 *** ~/.xsessionrc
3333 :PROPERTIES:
3334 :header-args+: :tangle ~/.xsessionrc
3335 :END:
3336
3337 #+begin_src sh
3338 if [ -f "$HOME/.profile" ]; then . "$HOME/.profile"; fi
3339 #+end_src
3340
3341 ** XDG
3342 :PROPERTIES:
3343 :header-args+: :tangle ~/.config/user-dirs.dirs
3344 :END:
3345
3346 #+begin_src conf
3347 XDG_DESKTOP_DIR="$HOME/Desktop"
3348 XDG_DOCUMENTS_DIR="$HOME/usr/doc"
3349 XDG_DOWNLOAD_DIR="$HOME/usr/dl"
3350 XDG_MUSIC_DIR="$HOME/usr/music"
3351 XDG_PICTURES_DIR="$HOME/usr/pic"
3352 XDG_PUBLICSHARE_DIR="$HOME/usr/pub"
3353 XDG_TEMPLATES_DIR="$HOME/usr/temp"
3354 XDG_VIDEOS_DIR="$HOME/usr/vid"
3355 #+end_src
3356
3357 ** zathura
3358 :PROPERTIES:
3359 :header-args+: :tangle ~/.config/zathura/zathurarc
3360 :END:
3361
3362 #+begin_src conf
3363 set smooth-scroll true
3364 set selection-clipboard clipboard
3365 set zoom-step 05
3366 set default-bg "#272727"
3367 set statusbar-bg "#272727"
3368 set inputbar-bg "#373737"
3369 set window-title-basename true
3370 set statusbar-home-tilde true
3371
3372 map <Return> scroll down
3373 map <A-Return> scroll up
3374
3375 map H jumplist backward
3376 map L jumplist forward
3377
3378 map [normal] i toggle_index
3379 map [index] i toggle_index
3380 map [index] q toggle_index
3381 #+end_src