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 amin@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 amin@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
581 User gnu@bandali.eu.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@uw.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@csc.uw.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 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
1107 from amin@shemshak.org
1108 user amin@shemshak.org
1109 passwordeval gpg --no-tty -q -d ~/.passwd/shemshak.gpg
1111 account aminb : shemshak
1113 account bndl : shemshak
1117 host fencepost.gnu.org
1118 # use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1119 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
1121 from bandali@gnu.org
1123 passwordeval gpg --no-tty -q -d ~/.passwd/gnu.gpg
1125 account gnu-mab : gnu
1127 account gnu-aminb : gnu
1129 account gnu-amin : gnu
1133 host connect.uwaterloo.ca
1135 from abandali@uwaterloo.ca
1137 passwordeval gpg --no-tty -q -d ~/.passwd/uwaterloo.gpg
1138 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1140 account uwaterloo-friendly : uwaterloo
1141 from bandali@uwaterloo.ca
1144 host mail.csclub.uwaterloo.ca
1146 from abandali@csclub.uwaterloo.ca
1148 passwordeval gpg --no-tty -q -d ~/.passwd/csclub.gpg
1149 tls_trust_file /etc/ssl/certs/ca-certificates.crt
1151 account csclub-friendly : csclub
1152 from bandali@csclub.uwaterloo.ca
1154 # Set a default account
1155 account default : shemshak
1160 :header-args+: :tangle ~/.config/readline/inputrc
1164 set enable-bracketed-paste on
1166 set colored-stats on
1167 set colored-completion-prefix on
1168 set completion-ignore-case on
1169 set menu-complete-display-prefix on
1170 set page-completions off
1171 set show-all-if-ambiguous on
1172 set show-all-if-unmodified on
1173 set visible-stats on
1176 "\e[Z": menu-complete-backward
1178 "\e[A": history-search-backward
1179 "\e[B": history-search-forward
1184 :header-args+: :tangle ~/.config/rofi/config
1188 ! rofi.font: Ubuntu Mono 13
1189 ! rofi.font: Inconsolata 16
1190 ! rofi.font: Iosevka 13
1191 ! rofi.font: Source Code Pro 11
1192 rofi.font: Source Code Pro 10.5
1193 rofi.modi: run,window
1201 rofi.theme: ~/.guix-profile/share/rofi/themes/gruvbox-light-hard.rasi
1206 :header-args+: :tangle ~/.config/rofi-pass/config
1210 # permanently set alternative root dir
1211 # root=/path/to/root
1213 # rofi command. Make sure to have "$@" as last argument
1215 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
1216 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
1219 # xdotool needs the keyboard layout to be set using setxkbmap
1220 # You can do this in your autostart scripts (e.g. xinitrc)
1222 # If for some reason, you cannot do this, you can set the command here.
1223 # and set fix_layout to true
1232 USERNAME_field='user'
1233 AUTOTYPE_field='autotype'
1235 # delay to be used for :delay keyword
1238 ## Programs to be used
1247 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
1250 default_autotype='user :tab pass'
1252 # color of the help messages
1253 # leave empty for autodetection
1254 help_color="#4872FF"
1256 # Clipboard settings
1257 # Possible options: primary, clipboard, both
1260 # Options for generating new password entries
1261 # default_user is also used for password files that have no user field.
1263 default_user2=bandali
1266 # Custom Keybindings
1288 :header-args+: :tangle ~/.config/screen/screenrc
1293 caption always "%{= kc}GNU Screen $USER@%H (load: %l)%-28=%{= .m}%D %d.%m.%Y %0c"
1300 :header-args+: :tangle ~/.bashrc
1304 # Bash initialization for interactive non-login shells and
1305 # for remote shells (info "(bash) Bash Startup Files").
1307 # Export 'SHELL' to child processes. Programs such as 'screen'
1308 # honor it and otherwise use /bin/sh.
1313 # We are being invoked from a non-interactive shell. If this
1314 # is an SSH session (as in "ssh host command"), source
1315 # /etc/profile so we get PATH and other essential variables.
1316 [[ -n "$SSH_CLIENT" ]] && source /etc/profile
1318 # Don't do anything else.
1322 if [ -n "$IS_GUIX_SYSTEM" ]; then
1323 # Source the system-wide file.
1327 # from https://unix.stackexchange.com/a/55935
1329 cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
1333 if [ $(id -u) == "0" ]; then
1334 PS1='`printf "\[\e[1;31m\]\$\[\e[00m\]"` '
1338 PS1="\u@\h:\w/`[ -n "$GUIX_ENVIRONMENT" ] && printf \" [env]\"`\n$PS1"
1340 # set terminal title
1341 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: $(b_prompt)\007"'
1344 # echo -e "\033[5 q" # blinking
1345 echo -e "\033[6 q" # non-blinking
1347 # various bash tweaks
1348 # append to the history file, don't overwrite it
1351 # check the window size after each command and, if necessary,
1352 # update the values of LINES and COLUMNS.
1353 shopt -s checkwinsize
1354 # If set, the pattern "**" used in a pathname expansion context will
1355 # match all files and zero or more directories and subdirectories.
1357 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
1360 # don't put duplicate lines or lines starting with space in the
1362 HISTCONTROL=ignoreboth
1363 # ignore a few very common commands and don't add them to history
1364 HISTIGNORE='ls:l:s:g:[bf]g:history'
1365 HISTTIMEFORMAT='%F %T '
1369 alias ls='ls -p --color=auto'
1370 alias l='ls -lh' # long format and human-readable sizes
1371 alias ll='l -A' # long format, all files
1372 alias dir='dir --color=auto'
1373 alias vdir='vdir --color=auto'
1374 alias grep='grep --color=auto'
1375 alias fgrep='fgrep --color=auto'
1376 alias egrep='egrep --color=auto'
1377 alias mpv="mpv --ytdl-format mp4"
1380 alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
1381 alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
1382 alias m="mbsync csclub; mbsync uwaterloo; mbsync shemshak; mbsync gnub"
1383 alias best="youtube-dl -f best"
1385 alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
1389 [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
1394 cd $(mktemp -d /tmp/$1.XXXX)
1397 # separate alias definitions file, if exists
1398 if [ -f ~/.bash_aliases ]; then
1402 # enable programmable completion features (not needed if already
1403 # enabled in /etc/bash.bashrc and if /etc/profile sources
1404 # /etc/bash.bashrc).
1405 if ! shopt -oq posix; then
1406 if [ -f /usr/share/bash-completion/bash_completion ]; then
1407 . /usr/share/bash-completion/bash_completion
1408 elif [ -f /etc/bash_completion ]; then
1409 . /etc/bash_completion
1413 # source Guix shell config dirs, for vte.sh and bash completions
1414 GUIX_PROFILES=("${HOME}/.guix-profile"
1415 "${HOME}/.config/guix/current")
1416 for profile in "${GUIX_PROFILES[@]}"; do
1417 for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
1418 if [ -d "${dir}" ]; then
1419 for f in "${dir}"/*; do
1429 :header-args+: :tangle ~/.profile
1433 # ~/.profile: executed by the command interpreter for login shells.
1434 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
1437 # source host-specific profile
1438 if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
1439 . "$HOME/.config/profiles/$(hostname)"
1442 export EDITOR="emacsclient -nw"
1443 export VISUAL="emcl"
1445 PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
1446 PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
1447 if [ -z "$IS_GUIX_SYSTEM" ]; then
1448 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
1449 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
1450 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
1455 export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
1456 export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
1458 export XDG_CONFIG_HOME="$HOME/.config"
1459 export XDG_DATA_HOME="$HOME/.local/share"
1461 if [ -f "$HOME/.config/user-dirs.dirs" ]; then
1463 . "$HOME/.config/user-dirs.dirs"
1467 export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
1468 export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
1470 export MAILDIR="$HOME/mail"
1471 export CVS_RSH="ssh"
1473 if [ -x "$(command -v go)" ]; then
1474 export GOPATH="$HOME/src/go"
1475 export PATH="$GOPATH/bin:$PATH"
1479 if [ -n "$BASH_VERSION" ]; then
1480 # include .bashrc if it exists
1481 if [ -f "$HOME/.bashrc" ]; then
1486 if [ -z "$IS_GUIX_SYSTEM" ]; then
1487 # if guix is installed
1488 if [ -x "$(command -v guix)" ]; then
1489 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
1490 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
1492 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
1494 printf "it seems you forgot to \`guix install nss-certs\'\n"
1496 GUIX_PROFILE="$HOME/.guix-profile"
1497 . "$GUIX_PROFILE/etc/profile"
1502 for p in $MY_GUIX_PROFILES/*; do
1503 profile=$p/$(basename "$p")
1504 if [ -f "$profile"/etc/profile ]; then
1505 GUIX_PROFILE="$profile"
1506 . "$GUIX_PROFILE"/etc/profile
1511 # start an ssh-agent (with guix's openssh)
1512 if [ -z "$IS_GUIX_SYSTEM" ]; then
1513 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
1514 ssh-agent > ~/.ssh-agent-thing
1516 if [[ ! "$SSH_AUTH_SOCK" ]]; then
1517 eval "$(<~/.ssh-agent-thing)"
1521 # footenote: when on a foreign distro and using Xfce, don't forget to
1522 # disable its auto-start of gpg- and ssh-agent, by issuing
1523 # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
1524 # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
1525 # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
1526 # also, MATE does something similar with gnome-keyring-daemon:
1527 # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop
1530 *** per-host profiles
1532 Host-specific profiles, sourced from =~/.profile=. Each
1533 =~/.config/profiles/HOST= file will be sourced on the machine with
1534 =hostname= of =HOST=.
1538 :header-args+: :tangle ~/.config/profiles/chaman
1542 export IS_GUIX_SYSTEM=true
1544 if [ -x "$(command -v xinput)" ]; then
1545 xinput --set-prop "TPPS/2 IBM TrackPoint" 'libinput Accel Speed' -0.4
1550 -option ctrl:nocaps \
1551 -option grp:shifts_toggle
1553 xmodmap -e "keysym Menu = Super_R"
1555 xsetroot -cursor_name left_ptr
1562 :header-args+: :tangle ~/.config/profiles/darrud
1566 export INFOPATH="$HOME/usr/local/share/info${INFOPATH:+:}$INFOPATH"
1571 :header-args+: :tangle ~/.config/profiles/langa
1575 export XDG_DATA_DIRS="/usr/share/mate:/usr/local/share/:/usr/share/"
1580 :header-args+: :tangle ~/.config/redshift.conf :comments none
1584 ; Global settings for redshift
1586 ; Set the day and night screen temperatures (Neutral is 6500K)
1597 ; Enable/Disable a smooth transition between day and night
1598 ; 0 will cause a direct change from day to night screen temperature.
1599 ; 1 will gradually increase or decrease the screen temperature.
1602 ; Set the screen brightness. Default is 1.0.
1604 ; It is also possible to use different settings for day and night
1605 ; since version 1.8.
1607 ;brightness-night=0.4
1608 ; Set the screen gamma (for all colors, or each color channel
1613 ; This can also be set individually for day and night since
1615 ;gamma-day=0.8:0.7:0.8
1618 ; Set the location-provider: 'geoclue2' or 'manual'
1619 ; type 'redshift -l list' to see possible values.
1620 ; The location provider settings are in a different section.
1621 ;location-provider=manual
1622 location-provider=geoclue2
1624 ; Set the adjustment-method: 'randr', 'vidmode'
1625 ; type 'redshift -m list' to see all possible values.
1626 ; 'randr' is the preferred method, 'vidmode' is an older API.
1627 ; but works in some cases when 'randr' does not.
1628 ; The adjustment method settings are in a different section.
1629 adjustment-method=randr
1631 ; Configuration of the location-provider:
1632 ; type 'redshift -l PROVIDER:help' to see the settings.
1633 ; ex: 'redshift -l manual:help'
1634 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
1635 ; are negative numbers.
1640 ; Configuration of the adjustment-method
1641 ; type 'redshift -m METHOD:help' to see the settings.
1642 ; ex: 'redshift -m randr:help'
1643 ; In this example, randr is configured to adjust screen 1.
1644 ; Note that the numbering starts from 0, so this is actually the
1645 ; second screen. If this option is not specified, Redshift will try
1646 ; to adjust _all_ screens.
1653 :header-args+: :tangle ~/.signature
1660 Free Software activist | GNU maintainer & webmaster
1661 GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
1662 https://bandali.eu.org
1667 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
1669 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
1678 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "darrud")) "/sudo::/etc/default/tlp")
1679 # ------------------------------------------------------------------------------
1680 # tlp - Parameters for power saving
1681 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
1683 # Hint: some features are disabled by default, remove the leading # to enable
1686 # Set to 0 to disable, 1 to enable TLP.
1689 # Operation mode when no power supply can be detected: AC, BAT.
1690 # Concerns some desktop and embedded hardware only.
1693 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
1694 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
1695 TLP_PERSISTENT_DEFAULT=0
1697 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
1698 # Non-zero value enables, zero disables laptop mode.
1699 DISK_IDLE_SECS_ON_AC=0
1700 DISK_IDLE_SECS_ON_BAT=2
1702 # Dirty page values (timeouts in secs).
1703 MAX_LOST_WORK_SECS_ON_AC=15
1704 MAX_LOST_WORK_SECS_ON_BAT=60
1706 # Hint: CPU parameters below are disabled by default, remove the leading #
1707 # to enable them, otherwise kernel default values are used.
1709 # Select a CPU frequency scaling governor.
1710 # Intel Core i processor with intel_pstate driver:
1711 # powersave(*), performance.
1712 # Older hardware with acpi-cpufreq driver:
1713 # ondemand(*), powersave, performance, conservative, schedutil.
1714 # (*) is recommended.
1715 # Hint: use tlp-stat -p to show the active driver and available governors.
1717 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
1718 # efficient for *almost all* workloads and therefore kernel and most
1719 # distributions have chosen them as defaults. If you still want to change,
1720 # you should know what you're doing! You *must* disable your distribution's
1721 # governor settings or conflicts will occur.
1722 #CPU_SCALING_GOVERNOR_ON_AC=powersave
1723 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
1724 CPU_SCALING_GOVERNOR_ON_AC=conservative
1725 CPU_SCALING_GOVERNOR_ON_BAT=conservative
1727 # Set the min/max frequency available for the scaling governor.
1728 # Possible values strongly depend on your CPU. For available frequencies see
1729 # the output of tlp-stat -p.
1730 #CPU_SCALING_MIN_FREQ_ON_AC=0
1731 #CPU_SCALING_MAX_FREQ_ON_AC=0
1732 #CPU_SCALING_MIN_FREQ_ON_BAT=0
1733 #CPU_SCALING_MAX_FREQ_ON_BAT=0
1735 # Set energy performance hints (HWP) for Intel P-state governor:
1736 # performance, balance_performance, default, balance_power, power
1737 # Values are given in order of increasing power saving.
1738 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
1739 CPU_HWP_ON_AC=balance_performance
1740 CPU_HWP_ON_BAT=balance_power
1742 # Set Intel P-state performance: 0..100 (%).
1743 # Limit the max/min P-state to control the power dissipation of the CPU.
1744 # Values are stated as a percentage of the available performance.
1745 # Requires an Intel Core i processor with intel_pstate driver.
1746 #CPU_MIN_PERF_ON_AC=0
1747 #CPU_MAX_PERF_ON_AC=100
1748 #CPU_MIN_PERF_ON_BAT=0
1749 #CPU_MAX_PERF_ON_BAT=30
1751 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
1752 # Requires an Intel Core i processor.
1754 # - This may conflict with your distribution's governor settings
1755 # - A value of 1 does *not* activate boosting, it just allows it
1759 # Minimize number of used CPU cores/hyper-threads under light load conditions:
1760 # 0=disable, 1=enable.
1761 SCHED_POWERSAVE_ON_AC=0
1762 SCHED_POWERSAVE_ON_BAT=1
1764 # Kernel NMI Watchdog:
1765 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
1768 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
1769 # Frequency voltage pairs are written to:
1770 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
1771 # CAUTION: only use this, if you thoroughly understand what you are doing!
1772 #PHC_CONTROLS="F:V F:V F:V F:V"
1774 # Set CPU performance versus energy savings policy:
1775 # performance, balance-performance, default, balance-power, power.
1776 # Values are given in order of increasing power saving.
1777 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
1778 ENERGY_PERF_POLICY_ON_AC=performance
1779 ENERGY_PERF_POLICY_ON_BAT=balance-power
1781 # Disk devices; separate multiple devices with spaces (default: sda).
1782 # Devices can be specified by disk ID also (lookup with: tlp diskid).
1783 DISK_DEVICES="sda sdb"
1785 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
1786 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
1787 # Separate values for multiple disks with spaces. Use the special value 'keep'
1788 # to keep the hardware default for the particular disk.
1789 DISK_APM_LEVEL_ON_AC="254 254"
1790 DISK_APM_LEVEL_ON_BAT="128 128"
1792 # Hard disk spin down timeout:
1793 # 0: spin down disabled
1794 # 1..240: timeouts from 5s to 20min (in units of 5s)
1795 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
1796 # See 'man hdparm' for details.
1797 # Separate values for multiple disks with spaces. Use the special value 'keep'
1798 # to keep the hardware default for the particular disk.
1799 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
1800 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
1802 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
1803 # Separate values for multiple disks with spaces. Use the special value 'keep'
1804 # to keep the kernel default scheduler for the particular disk.
1805 #DISK_IOSCHED="cfq cfq"
1807 # AHCI link power management (ALPM) for disk devices:
1808 # min_power, med_power_with_dipm(*), medium_power, max_performance.
1809 # (*) Kernel >= 4.15 required, then recommended.
1810 # Multiple values separated with spaces are tried sequentially until success.
1811 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
1812 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
1814 # Exclude host devices from AHCI link power management.
1815 # Separate multiple hosts with spaces.
1816 #SATA_LINKPWR_BLACKLIST="host1"
1818 # Runtime Power Management for AHCI host and disks devices:
1819 # on=disable, auto=enable.
1820 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
1821 #AHCI_RUNTIME_PM_ON_AC=on
1822 #AHCI_RUNTIME_PM_ON_BAT=on
1824 # Seconds of inactivity before disk is suspended.
1825 AHCI_RUNTIME_PM_TIMEOUT=15
1827 # PCI Express Active State Power Management (PCIe ASPM):
1828 # default, performance, powersave.
1829 PCIE_ASPM_ON_AC=performance
1830 PCIE_ASPM_ON_BAT=powersave
1832 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
1833 # auto = mid on BAT, high on AC; default = use hardware defaults.
1834 RADEON_POWER_PROFILE_ON_AC=high
1835 RADEON_POWER_PROFILE_ON_BAT=low
1837 # Radeon dynamic power management method (DPM): battery, performance.
1838 RADEON_DPM_STATE_ON_AC=performance
1839 RADEON_DPM_STATE_ON_BAT=battery
1841 # Radeon DPM performance level: auto, low, high; auto is recommended.
1842 RADEON_DPM_PERF_LEVEL_ON_AC=auto
1843 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
1845 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
1849 # Disable wake on LAN: Y/N.
1852 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
1853 # A value of 0 disables, >=1 enables power saving (recommended: 1).
1854 SOUND_POWER_SAVE_ON_AC=0
1855 SOUND_POWER_SAVE_ON_BAT=0
1857 # Disable controller too (HDA only): Y/N.
1858 SOUND_POWER_SAVE_CONTROLLER=N
1860 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
1861 # Drive can be powered on again by releasing (and reinserting) the eject lever
1862 # or by pressing the disc eject button on newer models.
1863 # Note: an UltraBay/MediaBay hard disk is never powered off.
1864 BAY_POWEROFF_ON_AC=0
1865 BAY_POWEROFF_ON_BAT=0
1866 # Optical drive device to power off (default sr0).
1869 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
1871 RUNTIME_PM_ON_BAT=auto
1873 # Exclude PCI(e) device adresses the following list from Runtime PM
1874 # (separate with spaces). Use lspci to get the adresses (1st column).
1875 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
1876 RUNTIME_PM_BLACKLIST="01:00.0"
1878 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
1879 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
1880 # prevents accidential power-on of dGPU in hybrid graphics setups.
1881 # Use "" to disable the feature completely.
1882 # Separate multiple drivers with spaces.
1883 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
1885 # Set to 0 to disable, 1 to enable USB autosuspend feature.
1888 # Exclude listed devices from USB autosuspend (separate with spaces).
1889 # Use lsusb to get the ids.
1890 # Note: input devices (usbhid) are excluded automatically
1891 #USB_BLACKLIST="1111:2222 3333:4444"
1893 # Bluetooth devices are excluded from USB autosuspend:
1894 # 0=do not exclude, 1=exclude.
1895 USB_BLACKLIST_BTUSB=0
1897 # Phone devices are excluded from USB autosuspend:
1898 # 0=do not exclude, 1=exclude (enable charging).
1899 USB_BLACKLIST_PHONE=0
1901 # Printers are excluded from USB autosuspend:
1902 # 0=do not exclude, 1=exclude.
1903 USB_BLACKLIST_PRINTER=1
1905 # WWAN devices are excluded from USB autosuspend:
1906 # 0=do not exclude, 1=exclude.
1907 USB_BLACKLIST_WWAN=1
1909 # Include listed devices into USB autosuspend even if already excluded
1910 # by the blacklists above (separate with spaces).
1911 # Use lsusb to get the ids.
1912 #USB_WHITELIST="1111:2222 3333:4444"
1914 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
1915 # (workaround for USB devices that cause shutdown problems).
1916 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
1918 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
1919 # on system startup: 0=disable, 1=enable.
1920 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
1921 # are ignored when this is enabled!
1922 #RESTORE_DEVICE_STATE_ON_STARTUP=0
1923 RESTORE_DEVICE_STATE_ON_STARTUP=1
1925 # Radio devices to disable on startup: bluetooth, wifi, wwan.
1926 # Separate multiple devices with spaces.
1927 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
1929 # Radio devices to enable on startup: bluetooth, wifi, wwan.
1930 # Separate multiple devices with spaces.
1931 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
1933 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
1934 # (workaround for devices that are blocking shutdown).
1935 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
1937 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
1938 # (to prevent other operating systems from missing radios).
1939 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
1941 # Radio devices to enable on AC: bluetooth, wifi, wwan.
1942 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
1944 # Radio devices to disable on battery: bluetooth, wifi, wwan.
1945 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
1947 # Radio devices to disable on battery when not in use (not connected):
1948 # bluetooth, wifi, wwan.
1949 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
1951 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
1952 # required). Charging starts when the remaining capacity falls below the
1953 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
1954 # Main / Internal battery (values in %)
1955 #START_CHARGE_THRESH_BAT0=75
1956 #STOP_CHARGE_THRESH_BAT0=80
1957 # Ultrabay / Slice / Replaceable battery (values in %)
1958 #START_CHARGE_THRESH_BAT1=75
1959 #STOP_CHARGE_THRESH_BAT1=80
1961 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
1962 #RESTORE_THRESHOLDS_ON_BAT=1
1964 # ------------------------------------------------------------------------------
1965 # tlp-rdw - Parameters for the radio device wizard
1966 # Possible devices: bluetooth, wifi, wwan.
1969 # - Parameters are disabled by default, remove the leading # to enable them
1970 # - Separate multiple radio devices with spaces
1972 # Radio devices to disable on connect.
1973 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
1974 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
1975 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
1977 # Radio devices to enable on disconnect.
1978 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
1979 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
1980 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
1982 # Radio devices to enable/disable when docked.
1983 #DEVICES_TO_ENABLE_ON_DOCK=""
1984 #DEVICES_TO_DISABLE_ON_DOCK=""
1986 # Radio devices to enable/disable when undocked.
1987 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
1988 #DEVICES_TO_DISABLE_ON_UNDOCK=""
1993 :header-args+: :tangle ~/.config/tridactyl/tridactylrc
1998 bind p scrollline -2
2001 bind - scrollto 100 x
2006 bind d scrollpage 0.5
2007 bind u scrollpage -0.5
2015 bind gd tabduplicate
2018 bind O fillcmdline bmarks
2020 bind ;<Space> fillcmdline_notrail
2024 set hintfiltermode vimperator-reflow
2025 set hintnames numeric
2026 set urlparenttrailingslash false
2028 set browser abrowser
2029 " set newtab https://bandali.eu.org
2031 seturl warrior.uwaterloo.ca noiframe true
2033 " autocmd DocStart www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
2040 :header-args+: :tangle ~/.xinitrc
2044 [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
2049 #+begin_src conf-xdefaults :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
2050 #include ".Xresources.d/fonts"
2051 #include ".Xresources.d/emacs"
2052 #include ".Xresources.d/rxvt-unicode"
2057 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
2060 #+begin_src conf-xdefaults
2063 Emacs.verticalScrollBars: off
2064 Emacs.cursorBlink: off
2065 Emacs.FontBackend: xft,x
2066 ! Emacs.font: Ubuntu Mono-12
2067 ! Emacs.font: Triplicate T4C-11
2068 ! Emacs.font: Ubuntu Mono-10.5
2069 ! Emacs.font: Ubuntu Mono-12
2070 ! Emacs.font: Iosevka-11
2072 ! Emacs.font: Fira Mono:size=15
2073 ! Emacs.font: DejaVu Sans Mono:size=15
2074 ! Emacs.font: Inconsolata:size=17
2075 ! Emacs.font: Inconsolata:size=16
2076 ! Emacs.font: Inconsolata LGC:size=14
2077 ! Emacs.font: Source Code Pro Medium-10.5
2078 Emacs.font: Source Code Pro Medium:size=14
2079 ! Emacs.font: Ubuntu Mono:size=16
2080 ! Emacs.font: Iosevka:size=16
2085 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
2088 #+begin_src conf-xdefaults
2089 Xft.lcdfilter: lcddefault
2093 Xft.hintstyle: hintslight
2094 ! Xft.hintstyle: hintfull
2101 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
2104 #+begin_src conf-xdefaults
2106 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
2107 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
2108 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
2109 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
2111 URxvt.xftAntialias: true
2112 URxvt.letterSpace: -1
2115 !URxvt.loginShell: true
2116 !URxvt*buffered: false
2117 URxvt.saveLines: 100000
2118 URxvt.internalBorder: 3
2120 URxvt.scrollBar: false
2121 URxvt.scrollStyle: rxvt
2122 URxvt*scrollTtyOutput: false
2123 URxvt*scrollWithBuffer: true
2124 URxvt*scrollTtyKeypress: true
2125 URxvt.keysym.Shift-Up: command:\033]720;1\007
2126 URxvt.keysym.Shift-Down: command:\033]721;1\007
2128 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
2129 URxvt.url-select.launcher: firefox
2130 URxvt.url-select.underline: true
2131 URxvt.keysym.M-u: perl:url-select:select_next
2132 URxvt.keysym.M-Escape: perl:keyboard-select:activate
2133 URxvt.keysym.M-s: perl:keyboard-select:search
2134 URxvt.url-launcher: /usr/bin/abrowser
2135 URxvt.matcher.button: 1
2136 ! URxvt.iso14755: false
2137 ! URxvt.iso14755_53: false
2138 ! URxvt.keysym.M-c: perl:clipboard:copy
2139 ! URxvt.keysym.M-v: perl:clipboard:paste
2140 URxvt.keysym.M-c: eval:selection_to_clipboard
2141 URxvt.keysym.M-v: eval:paste_clipboard
2142 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
2143 ! URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
2144 ! URxvt.keysym.Shift-Control-V: eval:paste_clipboard
2145 URxvt.keysym.C-Up: font-size:increase
2146 URxvt.keysym.C-Down: font-size:decrease
2147 URxvt.keysym.C-S-Up: font-size:incglobal
2148 URxvt.keysym.C-S-Down: font-size:decglobal
2149 URxvt.keysym.C-equal: font-size:reset
2150 !URxvt.keysym.C-question: font-size:show
2152 !URxvt.iconFile: /usr/share/icons/elementary-xfce/apps/48/terminal.png
2154 !urxvt*foreground: white
2155 !urxvt*background: black
2174 !URxvt.foreground: #C8C8C8
2175 !URxvt.background: #FFFFFF
2195 !! orange (replaces cyan)
2204 ! ! Base16 Solarized Light
2205 ! ! Scheme: Ethan Schoonover (http://ethanschoonover.com/solarized)
2207 ! #define base00 #fdf6e3
2208 ! #define base01 #eee8d5
2209 ! #define base02 #93a1a1
2210 ! #define base03 #839496
2211 ! #define base04 #657b83
2212 ! #define base05 #586e75
2213 ! #define base06 #073642
2214 ! #define base07 #002b36
2215 ! #define base08 #dc322f
2216 ! #define base09 #cb4b16
2217 ! #define base0A #b58900
2218 ! #define base0B #859900
2219 ! #define base0C #2aa198
2220 ! #define base0D #268bd2
2221 ! #define base0E #6c71c4
2222 ! #define base0F #d33682
2224 ! *foreground: base05
2225 ! #ifdef background_opacity
2226 ! *background: [background_opacity]base00
2228 ! *background: base00
2230 ! *cursorColor: base05
2250 ! ! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
2251 ! ! use 'shell' template to set these if necessary
2260 ! Tango colour theme for rxvt-unicode
2261 URxvt.background: #FFFFFF
2262 URxvt.foreground: #000000
2265 URxvt.color0: #2E3436
2266 URxvt.color8: #757773
2269 URxvt.color1: #CC0000
2270 URxvt.color9: #EF2929
2273 URxvt.color2: #4E9A06
2274 URxvt.color10: #8AE234
2277 URxvt.color3: #C4A000
2278 URxvt.color11: #FCE94F
2281 URxvt.color4: #3465A4
2282 URxvt.color12: #729FCF
2285 URxvt.color5: #75507B
2286 URxvt.color13: #AD7FA8
2289 !URxvt.color6: #06989A
2290 !URxvt.color14: #34E2E2
2291 ! orange (replaces cyan)
2296 URxvt.color7: #D3D7CF
2297 URxvt.color15: #EEEEEC
2302 :header-args+: :tangle ~/.xsession :tangle-mode (identity #o755)
2305 For custom session on Debian. See https://wiki.debian.org/Xsession.
2308 if [ -f "$HOME/.xinitrc" ]; then
2312 [ -f "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" ] && /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd &
2313 [ -x "$(command -v light-locker)" ] && light-locker --lock-on-suspend &
2314 [ -x "$(command -v pasystray)" ] && pasystray -a &
2315 [ -x "$(command -v nm-applet)" ] && nm-applet &
2316 [ -x "$(command -v compton)" ] && compton &
2317 [ -x "$(command -v dunst)" ] && dunst &
2318 [ -x "$(command -v emacs)" ] && exec ssh-agent exwm -ib 0
2323 :header-args+: :tangle ~/.xsessionrc
2327 if [ -f "$HOME/.profile" ]; then . "$HOME/.profile"; fi
2332 :header-args+: :tangle ~/.config/user-dirs.dirs
2336 XDG_DESKTOP_DIR="$HOME/Desktop"
2337 XDG_DOCUMENTS_DIR="$HOME/usr/doc"
2338 XDG_DOWNLOAD_DIR="$HOME/usr/dl"
2339 XDG_MUSIC_DIR="$HOME/usr/music"
2340 XDG_PICTURES_DIR="$HOME/usr/pic"
2341 XDG_PUBLICSHARE_DIR="$HOME/usr/pub"
2342 XDG_TEMPLATES_DIR="$HOME/usr/temp"
2343 XDG_VIDEOS_DIR="$HOME/usr/vid"
2348 :header-args+: :tangle ~/.config/zathura/zathurarc
2352 set smooth-scroll true
2353 set selection-clipboard clipboard
2355 set default-bg "#272727"
2356 set statusbar-bg "#272727"
2357 set inputbar-bg "#373737"
2358 set window-title-basename true
2359 set statusbar-home-tilde true
2361 map <Return> scroll down
2362 map <A-Return> scroll up
2364 map H jumplist backward
2365 map L jumplist forward
2367 map [normal] i toggle_index
2368 map [index] i toggle_index
2369 map [index] q toggle_index
2374 This section contains various useful scripts including ones used by
2375 the programs above. For instance, =toggle-tablet= for switching to
2376 and from tablet mode on my X220T, =toggle-presentation-mode= for
2377 toggling Xfce's presentation mode which keeps the screen awake, and
2378 =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
2379 exact brightness value.
2381 ** battery-percentage-time
2383 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
2386 #+begin_src sh :tangle no
2389 dbus-send --print-reply=literal --system \
2390 --dest=org.freedesktop.UPower \
2391 /org/freedesktop/UPower/devices/battery_BAT0 \
2392 org.freedesktop.DBus.Properties.Get \
2393 string:org.freedesktop.UPower.Device \
2394 string:"${label}" | awk '{print $3}'
2397 perc=$(dbus_send 'Percentage')
2398 state=$(dbus_send 'State')
2400 if [ "$state" -eq 2 ]; then # Discharging
2401 secs=$(dbus_send 'TimeToEmpty')
2402 elif [ "$state" -eq 1 ]; then # Charging
2403 secs=$(dbus_send 'TimeToFull')
2406 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
2411 :header-args+: :tangle ~/.local/bin/emcl :shebang "#!/bin/sh"
2415 exec emacsclient --alternate-editor="" -c "$@"
2420 :header-args+: :tangle ~/.local/bin/my-i3status :shebang "#!/usr/bin/env python2"
2424 # -*- coding: utf-8 -*-
2426 # This script is a simple wrapper which prefixes each i3status line with custom
2427 # information. It is based on:
2428 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
2430 # In ~/.i3status.conf, add the following line:
2431 # output_format = "i3bar"
2432 # in the 'general' section.
2433 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
2434 # status_command i3status | my-i3status.py
2435 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
2437 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
2438 # © 2018 Amin Bandali <bandali@gnu.org>
2440 # This program is free software. It comes without any warranty, to the extent
2441 # permitted by applicable law. You can redistribute it and/or modify it under
2442 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
2443 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
2451 """ Return true if ~/.nosleep exists. """
2452 return os.path.isfile(os.path.expanduser("~/.nosleep"))
2454 def print_line(message):
2455 """ Non-buffered printing to stdout. """
2456 sys.stdout.write(message + '\n')
2460 """ Interrupted respecting reader for stdin. """
2461 # try reading a line, removing any extra whitespace
2463 line = sys.stdin.readline().strip()
2464 # i3status sends EOF, or an empty line
2469 except KeyboardInterrupt:
2472 if __name__ == '__main__':
2473 # Skip the first line which contains the version header.
2474 print_line(read_line())
2476 # The second line contains the start of the infinite array.
2477 print_line(read_line())
2480 line, prefix = read_line(), ''
2481 # ignore comma at start of lines
2482 if line.startswith(','):
2483 line, prefix = line[1:], ','
2486 j = json.loads(line)
2487 # insert information into the start of the json, but could be anywhere
2488 j.insert(0, {'full_text' : '•', 'name' : 'nosleep'})
2489 # and echo back new encoded json
2490 print_line(prefix+json.dumps(j))
2492 print_line(prefix+line)
2497 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/sh"
2502 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
2503 [ -n "$val" ] && light -S "$val"
2508 :header-args+: :tangle ~/.local/bin/rofi-remmina :shebang "#!/usr/bin/env python2"
2514 from subprocess import Popen, PIPE
2516 remmina_dir = os.path.expanduser("~/.local/share/remmina")
2520 for f in os.listdir(remmina_dir):
2521 fp = os.path.join(remmina_dir, f)
2522 c = ConfigParser.ConfigParser()
2524 n = c.get('remmina', 'name')
2527 lines = max(min(15, len(fdict)), 1);
2528 width = len(max(fdict.keys(), key=len))
2529 rofi = Popen(["rofi", "-i", "-dmenu", \
2530 "-l", str(lines), "-width", str(width), \
2531 "-p", "connection"], stdout=PIPE, stdin=PIPE)
2532 selected = rofi.communicate("\n" \
2533 .join(fdict.keys()) \
2534 .encode("utf-8"))[0] \
2539 r = Popen(["remmina", "-c", fdict[selected]])
2543 ** toggle-presentation-mode
2545 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/sh"
2549 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
2554 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/sh"
2558 # This script toggles between a 'normal' mode and a 'tablet' mode, doing
2561 # - rotates the screen using =xrandr=, so that rotating the physical
2562 # display of my X220t would have the laptop's battery on the right
2564 # - enables touch screen,
2565 # - properly rotates the stylus pen and touch screen pointers, and
2566 # - toggles between RGB and Vertical BGR sub-pixel order.
2568 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
2569 0) # Screen is not rotated, we should rotate it right (90°)
2571 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
2572 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
2573 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
2574 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
2576 1) # Currently top is rotated right, we should set it normal (0°)
2578 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
2579 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
2580 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
2581 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
2584 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
2592 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
2596 cur_vol=$(pamixer --get-volume)
2598 if [ $(pamixer --get-mute) = true ]; then
2599 printf 'mt \n' "$cur_vol"
2601 printf '%02d \n' "$cur_vol"
2607 :header-args+: :tangle ~/.local/bin/zathura-sync :shebang "#!/bin/sh"
2613 zathura --synctex-forward "$pos" "$pdffile" || \
2615 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
2616 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )