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
1162 :header-args+: :tangle ~/.ncmpcpp/config
1165 #+begin_src conf :tangle no
1166 ##############################################################
1167 ## This is the example configuration file. Copy it to ##
1168 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1169 ## and set up your preferences. ##
1170 ##############################################################
1172 ##### directories ######
1174 ## Directory for storing ncmpcpp related files.
1175 ## Changing it is useful if you want to store
1176 ## everything somewhere else and provide command
1177 ## line setting for alternative location to config
1178 ## file which defines that while launching ncmpcpp.
1181 ncmpcpp_directory = ~/.ncmpcpp
1184 ## Directory for storing downloaded lyrics. It
1185 ## defaults to ~/.lyrics since other MPD clients
1186 ## (eg. ncmpc) also use that location.
1189 #lyrics_directory = ~/.lyrics
1191 ##### connection settings #####
1193 #mpd_host = localhost
1197 #mpd_connection_timeout = 5
1199 ## Needed for tag editor and file operations to work.
1201 mpd_music_dir = ~/usr/music
1203 #mpd_crossfade_time = 5
1205 ##### music visualizer #####
1207 ## Note: In order to make music visualizer work you'll
1208 ## need to use mpd fifo output, whose format parameter
1209 ## has to be set to 44100:16:1 for mono visualization
1210 ## or 44100:16:2 for stereo visualization. Example
1211 ## configuration (it has to be put into mpd.conf):
1215 ## name "Visualizer feed"
1216 ## path "/tmp/mpd.fifo"
1217 ## format "44100:16:2"
1221 visualizer_fifo_path = /tmp/mpd.fifo
1224 ## Note: Below parameter is needed for ncmpcpp
1225 ## to determine which output provides data for
1226 ## visualizer and thus allow syncing between
1227 ## visualization and sound as currently there
1228 ## are some problems with it.
1231 visualizer_output_name = my fifo
1234 ## If you set format to 44100:16:2, make it 'yes'.
1236 visualizer_in_stereo = yes
1239 ## Multiply received samples by given value. Very
1240 ## useful for proper visualization of quiet music.
1242 #visualizer_sample_multiplier = 1
1245 ## Note: Below parameter defines how often ncmpcpp
1246 ## has to "synchronize" visualizer and audio outputs.
1247 ## 30 seconds is optimal value, but if you experience
1248 ## synchronization problems, set it to lower value.
1249 ## Keep in mind that sane values start with >=10.
1252 visualizer_sync_interval = 30
1255 ## Note: To enable spectrum frequency visualization
1256 ## you need to compile ncmpcpp with fftw3 support.
1259 ## Available values: spectrum, wave, wave_filled, ellipse.
1261 visualizer_type = spectrum
1263 #visualizer_look = ●▮
1264 visualizer_look = "●•"
1266 #visualizer_color = blue, cyan, green, yellow, magenta, red
1268 ## Alternative subset of 256 colors for terminals that support it.
1270 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1272 ##### system encoding #####
1274 ## ncmpcpp should detect your charset encoding
1275 ## but if it failed to do so, you can specify
1276 ## charset encoding you are using here.
1278 ## Note: You can see whether your ncmpcpp build
1279 ## supports charset detection by checking output
1280 ## of `ncmpcpp --version`.
1282 ## Note: Since MPD uses UTF-8 by default, setting
1283 ## this option makes sense only if your encoding
1287 #system_encoding = ""
1291 ## Time of inactivity (in seconds) after playlist
1292 ## highlighting will be disabled (0 = always on).
1294 #playlist_disable_highlight_delay = 5
1296 ## Defines how long messages are supposed to be visible.
1298 #message_delay_time = 5
1300 ##### song format #####
1302 ## For a song format you can use:
1308 ## %A - album artist
1312 ## %n - track number (01/12 -> 01)
1313 ## %N - full track info (01/12 -> 01/12)
1320 ## $R - begin right alignment
1322 ## If you want to make sure that a part of the format is displayed
1323 ## only when certain tags are present, you can archieve it by
1324 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1325 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1326 ## It is also possible to define a list of alternatives by providing
1327 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
1328 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1331 ## Note: If you want to set limit on maximal length of a tag, just
1332 ## put the appropriate number between % and character that defines
1333 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1335 ## In addition, formats support markers used for text attributes.
1336 ## They are followed by character '$'. After that you can put:
1338 ## - 0 - default window color (discards all other colors)
1347 ## - 9 - end of current color
1349 ## - u - underline text
1350 ## - r - reverse colors
1351 ## - a - use alternative character set
1353 ## If you don't want to use a non-color attribute anymore, just put it
1354 ## again, but this time insert character '/' between '$' and attribute
1355 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1356 ## or filename with reversed colors.
1358 ## If you want to use 256 colors and/or background colors in formats
1359 ## (the naming scheme is described below in section about color
1360 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
1361 ## the artist tag to one of the non-standard colors and make it have
1362 ## yellow background, you need to write $(197_yellow)%a$(end). Note
1363 ## that for standard colors this is interchangable with attributes
1366 ## Note: colors can be nested.
1369 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1371 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1373 #song_library_format = {%n - }{%t}|{%f}
1376 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1378 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1380 #now_playing_prefix = $b
1382 #now_playing_suffix = $/b
1384 #browser_playlist_prefix = "$2playlist$9 "
1386 #selected_item_prefix = $6
1388 #selected_item_suffix = $9
1390 #modified_item_prefix = $3> $9
1393 ## Note: attributes are not supported for the following variables.
1395 #song_window_title_format = {%a - }{%t}|{%f}
1397 ## Note: Below variables are used for sorting songs in browser.
1398 ## The sort mode determines how songs are sorted, and can be used
1399 ## in combination with a sort format to specify a custom sorting format.
1400 ## Available values for browser_sort_mode are "name", "mtime", "format"
1404 #browser_sort_mode = name
1406 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1408 ##### columns settings #####
1410 ## syntax of song columns list format is "column column etc."
1412 ## - syntax for each column is:
1414 ## (width of the column)[color of the column]{displayed tag}
1416 ## Note: Width is by default in %, if you want a column to
1417 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1418 ## will be the column that take 10% of screen (so the real width
1419 ## will depend on actual screen size), whereas (10f)[white]{a}
1420 ## will take 10 terminal cells, no matter how wide the screen is.
1422 ## - color is optional (if you want the default one,
1423 ## leave the field empty).
1425 ## Note: You can give a column additional attributes by putting appropriate
1426 ## character after displayed tag character. Available attributes are:
1428 ## - r - column will be right aligned
1429 ## - E - if tag is empty, empty tag marker won't be displayed
1433 ## - give a column custom name by putting it after attributes,
1434 ## separated with character ':', e.g. {lr:Length} gives you
1435 ## right aligned column of lengths named "Length".
1437 ## - define sequence of tags, that have to be displayed in case
1438 ## predecessor is empty in a way similar to the one in classic
1439 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1440 ## creates column named "Owner" that tries to display artist
1441 ## tag and then composer and performer if previous ones are
1445 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1447 ##### various settings #####
1450 ## Note: Custom command that will be executed each
1451 ## time song changes. Useful for notifications etc.
1453 #execute_on_song_change = ""
1455 #playlist_show_mpd_host = no
1457 #playlist_show_remaining_time = no
1459 #playlist_shorten_total_times = no
1461 #playlist_separate_albums = no
1464 ## Note: Possible display modes: classic, columns.
1466 #playlist_display_mode = columns
1468 #browser_display_mode = classic
1470 #search_engine_display_mode = classic
1472 #playlist_editor_display_mode = classic
1474 #discard_colors_if_item_is_selected = yes
1476 #incremental_seeking = yes
1480 #volume_change_step = 2
1482 #autocenter_mode = no
1484 #centered_cursor = no
1487 ## Note: You can specify third character which will
1488 ## be used to build 'empty' part of progressbar.
1490 #progressbar_look = =>
1491 progressbar_look = "─╼╶"
1492 #progressbar_look = "─⊙╶"
1494 #progressbar_boldness = yes
1496 ## Available values: database, playlist.
1498 #default_place_to_search_in = database
1500 ## Available values: classic, alternative.
1502 #user_interface = classic
1504 #data_fetching_delay = yes
1506 ## Available values: artist, album_artist, date, genre, composer, performer.
1508 #media_library_primary_tag = artist
1510 ## Available values: wrapped, normal.
1512 #default_find_mode = wrapped
1514 #default_tag_editor_pattern = %n - %t
1516 #header_visibility = yes
1518 #statusbar_visibility = yes
1520 #titles_visibility = yes
1522 #header_text_scrolling = yes
1524 #cyclic_scrolling = no
1528 #follow_now_playing_lyrics = no
1530 #fetch_lyrics_for_current_song_in_background = no
1532 #store_lyrics_in_song_dir = no
1534 #generate_win32_compatible_filenames = yes
1536 #allow_for_physical_item_deletion = no
1539 ## Note: If you set this variable, ncmpcpp will try to
1540 ## get info from last.fm in language you set and if it
1541 ## fails, it will fall back to english. Otherwise it will
1542 ## use english the first time.
1544 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1546 #lastfm_preferred_language = en
1548 #show_hidden_files_in_local_browser = no
1551 ## How shall screen switcher work?
1553 ## - "previous" - switch between the current and previous screen.
1554 ## - "screen1,...,screenN" - switch between given sequence of screens.
1556 ## Screens available for use: help, playlist, browser, search_engine,
1557 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1559 #screen_switcher_mode = playlist, browser
1562 ## Note: You can define startup screen
1563 ## by choosing screen from the list above.
1565 #startup_screen = playlist
1568 ## Note: You can define startup slave screen
1569 ## by choosing screen from the list above or
1570 ## an empty value for no slave screen.
1572 #startup_slave_screen = ""
1574 #startup_slave_screen_focus = no
1577 ## Default width of locked screen (in %).
1578 ## Acceptable values are from 20 to 80.
1581 #locked_screen_width_part = 50
1583 #ask_for_locked_screen_width_part = yes
1585 #jump_to_now_playing_song_at_start = yes
1587 #ask_before_clearing_playlists = yes
1589 #clock_display_seconds = no
1591 #display_volume_level = yes
1593 #display_bitrate = no
1595 #display_remaining_time = no
1597 ## Available values: none, basic, extended, perl.
1599 #regular_expressions = perl
1602 ## Note: If below is enabled, ncmpcpp will ignore leading
1603 ## "The" word while sorting items in browser, tags in
1604 ## media library, etc.
1606 #ignore_leading_the = no
1608 #block_search_constraints_change_if_items_found = yes
1610 #mouse_support = yes
1612 #mouse_list_scroll_whole_page = yes
1614 #empty_tag_marker = <empty>
1616 #tags_separator = " | "
1618 #tag_editor_extended_numeration = no
1620 #media_library_sort_by_mtime = no
1622 #enable_window_title = yes
1625 ## Note: You can choose default search mode for search
1626 ## engine. Available modes are:
1628 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1629 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1630 ## but if your mpd is on a remote machine, downloading big database
1631 ## to process it can take a while
1632 ## - 3 - match only exact values (this mode uses mpd function for searching
1633 ## in database and local one for searching in current playlist)
1636 #search_engine_default_search_mode = 1
1638 #external_editor = nano
1640 ## Note: set to yes if external editor is a console application.
1642 #use_console_editor = yes
1644 ##### colors definitions #####
1646 ## It is possible to set a background color by setting a color
1647 ## value "<foreground>_<background>", e.g. red_black will set
1648 ## foregound color to red and background color to black.
1650 ## In addition, for terminals that support 256 colors it
1651 ## is possible to set one of them by using a number in range
1652 ## [1, 256] instead of color name, e.g. numerical value
1653 ## corresponding to red_black is 2_1. To find out if the
1654 ## terminal supports 256 colors, run ncmpcpp and check out
1655 ## the bottom of the help screen for list of available colors
1656 ## and their numerical values.
1658 ## Note: due to technical limitations of ncurses, if 256 colors
1659 ## are used, it is possible to either use only the colors with
1660 ## default background color, or all pairs from 1_1 up to 254_127,
1661 ## depending on the ncurses version used.
1664 #colors_enabled = yes
1666 #empty_tag_color = cyan
1668 #header_window_color = default
1670 #volume_color = default
1672 #state_line_color = default
1674 #state_flags_color = default
1676 #main_window_color = yellow
1682 #main_window_highlight_color = yellow
1684 #progressbar_color = black
1686 #progressbar_elapsed_color = green
1688 #statusbar_color = default
1690 #alternative_ui_separator_color = black
1692 #active_column_color = red
1694 #window_border_color = green
1696 #active_window_border = red
1702 :header-args+: :tangle ~/.ncmpcpp/bindings
1705 #+begin_src conf :tangle no
1730 move_sort_order_down
1738 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/amin.sieve :comments none
1742 require ["regex", "variables", "fileinto", "envelope",
1743 "mailbox", "imap4flags", "include"];
1747 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
1748 fileinto :create "gnu.webmasters";
1752 include :personal "lists";
1757 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/lists.sieve :comments none
1761 require ["regex", "variables", "fileinto", "envelope",
1762 "mailbox", "imap4flags", "include"];
1766 header :contains "list-id"
1767 [ "<emacs-devel.gnu.org>"
1768 , "<emacs-orgmode.gnu.org>"
1769 , "<emacsconf-discuss.gnu.org>"
1770 , "<fencepost-users.gnu.org>"
1771 , "<guix-devel.gnu.org>"
1772 , "<guile-devel.gnu.org>"
1773 , "<help-gnu-emacs.gnu.org>"
1774 , "<info-gnu-emacs.gnu.org>"
1775 , "<info-guix.gnu.org>"
1776 , "<www-commits.gnu.org>"
1777 , "<www-discuss.gnu.org>"
1778 , "<deepspec.lists.cs.princeton.edu>"
1779 , "<haskell-cafe.haskell.org>"
1780 , "<haskell-art.we.lurk.org>"
1781 , "<notmuch.notmuchmail.org>"
1783 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
1784 set :lower "listname" "${1}";
1785 fileinto :create "gnu.${listname}";
1790 # sr.ht lists, with dots ('.') omitted
1792 header :contains "list-id"
1793 [ "<~bandali/public-inbox@lists.sr.ht>"
1794 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
1795 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
1796 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
1797 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
1799 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
1800 set :lower "username" "${1}";
1801 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
1802 fileinto :create "gnu.${username}.${listname}";
1810 :header-args+: :tangle ~/.config/readline/inputrc
1814 set enable-bracketed-paste on
1816 set colored-stats on
1817 set colored-completion-prefix on
1818 set completion-ignore-case on
1819 set menu-complete-display-prefix on
1820 set page-completions off
1821 set show-all-if-ambiguous on
1822 set show-all-if-unmodified on
1823 set visible-stats on
1826 "\e[Z": menu-complete-backward
1828 "\e[A": history-search-backward
1829 "\e[B": history-search-forward
1834 :header-args+: :tangle ~/.config/rofi/config
1838 ! rofi.font: Ubuntu Mono 13
1839 ! rofi.font: Inconsolata 16
1840 ! rofi.font: Iosevka 13
1841 ! rofi.font: Source Code Pro 11
1842 rofi.font: Source Code Pro 10.5
1843 rofi.modi: run,window
1851 rofi.theme: ~/.guix-profile/share/rofi/themes/gruvbox-light-hard.rasi
1856 :header-args+: :tangle ~/.config/rofi-pass/config
1860 # permanently set alternative root dir
1861 # root=/path/to/root
1863 # rofi command. Make sure to have "$@" as last argument
1865 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
1866 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
1869 # xdotool needs the keyboard layout to be set using setxkbmap
1870 # You can do this in your autostart scripts (e.g. xinitrc)
1872 # If for some reason, you cannot do this, you can set the command here.
1873 # and set fix_layout to true
1882 USERNAME_field='user'
1883 AUTOTYPE_field='autotype'
1885 # delay to be used for :delay keyword
1888 ## Programs to be used
1897 default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
1900 default_autotype='user :tab pass'
1902 # color of the help messages
1903 # leave empty for autodetection
1904 help_color="#4872FF"
1906 # Clipboard settings
1907 # Possible options: primary, clipboard, both
1910 # Options for generating new password entries
1911 # default_user is also used for password files that have no user field.
1913 default_user2=bandali
1916 # Custom Keybindings
1938 :header-args+: :tangle ~/.config/screen/screenrc
1943 caption always "%{= kc}GNU Screen $USER@%H (load: %l)%-28=%{= .m}%D %d.%m.%Y %0c"
1950 :header-args+: :tangle ~/.bashrc
1954 # Bash initialization for interactive non-login shells and
1955 # for remote shells (info "(bash) Bash Startup Files").
1957 # Export 'SHELL' to child processes. Programs such as 'screen'
1958 # honor it and otherwise use /bin/sh.
1963 # We are being invoked from a non-interactive shell. If this
1964 # is an SSH session (as in "ssh host command"), source
1965 # /etc/profile so we get PATH and other essential variables.
1966 [[ -n "$SSH_CLIENT" ]] && source /etc/profile
1968 # Don't do anything else.
1972 if [ -n "$IS_GUIX_SYSTEM" ]; then
1973 # Source the system-wide file.
1977 # from https://unix.stackexchange.com/a/55935
1979 cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
1983 if [ $(id -u) == "0" ]; then
1984 PS1='`printf "\[\e[1;31m\]\$\[\e[00m\]"` '
1988 PS1="\u@\h:\w/`[ -n "$GUIX_ENVIRONMENT" ] && printf \" [env]\"`\n$PS1"
1990 # set terminal title
1991 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: $(b_prompt)\007"'
1994 # echo -e "\033[5 q" # blinking
1995 echo -e "\033[6 q" # non-blinking
1997 # various bash tweaks
1998 # append to the history file, don't overwrite it
2001 # check the window size after each command and, if necessary,
2002 # update the values of LINES and COLUMNS.
2003 shopt -s checkwinsize
2004 # If set, the pattern "**" used in a pathname expansion context will
2005 # match all files and zero or more directories and subdirectories.
2007 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
2010 # don't put duplicate lines or lines starting with space in the
2012 HISTCONTROL=ignoreboth
2013 # ignore a few very common commands and don't add them to history
2014 HISTIGNORE='ls:l:s:g:[bf]g:history'
2015 HISTTIMEFORMAT='%F %T '
2019 alias ls='ls -p --color=auto'
2020 alias l='ls -lh' # long format and human-readable sizes
2021 alias ll='l -A' # long format, all files
2022 alias dir='dir --color=auto'
2023 alias vdir='vdir --color=auto'
2024 alias grep='grep --color=auto'
2025 alias fgrep='fgrep --color=auto'
2026 alias egrep='egrep --color=auto'
2027 alias mpv="mpv --ytdl-format mp4"
2030 alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
2031 alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
2032 alias m="mbsync csclub; mbsync uwaterloo; mbsync shemshak; mbsync gnub"
2033 alias best="youtube-dl -f best"
2035 alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
2039 [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
2044 cd $(mktemp -d /tmp/$1.XXXX)
2047 # separate alias definitions file, if exists
2048 if [ -f ~/.bash_aliases ]; then
2052 # enable programmable completion features (not needed if already
2053 # enabled in /etc/bash.bashrc and if /etc/profile sources
2054 # /etc/bash.bashrc).
2055 if ! shopt -oq posix; then
2056 if [ -f /usr/share/bash-completion/bash_completion ]; then
2057 . /usr/share/bash-completion/bash_completion
2058 elif [ -f /etc/bash_completion ]; then
2059 . /etc/bash_completion
2063 # source Guix shell config dirs, for vte.sh and bash completions
2064 GUIX_PROFILES=("${HOME}/.guix-profile"
2065 "${HOME}/.config/guix/current")
2066 for profile in "${GUIX_PROFILES[@]}"; do
2067 for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
2068 if [ -d "${dir}" ]; then
2069 for f in "${dir}"/*; do
2079 :header-args+: :tangle ~/.profile
2083 # ~/.profile: executed by the command interpreter for login shells.
2084 # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
2087 # source host-specific profile
2088 if [ -f "$HOME/.config/profiles/$(hostname)" ]; then
2089 . "$HOME/.config/profiles/$(hostname)"
2092 export EDITOR="emacsclient -nw"
2093 export VISUAL="emcl"
2095 PATH="$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
2096 PATH="$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH"
2097 if [ -z "$IS_GUIX_SYSTEM" ]; then
2098 PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
2099 INFOPATH="$HOME/.config/guix/current/share/info${INFOPATH:+:}$INFOPATH"
2100 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
2105 export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
2106 export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
2108 export XDG_CONFIG_HOME="$HOME/.config"
2109 export XDG_DATA_HOME="$HOME/.local/share"
2111 if [ -f "$HOME/.config/user-dirs.dirs" ]; then
2113 . "$HOME/.config/user-dirs.dirs"
2117 export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
2118 export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
2120 export MAILDIR="$HOME/mail"
2121 export CVS_RSH="ssh"
2123 if [ -x "$(command -v go)" ]; then
2124 export GOPATH="$HOME/src/go"
2125 export PATH="$GOPATH/bin:$PATH"
2129 if [ -n "$BASH_VERSION" ]; then
2130 # include .bashrc if it exists
2131 if [ -f "$HOME/.bashrc" ]; then
2136 if [ -z "$IS_GUIX_SYSTEM" ]; then
2137 # if guix is installed
2138 if [ -x "$(command -v guix)" ]; then
2139 SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
2140 if [ -d "$SSL_CERT_DIR" -o -h "$SSL_CERT_DIR" ]; then
2142 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
2144 printf "it seems you forgot to \`guix install nss-certs\'\n"
2146 GUIX_PROFILE="$HOME/.guix-profile"
2147 . "$GUIX_PROFILE/etc/profile"
2152 for p in $MY_GUIX_PROFILES/*; do
2153 profile=$p/$(basename "$p")
2154 if [ -f "$profile"/etc/profile ]; then
2155 GUIX_PROFILE="$profile"
2156 . "$GUIX_PROFILE"/etc/profile
2161 # start an ssh-agent (with guix's openssh)
2162 if [ -z "$IS_GUIX_SYSTEM" ]; then
2163 if ! pgrep -u "$USER" ssh-agent > /dev/null; then
2164 ssh-agent > ~/.ssh-agent-thing
2166 if [[ ! "$SSH_AUTH_SOCK" ]]; then
2167 eval "$(<~/.ssh-agent-thing)"
2171 # footenote: when on a foreign distro and using Xfce, don't forget to
2172 # disable its auto-start of gpg- and ssh-agent, by issuing
2173 # xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
2174 # xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
2175 # see https://docs.xfce.org/xfce/xfce4-session/advanced#ssh_and_gpg_agents
2176 # also, MATE does something similar with gnome-keyring-daemon:
2177 # http://william.shallum.net/random-notes/disabling-gnome-keyring-daemon-ssh-agent-on-mate-desktop
2180 *** per-host profiles
2182 Host-specific profiles, sourced from =~/.profile=. Each
2183 =~/.config/profiles/HOST= file will be sourced on the machine with
2184 =hostname= of =HOST=.
2188 :header-args+: :tangle ~/.config/profiles/chaman
2192 export IS_GUIX_SYSTEM=true
2194 if [ -x "$(command -v xinput)" ]; then
2195 xinput --set-prop "TPPS/2 IBM TrackPoint" 'libinput Accel Speed' -0.4
2200 -option ctrl:nocaps \
2201 -option grp:shifts_toggle
2203 xmodmap -e "keysym Menu = Super_R"
2205 xsetroot -cursor_name left_ptr
2212 :header-args+: :tangle ~/.config/profiles/darrud
2216 export INFOPATH="$HOME/usr/local/share/info${INFOPATH:+:}$INFOPATH"
2221 :header-args+: :tangle ~/.config/profiles/langa
2225 export XDG_DATA_DIRS="/usr/share/mate:/usr/local/share/:/usr/share/"
2230 :header-args+: :tangle ~/.config/redshift.conf :comments none
2234 ; Global settings for redshift
2236 ; Set the day and night screen temperatures (Neutral is 6500K)
2247 ; Enable/Disable a smooth transition between day and night
2248 ; 0 will cause a direct change from day to night screen temperature.
2249 ; 1 will gradually increase or decrease the screen temperature.
2252 ; Set the screen brightness. Default is 1.0.
2254 ; It is also possible to use different settings for day and night
2255 ; since version 1.8.
2257 ;brightness-night=0.4
2258 ; Set the screen gamma (for all colors, or each color channel
2263 ; This can also be set individually for day and night since
2265 ;gamma-day=0.8:0.7:0.8
2268 ; Set the location-provider: 'geoclue2' or 'manual'
2269 ; type 'redshift -l list' to see possible values.
2270 ; The location provider settings are in a different section.
2271 ;location-provider=manual
2272 location-provider=geoclue2
2274 ; Set the adjustment-method: 'randr', 'vidmode'
2275 ; type 'redshift -m list' to see all possible values.
2276 ; 'randr' is the preferred method, 'vidmode' is an older API.
2277 ; but works in some cases when 'randr' does not.
2278 ; The adjustment method settings are in a different section.
2279 adjustment-method=randr
2281 ; Configuration of the location-provider:
2282 ; type 'redshift -l PROVIDER:help' to see the settings.
2283 ; ex: 'redshift -l manual:help'
2284 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
2285 ; are negative numbers.
2290 ; Configuration of the adjustment-method
2291 ; type 'redshift -m METHOD:help' to see the settings.
2292 ; ex: 'redshift -m randr:help'
2293 ; In this example, randr is configured to adjust screen 1.
2294 ; Note that the numbering starts from 0, so this is actually the
2295 ; second screen. If this option is not specified, Redshift will try
2296 ; to adjust _all_ screens.
2303 :header-args+: :tangle ~/.signature
2310 Free Software activist | GNU maintainer & webmaster
2311 GPG: BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103
2312 https://bandali.eu.org
2317 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
2319 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
2328 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
2329 # ------------------------------------------------------------------------------
2330 # tlp - Parameters for power saving
2331 # See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
2334 # - Some parameters are disabled, remove the leading '#' to enable # them;
2335 # shown values are suggestions not defaults
2336 # - Default *: intrinsic default that is effective when the parameter is missing
2337 # or disabled by a leading '#'; use PARAM="" to disable intrinsic defaults for
2338 # parameters with text string values
2339 # - Default <none>: do nothing or use kernel/hardware defaults
2341 # Set to 0 to disable, 1 to enable TLP.
2345 # Operation mode when no power supply can be detected: AC, BAT.
2346 # Concerns some desktop and embedded hardware only.
2350 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2351 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2353 TLP_PERSISTENT_DEFAULT=0
2355 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2356 # Non-zero value enables, zero disables laptop mode.
2357 # Default: 0 (AC), 2 (BAT)
2358 DISK_IDLE_SECS_ON_AC=0
2359 DISK_IDLE_SECS_ON_BAT=2
2361 # Dirty page values (timeouts in secs).
2362 # Default: 15 (AC + BAT)
2363 MAX_LOST_WORK_SECS_ON_AC=15
2364 MAX_LOST_WORK_SECS_ON_BAT=60
2366 # Note: CPU parameters below are disabled by default, remove the leading #
2367 # to enable them, otherwise kernel defaults will be used.
2369 # Select a CPU frequency scaling governor.
2370 # Intel Core i processor with intel_pstate driver:
2371 # powersave(*), performance.
2372 # Older hardware with acpi-cpufreq driver:
2373 # ondemand(*), powersave, performance, conservative, schedutil.
2374 # (*) is recommended.
2375 # Use tlp-stat -p to show the active driver and available governors.
2377 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2378 # efficient for *almost all* workloads and therefore kernel and most
2379 # distributions have chosen them as defaults. If you still want to change,
2380 # you should know what you're doing! You *must* disable your distribution's
2381 # governor settings or conflicts will occur.
2383 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2384 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2386 # Set the min/max frequency available for the scaling governor.
2387 # Possible values depend on your CPU. For available frequencies see
2388 # the output of tlp-stat -p.
2390 #CPU_SCALING_MIN_FREQ_ON_AC=0
2391 #CPU_SCALING_MAX_FREQ_ON_AC=0
2392 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2393 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2395 # Set energy performance hints (HWP) for Intel P-state governor:
2396 # performance, balance_performance, default, balance_power, power
2397 # Values are given in order of increasing power saving.
2398 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2400 CPU_HWP_ON_AC=balance_performance
2401 CPU_HWP_ON_BAT=balance_power
2403 # Set Intel P-state performance: 0..100 (%).
2404 # Limit the max/min P-state to control the power dissipation of the CPU.
2405 # Values are stated as a percentage of the available performance.
2406 # Requires an Intel Core i processor with intel_pstate driver.
2408 #CPU_MIN_PERF_ON_AC=0
2409 #CPU_MAX_PERF_ON_AC=100
2410 #CPU_MIN_PERF_ON_BAT=0
2411 #CPU_MAX_PERF_ON_BAT=30
2413 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2414 # Requires an Intel Core i processor.
2416 # - This may conflict with your distribution's governor settings
2417 # - A value of 1 does *not* activate boosting, it just allows it
2422 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2423 # 0=disable, 1=enable.
2425 SCHED_POWERSAVE_ON_AC=0
2426 SCHED_POWERSAVE_ON_BAT=1
2428 # Kernel NMI Watchdog:
2429 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2433 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2434 # Frequency voltage pairs are written to:
2435 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2436 # CAUTION: only use this, if you thoroughly understand what you are doing!
2438 #PHC_CONTROLS="F:V F:V F:V F:V"
2440 # Set CPU performance versus energy savings policy:
2441 # performance, balance-performance, default, balance-power, power.
2442 # Values are given in order of increasing power saving.
2443 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2445 ENERGY_PERF_POLICY_ON_AC=performance
2446 ENERGY_PERF_POLICY_ON_BAT=balance-power
2448 # Disk devices; separate multiple devices with spaces.
2449 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2450 # Note: DISK parameters below are effective only when this option is configured.
2451 # Default: "nvme0n1 sda"
2452 DISK_DEVICES="sda sdb"
2454 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2455 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2456 # Separate values for multiple disks with spaces. Use the special value 'keep'
2457 # to keep the hardware default for the particular disk.
2459 DISK_APM_LEVEL_ON_AC="254 254"
2460 DISK_APM_LEVEL_ON_BAT="128 128"
2462 # Hard disk spin down timeout:
2463 # 0: spin down disabled
2464 # 1..240: timeouts from 5s to 20min (in units of 5s)
2465 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2466 # See 'man hdparm' for details.
2467 # Separate values for multiple disks with spaces. Use the special value 'keep'
2468 # to keep the hardware default for the particular disk.
2470 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2471 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2473 # Select I/O scheduler for the disk devices.
2474 # Multi queue (blk-mq) schedulers:
2475 # mq-deadline(*), none, kyber, bfq
2476 # Single queue schedulers:
2477 # deadline(*), cfq, bfq, noop
2479 # Separate values for multiple disks with spaces. Use the special value 'keep'
2480 # to keep the kernel default scheduler for the particular disk.
2482 # - Multi queue (blk-mq) may need kernel boot option 'scsi_mod.use_blk_mq=1'
2483 # and 'modprobe mq-deadline-iosched|kyber|bfq' on kernels < 5.0
2484 # - Single queue schedulers are legacy now and were removed together with
2485 # the old block layer in kernel 5.0
2487 #DISK_IOSCHED="mq-deadline mq-deadline"
2489 # AHCI link power management (ALPM) for disk devices:
2490 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2491 # (*) Kernel >= 4.15 required, then recommended.
2492 # Multiple values separated with spaces are tried sequentially until success.
2494 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2495 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2497 # Exclude host devices from AHCI link power management.
2498 # Separate multiple hosts with spaces.
2500 #SATA_LINKPWR_BLACKLIST="host1"
2502 # Runtime Power Management for AHCI host and disks devices:
2503 # on=disable, auto=enable.
2504 # EXPERIMENTAL ** WARNING: auto may cause system lockups/data loss.
2506 #AHCI_RUNTIME_PM_ON_AC=on
2507 #AHCI_RUNTIME_PM_ON_BAT=on
2509 # Seconds of inactivity before disk is suspended.
2510 # Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated.
2512 AHCI_RUNTIME_PM_TIMEOUT=15
2514 # PCI Express Active State Power Management (PCIe ASPM):
2515 # default(*), performance, powersave.
2516 # (*) keeps BIOS ASPM defaults (recommended)
2518 #PCIE_ASPM_ON_AC=default
2519 #PCIE_ASPM_ON_BAT=default
2521 # Set the min/max/turbo frequency for the Intel GPU.
2522 # Possible values depend on your hardware. For available frequencies see
2523 # the output of tlp-stat -g.
2525 #INTEL_GPU_MIN_FREQ_ON_AC=0
2526 #INTEL_GPU_MIN_FREQ_ON_BAT=0
2527 #INTEL_GPU_MAX_FREQ_ON_AC=0
2528 #INTEL_GPU_MAX_FREQ_ON_BAT=0
2529 #INTEL_GPU_BOOST_FREQ_ON_AC=0
2530 #INTEL_GPU_BOOST_FREQ_ON_BAT=0
2532 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2533 # auto = mid on BAT, high on AC.
2535 RADEON_POWER_PROFILE_ON_AC=default
2536 RADEON_POWER_PROFILE_ON_BAT=default
2538 # Radeon dynamic power management method (DPM): battery, performance.
2540 RADEON_DPM_STATE_ON_AC=performance
2541 RADEON_DPM_STATE_ON_BAT=battery
2543 # Radeon DPM performance level: auto, low, high; auto is recommended.
2544 # Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated.
2546 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2547 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2549 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2554 # Disable wake on LAN: Y/N.
2558 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2559 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2561 SOUND_POWER_SAVE_ON_AC=0
2562 SOUND_POWER_SAVE_ON_BAT=0
2564 # Disable controller too (HDA only): Y/N.
2565 # Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated.
2567 SOUND_POWER_SAVE_CONTROLLER=N
2569 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2570 # Drive can be powered on again by releasing (and reinserting) the eject lever
2571 # or by pressing the disc eject button on newer models.
2572 # Note: an UltraBay/MediaBay hard disk is never powered off.
2574 BAY_POWEROFF_ON_AC=0
2575 BAY_POWEROFF_ON_BAT=0
2576 # Optical drive device to power off
2580 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2583 RUNTIME_PM_ON_BAT=auto
2585 # Exclude PCI(e) device adresses the following list from Runtime PM
2586 # (separate with spaces). Use lspci to get the adresses (1st column).
2588 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2590 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2591 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2592 # prevents accidential power-on of dGPU in hybrid graphics setups.
2593 # Separate multiple drivers with spaces.
2594 # Default: "amdgpu mei_me nouveau nvidia pcieport radeon", use "" to disable
2596 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu mei_me nouveau nvidia pcieport radeon"
2598 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2602 # Exclude listed devices from USB autosuspend (separate with spaces).
2603 # Use lsusb to get the ids.
2604 # Note: input devices (usbhid) are excluded automatically
2606 #USB_BLACKLIST="1111:2222 3333:4444"
2608 # Bluetooth devices are excluded from USB autosuspend:
2609 # 0=do not exclude, 1=exclude.
2611 USB_BLACKLIST_BTUSB=0
2613 # Phone devices are excluded from USB autosuspend:
2614 # 0=do not exclude, 1=exclude (enable charging).
2616 USB_BLACKLIST_PHONE=0
2618 # Printers are excluded from USB autosuspend:
2619 # 0=do not exclude, 1=exclude.
2621 USB_BLACKLIST_PRINTER=1
2623 # WWAN devices are excluded from USB autosuspend:
2624 # 0=do not exclude, 1=exclude.
2626 USB_BLACKLIST_WWAN=0
2628 # Include listed devices into USB autosuspend even if already excluded
2629 # by the blacklists above (separate with spaces). Use lsusb to get the ids.
2631 #USB_WHITELIST="1111:2222 3333:4444"
2633 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
2634 # (workaround for USB devices that cause shutdown problems).
2636 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
2638 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
2639 # on system startup: 0=disable, 1=enable.
2640 # Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
2641 # are ignored when this is enabled.
2643 #RESTORE_DEVICE_STATE_ON_STARTUP=0
2644 RESTORE_DEVICE_STATE_ON_STARTUP=1
2646 # Radio devices to disable on startup: bluetooth, wifi, wwan.
2647 # Separate multiple devices with spaces.
2649 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
2651 # Radio devices to enable on startup: bluetooth, wifi, wwan.
2652 # Separate multiple devices with spaces.
2654 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
2656 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
2657 # (workaround for devices that are blocking shutdown).
2659 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
2661 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
2662 # (to prevent other operating systems from missing radios).
2664 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
2666 # Radio devices to enable on AC: bluetooth, wifi, wwan.
2668 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
2670 # Radio devices to disable on battery: bluetooth, wifi, wwan.
2672 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
2673 DEVICES_TO_DISABLE_ON_BAT="bluetooth"
2675 # Radio devices to disable on battery when not in use (not connected):
2676 # bluetooth, wifi, wwan.
2678 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
2680 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
2681 # required). Charging starts when the remaining capacity falls below the
2682 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
2683 # Main / Internal battery (values in %)
2685 #START_CHARGE_THRESH_BAT0=75
2686 #STOP_CHARGE_THRESH_BAT0=80
2687 # Ultrabay / Slice / Replaceable battery (values in %)
2689 #START_CHARGE_THRESH_BAT1=75
2690 #STOP_CHARGE_THRESH_BAT1=80
2692 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
2694 #RESTORE_THRESHOLDS_ON_BAT=1
2696 # Battery feature drivers: 0=disable, 1=enable
2702 # ------------------------------------------------------------------------------
2703 # tlp-rdw - Parameters for the radio device wizard
2704 # Possible devices: bluetooth, wifi, wwan.
2707 # - Parameters are disabled by default, remove the leading # to enable them
2708 # - Separate multiple radio devices with spaces
2710 # Default: <none> (for all parameters below)
2712 # Radio devices to disable on connect.
2713 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
2714 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
2715 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
2717 # Radio devices to enable on disconnect.
2718 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
2719 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
2720 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
2722 # Radio devices to enable/disable when docked.
2723 #DEVICES_TO_ENABLE_ON_DOCK=""
2724 #DEVICES_TO_DISABLE_ON_DOCK=""
2726 # Radio devices to enable/disable when undocked.
2727 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
2728 #DEVICES_TO_DISABLE_ON_UNDOCK=""
2733 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
2734 # ------------------------------------------------------------------------------
2735 # tlp - Parameters for power saving
2736 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
2738 # Hint: some features are disabled by default, remove the leading # to enable
2741 # Set to 0 to disable, 1 to enable TLP.
2744 # Operation mode when no power supply can be detected: AC, BAT.
2745 # Concerns some desktop and embedded hardware only.
2748 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2749 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2750 TLP_PERSISTENT_DEFAULT=0
2752 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2753 # Non-zero value enables, zero disables laptop mode.
2754 DISK_IDLE_SECS_ON_AC=0
2755 DISK_IDLE_SECS_ON_BAT=2
2757 # Dirty page values (timeouts in secs).
2758 MAX_LOST_WORK_SECS_ON_AC=15
2759 MAX_LOST_WORK_SECS_ON_BAT=60
2761 # Hint: CPU parameters below are disabled by default, remove the leading #
2762 # to enable them, otherwise kernel default values are used.
2764 # Select a CPU frequency scaling governor.
2765 # Intel Core i processor with intel_pstate driver:
2766 # powersave(*), performance.
2767 # Older hardware with acpi-cpufreq driver:
2768 # ondemand(*), powersave, performance, conservative, schedutil.
2769 # (*) is recommended.
2770 # Hint: use tlp-stat -p to show the active driver and available governors.
2772 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
2773 # efficient for *almost all* workloads and therefore kernel and most
2774 # distributions have chosen them as defaults. If you still want to change,
2775 # you should know what you're doing! You *must* disable your distribution's
2776 # governor settings or conflicts will occur.
2777 #CPU_SCALING_GOVERNOR_ON_AC=powersave
2778 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
2780 # Set the min/max frequency available for the scaling governor.
2781 # Possible values strongly depend on your CPU. For available frequencies see
2782 # the output of tlp-stat -p.
2783 #CPU_SCALING_MIN_FREQ_ON_AC=0
2784 #CPU_SCALING_MAX_FREQ_ON_AC=0
2785 #CPU_SCALING_MIN_FREQ_ON_BAT=0
2786 #CPU_SCALING_MAX_FREQ_ON_BAT=0
2788 # Set energy performance hints (HWP) for Intel P-state governor:
2789 # performance, balance_performance, default, balance_power, power
2790 # Values are given in order of increasing power saving.
2791 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2792 CPU_HWP_ON_AC=balance_performance
2793 CPU_HWP_ON_BAT=balance_power
2795 # Set Intel P-state performance: 0..100 (%).
2796 # Limit the max/min P-state to control the power dissipation of the CPU.
2797 # Values are stated as a percentage of the available performance.
2798 # Requires an Intel Core i processor with intel_pstate driver.
2799 #CPU_MIN_PERF_ON_AC=0
2800 #CPU_MAX_PERF_ON_AC=100
2801 #CPU_MIN_PERF_ON_BAT=0
2802 #CPU_MAX_PERF_ON_BAT=30
2804 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2805 # Requires an Intel Core i processor.
2807 # - This may conflict with your distribution's governor settings
2808 # - A value of 1 does *not* activate boosting, it just allows it
2812 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2813 # 0=disable, 1=enable.
2814 SCHED_POWERSAVE_ON_AC=0
2815 SCHED_POWERSAVE_ON_BAT=1
2817 # Kernel NMI Watchdog:
2818 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2821 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2822 # Frequency voltage pairs are written to:
2823 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2824 # CAUTION: only use this, if you thoroughly understand what you are doing!
2825 #PHC_CONTROLS="F:V F:V F:V F:V"
2827 # Set CPU performance versus energy savings policy:
2828 # performance, balance-performance, default, balance-power, power.
2829 # Values are given in order of increasing power saving.
2830 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2831 ENERGY_PERF_POLICY_ON_AC=performance
2832 ENERGY_PERF_POLICY_ON_BAT=balance-power
2834 # Disk devices; separate multiple devices with spaces (default: sda).
2835 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2836 DISK_DEVICES="sda sdb"
2838 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2839 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2840 # Separate values for multiple disks with spaces. Use the special value 'keep'
2841 # to keep the hardware default for the particular disk.
2842 DISK_APM_LEVEL_ON_AC="254 254"
2843 DISK_APM_LEVEL_ON_BAT="128 128"
2845 # Hard disk spin down timeout:
2846 # 0: spin down disabled
2847 # 1..240: timeouts from 5s to 20min (in units of 5s)
2848 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2849 # See 'man hdparm' for details.
2850 # Separate values for multiple disks with spaces. Use the special value 'keep'
2851 # to keep the hardware default for the particular disk.
2852 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2853 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2855 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
2856 # Separate values for multiple disks with spaces. Use the special value 'keep'
2857 # to keep the kernel default scheduler for the particular disk.
2858 #DISK_IOSCHED="cfq cfq"
2860 # AHCI link power management (ALPM) for disk devices:
2861 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2862 # (*) Kernel >= 4.15 required, then recommended.
2863 # Multiple values separated with spaces are tried sequentially until success.
2864 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2865 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2867 # Exclude host devices from AHCI link power management.
2868 # Separate multiple hosts with spaces.
2869 #SATA_LINKPWR_BLACKLIST="host1"
2871 # Runtime Power Management for AHCI host and disks devices:
2872 # on=disable, auto=enable.
2873 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
2874 #AHCI_RUNTIME_PM_ON_AC=on
2875 #AHCI_RUNTIME_PM_ON_BAT=on
2877 # Seconds of inactivity before disk is suspended.
2878 AHCI_RUNTIME_PM_TIMEOUT=15
2880 # PCI Express Active State Power Management (PCIe ASPM):
2881 # default, performance, powersave.
2882 PCIE_ASPM_ON_AC=performance
2883 PCIE_ASPM_ON_BAT=powersave
2885 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2886 # auto = mid on BAT, high on AC; default = use hardware defaults.
2887 RADEON_POWER_PROFILE_ON_AC=high
2888 RADEON_POWER_PROFILE_ON_BAT=low
2890 # Radeon dynamic power management method (DPM): battery, performance.
2891 RADEON_DPM_STATE_ON_AC=performance
2892 RADEON_DPM_STATE_ON_BAT=battery
2894 # Radeon DPM performance level: auto, low, high; auto is recommended.
2895 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2896 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2898 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2902 # Disable wake on LAN: Y/N.
2905 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2906 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2907 SOUND_POWER_SAVE_ON_AC=0
2908 SOUND_POWER_SAVE_ON_BAT=0
2910 # Disable controller too (HDA only): Y/N.
2911 SOUND_POWER_SAVE_CONTROLLER=N
2913 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2914 # Drive can be powered on again by releasing (and reinserting) the eject lever
2915 # or by pressing the disc eject button on newer models.
2916 # Note: an UltraBay/MediaBay hard disk is never powered off.
2917 BAY_POWEROFF_ON_AC=0
2918 BAY_POWEROFF_ON_BAT=0
2919 # Optical drive device to power off (default sr0).
2922 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2924 RUNTIME_PM_ON_BAT=auto
2926 # Exclude PCI(e) device adresses the following list from Runtime PM
2927 # (separate with spaces). Use lspci to get the adresses (1st column).
2928 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2929 RUNTIME_PM_BLACKLIST="01:00.0"
2931 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2932 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2933 # prevents accidential power-on of dGPU in hybrid graphics setups.
2934 # Use "" to disable the feature completely.
2935 # Separate multiple drivers with spaces.
2936 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
2938 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2941 # Exclude listed devices from USB autosuspend (separate with spaces).
2942 # Use lsusb to get the ids.
2943 # Note: input devices (usbhid) are excluded automatically
2944 #USB_BLACKLIST="1111:2222 3333:4444"
2946 # Bluetooth devices are excluded from USB autosuspend:
2947 # 0=do not exclude, 1=exclude.
2948 USB_BLACKLIST_BTUSB=0
2950 # Phone devices are excluded from USB autosuspend:
2951 # 0=do not exclude, 1=exclude (enable charging).
2952 USB_BLACKLIST_PHONE=0
2954 # Printers are excluded from USB autosuspend:
2955 # 0=do not exclude, 1=exclude.
2956 USB_BLACKLIST_PRINTER=1
2958 # WWAN devices are excluded from USB autosuspend:
2959 # 0=do not exclude, 1=exclude.
2960 USB_BLACKLIST_WWAN=1
2962 # Include listed devices into USB autosuspend even if already excluded
2963 # by the blacklists above (separate with spaces).
2964 # Use lsusb to get the ids.
2965 #USB_WHITELIST="1111:2222 3333:4444"
2967 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
2968 # (workaround for USB devices that cause shutdown problems).
2969 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
2971 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
2972 # on system startup: 0=disable, 1=enable.
2973 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
2974 # are ignored when this is enabled!
2975 #RESTORE_DEVICE_STATE_ON_STARTUP=0
2976 RESTORE_DEVICE_STATE_ON_STARTUP=1
2978 # Radio devices to disable on startup: bluetooth, wifi, wwan.
2979 # Separate multiple devices with spaces.
2980 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
2982 # Radio devices to enable on startup: bluetooth, wifi, wwan.
2983 # Separate multiple devices with spaces.
2984 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
2986 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
2987 # (workaround for devices that are blocking shutdown).
2988 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
2990 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
2991 # (to prevent other operating systems from missing radios).
2992 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
2994 # Radio devices to enable on AC: bluetooth, wifi, wwan.
2995 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
2997 # Radio devices to disable on battery: bluetooth, wifi, wwan.
2998 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3000 # Radio devices to disable on battery when not in use (not connected):
3001 # bluetooth, wifi, wwan.
3002 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3004 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3005 # required). Charging starts when the remaining capacity falls below the
3006 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3007 # Main / Internal battery (values in %)
3008 #START_CHARGE_THRESH_BAT0=75
3009 #STOP_CHARGE_THRESH_BAT0=80
3010 # Ultrabay / Slice / Replaceable battery (values in %)
3011 #START_CHARGE_THRESH_BAT1=75
3012 #STOP_CHARGE_THRESH_BAT1=80
3014 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3015 #RESTORE_THRESHOLDS_ON_BAT=1
3017 # ------------------------------------------------------------------------------
3018 # tlp-rdw - Parameters for the radio device wizard
3019 # Possible devices: bluetooth, wifi, wwan.
3022 # - Parameters are disabled by default, remove the leading # to enable them
3023 # - Separate multiple radio devices with spaces
3025 # Radio devices to disable on connect.
3026 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3027 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3028 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3030 # Radio devices to enable on disconnect.
3031 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3032 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3033 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3035 # Radio devices to enable/disable when docked.
3036 #DEVICES_TO_ENABLE_ON_DOCK=""
3037 #DEVICES_TO_DISABLE_ON_DOCK=""
3039 # Radio devices to enable/disable when undocked.
3040 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3041 #DEVICES_TO_DISABLE_ON_UNDOCK=""
3048 :header-args+: :tangle ~/.xinitrc
3052 [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
3057 #+begin_src conf-xdefaults :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3058 #include ".Xresources.d/fonts"
3059 #include ".Xresources.d/emacs"
3060 #include ".Xresources.d/rxvt-unicode"
3065 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3068 #+begin_src conf-xdefaults
3071 Emacs.verticalScrollBars: off
3072 Emacs.cursorBlink: off
3073 Emacs.FontBackend: xft,x
3074 ! Emacs.font: Ubuntu Mono-12
3075 ! Emacs.font: Triplicate T4C-11
3076 ! Emacs.font: Ubuntu Mono-10.5
3077 ! Emacs.font: Ubuntu Mono-12
3078 ! Emacs.font: Iosevka-11
3080 ! Emacs.font: Fira Mono:size=15
3081 ! Emacs.font: DejaVu Sans Mono:size=15
3082 ! Emacs.font: Inconsolata:size=17
3083 ! Emacs.font: Inconsolata:size=16
3084 ! Emacs.font: Inconsolata LGC:size=14
3085 ! Emacs.font: Source Code Pro Medium-10.5
3086 Emacs.font: Source Code Pro Medium:size=14
3087 ! Emacs.font: Ubuntu Mono:size=16
3088 ! Emacs.font: Iosevka:size=16
3093 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3096 #+begin_src conf-xdefaults
3097 Xft.lcdfilter: lcddefault
3101 Xft.hintstyle: hintslight
3102 ! Xft.hintstyle: hintfull
3109 :header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3112 #+begin_src conf-xdefaults
3114 URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3115 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
3116 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
3117 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
3119 URxvt.xftAntialias: true
3120 URxvt.letterSpace: -1
3123 !URxvt.loginShell: true
3124 !URxvt*buffered: false
3125 URxvt.saveLines: 100000
3126 URxvt.internalBorder: 3
3128 URxvt.scrollBar: false
3129 URxvt.scrollStyle: rxvt
3130 URxvt*scrollTtyOutput: false
3131 URxvt*scrollWithBuffer: true
3132 URxvt*scrollTtyKeypress: true
3133 URxvt.keysym.Shift-Up: command:\033]720;1\007
3134 URxvt.keysym.Shift-Down: command:\033]721;1\007
3136 URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3137 URxvt.url-select.launcher: firefox
3138 URxvt.url-select.underline: true
3139 URxvt.keysym.M-u: perl:url-select:select_next
3140 URxvt.keysym.M-Escape: perl:keyboard-select:activate
3141 URxvt.keysym.M-s: perl:keyboard-select:search
3142 URxvt.url-launcher: /usr/bin/abrowser
3143 URxvt.matcher.button: 1
3144 ! URxvt.iso14755: false
3145 ! URxvt.iso14755_53: false
3146 ! URxvt.keysym.M-c: perl:clipboard:copy
3147 ! URxvt.keysym.M-v: perl:clipboard:paste
3148 URxvt.keysym.M-c: eval:selection_to_clipboard
3149 URxvt.keysym.M-v: eval:paste_clipboard
3150 URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3151 ! URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
3152 ! URxvt.keysym.Shift-Control-V: eval:paste_clipboard
3153 URxvt.keysym.C-Up: font-size:increase
3154 URxvt.keysym.C-Down: font-size:decrease
3155 URxvt.keysym.C-S-Up: font-size:incglobal
3156 URxvt.keysym.C-S-Down: font-size:decglobal
3157 URxvt.keysym.C-equal: font-size:reset
3158 !URxvt.keysym.C-question: font-size:show
3160 !URxvt.iconFile: /usr/share/icons/elementary-xfce/apps/48/terminal.png
3162 !urxvt*foreground: white
3163 !urxvt*background: black
3182 !URxvt.foreground: #C8C8C8
3183 !URxvt.background: #FFFFFF
3203 !! orange (replaces cyan)
3212 ! ! Base16 Solarized Light
3213 ! ! Scheme: Ethan Schoonover (http://ethanschoonover.com/solarized)
3215 ! #define base00 #fdf6e3
3216 ! #define base01 #eee8d5
3217 ! #define base02 #93a1a1
3218 ! #define base03 #839496
3219 ! #define base04 #657b83
3220 ! #define base05 #586e75
3221 ! #define base06 #073642
3222 ! #define base07 #002b36
3223 ! #define base08 #dc322f
3224 ! #define base09 #cb4b16
3225 ! #define base0A #b58900
3226 ! #define base0B #859900
3227 ! #define base0C #2aa198
3228 ! #define base0D #268bd2
3229 ! #define base0E #6c71c4
3230 ! #define base0F #d33682
3232 ! *foreground: base05
3233 ! #ifdef background_opacity
3234 ! *background: [background_opacity]base00
3236 ! *background: base00
3238 ! *cursorColor: base05
3258 ! ! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
3259 ! ! use 'shell' template to set these if necessary
3268 ! Tango colour theme for rxvt-unicode
3269 URxvt.background: #FFFFFF
3270 URxvt.foreground: #000000
3273 URxvt.color0: #2E3436
3274 URxvt.color8: #757773
3277 URxvt.color1: #CC0000
3278 URxvt.color9: #EF2929
3281 URxvt.color2: #4E9A06
3282 URxvt.color10: #8AE234
3285 URxvt.color3: #C4A000
3286 URxvt.color11: #FCE94F
3289 URxvt.color4: #3465A4
3290 URxvt.color12: #729FCF
3293 URxvt.color5: #75507B
3294 URxvt.color13: #AD7FA8
3297 !URxvt.color6: #06989A
3298 !URxvt.color14: #34E2E2
3299 ! orange (replaces cyan)
3304 URxvt.color7: #D3D7CF
3305 URxvt.color15: #EEEEEC
3310 :header-args+: :tangle ~/.xsession :tangle-mode (identity #o755)
3313 For custom session on Debian. See https://wiki.debian.org/Xsession.
3316 if [ -f "$HOME/.xinitrc" ]; then
3320 [ -f "/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd" ] && /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd &
3321 [ -x "$(command -v light-locker)" ] && light-locker --lock-on-suspend &
3322 [ -x "$(command -v pasystray)" ] && pasystray -a &
3323 [ -x "$(command -v nm-applet)" ] && nm-applet &
3324 [ -x "$(command -v compton)" ] && compton &
3325 [ -x "$(command -v dunst)" ] && dunst &
3326 [ -x "$(command -v emacs)" ] && exec ssh-agent exwm -ib 0
3331 :header-args+: :tangle ~/.xsessionrc
3335 if [ -f "$HOME/.profile" ]; then . "$HOME/.profile"; fi
3340 :header-args+: :tangle ~/.config/user-dirs.dirs
3344 XDG_DESKTOP_DIR="$HOME/Desktop"
3345 XDG_DOCUMENTS_DIR="$HOME/usr/doc"
3346 XDG_DOWNLOAD_DIR="$HOME/usr/dl"
3347 XDG_MUSIC_DIR="$HOME/usr/music"
3348 XDG_PICTURES_DIR="$HOME/usr/pic"
3349 XDG_PUBLICSHARE_DIR="$HOME/usr/pub"
3350 XDG_TEMPLATES_DIR="$HOME/usr/temp"
3351 XDG_VIDEOS_DIR="$HOME/usr/vid"
3356 :header-args+: :tangle ~/.config/zathura/zathurarc
3360 set smooth-scroll true
3361 set selection-clipboard clipboard
3363 set default-bg "#272727"
3364 set statusbar-bg "#272727"
3365 set inputbar-bg "#373737"
3366 set window-title-basename true
3367 set statusbar-home-tilde true
3369 map <Return> scroll down
3370 map <A-Return> scroll up
3372 map H jumplist backward
3373 map L jumplist forward
3375 map [normal] i toggle_index
3376 map [index] i toggle_index
3377 map [index] q toggle_index
3382 This section contains various useful scripts including ones used by
3383 the programs above. For instance, =toggle-tablet= for switching to
3384 and from tablet mode on my X220T, =toggle-presentation-mode= for
3385 toggling Xfce's presentation mode which keeps the screen awake, and
3386 =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
3387 exact brightness value.
3389 ** battery-percentage-time
3391 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
3394 #+begin_src sh :tangle no
3397 dbus-send --print-reply=literal --system \
3398 --dest=org.freedesktop.UPower \
3399 /org/freedesktop/UPower/devices/battery_BAT0 \
3400 org.freedesktop.DBus.Properties.Get \
3401 string:org.freedesktop.UPower.Device \
3402 string:"${label}" | awk '{print $3}'
3405 perc=$(dbus_send 'Percentage')
3406 state=$(dbus_send 'State')
3408 if [ "$state" -eq 2 ]; then # Discharging
3409 secs=$(dbus_send 'TimeToEmpty')
3410 elif [ "$state" -eq 1 ]; then # Charging
3411 secs=$(dbus_send 'TimeToFull')
3414 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
3419 :header-args+: :tangle ~/.local/bin/emcl :shebang "#!/bin/sh"
3423 exec emacsclient --alternate-editor="" -c "$@"
3428 :header-args+: :tangle ~/.local/bin/emcl :shebang "#!/usr/bin/env python2"
3432 # -*- coding: utf-8 -*-
3434 # This script is a simple wrapper which prefixes each i3status line with custom
3435 # information. It is based on:
3436 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
3438 # In ~/.i3status.conf, add the following line:
3439 # output_format = "i3bar"
3440 # in the 'general' section.
3441 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
3442 # status_command i3status | my-i3status.py
3443 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
3445 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
3446 # © 2018 Amin Bandali <bandali@gnu.org>
3448 # This program is free software. It comes without any warranty, to the extent
3449 # permitted by applicable law. You can redistribute it and/or modify it under
3450 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
3451 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
3459 """ Return true if ~/.nosleep exists. """
3460 return os.path.isfile(os.path.expanduser("~/.nosleep"))
3462 def print_line(message):
3463 """ Non-buffered printing to stdout. """
3464 sys.stdout.write(message + '\n')
3468 """ Interrupted respecting reader for stdin. """
3469 # try reading a line, removing any extra whitespace
3471 line = sys.stdin.readline().strip()
3472 # i3status sends EOF, or an empty line
3477 except KeyboardInterrupt:
3480 if __name__ == '__main__':
3481 # Skip the first line which contains the version header.
3482 print_line(read_line())
3484 # The second line contains the start of the infinite array.
3485 print_line(read_line())
3488 line, prefix = read_line(), ''
3489 # ignore comma at start of lines
3490 if line.startswith(','):
3491 line, prefix = line[1:], ','
3494 j = json.loads(line)
3495 # insert information into the start of the json, but could be anywhere
3496 j.insert(0, {'full_text' : '•', 'name' : 'nosleep'})
3497 # and echo back new encoded json
3498 print_line(prefix+json.dumps(j))
3500 print_line(prefix+line)
3505 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/sh"
3510 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
3511 [ -n "$val" ] && light -S "$val"
3516 :header-args+: :tangle ~/.local/bin/rofi-remmina :shebang "#!/usr/bin/env python2"
3522 from subprocess import Popen, PIPE
3524 remmina_dir = os.path.expanduser("~/.local/share/remmina")
3528 for f in os.listdir(remmina_dir):
3529 fp = os.path.join(remmina_dir, f)
3530 c = ConfigParser.ConfigParser()
3532 n = c.get('remmina', 'name')
3535 lines = max(min(15, len(fdict)), 1);
3536 width = len(max(fdict.keys(), key=len))
3537 rofi = Popen(["rofi", "-i", "-dmenu", \
3538 "-l", str(lines), "-width", str(width), \
3539 "-p", "connection"], stdout=PIPE, stdin=PIPE)
3540 selected = rofi.communicate("\n" \
3541 .join(fdict.keys()) \
3542 .encode("utf-8"))[0] \
3547 r = Popen(["remmina", "-c", fdict[selected]])
3551 ** toggle-presentation-mode
3553 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/sh"
3557 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
3562 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/sh"
3566 # This script toggles between a 'normal' mode and a 'tablet' mode, doing
3569 # - rotates the screen using =xrandr=, so that rotating the physical
3570 # display of my X220t would have the laptop's battery on the right
3572 # - enables touch screen,
3573 # - properly rotates the stylus pen and touch screen pointers, and
3574 # - toggles between RGB and Vertical BGR sub-pixel order.
3576 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
3577 0) # Screen is not rotated, we should rotate it right (90°)
3579 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
3580 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
3581 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
3582 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
3584 1) # Currently top is rotated right, we should set it normal (0°)
3586 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
3587 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
3588 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
3589 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
3592 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
3600 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
3604 cur_vol=$(pamixer --get-volume)
3606 if [ $(pamixer --get-mute) = true ]; then
3607 printf 'mt \n' "$cur_vol"
3609 printf '%02d \n' "$cur_vol"
3615 :header-args+: :tangle ~/.local/bin/zathura-sync :shebang "#!/bin/sh"
3621 zathura --synctex-forward "$pos" "$pdffile" || \
3623 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
3624 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )