2 #+property: header-args :comments no :mkdirp yes :results silent
6 This org file contains the configuration files of pretty much every
7 program I use. The files are tangled (i.e. exported, or derived) from
8 this file using =org-babel=.
10 Note: This file is best viewed inside Emacs with org mode.
14 This section contains the configuration files (dotfiles) of various
15 programs I use besides GNU Emacs.
19 :header-args+: :tangle ~/.config/fontconfig/fonts.conf
24 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
27 <edit mode="assign" name="rgba">
32 <edit mode="assign" name="hinting">
37 <edit mode="assign" name="hintstyle">
38 <const>hintslight</const>
42 <edit mode="assign" name="antialias">
47 <edit mode="assign" name="lcdfilter">
48 <const>lcddefault</const>
53 <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) -->
54 <alias binding="same">
55 <family>Helvetica</family>
57 <family>Liberation Sans</family>
65 :header-args+: :tangle ~/.config/getmail/getmailrc
70 type = SimplePOP3SSLRetriever
71 server = fencepost.gnu.org
73 password_command = ("gpg", "--no-tty", "-q", "-d", "/home/bandali/.passwd/gnu.gpg")
79 path = ~/mail/gnu.local/bandali/mail/
83 # path = /usr/lib/dovecot/deliver
84 # arguments = ('-e', '-f', '%(sender)', '-d', 'bandali@gnu.local')
98 :header-args+: :tangle ~/.config/git/config
104 email = bandali@gnu.org
105 signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
114 autocrlf = input # CRLF -> LF on commit
115 editor = emacsclient -t
119 file = ~/.config/git/mailmap
122 git = !exec git # handle nested git calls, e.g. git git status
123 aliases = config --get-regexp '^alias\\.'
135 nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
136 nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
146 remote = magenta bold
152 # # showUntrackedFiles = all
161 smtpserver = fencepost.gnu.org
172 :header-args+: :tangle ~/.config/git/ignore
188 :header-args+: :tangle ~/.config/git/mailmap
192 <bandali@gnu.org> <mab@gnu.org>
193 <bandali@gnu.org> <amin@gnu.org>
194 <bandali@gnu.org> <aminb@gnu.org>
195 <bandali@gnu.org> <amin@aminb.org>
196 <bandali@gnu.org> <me@aminb.org>
201 :header-args+: :tangle ~/.gnupg/gpg-agent.conf
205 default-cache-ttl 43200
208 default-cache-ttl-ssh 43200
209 max-cache-ttl-ssh 86400
211 pinentry-program /home/bandali/.guix-profile/bin/pinentry-emacs
213 allow-loopback-pinentry
220 :header-args+: :tangle ~/.gtkrc-2.0
224 gtk-theme-name="Xfce"
225 # gtk-icon-theme-name="elementary Xfce darker"
226 gtk-font-name="Roboto 10"
227 # gtk-font-name="Source Code Variable 10"
229 # gtk-key-theme-name = "Emacs"
234 :header-args+: :tangle ~/.config/gtk-3.0/settings.ini
239 gtk-icon-theme-name = Adwaita
240 # gtk-theme-name = Adwaita
242 gtk-theme-name = Xfce
243 # gtk-theme-name = Arc-Darker
244 # gtk-theme-name = Numix-ArchBlue
246 gtk-font-name = Roboto 10
247 # gtk-font-name = Source Code Variable Medium 10
248 # gtk-key-theme-name = Emacs
255 :header-args+: :tangle ~/.config/guix/channels.scm
260 (name 'guix) ; https://git.savannah.gnu.org/git/guix.git
261 (url "file:///home/bandali/src/git/guix"))
263 (name 'guix-bandali) ; https://git.sr.ht/~bandali/guix-bandali
264 (url "file:///home/bandali/src/git/guix-bandali")))
267 *** Profile manifests
269 To install/update the packages of the default profile, use
271 guix package -m $MY_GUIX_MANIFESTS/main.scm
273 and for other profiles, use
275 guix package -m $MY_GUIX_MANIFESTS/name.scm -p $MY_GUIX_PROFILES/name/name
277 where =name= is the name of the profile (e.g. =doc=, =media=, ...).
281 :header-args+: :tangle ~/.config/guix/manifest/doc.scm
285 (specifications->manifest
289 "texlive-latex-listings"
290 ;; "texlive-palatino"
297 :header-args+: :tangle ~/.config/guix/manifest/main.scm
301 (specifications->manifest
326 "emacs-erc-scrolltoplace"
328 "emacs-exec-path-from-shell"
329 "emacs-expand-region"
334 ;; "emacs-gnus-harvest"
342 ;; "emacs-multi-term"
343 "emacs-multiple-cursors"
346 ;; "emacs-next-delight"
352 "emacs-page-break-lines"
356 "emacs-shrink-path-git"
357 "emacs-smart-mode-line"
359 "emacs-unkillable-scratch"
365 "font-adobe-source-code-pro"
366 "font-gnu-freefont-ttf"
369 "font-linuxlibertine"
383 "hunspell-dict-en-ca"
384 "hunspell-dict-en-us"
397 "poppler" ; for 'pdffonts'
419 :header-args+: :tangle ~/.config/guix/manifest/media.scm
423 (specifications->manifest
433 :header-args+: :tangle ~/.config/guix/manifest/web.scm
437 (specifications->manifest
446 :header-args+: :tangle ~/.config/guix/system/chaman.scm
451 (gnu packages certs) ; for nss-certs
452 (gnu packages emacs-xyz) ; for exwm
453 (gnu packages linux)) ; for powertop
454 (use-service-modules admin desktop mail networking pm ssh xorg)
458 (locale "en_CA.utf8")
459 (timezone "Canada/Eastern")
461 (keyboard-layout "us" "basic"))
463 (bootloader-configuration
464 (bootloader grub-bootloader)
466 (keyboard-layout keyboard-layout)))
470 (uuid "283da85e-2c84-47e6-a8ca-20f4e8efb806"))
472 (type luks-device-mapping))
475 (uuid "017ddebc-c2c3-4a0a-bda4-d47ec0bc67f0"))
477 (type luks-device-mapping))))
481 (device "/dev/mapper/groot")
483 (dependencies mapped-devices))
485 (mount-point "/data")
486 (device "/dev/mapper/data")
488 (dependencies mapped-devices))
494 (home-directory "/home/bandali")
495 (supplementary-groups
496 '("wheel" "netdev" "audio" "video")))
497 %base-user-accounts))
504 (service xfce-desktop-service-type)
505 (set-xorg-configuration
507 (keyboard-layout keyboard-layout)))
510 (dovecot-configuration
511 ;; (log-path "/dev/stderr")
512 (protocols (list (protocol-configuration
515 (listen '("127.0.0.1"))
516 (disable-plaintext-auth? #f)
517 (auth-mechanisms '("plain"))
518 (postmaster-address "bandali@gnu.local")
519 (mail-location "maildir:/home/bandali/mail/%d/%n/mail")
520 (userdbs (list (userdb-configuration
522 (args (list "uid=bandali" "gid=users" "home=/home/bandali/mail/%d/%n")))))
523 (passdbs (list (passdb-configuration
524 (driver "passwd-file")
525 (args (list "/data/dovecot-passwd")))))))
526 (service rottlog-service-type)
527 (service thermald-service-type)
528 (service tlp-service-type
530 (cpu-boost-on-ac? #t)
531 (sound-power-save-on-bat 0)
532 (sound-power-save-controller? #f)
533 ;; (usb-blacklist "0e8f:00a8") ;for some reason doesn't seem to work
534 (usb-autosuspend? #f)))
535 (simple-service 'my-powertop-auto-tune activation-service-type
536 #~(zero? (system* #$(file-append powertop "/sbin/powertop")
538 (simple-service 'light-udev-rules udev-service-type (list light))
544 :header-args+: :tangle ~/.config/isync/mbsyncrc
555 Host mail.shemshak.org
556 User bandali@shemshak.org
557 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak.gpg"
560 IMAPStore shemshak-remote
563 IMAPAccount shemshak-local
566 User bandali@shemshak.local
567 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/shemshak-local.gpg"
570 IMAPStore shemshak-local
571 Account shemshak-local
574 Master :shemshak-remote:
575 Slave :shemshak-local:
580 Host mail.shemshak.org
582 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub.gpg"
585 IMAPStore gnub-remote
588 IMAPAccount gnub-local
591 User bandali@gnu.local
592 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/gnub-local.gpg"
604 IMAPAccount uwaterloo
605 Host connect.uwaterloo.ca
607 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
610 IMAPStore uwaterloo-remote
613 IMAPAccount uwaterloo-local
616 User abandali@uwaterloo.local
617 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-local.gpg"
620 IMAPStore uwaterloo-local
621 Account uwaterloo-local
624 Master :uwaterloo-remote:
625 Slave :uwaterloo-local:
630 Host mail.csclub.uwaterloo.ca
632 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub.gpg"
635 IMAPStore csclub-remote
638 IMAPAccount csclub-local
641 User abandali@csclub.uwaterloo.local
642 PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/csclub-local.gpg"
645 IMAPStore csclub-local
649 Master :csclub-remote:
656 :header-args+: :tangle ~/.config/latexmk/latexmkrc
660 $pdf_previewer = "start zathura %O %S";
661 $clean_ext = "aux out";
663 # $pdf_update_method = 4;
664 # $pdf_update_command = "zathura %O %S";
666 # Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
667 # by Ctrl+click in the PDF.
668 # Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
670 # $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
675 :header-args+: :tangle ~/.config/mpd/mpd.conf
679 # An example configuration file for MPD.
680 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
683 # Files and directories #######################################################
685 # This setting controls the top directory which MPD will search to discover the
686 # available audio files and add them to the daemon's online database. This
687 # setting defaults to the XDG directory, otherwise the music directory will be
688 # be disabled and audio files will only be accepted over ipc socket (using
689 # file:// protocol) or streaming files over an accepted protocol.
691 music_directory "~/usr/music"
693 # This setting sets the MPD internal playlist directory. The purpose of this
694 # directory is storage for playlists created by MPD. The server will use
695 # playlist files not created by the server but only if they are in the MPD
696 # format. This setting defaults to playlist saving being disabled.
698 playlist_directory "~/.mpd/playlists"
700 # This setting sets the location of the MPD database. This file is used to
701 # load the database at server start up and store the database while the
702 # server is not up. This setting defaults to disabled which will allow
703 # MPD to accept files over ipc socket (using file:// protocol) or streaming
704 # files over an accepted protocol.
706 db_file "~/.mpd/database"
708 # These settings are the locations for the daemon log files for the daemon.
709 # These logs are great for troubleshooting, depending on your log_level
712 # The special value "syslog" makes MPD use the local syslog daemon. This
713 # setting defaults to logging to syslog, otherwise logging is disabled.
715 log_file "~/.mpd/log"
717 # This setting sets the location of the file which stores the process ID
718 # for use of mpd --kill and some init scripts. This setting is disabled by
719 # default and the pid file will not be stored.
721 pid_file "~/.mpd/pid"
723 # This setting sets the location of the file which contains information about
724 # most variables to get MPD back into the same general shape it was in before
725 # it was brought down. This setting is disabled by default and the server
726 # state will be reset on server start up.
728 state_file "~/.mpd/state"
730 # The location of the sticker database. This is a database which
731 # manages dynamic information attached to songs.
733 sticker_file "~/.mpd/sticker.sql"
735 ###############################################################################
738 # General music daemon options ################################################
740 # This setting specifies the user that MPD will run as. MPD should never run as
741 # root and you may use this setting to make MPD change its user ID after
742 # initialization. This setting is disabled by default and MPD is run as the
747 # This setting specifies the group that MPD will run as. If not specified
748 # primary group of user specified with "user" setting will be used (if set).
749 # This is useful if MPD needs to be a member of group such as "audio" to
750 # have permission to use sound card.
754 # This setting sets the address for the daemon to listen on. Careful attention
755 # should be paid if this is assigned to anything other then the default, any.
756 # This setting can deny access to control of the daemon. Not effective if
757 # systemd socket activiation is in use.
760 #bind_to_address "any"
762 # And for Unix Socket
763 #bind_to_address "~/.mpd/socket"
765 # This setting is the TCP port that is desired for the daemon to get assigned
770 # This setting controls the type of information which is logged. Available
771 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
772 # argument is recommended for troubleshooting, though can quickly stretch
773 # available resources on limited hardware storage.
777 # If you have a problem with your MP3s ending abruptly it is recommended that
778 # you set this argument to "no" to attempt to fix the problem. If this solves
779 # the problem, it is highly recommended to fix the MP3 files with vbrfix
780 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
781 # point gapless MP3 playback can be enabled.
783 #gapless_mp3_playback "yes"
785 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
786 # of starting playback after startup.
790 # This setting enables MPD to create playlists in a format usable by other
793 #save_absolute_paths_in_playlists "no"
795 # This setting defines a list of tag types that will be extracted during the
796 # audio file discovery process. The complete list of possible values can be
797 # found in the user manual.
798 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
800 # This setting enables automatic update of MPD's database when files in
801 # music_directory are changed.
805 # Limit the depth of the directories being watched, 0 means only watch
806 # the music directory itself. There is no limit by default.
808 #auto_update_depth "3"
810 ###############################################################################
813 # Symbolic link behavior ######################################################
815 # If this setting is set to "yes", MPD will discover audio files by following
816 # symbolic links outside of the configured music_directory.
818 #follow_outside_symlinks "yes"
820 # If this setting is set to "yes", MPD will discover audio files by following
821 # symbolic links inside of the configured music_directory.
823 #follow_inside_symlinks "yes"
825 ###############################################################################
828 # Zeroconf / Avahi Service Discovery ##########################################
830 # If this setting is set to "yes", service information will be published with
833 #zeroconf_enabled "yes"
835 # The argument to this setting will be the Zeroconf / Avahi unique name for
836 # this MPD server on the network.
838 #zeroconf_name "Music Player"
840 ###############################################################################
843 # Permissions #################################################################
845 # If this setting is set, MPD will require password authorization. The password
846 # setting can be specified multiple times for different password profiles.
848 #password "password@read,add,control,admin"
850 # This setting specifies the permissions a user has who has not yet logged in.
852 #default_permissions "read,add,control,admin"
854 ###############################################################################
857 # Database #######################################################################
862 # host "other.mpd.host"
866 # Input #######################################################################
871 # proxy "proxy.isp.com:8080"
873 # proxy_password "password"
877 ###############################################################################
879 # Audio Output ################################################################
894 # MPD supports various audio output types, as well as playing through multiple
895 # audio outputs at the same time, through multiple audio_output settings
896 # blocks. Setting this block is optional, though the server will only attempt
897 # autodetection for one sound card.
899 # An example of an ALSA output:
903 # name "My ALSA Device"
904 ## device "hw:0,0" # optional
905 ## mixer_type "hardware" # optional
906 ## mixer_device "default" # optional
907 ## mixer_control "PCM" # optional
908 ## mixer_index "0" # optional
911 # An example of an OSS output:
915 # name "My OSS Device"
916 ## device "/dev/dsp" # optional
917 ## mixer_type "hardware" # optional
918 ## mixer_device "/dev/mixer" # optional
919 ## mixer_control "PCM" # optional
922 # An example of a shout output (for streaming to Icecast):
926 # encoder "vorbis" # optional
927 # name "My Shout Stream"
934 # format "44100:16:1"
935 ## protocol "icecast2" # optional
936 ## user "source" # optional
937 ## description "My Stream Description" # optional
938 ## url "http://example.com" # optional
939 ## genre "jazz" # optional
940 ## public "no" # optional
941 ## timeout "2" # optional
942 ## mixer_type "software" # optional
945 # An example of a recorder output:
950 # encoder "vorbis" # optional, vorbis or lame
951 # path "/var/lib/mpd/recorder/mpd.ogg"
952 ## quality "5.0" # do not define if bitrate is defined
953 # bitrate "128" # do not define if quality is defined
954 # format "44100:16:1"
957 # An example of a httpd output (built-in HTTP streaming server):
961 # name "My HTTP Stream"
962 # encoder "vorbis" # optional, vorbis or lame
964 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
965 ## quality "5.0" # do not define if bitrate is defined
966 # bitrate "128" # do not define if quality is defined
967 # format "44100:16:1"
968 # max_clients "0" # optional 0=no limit
971 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
975 # name "My Pulse Output"
976 ## server "remote_server" # optional
977 ## sink "remote_server_sink" # optional
980 # An example of a winmm output (Windows multimedia API).
984 # name "My WinMM output"
985 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
987 ## device "0" # optional
988 ## mixer_type "hardware" # optional
991 # An example of an openal output.
995 # name "My OpenAL output"
996 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
999 # An example of an sndio output.
1003 # name "sndio output"
1004 # mixer_type "software"
1007 # An example of an OS X output:
1011 # name "My OS X Device"
1012 ## device "Built-in Output" # optional
1013 ## channel_map "-1,-1,0,1" # optional
1016 ## Example "pipe" output:
1021 # command "aplay -f cd 2>/dev/null"
1022 ## Or if you're want to use AudioCompress
1023 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
1024 ## Or to send raw PCM stream through PCM:
1025 # command "nc example.org 8765"
1026 # format "44100:16:2"
1029 ## An example of a null output (for no audio output):
1033 # name "My Null Output"
1034 # mixer_type "none" # optional
1037 ###############################################################################
1040 # Normalization automatic volume adjustments ##################################
1042 # This setting specifies the type of ReplayGain to use. This setting can have
1043 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
1044 # chooses between "track" and "album" depending on the current state of
1045 # random playback. If random playback is enabled then "track" mode is used.
1046 # See <http://www.replaygain.org> for more details about ReplayGain.
1047 # This setting is off by default.
1051 # This setting sets the pre-amp used for files that have ReplayGain tags. By
1052 # default this setting is disabled.
1054 #replaygain_preamp "0"
1056 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1057 # By default this setting is disabled.
1059 #replaygain_missing_preamp "0"
1061 # This setting enables or disables ReplayGain limiting.
1062 # MPD calculates actual amplification based on the ReplayGain tags
1063 # and replaygain_preamp / replaygain_missing_preamp setting.
1064 # If replaygain_limit is enabled MPD will never amplify audio signal
1065 # above its original level. If replaygain_limit is disabled such amplification
1066 # might occur. By default this setting is enabled.
1068 #replaygain_limit "yes"
1070 # This setting enables on-the-fly normalization volume adjustment. This will
1071 # result in the volume of all playing audio to be adjusted so the output has
1072 # equal "loudness". This setting is disabled by default.
1074 #volume_normalization "no"
1076 ###############################################################################
1078 # Character Encoding ##########################################################
1080 # If file or directory names do not display correctly for your locale then you
1081 # may need to modify this setting.
1083 #filesystem_charset "UTF-8"
1085 ###############################################################################
1090 :header-args+: :tangle ~/.config/msmtp/config
1094 # Set default values for all following accounts.
1099 #tls_trust_file /etc/ssl/certs/ca-certificates.crt
1100 logfile ~/.msmtp.log
1103 host mail.shemshak.org
1104 # use `msmtp -a shemshak --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1105 tls_fingerprint A9:B8:79:CE:47:F7:E8:EB:7B:0D:C5:3E:1E:35:72:A0:03:E3:A2:1A:A9:1C:24:34:6E:F9:9E:78:89:67:11:E3
1107 from amin@shemshak.org
1108 user bandali@shemshak.org
1109 passwordeval gpg --no-tty -q -d ~/.passwd/shemshak.gpg
1111 account bandali : shemshak
1112 from bandali@shemshak.org
1113 account aminb : shemshak
1115 account bndl : shemshak
1119 host fencepost.gnu.org
1120 # use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1121 tls_fingerprint 36:A7:33:D0:57:25:BB:D8:A8:21:7B:A3:91:05:A9:4F:43:4E:87:AE:65:4B:0D:A4:A0:9A:08:89:AE:1F:A5:D7
1123 from bandali@gnu.org
1125 passwordeval gpg --no-tty -q -d ~/.passwd/gnu.gpg
1127 account gnu-mab : gnu
1129 account gnu-aminb : gnu
1131 account gnu-amin : gnu
1135 host connect.uwaterloo.ca
1137 from abandali@uwaterloo.ca
1139 passwordeval gpg --no-tty -q -d ~/.passwd/uwaterloo.gpg
1140 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1142 account uwaterloo-friendly : uwaterloo
1143 from bandali@uwaterloo.ca
1146 host mail.csclub.uwaterloo.ca
1148 from abandali@csclub.uwaterloo.ca
1150 passwordeval gpg --no-tty -q -d ~/.passwd/csclub.gpg
1151 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1153 account csclub-friendly : csclub
1154 from bandali@csclub.uwaterloo.ca
1157 host mail.savoirfairelinux.com
1159 from amin.bandali@savoirfairelinux.com
1161 passwordeval gpg --no-tty -q -d ~/.passwd/sfl.gpg
1162 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1164 # Set a default account
1165 account default : shemshak
1170 :header-args+: :tangle ~/.config/readline/inputrc
1174 set enable-bracketed-paste on
1176 set colored-stats on
1177 set colored-completion-prefix on
1178 set completion-ignore-case on
1179 set menu-complete-display-prefix on
1180 set page-completions off
1181 set show-all-if-ambiguous on
1182 set show-all-if-unmodified on
1183 set visible-stats on
1186 "\e[Z": menu-complete-backward
1188 "\e[A": history-search-backward
1189 "\e[B": history-search-forward
1194 :header-args+: :tangle ~/.config/rofi/config
1198 ! rofi.font: Ubuntu Mono 13
1199 ! rofi.font: Inconsolata 16
1200 ! rofi.font: Iosevka 13
1201 ! rofi.font: Source Code Pro 11
1202 rofi.font: Source Code Pro 10.5
1203 rofi.modi: run,window
1211 rofi.theme: ~/.guix-profile/share/rofi/themes/gruvbox-light-hard.rasi
1216 :header-args+: :tangle ~/.config/rofi-pass/config
1220 # permanently set alternative root dir
1221 # root=/path/to/root
1223 # rofi command. Make sure to have "$@" as last argument
1225 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
1226 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
1229 # xdotool needs the keyboard layout to be set using setxkbmap
1230 # You can do this in your autostart scripts (e.g. xinitrc)
1232 # If for some reason, you cannot do this, you can set the command here.
1233 # and set fix_layout to true
1242 USERNAME_field='user'
1243 AUTOTYPE_field='autotype'
1245 # delay to be used for :delay keyword
1248 ## Programs to be used
1257 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
1260 default_autotype='user :tab pass'
1262 # color of the help messages
1263 # leave empty for autodetection
1264 help_color="#4872FF"
1266 # Clipboard settings
1267 # Possible options: primary, clipboard, both
1270 # Options for generating new password entries
1271 # default_user is also used for password files that have no user field.
1273 default_user2=bandali
1276 # Custom Keybindings
1298 :header-args+: :tangle ~/.config/screen/screenrc
1303 caption always "%{= kc}GNU Screen $USER@%H (load: %l)%-28=%{= .m}%D %d.%m.%Y %0c"
1310 :header-args+: :tangle ~/.bashrc
1314 # Bash initialization for interactive non-login shells and
1315 # for remote shells (info "(bash) Bash Startup Files").
1317 # Export 'SHELL' to child processes. Programs such as 'screen'
1318 # honor it and otherwise use /bin/sh.
1323 # We are being invoked from a non-interactive shell. If this
1324 # is an SSH session (as in "ssh host command"), source
1325 # /etc/profile so we get PATH and other essential variables.
1326 [[ -n "$SSH_CLIENT" ]] && source /etc/profile
1328 # Don't do anything else.
1332 if [ -n "$IS_GUIX_SYSTEM" ]; then
1333 # Source the system-wide file.
1337 # from https://unix.stackexchange.com/a/55935
1339 cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
1343 if [ $(id -u) == "0" ]; then
1344 PS1='`printf "\[\e[1;31m\]\$\[\e[00m\]"` '
1348 PS1="\u@\h:\w/`[ -n "$GUIX_ENVIRONMENT" ] && printf \" [env]\"`\n$PS1"
1350 # set terminal title
1351 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: $(b_prompt)\007"'
1354 # echo -e "\033[5 q" # blinking
1355 echo -e "\033[6 q" # non-blinking
1357 # various bash tweaks
1358 # append to the history file, don't overwrite it
1361 # check the window size after each command and, if necessary,
1362 # update the values of LINES and COLUMNS.
1363 shopt -s checkwinsize
1364 # If set, the pattern "**" used in a pathname expansion context will
1365 # match all files and zero or more directories and subdirectories.
1367 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
1370 # don't put duplicate lines or lines starting with space in the
1372 HISTCONTROL=ignoreboth
1373 # ignore a few very common commands and don't add them to history
1374 HISTIGNORE='ls:l:s:g:[bf]g:history'
1375 HISTTIMEFORMAT='%F %T '
1379 alias ls='ls -p --color=auto'
1380 alias l='ls -lh' # long format and human-readable sizes
1381 alias ll='l -A' # long format, all files
1382 alias dir='dir --color=auto'
1383 alias vdir='vdir --color=auto'
1384 alias grep='grep --color=auto'
1385 alias fgrep='fgrep --color=auto'
1386 alias egrep='egrep --color=auto'
1387 alias mpv="mpv --ytdl-format mp4"
1390 alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
1391 alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
1392 alias m="mbsync csclub; mbsync uwaterloo; mbsync shemshak; mbsync gnub"
1393 alias best="youtube-dl -f best"
1395 alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
1399 [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
1404 cd $(mktemp -d /tmp/$1.XXXX)
1407 # separate alias definitions file, if exists
1408 if [ -f ~/.bash_aliases ]; then
1412 # enable programmable completion features (not needed if already
1413 # enabled in /etc/bash.bashrc and if /etc/profile sources
1414 # /etc/bash.bashrc).
1415 if ! shopt -oq posix; then
1416 if [ -f /usr/share/bash-completion/bash_completion ]; then
1417 . /usr/share/bash-completion/bash_completion
1418 elif [ -f /etc/bash_completion ]; then
1419 . /etc/bash_completion
1423 # source Guix shell config dirs, for vte.sh and bash completions
1424 GUIX_PROFILES=("${HOME}/.guix-profile"
1425 "${HOME}/.config/guix/current")
1426 for profile in "${GUIX_PROFILES[@]}"; do
1427 for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
1428 if [ -d "${dir}" ]; then
1429 for f in "${dir}"/*; do
1439 :header-args+: :tangle ~/.profile
1443 # ~/.profile: executed by the command interpreter for login shells.
1444 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
1447 # source host-specific profile
1448 if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
1449 . "$HOME/.config/profiles/$(hostname)"
1452 export EDITOR="emacsclient -nw"
1453 export VISUAL="emcl"
1455 PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
1456 if [ -z "$IS_GUIX_SYSTEM" ]; then
1457 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
1458 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
1459 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
1464 export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
1465 export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
1467 export XDG_CONFIG_HOME="$HOME/.config"
1468 export XDG_DATA_HOME="$HOME/.local/share"
1470 if [ -f "$HOME/.config/user-dirs.dirs" ]; then
1472 . "$HOME/.config/user-dirs.dirs"
1476 export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
1477 export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
1479 export MAILDIR="$HOME/mail"
1480 export CVS_RSH="ssh"
1482 if [ -x "$(command -v go)" ]; then
1483 export GOPATH="$HOME/src/go"
1484 export PATH="$GOPATH/bin:$PATH"
1488 if [ -n "$BASH_VERSION" ]; then
1489 # include .bashrc if it exists
1490 if [ -f "$HOME/.bashrc" ]; then
1495 if [ -z "$IS_GUIX_SYSTEM" ]; then
1496 # if guix is installed
1497 if [ -x "$(command -v guix)" ]; then
1498 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
1499 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
1501 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
1503 printf "it seems you forgot to \`guix install nss-certs\'\n"
1505 GUIX_PROFILE="$HOME/.guix-profile"
1506 . "$GUIX_PROFILE/etc/profile"
1511 for p in $MY_GUIX_PROFILES/*; do
1512 profile=$p/$(basename "$p")
1513 if [ -f "$profile"/etc/profile ]; then
1514 GUIX_PROFILE="$profile"
1515 . "$GUIX_PROFILE"/etc/profile
1520 export PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
1522 # start an ssh-agent (with guix's openssh)
1523 if [ -z "$IS_GUIX_SYSTEM" ]; then
1524 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
1525 ssh-agent > ~/.ssh-agent-thing
1527 if [[ ! "$SSH_AUTH_SOCK" ]]; then
1528 eval "$(<~/.ssh-agent-thing)"
1532 # footenote: when on a foreign distro and using Xfce, don't forget to
1533 # disable its auto-start of gpg- and ssh-agent, by issuing
1534 # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
1535 # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
1536 # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
1537 # also, MATE does something similar with gnome-keyring-daemon:
1538 # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop
1540 export PATH="$HOME/.cargo/bin:$PATH"
1543 *** per-host profiles
1545 Host-specific profiles, sourced from =~/.profile=. Each
1546 =~/.config/profiles/HOST= file will be sourced on the machine with
1547 =hostname= of =HOST=.
1551 :header-args+: :tangle ~/.config/profiles/chaman
1555 export IS_GUIX_SYSTEM=true
1557 if [ -x "$(command -v xinput)" ]; then
1558 xinput --set-prop "TPPS/2 IBM TrackPoint" 'libinput Accel Speed' -0.4
1563 -option ctrl:nocaps \
1564 -option grp:shifts_toggle
1566 xmodmap -e "keysym Menu = Super_R"
1568 xsetroot -cursor_name left_ptr
1575 :header-args+: :tangle ~/.config/profiles/darrud
1579 export INFOPATH="$HOME/usr/local/share/info${INFOPATH:+:}$INFOPATH"
1584 :header-args+: :tangle ~/.config/profiles/langa
1588 export XDG_DATA_DIRS="/usr/share/mate:/usr/local/share/:/usr/share/"
1593 :header-args+: :tangle ~/.config/redshift.conf :comments none
1597 ; Global settings for redshift
1599 ; Set the day and night screen temperatures (Neutral is 6500K)
1610 ; Enable/Disable a smooth transition between day and night
1611 ; 0 will cause a direct change from day to night screen temperature.
1612 ; 1 will gradually increase or decrease the screen temperature.
1615 ; Set the screen brightness. Default is 1.0.
1617 ; It is also possible to use different settings for day and night
1618 ; since version 1.8.
1620 ;brightness-night=0.4
1621 ; Set the screen gamma (for all colors, or each color channel
1626 ; This can also be set individually for day and night since
1628 ;gamma-day=0.8:0.7:0.8
1631 ; Set the location-provider: 'geoclue2' or 'manual'
1632 ; type 'redshift -l list' to see possible values.
1633 ; The location provider settings are in a different section.
1634 ;location-provider=manual
1635 location-provider=geoclue2
1637 ; Set the adjustment-method: 'randr', 'vidmode'
1638 ; type 'redshift -m list' to see all possible values.
1639 ; 'randr' is the preferred method, 'vidmode' is an older API.
1640 ; but works in some cases when 'randr' does not.
1641 ; The adjustment method settings are in a different section.
1642 adjustment-method=randr
1644 ; Configuration of the location-provider:
1645 ; type 'redshift -l PROVIDER:help' to see the settings.
1646 ; ex: 'redshift -l manual:help'
1647 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
1648 ; are negative numbers.
1653 ; Configuration of the adjustment-method
1654 ; type 'redshift -m METHOD:help' to see the settings.
1655 ; ex: 'redshift -m randr:help'
1656 ; In this example, randr is configured to adjust screen 1.
1657 ; Note that the numbering starts from 0, so this is actually the
1658 ; second screen. If this option is not specified, Redshift will try
1659 ; to adjust _all_ screens.
1666 :header-args+: :tangle ~/.signature
1673 Free Software activist | GNU maintainer & webmaster
1674 GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
1679 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
1681 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
1690 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "darrud")) "/sudo::/etc/default/tlp")
1691 # ------------------------------------------------------------------------------
1692 # tlp - Parameters for power saving
1693 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
1695 # Hint: some features are disabled by default, remove the leading # to enable
1698 # Set to 0 to disable, 1 to enable TLP.
1701 # Operation mode when no power supply can be detected: AC, BAT.
1702 # Concerns some desktop and embedded hardware only.
1705 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
1706 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
1707 TLP_PERSISTENT_DEFAULT=0
1709 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
1710 # Non-zero value enables, zero disables laptop mode.
1711 DISK_IDLE_SECS_ON_AC=0
1712 DISK_IDLE_SECS_ON_BAT=2
1714 # Dirty page values (timeouts in secs).
1715 MAX_LOST_WORK_SECS_ON_AC=15
1716 MAX_LOST_WORK_SECS_ON_BAT=60
1718 # Hint: CPU parameters below are disabled by default, remove the leading #
1719 # to enable them, otherwise kernel default values are used.
1721 # Select a CPU frequency scaling governor.
1722 # Intel Core i processor with intel_pstate driver:
1723 # powersave(*), performance.
1724 # Older hardware with acpi-cpufreq driver:
1725 # ondemand(*), powersave, performance, conservative, schedutil.
1726 # (*) is recommended.
1727 # Hint: use tlp-stat -p to show the active driver and available governors.
1729 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
1730 # efficient for *almost all* workloads and therefore kernel and most
1731 # distributions have chosen them as defaults. If you still want to change,
1732 # you should know what you're doing! You *must* disable your distribution's
1733 # governor settings or conflicts will occur.
1734 #CPU_SCALING_GOVERNOR_ON_AC=powersave
1735 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
1736 CPU_SCALING_GOVERNOR_ON_AC=conservative
1737 CPU_SCALING_GOVERNOR_ON_BAT=conservative
1739 # Set the min/max frequency available for the scaling governor.
1740 # Possible values strongly depend on your CPU. For available frequencies see
1741 # the output of tlp-stat -p.
1742 #CPU_SCALING_MIN_FREQ_ON_AC=0
1743 #CPU_SCALING_MAX_FREQ_ON_AC=0
1744 #CPU_SCALING_MIN_FREQ_ON_BAT=0
1745 #CPU_SCALING_MAX_FREQ_ON_BAT=0
1747 # Set energy performance hints (HWP) for Intel P-state governor:
1748 # performance, balance_performance, default, balance_power, power
1749 # Values are given in order of increasing power saving.
1750 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
1751 CPU_HWP_ON_AC=balance_performance
1752 CPU_HWP_ON_BAT=balance_power
1754 # Set Intel P-state performance: 0..100 (%).
1755 # Limit the max/min P-state to control the power dissipation of the CPU.
1756 # Values are stated as a percentage of the available performance.
1757 # Requires an Intel Core i processor with intel_pstate driver.
1758 #CPU_MIN_PERF_ON_AC=0
1759 #CPU_MAX_PERF_ON_AC=100
1760 #CPU_MIN_PERF_ON_BAT=0
1761 #CPU_MAX_PERF_ON_BAT=30
1763 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
1764 # Requires an Intel Core i processor.
1766 # - This may conflict with your distribution's governor settings
1767 # - A value of 1 does *not* activate boosting, it just allows it
1771 # Minimize number of used CPU cores/hyper-threads under light load conditions:
1772 # 0=disable, 1=enable.
1773 SCHED_POWERSAVE_ON_AC=0
1774 SCHED_POWERSAVE_ON_BAT=1
1776 # Kernel NMI Watchdog:
1777 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
1780 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
1781 # Frequency voltage pairs are written to:
1782 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
1783 # CAUTION: only use this, if you thoroughly understand what you are doing!
1784 #PHC_CONTROLS="F:V F:V F:V F:V"
1786 # Set CPU performance versus energy savings policy:
1787 # performance, balance-performance, default, balance-power, power.
1788 # Values are given in order of increasing power saving.
1789 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
1790 ENERGY_PERF_POLICY_ON_AC=performance
1791 ENERGY_PERF_POLICY_ON_BAT=balance-power
1793 # Disk devices; separate multiple devices with spaces (default: sda).
1794 # Devices can be specified by disk ID also (lookup with: tlp diskid).
1795 DISK_DEVICES="sda sdb"
1797 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
1798 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
1799 # Separate values for multiple disks with spaces. Use the special value 'keep'
1800 # to keep the hardware default for the particular disk.
1801 DISK_APM_LEVEL_ON_AC="254 254"
1802 DISK_APM_LEVEL_ON_BAT="128 128"
1804 # Hard disk spin down timeout:
1805 # 0: spin down disabled
1806 # 1..240: timeouts from 5s to 20min (in units of 5s)
1807 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
1808 # See 'man hdparm' for details.
1809 # Separate values for multiple disks with spaces. Use the special value 'keep'
1810 # to keep the hardware default for the particular disk.
1811 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
1812 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
1814 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
1815 # Separate values for multiple disks with spaces. Use the special value 'keep'
1816 # to keep the kernel default scheduler for the particular disk.
1817 #DISK_IOSCHED="cfq cfq"
1819 # AHCI link power management (ALPM) for disk devices:
1820 # min_power, med_power_with_dipm(*), medium_power, max_performance.
1821 # (*) Kernel >= 4.15 required, then recommended.
1822 # Multiple values separated with spaces are tried sequentially until success.
1823 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
1824 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
1826 # Exclude host devices from AHCI link power management.
1827 # Separate multiple hosts with spaces.
1828 #SATA_LINKPWR_BLACKLIST="host1"
1830 # Runtime Power Management for AHCI host and disks devices:
1831 # on=disable, auto=enable.
1832 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
1833 #AHCI_RUNTIME_PM_ON_AC=on
1834 #AHCI_RUNTIME_PM_ON_BAT=on
1836 # Seconds of inactivity before disk is suspended.
1837 AHCI_RUNTIME_PM_TIMEOUT=15
1839 # PCI Express Active State Power Management (PCIe ASPM):
1840 # default, performance, powersave.
1841 PCIE_ASPM_ON_AC=performance
1842 PCIE_ASPM_ON_BAT=powersave
1844 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
1845 # auto = mid on BAT, high on AC; default = use hardware defaults.
1846 RADEON_POWER_PROFILE_ON_AC=high
1847 RADEON_POWER_PROFILE_ON_BAT=low
1849 # Radeon dynamic power management method (DPM): battery, performance.
1850 RADEON_DPM_STATE_ON_AC=performance
1851 RADEON_DPM_STATE_ON_BAT=battery
1853 # Radeon DPM performance level: auto, low, high; auto is recommended.
1854 RADEON_DPM_PERF_LEVEL_ON_AC=auto
1855 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
1857 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
1861 # Disable wake on LAN: Y/N.
1864 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
1865 # A value of 0 disables, >=1 enables power saving (recommended: 1).
1866 SOUND_POWER_SAVE_ON_AC=0
1867 SOUND_POWER_SAVE_ON_BAT=0
1869 # Disable controller too (HDA only): Y/N.
1870 SOUND_POWER_SAVE_CONTROLLER=N
1872 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
1873 # Drive can be powered on again by releasing (and reinserting) the eject lever
1874 # or by pressing the disc eject button on newer models.
1875 # Note: an UltraBay/MediaBay hard disk is never powered off.
1876 BAY_POWEROFF_ON_AC=0
1877 BAY_POWEROFF_ON_BAT=0
1878 # Optical drive device to power off (default sr0).
1881 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
1883 RUNTIME_PM_ON_BAT=auto
1885 # Exclude PCI(e) device adresses the following list from Runtime PM
1886 # (separate with spaces). Use lspci to get the adresses (1st column).
1887 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
1888 RUNTIME_PM_BLACKLIST="01:00.0"
1890 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
1891 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
1892 # prevents accidential power-on of dGPU in hybrid graphics setups.
1893 # Use "" to disable the feature completely.
1894 # Separate multiple drivers with spaces.
1895 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
1897 # Set to 0 to disable, 1 to enable USB autosuspend feature.
1900 # Exclude listed devices from USB autosuspend (separate with spaces).
1901 # Use lsusb to get the ids.
1902 # Note: input devices (usbhid) are excluded automatically
1903 #USB_BLACKLIST="1111:2222 3333:4444"
1905 # Bluetooth devices are excluded from USB autosuspend:
1906 # 0=do not exclude, 1=exclude.
1907 USB_BLACKLIST_BTUSB=0
1909 # Phone devices are excluded from USB autosuspend:
1910 # 0=do not exclude, 1=exclude (enable charging).
1911 USB_BLACKLIST_PHONE=0
1913 # Printers are excluded from USB autosuspend:
1914 # 0=do not exclude, 1=exclude.
1915 USB_BLACKLIST_PRINTER=1
1917 # WWAN devices are excluded from USB autosuspend:
1918 # 0=do not exclude, 1=exclude.
1919 USB_BLACKLIST_WWAN=1
1921 # Include listed devices into USB autosuspend even if already excluded
1922 # by the blacklists above (separate with spaces).
1923 # Use lsusb to get the ids.
1924 #USB_WHITELIST="1111:2222 3333:4444"
1926 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
1927 # (workaround for USB devices that cause shutdown problems).
1928 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
1930 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
1931 # on system startup: 0=disable, 1=enable.
1932 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
1933 # are ignored when this is enabled!
1934 #RESTORE_DEVICE_STATE_ON_STARTUP=0
1935 RESTORE_DEVICE_STATE_ON_STARTUP=1
1937 # Radio devices to disable on startup: bluetooth, wifi, wwan.
1938 # Separate multiple devices with spaces.
1939 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
1941 # Radio devices to enable on startup: bluetooth, wifi, wwan.
1942 # Separate multiple devices with spaces.
1943 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
1945 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
1946 # (workaround for devices that are blocking shutdown).
1947 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
1949 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
1950 # (to prevent other operating systems from missing radios).
1951 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
1953 # Radio devices to enable on AC: bluetooth, wifi, wwan.
1954 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
1956 # Radio devices to disable on battery: bluetooth, wifi, wwan.
1957 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
1959 # Radio devices to disable on battery when not in use (not connected):
1960 # bluetooth, wifi, wwan.
1961 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
1963 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
1964 # required). Charging starts when the remaining capacity falls below the
1965 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
1966 # Main / Internal battery (values in %)
1967 #START_CHARGE_THRESH_BAT0=75
1968 #STOP_CHARGE_THRESH_BAT0=80
1969 # Ultrabay / Slice / Replaceable battery (values in %)
1970 #START_CHARGE_THRESH_BAT1=75
1971 #STOP_CHARGE_THRESH_BAT1=80
1973 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
1974 #RESTORE_THRESHOLDS_ON_BAT=1
1976 # ------------------------------------------------------------------------------
1977 # tlp-rdw - Parameters for the radio device wizard
1978 # Possible devices: bluetooth, wifi, wwan.
1981 # - Parameters are disabled by default, remove the leading # to enable them
1982 # - Separate multiple radio devices with spaces
1984 # Radio devices to disable on connect.
1985 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
1986 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
1987 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
1989 # Radio devices to enable on disconnect.
1990 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
1991 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
1992 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
1994 # Radio devices to enable/disable when docked.
1995 #DEVICES_TO_ENABLE_ON_DOCK=""
1996 #DEVICES_TO_DISABLE_ON_DOCK=""
1998 # Radio devices to enable/disable when undocked.
1999 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
2000 #DEVICES_TO_DISABLE_ON_UNDOCK=""
2005 :header-args+: :tangle ~/.config/tridactyl/tridactylrc
2010 bind p scrollline -2
2013 bind - scrollto 100 x
2018 bind d scrollpage 0.5
2019 bind u scrollpage -0.5
2027 bind gd tabduplicate
2030 bind O fillcmdline bmarks
2032 bind ;<Space> fillcmdline_notrail
2036 set hintfiltermode vimperator-reflow
2037 set hintnames numeric
2038 set urlparenttrailingslash false
2040 set browser abrowser
2041 " set newtab https://bandali.eu.org
2043 seturl warrior.uwaterloo.ca noiframe true
2045 " autocmd DocStart www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
2052 :header-args+: :tangle ~/.xinitrc
2056 [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
2061 #+begin_src conf-xdefaults :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
2062 #include ".Xresources.d/fonts"
2063 #include ".Xresources.d/emacs"
2064 #include ".Xresources.d/rxvt-unicode"
2069 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
2072 #+begin_src conf-xdefaults
2075 Emacs.verticalScrollBars: off
2076 Emacs.cursorBlink: off
2077 Emacs.FontBackend: ftcrhb,x
2078 !Emacs.FontBackend: xft,x
2079 ! Emacs.font: Ubuntu Mono-12
2080 ! Emacs.font: Triplicate T4C-11
2081 ! Emacs.font: Ubuntu Mono-10.5
2082 ! Emacs.font: Ubuntu Mono-12
2083 ! Emacs.font: Iosevka-11
2085 ! Emacs.font: Fira Mono:size=15
2086 ! Emacs.font: DejaVu Sans Mono:size=15
2087 ! Emacs.font: Inconsolata:size=17
2088 ! Emacs.font: Inconsolata:size=16
2089 ! Emacs.font: Inconsolata LGC:size=14
2090 ! Emacs.font: Source Code Pro Medium-10.5
2091 Emacs.font: Source Code Pro Medium:size=14
2092 !Emacs.font: Vazir:size=14
2093 ! Emacs.font: Ubuntu Mono:size=16
2094 ! Emacs.font: Iosevka:size=16
2099 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
2102 #+begin_src conf-xdefaults
2103 Xft.lcdfilter: lcddefault
2107 Xft.hintstyle: hintslight
2108 ! Xft.hintstyle: hintfull
2115 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
2118 #+begin_src conf-xdefaults
2120 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
2121 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
2122 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
2123 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
2125 URxvt.xftAntialias: true
2126 URxvt.letterSpace: -1
2129 !URxvt.loginShell: true
2130 !URxvt*buffered: false
2131 URxvt.saveLines: 100000
2132 URxvt.internalBorder: 3
2134 URxvt.scrollBar: false
2135 URxvt.scrollStyle: rxvt
2136 URxvt*scrollTtyOutput: false
2137 URxvt*scrollWithBuffer: true
2138 URxvt*scrollTtyKeypress: true
2139 URxvt.keysym.Shift-Up: command:\033]720;1\007
2140 URxvt.keysym.Shift-Down: command:\033]721;1\007
2142 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
2143 URxvt.url-select.launcher: firefox
2144 URxvt.url-select.underline: true
2145 URxvt.keysym.M-u: perl:url-select:select_next
2146 URxvt.keysym.M-Escape: perl:keyboard-select:activate
2147 URxvt.keysym.M-s: perl:keyboard-select:search
2148 URxvt.url-launcher: /usr/bin/abrowser
2149 URxvt.matcher.button: 1
2150 ! URxvt.iso14755: false
2151 ! URxvt.iso14755_53: false
2152 ! URxvt.keysym.M-c: perl:clipboard:copy
2153 ! URxvt.keysym.M-v: perl:clipboard:paste
2154 URxvt.keysym.M-c: eval:selection_to_clipboard
2155 URxvt.keysym.M-v: eval:paste_clipboard
2156 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
2157 ! URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
2158 ! URxvt.keysym.Shift-Control-V: eval:paste_clipboard
2159 URxvt.keysym.C-Up: font-size:increase
2160 URxvt.keysym.C-Down: font-size:decrease
2161 URxvt.keysym.C-S-Up: font-size:incglobal
2162 URxvt.keysym.C-S-Down: font-size:decglobal
2163 URxvt.keysym.C-equal: font-size:reset
2164 !URxvt.keysym.C-question: font-size:show
2166 !URxvt.iconFile: /usr/share/icons/elementary-xfce/apps/48/terminal.png
2168 !urxvt*foreground: white
2169 !urxvt*background: black
2188 !URxvt.foreground: #C8C8C8
2189 !URxvt.background: #FFFFFF
2209 !! orange (replaces cyan)
2218 ! ! Base16 Solarized Light
2219 ! ! Scheme: Ethan Schoonover (http://ethanschoonover.com/solarized)
2221 ! #define base00 #fdf6e3
2222 ! #define base01 #eee8d5
2223 ! #define base02 #93a1a1
2224 ! #define base03 #839496
2225 ! #define base04 #657b83
2226 ! #define base05 #586e75
2227 ! #define base06 #073642
2228 ! #define base07 #002b36
2229 ! #define base08 #dc322f
2230 ! #define base09 #cb4b16
2231 ! #define base0A #b58900
2232 ! #define base0B #859900
2233 ! #define base0C #2aa198
2234 ! #define base0D #268bd2
2235 ! #define base0E #6c71c4
2236 ! #define base0F #d33682
2238 ! *foreground: base05
2239 ! #ifdef background_opacity
2240 ! *background: [background_opacity]base00
2242 ! *background: base00
2244 ! *cursorColor: base05
2264 ! ! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
2265 ! ! use 'shell' template to set these if necessary
2274 ! Tango colour theme for rxvt-unicode
2275 URxvt.background: #FFFFFF
2276 URxvt.foreground: #000000
2279 URxvt.color0: #2E3436
2280 URxvt.color8: #757773
2283 URxvt.color1: #CC0000
2284 URxvt.color9: #EF2929
2287 URxvt.color2: #4E9A06
2288 URxvt.color10: #8AE234
2291 URxvt.color3: #C4A000
2292 URxvt.color11: #FCE94F
2295 URxvt.color4: #3465A4
2296 URxvt.color12: #729FCF
2299 URxvt.color5: #75507B
2300 URxvt.color13: #AD7FA8
2303 !URxvt.color6: #06989A
2304 !URxvt.color14: #34E2E2
2305 ! orange (replaces cyan)
2310 URxvt.color7: #D3D7CF
2311 URxvt.color15: #EEEEEC
2316 :header-args+: :tangle ~/.xsession :tangle-mode (identity #o755)
2319 For custom session on Debian. See https://wiki.debian.org/Xsession.
2322 if [ -f "$HOME/.xinitrc" ]; then
2326 [ -f "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" ] && /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd &
2327 [ -x "$(command -v light-locker)" ] && light-locker --lock-on-suspend &
2328 [ -x "$(command -v pasystray)" ] && pasystray -a &
2329 [ -x "$(command -v nm-applet)" ] && nm-applet &
2330 [ -x "$(command -v compton)" ] && compton &
2331 [ -x "$(command -v dunst)" ] && dunst &
2332 [ -x "$(command -v emacs)" ] && exec ssh-agent exwm -ib 0
2337 :header-args+: :tangle ~/.xsessionrc
2341 if [ -f "$HOME/.profile" ]; then . "$HOME/.profile"; fi
2346 :header-args+: :tangle ~/.config/user-dirs.dirs
2350 XDG_DESKTOP_DIR="$HOME/Desktop"
2351 XDG_DOCUMENTS_DIR="$HOME/usr/doc"
2352 XDG_DOWNLOAD_DIR="$HOME/usr/dl"
2353 XDG_MUSIC_DIR="$HOME/usr/music"
2354 XDG_PICTURES_DIR="$HOME/usr/pic"
2355 XDG_PUBLICSHARE_DIR="$HOME/usr/pub"
2356 XDG_TEMPLATES_DIR="$HOME/usr/temp"
2357 XDG_VIDEOS_DIR="$HOME/usr/vid"
2362 :header-args+: :tangle ~/.config/zathura/zathurarc
2366 set smooth-scroll true
2367 set selection-clipboard clipboard
2369 set default-bg "#272727"
2370 set statusbar-bg "#272727"
2371 set inputbar-bg "#373737"
2372 set window-title-basename true
2373 set statusbar-home-tilde true
2375 map <Return> scroll down
2376 map <A-Return> scroll up
2378 map H jumplist backward
2379 map L jumplist forward
2381 map [normal] i toggle_index
2382 map [index] i toggle_index
2383 map [index] q toggle_index
2388 This section contains various useful scripts including ones used by
2389 the programs above. For instance, =toggle-tablet= for switching to
2390 and from tablet mode on my X220T, =toggle-presentation-mode= for
2391 toggling Xfce's presentation mode which keeps the screen awake, and
2392 =rofi-light= a small utility that uses [[https://github.com/DaveDavenport/rofi][rofi]] to ask and [[https://github.com/haikarainen/light][light]] to set an
2393 exact brightness value.
2395 ** battery-percentage-time
2397 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
2400 #+begin_src sh :tangle no
2403 dbus-send --print-reply=literal --system \
2404 --dest=org.freedesktop.UPower \
2405 /org/freedesktop/UPower/devices/battery_BAT0 \
2406 org.freedesktop.DBus.Properties.Get \
2407 string:org.freedesktop.UPower.Device \
2408 string:"${label}" | awk '{print $3}'
2411 perc=$(dbus_send 'Percentage')
2412 state=$(dbus_send 'State')
2414 if [ "$state" -eq 2 ]; then # Discharging
2415 secs=$(dbus_send 'TimeToEmpty')
2416 elif [ "$state" -eq 1 ]; then # Charging
2417 secs=$(dbus_send 'TimeToFull')
2420 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
2425 :header-args+: :tangle ~/.local/bin/emcl :shebang "#!/bin/sh"
2429 exec emacsclient --alternate-editor="" -c "$@"
2434 :header-args+: :tangle ~/.local/bin/my-i3status :shebang "#!/usr/bin/env python2"
2438 # -*- coding: utf-8 -*-
2440 # This script is a simple wrapper which prefixes each i3status line with custom
2441 # information. It is based on:
2442 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
2444 # In ~/.i3status.conf, add the following line:
2445 # output_format = "i3bar"
2446 # in the 'general' section.
2447 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
2448 # status_command i3status | my-i3status.py
2449 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
2451 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
2452 # © 2018 Amin Bandali <bandali@gnu.org>
2454 # This program is free software. It comes without any warranty, to the extent
2455 # permitted by applicable law. You can redistribute it and/or modify it under
2456 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
2457 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
2465 """ Return true if ~/.nosleep exists. """
2466 return os.path.isfile(os.path.expanduser("~/.nosleep"))
2468 def print_line(message):
2469 """ Non-buffered printing to stdout. """
2470 sys.stdout.write(message + '\n')
2474 """ Interrupted respecting reader for stdin. """
2475 # try reading a line, removing any extra whitespace
2477 line = sys.stdin.readline().strip()
2478 # i3status sends EOF, or an empty line
2483 except KeyboardInterrupt:
2486 if __name__ == '__main__':
2487 # Skip the first line which contains the version header.
2488 print_line(read_line())
2490 # The second line contains the start of the infinite array.
2491 print_line(read_line())
2494 line, prefix = read_line(), ''
2495 # ignore comma at start of lines
2496 if line.startswith(','):
2497 line, prefix = line[1:], ','
2500 j = json.loads(line)
2501 # insert information into the start of the json, but could be anywhere
2502 j.insert(0, {'full_text' : '•', 'name' : 'nosleep'})
2503 # and echo back new encoded json
2504 print_line(prefix+json.dumps(j))
2506 print_line(prefix+line)
2511 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/sh"
2516 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
2517 [ -n "$val" ] && light -S "$val"
2522 :header-args+: :tangle ~/.local/bin/rofi-remmina :shebang "#!/usr/bin/env python2"
2528 from subprocess import Popen, PIPE
2530 remmina_dir = os.path.expanduser("~/.local/share/remmina")
2534 for f in os.listdir(remmina_dir):
2535 fp = os.path.join(remmina_dir, f)
2536 c = ConfigParser.ConfigParser()
2538 n = c.get('remmina', 'name')
2541 lines = max(min(15, len(fdict)), 1);
2542 width = len(max(fdict.keys(), key=len))
2543 rofi = Popen(["rofi", "-i", "-dmenu", \
2544 "-l", str(lines), "-width", str(width), \
2545 "-p", "connection"], stdout=PIPE, stdin=PIPE)
2546 selected = rofi.communicate("\n" \
2547 .join(fdict.keys()) \
2548 .encode("utf-8"))[0] \
2553 r = Popen(["remmina", "-c", fdict[selected]])
2557 ** toggle-presentation-mode
2559 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/sh"
2563 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
2568 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/sh"
2572 # This script toggles between a 'normal' mode and a 'tablet' mode, doing
2575 # - rotates the screen using =xrandr=, so that rotating the physical
2576 # display of my X220t would have the laptop's battery on the right
2578 # - enables touch screen,
2579 # - properly rotates the stylus pen and touch screen pointers, and
2580 # - toggles between RGB and Vertical BGR sub-pixel order.
2582 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
2583 0) # Screen is not rotated, we should rotate it right (90°)
2585 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
2586 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
2587 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
2588 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
2590 1) # Currently top is rotated right, we should set it normal (0°)
2592 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
2593 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
2594 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
2595 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
2598 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
2606 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
2610 cur_vol=$(pamixer --get-volume)
2612 if [ $(pamixer --get-mute) = true ]; then
2613 printf 'mt \n' "$cur_vol"
2615 printf '%02d \n' "$cur_vol"
2621 :header-args+: :tangle ~/.local/bin/zathura-sync :shebang "#!/bin/sh"
2627 zathura --synctex-forward "$pos" "$pdffile" || \
2629 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
2630 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )