2 #+property: header-args :comments link :mkdirp yes :results silent
6 This org file contains the configuration files of pretty much every
7 program I use. The files are tangled (i.e. exported, or derived) from
8 this file using =org-babel=.
10 Note: This file is best viewed inside Emacs with org mode.
14 This section contains the configuration files (dotfiles) of various
19 :header-args+: :tangle "/sudo::/etc/dovecot/dovecot.conf"
26 log_path = /var/log/dovecot.log
27 info_log_path = /var/log/dovecot-info.log
30 disable_plaintext_auth = no
33 auth_mechanisms = plain
37 args = /etc/dovecot/passwd
42 args = uid=amin gid=amin home=/home/amin/mail/%d/%n
43 default_fields = mail=maildir:/home/amin/mail/%d/%n/mail
46 # mail_home = /home/amin/mail/%d/%n
47 # mail_location = maildir:/home/amin/mail/%d/%n/mail:LAYOUT=fs:INBOX=/home/amin/mail/%d/%n/mail/Inbox
54 mail_plugins = $mail_plugins fts fts_lucene
58 fts_lucene = whitespace_chars=@.
65 Improve XPS 15 9560's touchpad experience.
67 # begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
68 #+begin_src conf :tangle no
70 Identifier "libinput touchpad catchall"
73 Option "ClickMethod" "clickfinger"
74 Option "NaturalScrolling" "true"
76 Option "TappingButtonMap" "lrm"
82 #+begin_src conf :tangle /sudo::/etc/mkinitcpio.conf :comments none
85 # The following modules are loaded before any boot hooks are
86 # run. Advanced users may wish to specify all system modules
87 # in this array. For instance:
88 # MODULES=(piix ide_disk reiserfs)
92 # This setting includes any additional binaries a given user may
93 # wish into the CPIO image. This is run last, so it may be used to
94 # override the actual binaries included by a given hook
95 # BINARIES are dependency parsed, so you may safely ignore libraries
99 # This setting is similar to BINARIES above, however, files are added
100 # as-is and are not parsed in any way. This is useful for config files.
104 # This is the most important setting in this file. The HOOKS control the
105 # modules and scripts added to the image, and what happens at boot time.
106 # Order is important, and it is recommended that you do not change the
107 # order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
108 # help on a given hook.
109 # 'base' is _required_ unless you know precisely what you are doing.
110 # 'udev' is _required_ in order to automatically load modules
111 # 'filesystems' is _required_ unless you specify your fs modules in MODULES
113 ## This setup specifies all modules in the MODULES setting above.
114 ## No raid, lvm2, or encrypted root is needed.
117 ## This setup will autodetect all modules for your system and should
118 ## work as a sane default
119 # HOOKS=(base udev autodetect block filesystems)
121 ## This setup will generate a 'full' image which supports most systems.
122 ## No autodetection is done.
123 # HOOKS=(base udev block filesystems)
125 ## This setup assembles a pata mdadm array with an encrypted root FS.
126 ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
127 # HOOKS=(base udev block mdadm encrypt filesystems)
129 ## This setup loads an lvm2 volume group on a usb device.
130 # HOOKS=(base udev block lvm2 filesystems)
132 ## NOTE: If you have /usr on a separate partition, you MUST include the
133 # usr, fsck and shutdown hooks.
134 HOOKS=(base udev autodetect modconf block keyboard encrypt lvm2 resume filesystems fsck)
137 # Use this to compress the initramfs image. By default, gzip compression
138 # is used. Use 'cat' to create an uncompressed image.
146 # COMPRESSION_OPTIONS
147 # Additional options for the compressor
148 #COMPRESSION_OPTIONS=()
153 :header-args+: :tangle ~/.config/mpd/mpd.conf
157 # An example configuration file for MPD.
158 # Read the user manual for documentation: http://www.musicpd.org/doc/user/
161 # Files and directories #######################################################
163 # This setting controls the top directory which MPD will search to discover the
164 # available audio files and add them to the daemon's online database. This
165 # setting defaults to the XDG directory, otherwise the music directory will be
166 # be disabled and audio files will only be accepted over ipc socket (using
167 # file:// protocol) or streaming files over an accepted protocol.
169 music_directory "~/usr/music"
171 # This setting sets the MPD internal playlist directory. The purpose of this
172 # directory is storage for playlists created by MPD. The server will use
173 # playlist files not created by the server but only if they are in the MPD
174 # format. This setting defaults to playlist saving being disabled.
176 playlist_directory "~/.mpd/playlists"
178 # This setting sets the location of the MPD database. This file is used to
179 # load the database at server start up and store the database while the
180 # server is not up. This setting defaults to disabled which will allow
181 # MPD to accept files over ipc socket (using file:// protocol) or streaming
182 # files over an accepted protocol.
184 db_file "~/.mpd/database"
186 # These settings are the locations for the daemon log files for the daemon.
187 # These logs are great for troubleshooting, depending on your log_level
190 # The special value "syslog" makes MPD use the local syslog daemon. This
191 # setting defaults to logging to syslog, otherwise logging is disabled.
193 log_file "~/.mpd/log"
195 # This setting sets the location of the file which stores the process ID
196 # for use of mpd --kill and some init scripts. This setting is disabled by
197 # default and the pid file will not be stored.
199 pid_file "~/.mpd/pid"
201 # This setting sets the location of the file which contains information about
202 # most variables to get MPD back into the same general shape it was in before
203 # it was brought down. This setting is disabled by default and the server
204 # state will be reset on server start up.
206 state_file "~/.mpd/state"
208 # The location of the sticker database. This is a database which
209 # manages dynamic information attached to songs.
211 sticker_file "~/.mpd/sticker.sql"
213 ###############################################################################
216 # General music daemon options ################################################
218 # This setting specifies the user that MPD will run as. MPD should never run as
219 # root and you may use this setting to make MPD change its user ID after
220 # initialization. This setting is disabled by default and MPD is run as the
225 # This setting specifies the group that MPD will run as. If not specified
226 # primary group of user specified with "user" setting will be used (if set).
227 # This is useful if MPD needs to be a member of group such as "audio" to
228 # have permission to use sound card.
232 # This setting sets the address for the daemon to listen on. Careful attention
233 # should be paid if this is assigned to anything other then the default, any.
234 # This setting can deny access to control of the daemon. Not effective if
235 # systemd socket activiation is in use.
238 #bind_to_address "any"
240 # And for Unix Socket
241 #bind_to_address "~/.mpd/socket"
243 # This setting is the TCP port that is desired for the daemon to get assigned
248 # This setting controls the type of information which is logged. Available
249 # setting arguments are "default", "secure" or "verbose". The "verbose" setting
250 # argument is recommended for troubleshooting, though can quickly stretch
251 # available resources on limited hardware storage.
255 # If you have a problem with your MP3s ending abruptly it is recommended that
256 # you set this argument to "no" to attempt to fix the problem. If this solves
257 # the problem, it is highly recommended to fix the MP3 files with vbrfix
258 # (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
259 # point gapless MP3 playback can be enabled.
261 #gapless_mp3_playback "yes"
263 # Setting "restore_paused" to "yes" puts MPD into pause mode instead
264 # of starting playback after startup.
268 # This setting enables MPD to create playlists in a format usable by other
271 #save_absolute_paths_in_playlists "no"
273 # This setting defines a list of tag types that will be extracted during the
274 # audio file discovery process. The complete list of possible values can be
275 # found in the user manual.
276 #metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
278 # This setting enables automatic update of MPD's database when files in
279 # music_directory are changed.
283 # Limit the depth of the directories being watched, 0 means only watch
284 # the music directory itself. There is no limit by default.
286 #auto_update_depth "3"
288 ###############################################################################
291 # Symbolic link behavior ######################################################
293 # If this setting is set to "yes", MPD will discover audio files by following
294 # symbolic links outside of the configured music_directory.
296 #follow_outside_symlinks "yes"
298 # If this setting is set to "yes", MPD will discover audio files by following
299 # symbolic links inside of the configured music_directory.
301 #follow_inside_symlinks "yes"
303 ###############################################################################
306 # Zeroconf / Avahi Service Discovery ##########################################
308 # If this setting is set to "yes", service information will be published with
311 #zeroconf_enabled "yes"
313 # The argument to this setting will be the Zeroconf / Avahi unique name for
314 # this MPD server on the network.
316 #zeroconf_name "Music Player"
318 ###############################################################################
321 # Permissions #################################################################
323 # If this setting is set, MPD will require password authorization. The password
324 # setting can be specified multiple times for different password profiles.
326 #password "password@read,add,control,admin"
328 # This setting specifies the permissions a user has who has not yet logged in.
330 #default_permissions "read,add,control,admin"
332 ###############################################################################
335 # Database #######################################################################
340 # host "other.mpd.host"
344 # Input #######################################################################
349 # proxy "proxy.isp.com:8080"
351 # proxy_password "password"
355 ###############################################################################
357 # Audio Output ################################################################
372 # MPD supports various audio output types, as well as playing through multiple
373 # audio outputs at the same time, through multiple audio_output settings
374 # blocks. Setting this block is optional, though the server will only attempt
375 # autodetection for one sound card.
377 # An example of an ALSA output:
381 # name "My ALSA Device"
382 ## device "hw:0,0" # optional
383 ## mixer_type "hardware" # optional
384 ## mixer_device "default" # optional
385 ## mixer_control "PCM" # optional
386 ## mixer_index "0" # optional
389 # An example of an OSS output:
393 # name "My OSS Device"
394 ## device "/dev/dsp" # optional
395 ## mixer_type "hardware" # optional
396 ## mixer_device "/dev/mixer" # optional
397 ## mixer_control "PCM" # optional
400 # An example of a shout output (for streaming to Icecast):
404 # encoder "vorbis" # optional
405 # name "My Shout Stream"
412 # format "44100:16:1"
413 ## protocol "icecast2" # optional
414 ## user "source" # optional
415 ## description "My Stream Description" # optional
416 ## url "http://example.com" # optional
417 ## genre "jazz" # optional
418 ## public "no" # optional
419 ## timeout "2" # optional
420 ## mixer_type "software" # optional
423 # An example of a recorder output:
428 # encoder "vorbis" # optional, vorbis or lame
429 # path "/var/lib/mpd/recorder/mpd.ogg"
430 ## quality "5.0" # do not define if bitrate is defined
431 # bitrate "128" # do not define if quality is defined
432 # format "44100:16:1"
435 # An example of a httpd output (built-in HTTP streaming server):
439 # name "My HTTP Stream"
440 # encoder "vorbis" # optional, vorbis or lame
442 # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
443 ## quality "5.0" # do not define if bitrate is defined
444 # bitrate "128" # do not define if quality is defined
445 # format "44100:16:1"
446 # max_clients "0" # optional 0=no limit
449 # An example of a pulseaudio output (streaming to a remote pulseaudio server)
453 # name "My Pulse Output"
454 ## server "remote_server" # optional
455 ## sink "remote_server_sink" # optional
458 # An example of a winmm output (Windows multimedia API).
462 # name "My WinMM output"
463 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
465 ## device "0" # optional
466 ## mixer_type "hardware" # optional
469 # An example of an openal output.
473 # name "My OpenAL output"
474 ## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
477 # An example of an sndio output.
481 # name "sndio output"
482 # mixer_type "software"
485 # An example of an OS X output:
489 # name "My OS X Device"
490 ## device "Built-in Output" # optional
491 ## channel_map "-1,-1,0,1" # optional
494 ## Example "pipe" output:
499 # command "aplay -f cd 2>/dev/null"
500 ## Or if you're want to use AudioCompress
501 # command "AudioCompress -m | aplay -f cd 2>/dev/null"
502 ## Or to send raw PCM stream through PCM:
503 # command "nc example.org 8765"
504 # format "44100:16:2"
507 ## An example of a null output (for no audio output):
511 # name "My Null Output"
512 # mixer_type "none" # optional
515 ###############################################################################
518 # Normalization automatic volume adjustments ##################################
520 # This setting specifies the type of ReplayGain to use. This setting can have
521 # the argument "off", "album", "track" or "auto". "auto" is a special mode that
522 # chooses between "track" and "album" depending on the current state of
523 # random playback. If random playback is enabled then "track" mode is used.
524 # See <http://www.replaygain.org> for more details about ReplayGain.
525 # This setting is off by default.
529 # This setting sets the pre-amp used for files that have ReplayGain tags. By
530 # default this setting is disabled.
532 #replaygain_preamp "0"
534 # This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
535 # By default this setting is disabled.
537 #replaygain_missing_preamp "0"
539 # This setting enables or disables ReplayGain limiting.
540 # MPD calculates actual amplification based on the ReplayGain tags
541 # and replaygain_preamp / replaygain_missing_preamp setting.
542 # If replaygain_limit is enabled MPD will never amplify audio signal
543 # above its original level. If replaygain_limit is disabled such amplification
544 # might occur. By default this setting is enabled.
546 #replaygain_limit "yes"
548 # This setting enables on-the-fly normalization volume adjustment. This will
549 # result in the volume of all playing audio to be adjusted so the output has
550 # equal "loudness". This setting is disabled by default.
552 #volume_normalization "no"
554 ###############################################################################
556 # Character Encoding ##########################################################
558 # If file or directory names do not display correctly for your locale then you
559 # may need to modify this setting.
561 #filesystem_charset "UTF-8"
563 ###############################################################################
570 :header-args+: :tangle ~/.ncmpcpp/config
573 #+begin_src conf :tangle no
574 ##############################################################
575 ## This is the example configuration file. Copy it to ##
576 ## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
577 ## and set up your preferences. ##
578 ##############################################################
580 ##### directories ######
582 ## Directory for storing ncmpcpp related files.
583 ## Changing it is useful if you want to store
584 ## everything somewhere else and provide command
585 ## line setting for alternative location to config
586 ## file which defines that while launching ncmpcpp.
589 ncmpcpp_directory = ~/.ncmpcpp
592 ## Directory for storing downloaded lyrics. It
593 ## defaults to ~/.lyrics since other MPD clients
594 ## (eg. ncmpc) also use that location.
597 #lyrics_directory = ~/.lyrics
599 ##### connection settings #####
601 #mpd_host = localhost
605 #mpd_connection_timeout = 5
607 ## Needed for tag editor and file operations to work.
609 mpd_music_dir = ~/usr/music
611 #mpd_crossfade_time = 5
613 ##### music visualizer #####
615 ## Note: In order to make music visualizer work you'll
616 ## need to use mpd fifo output, whose format parameter
617 ## has to be set to 44100:16:1 for mono visualization
618 ## or 44100:16:2 for stereo visualization. Example
619 ## configuration (it has to be put into mpd.conf):
623 ## name "Visualizer feed"
624 ## path "/tmp/mpd.fifo"
625 ## format "44100:16:2"
629 visualizer_fifo_path = /tmp/mpd.fifo
632 ## Note: Below parameter is needed for ncmpcpp
633 ## to determine which output provides data for
634 ## visualizer and thus allow syncing between
635 ## visualization and sound as currently there
636 ## are some problems with it.
639 visualizer_output_name = my fifo
642 ## If you set format to 44100:16:2, make it 'yes'.
644 visualizer_in_stereo = yes
647 ## Multiply received samples by given value. Very
648 ## useful for proper visualization of quiet music.
650 #visualizer_sample_multiplier = 1
653 ## Note: Below parameter defines how often ncmpcpp
654 ## has to "synchronize" visualizer and audio outputs.
655 ## 30 seconds is optimal value, but if you experience
656 ## synchronization problems, set it to lower value.
657 ## Keep in mind that sane values start with >=10.
660 visualizer_sync_interval = 30
663 ## Note: To enable spectrum frequency visualization
664 ## you need to compile ncmpcpp with fftw3 support.
667 ## Available values: spectrum, wave, wave_filled, ellipse.
669 visualizer_type = spectrum
671 #visualizer_look = ●▮
672 visualizer_look = "●•"
674 #visualizer_color = blue, cyan, green, yellow, magenta, red
676 ## Alternative subset of 256 colors for terminals that support it.
678 #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
680 ##### system encoding #####
682 ## ncmpcpp should detect your charset encoding
683 ## but if it failed to do so, you can specify
684 ## charset encoding you are using here.
686 ## Note: You can see whether your ncmpcpp build
687 ## supports charset detection by checking output
688 ## of `ncmpcpp --version`.
690 ## Note: Since MPD uses UTF-8 by default, setting
691 ## this option makes sense only if your encoding
695 #system_encoding = ""
699 ## Time of inactivity (in seconds) after playlist
700 ## highlighting will be disabled (0 = always on).
702 #playlist_disable_highlight_delay = 5
704 ## Defines how long messages are supposed to be visible.
706 #message_delay_time = 5
708 ##### song format #####
710 ## For a song format you can use:
720 ## %n - track number (01/12 -> 01)
721 ## %N - full track info (01/12 -> 01/12)
728 ## $R - begin right alignment
730 ## If you want to make sure that a part of the format is displayed
731 ## only when certain tags are present, you can archieve it by
732 ## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
733 ## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
734 ## It is also possible to define a list of alternatives by providing
735 ## several groups and separating them with '|', e.g. '{%t}|{%f}'
736 ## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
739 ## Note: If you want to set limit on maximal length of a tag, just
740 ## put the appropriate number between % and character that defines
741 ## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
743 ## In addition, formats support markers used for text attributes.
744 ## They are followed by character '$'. After that you can put:
746 ## - 0 - default window color (discards all other colors)
755 ## - 9 - end of current color
757 ## - u - underline text
758 ## - r - reverse colors
759 ## - a - use alternative character set
761 ## If you don't want to use a non-color attribute anymore, just put it
762 ## again, but this time insert character '/' between '$' and attribute
763 ## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
764 ## or filename with reversed colors.
766 ## If you want to use 256 colors and/or background colors in formats
767 ## (the naming scheme is described below in section about color
768 ## definitions), it can be done with the syntax $(COLOR), e.g. to set
769 ## the artist tag to one of the non-standard colors and make it have
770 ## yellow background, you need to write $(197_yellow)%a$(end). Note
771 ## that for standard colors this is interchangable with attributes
774 ## Note: colors can be nested.
777 #song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
779 #song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
781 #song_library_format = {%n - }{%t}|{%f}
784 #alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
786 #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
788 #now_playing_prefix = $b
790 #now_playing_suffix = $/b
792 #browser_playlist_prefix = "$2playlist$9 "
794 #selected_item_prefix = $6
796 #selected_item_suffix = $9
798 #modified_item_prefix = $3> $9
801 ## Note: attributes are not supported for the following variables.
803 #song_window_title_format = {%a - }{%t}|{%f}
805 ## Note: Below variables are used for sorting songs in browser.
806 ## The sort mode determines how songs are sorted, and can be used
807 ## in combination with a sort format to specify a custom sorting format.
808 ## Available values for browser_sort_mode are "name", "mtime", "format"
812 #browser_sort_mode = name
814 #browser_sort_format = {%a - }{%t}|{%f} {(%l)}
816 ##### columns settings #####
818 ## syntax of song columns list format is "column column etc."
820 ## - syntax for each column is:
822 ## (width of the column)[color of the column]{displayed tag}
824 ## Note: Width is by default in %, if you want a column to
825 ## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
826 ## will be the column that take 10% of screen (so the real width
827 ## will depend on actual screen size), whereas (10f)[white]{a}
828 ## will take 10 terminal cells, no matter how wide the screen is.
830 ## - color is optional (if you want the default one,
831 ## leave the field empty).
833 ## Note: You can give a column additional attributes by putting appropriate
834 ## character after displayed tag character. Available attributes are:
836 ## - r - column will be right aligned
837 ## - E - if tag is empty, empty tag marker won't be displayed
841 ## - give a column custom name by putting it after attributes,
842 ## separated with character ':', e.g. {lr:Length} gives you
843 ## right aligned column of lengths named "Length".
845 ## - define sequence of tags, that have to be displayed in case
846 ## predecessor is empty in a way similar to the one in classic
847 ## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
848 ## creates column named "Owner" that tries to display artist
849 ## tag and then composer and performer if previous ones are
853 #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
855 ##### various settings #####
858 ## Note: Custom command that will be executed each
859 ## time song changes. Useful for notifications etc.
861 #execute_on_song_change = ""
863 #playlist_show_mpd_host = no
865 #playlist_show_remaining_time = no
867 #playlist_shorten_total_times = no
869 #playlist_separate_albums = no
872 ## Note: Possible display modes: classic, columns.
874 #playlist_display_mode = columns
876 #browser_display_mode = classic
878 #search_engine_display_mode = classic
880 #playlist_editor_display_mode = classic
882 #discard_colors_if_item_is_selected = yes
884 #incremental_seeking = yes
888 #volume_change_step = 2
890 #autocenter_mode = no
892 #centered_cursor = no
895 ## Note: You can specify third character which will
896 ## be used to build 'empty' part of progressbar.
898 #progressbar_look = =>
899 progressbar_look = "─╼╶"
900 #progressbar_look = "─⊙╶"
902 #progressbar_boldness = yes
904 ## Available values: database, playlist.
906 #default_place_to_search_in = database
908 ## Available values: classic, alternative.
910 #user_interface = classic
912 #data_fetching_delay = yes
914 ## Available values: artist, album_artist, date, genre, composer, performer.
916 #media_library_primary_tag = artist
918 ## Available values: wrapped, normal.
920 #default_find_mode = wrapped
922 #default_tag_editor_pattern = %n - %t
924 #header_visibility = yes
926 #statusbar_visibility = yes
928 #titles_visibility = yes
930 #header_text_scrolling = yes
932 #cyclic_scrolling = no
936 #follow_now_playing_lyrics = no
938 #fetch_lyrics_for_current_song_in_background = no
940 #store_lyrics_in_song_dir = no
942 #generate_win32_compatible_filenames = yes
944 #allow_for_physical_item_deletion = no
947 ## Note: If you set this variable, ncmpcpp will try to
948 ## get info from last.fm in language you set and if it
949 ## fails, it will fall back to english. Otherwise it will
950 ## use english the first time.
952 ## Note: Language has to be expressed as an ISO 639 alpha-2 code.
954 #lastfm_preferred_language = en
956 #show_hidden_files_in_local_browser = no
959 ## How shall screen switcher work?
961 ## - "previous" - switch between the current and previous screen.
962 ## - "screen1,...,screenN" - switch between given sequence of screens.
964 ## Screens available for use: help, playlist, browser, search_engine,
965 ## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
967 #screen_switcher_mode = playlist, browser
970 ## Note: You can define startup screen
971 ## by choosing screen from the list above.
973 #startup_screen = playlist
976 ## Note: You can define startup slave screen
977 ## by choosing screen from the list above or
978 ## an empty value for no slave screen.
980 #startup_slave_screen = ""
982 #startup_slave_screen_focus = no
985 ## Default width of locked screen (in %).
986 ## Acceptable values are from 20 to 80.
989 #locked_screen_width_part = 50
991 #ask_for_locked_screen_width_part = yes
993 #jump_to_now_playing_song_at_start = yes
995 #ask_before_clearing_playlists = yes
997 #clock_display_seconds = no
999 #display_volume_level = yes
1001 #display_bitrate = no
1003 #display_remaining_time = no
1005 ## Available values: none, basic, extended, perl.
1007 #regular_expressions = perl
1010 ## Note: If below is enabled, ncmpcpp will ignore leading
1011 ## "The" word while sorting items in browser, tags in
1012 ## media library, etc.
1014 #ignore_leading_the = no
1016 #block_search_constraints_change_if_items_found = yes
1018 #mouse_support = yes
1020 #mouse_list_scroll_whole_page = yes
1022 #empty_tag_marker = <empty>
1024 #tags_separator = " | "
1026 #tag_editor_extended_numeration = no
1028 #media_library_sort_by_mtime = no
1030 #enable_window_title = yes
1033 ## Note: You can choose default search mode for search
1034 ## engine. Available modes are:
1036 ## - 1 - use mpd built-in searching (no regexes, pattern matching)
1037 ## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1038 ## but if your mpd is on a remote machine, downloading big database
1039 ## to process it can take a while
1040 ## - 3 - match only exact values (this mode uses mpd function for searching
1041 ## in database and local one for searching in current playlist)
1044 #search_engine_default_search_mode = 1
1046 #external_editor = nano
1048 ## Note: set to yes if external editor is a console application.
1050 #use_console_editor = yes
1052 ##### colors definitions #####
1054 ## It is possible to set a background color by setting a color
1055 ## value "<foreground>_<background>", e.g. red_black will set
1056 ## foregound color to red and background color to black.
1058 ## In addition, for terminals that support 256 colors it
1059 ## is possible to set one of them by using a number in range
1060 ## [1, 256] instead of color name, e.g. numerical value
1061 ## corresponding to red_black is 2_1. To find out if the
1062 ## terminal supports 256 colors, run ncmpcpp and check out
1063 ## the bottom of the help screen for list of available colors
1064 ## and their numerical values.
1066 ## Note: due to technical limitations of ncurses, if 256 colors
1067 ## are used, it is possible to either use only the colors with
1068 ## default background color, or all pairs from 1_1 up to 254_127,
1069 ## depending on the ncurses version used.
1072 #colors_enabled = yes
1074 #empty_tag_color = cyan
1076 #header_window_color = default
1078 #volume_color = default
1080 #state_line_color = default
1082 #state_flags_color = default
1084 #main_window_color = yellow
1090 #main_window_highlight_color = yellow
1092 #progressbar_color = black
1094 #progressbar_elapsed_color = green
1096 #statusbar_color = default
1098 #alternative_ui_separator_color = black
1100 #active_column_color = red
1102 #window_border_color = green
1104 #active_window_border = red
1110 :header-args+: :tangle ~/.ncmpcpp/bindings
1113 #+begin_src conf :tangle no
1138 move_sort_order_down
1147 #+begin_src conf :tangle /sudo::/etc/pacman.conf :comments none
1151 # See the pacman.conf(5) manpage for option and repository directives
1157 # The following paths are commented out with their default values listed.
1158 # If you wish to use different paths, uncomment and update the paths.
1160 #DBPath = /var/lib/pacman/
1161 #CacheDir = /var/cache/pacman/pkg/
1162 #LogFile = /var/log/pacman.log
1163 #GPGDir = /etc/pacman.d/gnupg/
1164 #HookDir = /etc/pacman.d/hooks/
1165 HoldPkg = pacman glibc
1166 #XferCommand = /usr/bin/curl -L -C - -f -o %o %u
1167 #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
1168 #CleanMethod = KeepInstalled
1172 # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
1186 # By default, pacman accepts packages signed by keys that its local keyring
1187 # trusts (see pacman-key and its man page), as well as unsigned packages.
1188 SigLevel = Required DatabaseOptional
1189 LocalFileSigLevel = Optional
1190 #RemoteFileSigLevel = Required
1192 # NOTE: You must run `pacman-key --init` before first using pacman; the local
1193 # keyring can then be populated with the keys of all Arch/Parabola packagers
1194 # with `pacman-key --populate archlinux` and `pacman-key --populate parabola`.
1198 # - can be defined here or included from another file
1199 # - pacman will search repositories in the order defined here
1200 # - local/custom mirrors can be added here or in separate files
1201 # - repositories listed first will take precedence when packages
1202 # have identical names, regardless of version number
1203 # - URLs will have $repo replaced by the name of the current repo
1204 # - URLs will have $arch replaced by the name of the architecture
1206 # Repository entries are of the format:
1208 # Server = ServerName
1209 # Include = IncludePath
1211 # The header [repo-name] is crucial - it must be present and
1212 # uncommented to enable the repo.
1215 # The testing repositories are disabled by default. To enable, uncomment the
1216 # repo name header and Include lines. You can add preferred servers immediately
1217 # after the header, and they will be used before the default mirrors.
1219 # NOTE: Nonprism is a particular repository that aims to provide software built
1220 # and patched without services under global data surveillance programs like PRISM,
1221 # XKeyscore and Tempora. For more info see: https://wiki.parabola.nu/Nonprism
1224 #Include = /etc/pacman.d/mirrorlist
1227 #Include = /etc/pacman.d/mirrorlist
1230 Include = /etc/pacman.d/mirrorlist
1233 Include = /etc/pacman.d/mirrorlist
1236 #Include = /etc/pacman.d/mirrorlist
1239 Include = /etc/pacman.d/mirrorlist
1242 Include = /etc/pacman.d/mirrorlist
1244 #[community-testing]
1245 #Include = /etc/pacman.d/mirrorlist
1248 Include = /etc/pacman.d/mirrorlist
1250 # The PCR (Parabola Community Repository) contains packages maintained by trusted
1251 # members of the Parabola community. It also contains packages maintained by
1252 # Parabola developers, but that the developer decided didn't belong in core/libre.
1255 #Include = /etc/pacman.d/mirrorlist
1258 Include = /etc/pacman.d/mirrorlist
1260 # If you want to run 32 bit applications on your x86_64 system,
1261 # enable the libre-multilib, multilib and pcr-multilib repositories as required here.
1263 #[nonprism-multilib-testing]
1264 #Include = /etc/pacman.d/mirrorlist
1266 #[nonprism-multilib]
1267 #Include = /etc/pacman.d/mirrorlist
1269 #[libre-multilib-testing]
1270 #Include = /etc/pacman.d/mirrorlist
1273 #Include = /etc/pacman.d/mirrorlist
1276 #Include = /etc/pacman.d/mirrorlist
1279 #Include = /etc/pacman.d/mirrorlist
1281 #[pcr-multilib-testing]
1282 #Include = /etc/pacman.d/mirrorlist
1285 #Include = /etc/pacman.d/mirrorlist
1287 # Parabola also supports another community projects and personal repositories, to
1288 # find them check out this wiki page: https://wiki.parabola.nu/Repositories
1290 # An example of a custom package repository. See the pacman manpage for
1291 # tips on creating your own repositories.
1293 #SigLevel = Optional TrustAll
1294 #Server = file:///home/custompkgs
1296 Include = /etc/pacman.d/*.conf
1301 #+begin_src conf :tangle /sudo::/etc/pacman.d/mirrorlist :comments none
1302 # Parabola GNU/Linux-libre - Last Updated: Wed Dec 20 02:59:35 GMT 2017
1304 Server = http://mirror.fsf.org/parabola/$repo/os/$arch
1305 Server = http://mirror.fsf.org/parabola/$repo/os/$arch
1306 Server = http://mirror.fsf.org/parabola/$repo/os/$arch
1307 Server = http://mirror.fsf.org/parabola/$repo/os/$arch
1309 # Location: London, UK
1310 # Responsible: Parabola Project
1311 # Note: Not really a mirror, automatically redirects you to an Arch
1312 # mirror when possible. Works best specifying it a few times in a
1313 # row (404s workaround).
1314 # Server = http://redirector.parabola.nu/$repo/os/$arch
1315 Server = https://redirector.parabola.nu/$repo/os/$arch
1317 # Location: Reykjavík, Iceland
1318 # Responsible: Parabola Project
1319 # Note: Not really a mirror, automatically redirects you to a Parabola
1320 # mirror that has the file you are looking for.
1321 # Server = http://repomirror.parabola.nu/$repo/os/$arch
1322 Server = https://repomirror.parabola.nu/$repo/os/$arch
1324 # Location: Falkenstein, Germany
1325 # Server = http://mirror.grapentin.org/parabola/$repo/os/$arch
1326 Server = https://mirror.grapentin.org/parabola/$repo/os/$arch
1328 # Location: Volendam, Netherlands
1329 Server = https://jeweet.net/repo/parabola/$repo/os/$arch
1331 # Location: Amsterdam, Netherlands
1332 # Note: Not really a mirror, but a high-speed 10GiB cache for
1333 # mirror.yandex.ru/mirrors/parabola
1334 # Server = http://parabola.isacdaavid.info:8080/$repo/os/$arch
1335 Server = https://parabola.isacdaavid.info:8081/$repo/os/$arch
1337 # Location: Moscow, Russian Federation
1338 # Server = http://mirror.yandex.ru/mirrors/parabola/$repo/os/$arch
1339 Server = https://mirror.yandex.ru/mirrors/parabola/$repo/os/$arch
1341 # Location: Ho Chi Minh City, Vietnam
1342 # Server = http://mirror.freedif.org/Parabola/$repo/os/$arch
1343 Server = https://mirror.freedif.org/Parabola/$repo/os/$arch
1345 # Location: Los Angeles, CA, USA
1346 # Note: Also visit http://alfplayer.com/ for its SNAPSHOTS ARCHIVE
1347 Server = http://alfplayer.com/parabola/$repo/os/$arch
1349 # Location: Boston, MA, USA
1350 Server = http://mirror.fsf.org/parabola/$repo/os/$arch
1352 # Location: Austin, TX, USA
1353 # Server = http://parabola.serverpit.com/
1354 Server = https://parabola.serverpit.com/
1356 # Location: Reykjavík, Iceland
1357 # Responsible: Parabola Project
1358 # Note: Currently pointing to repomirror.parabola.nu
1359 # Server = http://repo.parabola.nu/$repo/os/$arch
1360 Server = https://repo.parabola.nu/$repo/os/$arch
1366 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/amin.sieve :comments none
1370 require ["regex", "variables", "fileinto", "envelope",
1371 "mailbox", "imap4flags", "include"];
1375 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
1376 fileinto :create "gnu.webmasters";
1380 include :personal "lists";
1385 :header-args+: :tangle ~/mail/bndl.org/amin/sieve/lists.sieve :comments none
1389 require ["regex", "variables", "fileinto", "envelope",
1390 "mailbox", "imap4flags", "include"];
1394 header :contains "list-id"
1395 [ "<emacs-devel.gnu.org>"
1396 , "<emacs-orgmode.gnu.org>"
1397 , "<emacsconf-discuss.gnu.org>"
1398 , "<fencepost-users.gnu.org>"
1399 , "<guix-devel.gnu.org>"
1400 , "<guile-devel.gnu.org>"
1401 , "<help-gnu-emacs.gnu.org>"
1402 , "<info-gnu-emacs.gnu.org>"
1403 , "<info-guix.gnu.org>"
1404 , "<www-commits.gnu.org>"
1405 , "<www-discuss.gnu.org>"
1406 , "<deepspec.lists.cs.princeton.edu>"
1407 , "<haskell-cafe.haskell.org>"
1408 , "<haskell-art.we.lurk.org>"
1409 , "<notmuch.notmuchmail.org>"
1411 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
1412 set :lower "listname" "${1}";
1413 fileinto :create "gnu.${listname}";
1418 # sr.ht lists, with dots ('.') omitted
1420 header :contains "list-id"
1421 [ "<~bandali/public-inbox@lists.sr.ht>"
1422 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
1423 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
1424 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
1425 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
1427 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
1428 set :lower "username" "${1}";
1429 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
1430 fileinto :create "gnu.${username}.${listname}";
1438 :header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service"
1443 Description=Powertop tunings
1446 ExecStart=/usr/bin/powertop --auto-tune
1447 RemainAfterExit=true
1450 WantedBy=multi-user.target
1455 :header-args+: :tangle ~/.config/redshift.conf :comments none
1459 ; Global settings for redshift
1461 ; Set the day and night screen temperatures (Neutral is 6500K)
1472 ; Enable/Disable a smooth transition between day and night
1473 ; 0 will cause a direct change from day to night screen temperature.
1474 ; 1 will gradually increase or decrease the screen temperature.
1477 ; Set the screen brightness. Default is 1.0.
1479 ; It is also possible to use different settings for day and night
1480 ; since version 1.8.
1482 ;brightness-night=0.4
1483 ; Set the screen gamma (for all colors, or each color channel
1488 ; This can also be set individually for day and night since
1490 ;gamma-day=0.8:0.7:0.8
1493 ; Set the location-provider: 'geoclue2' or 'manual'
1494 ; type 'redshift -l list' to see possible values.
1495 ; The location provider settings are in a different section.
1496 ;location-provider=manual
1497 location-provider=geoclue2
1499 ; Set the adjustment-method: 'randr', 'vidmode'
1500 ; type 'redshift -m list' to see all possible values.
1501 ; 'randr' is the preferred method, 'vidmode' is an older API.
1502 ; but works in some cases when 'randr' does not.
1503 ; The adjustment method settings are in a different section.
1504 adjustment-method=randr
1506 ; Configuration of the location-provider:
1507 ; type 'redshift -l PROVIDER:help' to see the settings.
1508 ; ex: 'redshift -l manual:help'
1509 ; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
1510 ; are negative numbers.
1515 ; Configuration of the adjustment-method
1516 ; type 'redshift -m METHOD:help' to see the settings.
1517 ; ex: 'redshift -m randr:help'
1518 ; In this example, randr is configured to adjust screen 1.
1519 ; Note that the numbering starts from 0, so this is actually the
1520 ; second screen. If this option is not specified, Redshift will try
1521 ; to adjust _all_ screens.
1528 Keep boot messages on tty1 (see [[https://wiki.archlinux.org/index.php/getty#Have_boot_messages_stay_on_tty1][here]])
1530 #+begin_src conf :tangle /sudo::/etc/systemd/system/getty@tty1.service.d/noclear.conf
1539 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
1540 # ------------------------------------------------------------------------------
1541 # tlp - Parameters for power saving
1542 # See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
1545 # - Some parameters are disabled, remove the leading '#' to enable # them;
1546 # shown values are suggestions not defaults
1547 # - Default *: intrinsic default that is effective when the parameter is missing
1548 # or disabled by a leading '#'; use PARAM="" to disable intrinsic defaults for
1549 # parameters with text string values
1550 # - Default <none>: do nothing or use kernel/hardware defaults
1552 # Set to 0 to disable, 1 to enable TLP.
1556 # Operation mode when no power supply can be detected: AC, BAT.
1557 # Concerns some desktop and embedded hardware only.
1561 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
1562 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
1564 TLP_PERSISTENT_DEFAULT=0
1566 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
1567 # Non-zero value enables, zero disables laptop mode.
1568 # Default: 0 (AC), 2 (BAT)
1569 DISK_IDLE_SECS_ON_AC=0
1570 DISK_IDLE_SECS_ON_BAT=2
1572 # Dirty page values (timeouts in secs).
1573 # Default: 15 (AC + BAT)
1574 MAX_LOST_WORK_SECS_ON_AC=15
1575 MAX_LOST_WORK_SECS_ON_BAT=60
1577 # Note: CPU parameters below are disabled by default, remove the leading #
1578 # to enable them, otherwise kernel defaults will be used.
1580 # Select a CPU frequency scaling governor.
1581 # Intel Core i processor with intel_pstate driver:
1582 # powersave(*), performance.
1583 # Older hardware with acpi-cpufreq driver:
1584 # ondemand(*), powersave, performance, conservative, schedutil.
1585 # (*) is recommended.
1586 # Use tlp-stat -p to show the active driver and available governors.
1588 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
1589 # efficient for *almost all* workloads and therefore kernel and most
1590 # distributions have chosen them as defaults. If you still want to change,
1591 # you should know what you're doing! You *must* disable your distribution's
1592 # governor settings or conflicts will occur.
1594 #CPU_SCALING_GOVERNOR_ON_AC=powersave
1595 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
1597 # Set the min/max frequency available for the scaling governor.
1598 # Possible values depend on your CPU. For available frequencies see
1599 # the output of tlp-stat -p.
1601 #CPU_SCALING_MIN_FREQ_ON_AC=0
1602 #CPU_SCALING_MAX_FREQ_ON_AC=0
1603 #CPU_SCALING_MIN_FREQ_ON_BAT=0
1604 #CPU_SCALING_MAX_FREQ_ON_BAT=0
1606 # Set energy performance hints (HWP) for Intel P-state governor:
1607 # performance, balance_performance, default, balance_power, power
1608 # Values are given in order of increasing power saving.
1609 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
1611 CPU_HWP_ON_AC=balance_performance
1612 CPU_HWP_ON_BAT=balance_power
1614 # Set Intel P-state performance: 0..100 (%).
1615 # Limit the max/min P-state to control the power dissipation of the CPU.
1616 # Values are stated as a percentage of the available performance.
1617 # Requires an Intel Core i processor with intel_pstate driver.
1619 #CPU_MIN_PERF_ON_AC=0
1620 #CPU_MAX_PERF_ON_AC=100
1621 #CPU_MIN_PERF_ON_BAT=0
1622 #CPU_MAX_PERF_ON_BAT=30
1624 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
1625 # Requires an Intel Core i processor.
1627 # - This may conflict with your distribution's governor settings
1628 # - A value of 1 does *not* activate boosting, it just allows it
1633 # Minimize number of used CPU cores/hyper-threads under light load conditions:
1634 # 0=disable, 1=enable.
1636 SCHED_POWERSAVE_ON_AC=0
1637 SCHED_POWERSAVE_ON_BAT=1
1639 # Kernel NMI Watchdog:
1640 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
1644 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
1645 # Frequency voltage pairs are written to:
1646 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
1647 # CAUTION: only use this, if you thoroughly understand what you are doing!
1649 #PHC_CONTROLS="F:V F:V F:V F:V"
1651 # Set CPU performance versus energy savings policy:
1652 # performance, balance-performance, default, balance-power, power.
1653 # Values are given in order of increasing power saving.
1654 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
1656 ENERGY_PERF_POLICY_ON_AC=performance
1657 ENERGY_PERF_POLICY_ON_BAT=balance-power
1659 # Disk devices; separate multiple devices with spaces.
1660 # Devices can be specified by disk ID also (lookup with: tlp diskid).
1661 # Note: DISK parameters below are effective only when this option is configured.
1662 # Default: "nvme0n1 sda"
1663 DISK_DEVICES="sda sdb"
1665 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
1666 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
1667 # Separate values for multiple disks with spaces. Use the special value 'keep'
1668 # to keep the hardware default for the particular disk.
1670 DISK_APM_LEVEL_ON_AC="254 254"
1671 DISK_APM_LEVEL_ON_BAT="128 128"
1673 # Hard disk spin down timeout:
1674 # 0: spin down disabled
1675 # 1..240: timeouts from 5s to 20min (in units of 5s)
1676 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
1677 # See 'man hdparm' for details.
1678 # Separate values for multiple disks with spaces. Use the special value 'keep'
1679 # to keep the hardware default for the particular disk.
1681 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
1682 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
1684 # Select I/O scheduler for the disk devices.
1685 # Multi queue (blk-mq) schedulers:
1686 # mq-deadline(*), none, kyber, bfq
1687 # Single queue schedulers:
1688 # deadline(*), cfq, bfq, noop
1690 # Separate values for multiple disks with spaces. Use the special value 'keep'
1691 # to keep the kernel default scheduler for the particular disk.
1693 # - Multi queue (blk-mq) may need kernel boot option 'scsi_mod.use_blk_mq=1'
1694 # and 'modprobe mq-deadline-iosched|kyber|bfq' on kernels < 5.0
1695 # - Single queue schedulers are legacy now and were removed together with
1696 # the old block layer in kernel 5.0
1698 #DISK_IOSCHED="mq-deadline mq-deadline"
1700 # AHCI link power management (ALPM) for disk devices:
1701 # min_power, med_power_with_dipm(*), medium_power, max_performance.
1702 # (*) Kernel >= 4.15 required, then recommended.
1703 # Multiple values separated with spaces are tried sequentially until success.
1705 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
1706 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
1708 # Exclude host devices from AHCI link power management.
1709 # Separate multiple hosts with spaces.
1711 #SATA_LINKPWR_BLACKLIST="host1"
1713 # Runtime Power Management for AHCI host and disks devices:
1714 # on=disable, auto=enable.
1715 # EXPERIMENTAL ** WARNING: auto may cause system lockups/data loss.
1717 #AHCI_RUNTIME_PM_ON_AC=on
1718 #AHCI_RUNTIME_PM_ON_BAT=on
1720 # Seconds of inactivity before disk is suspended.
1721 # Note: effective only when AHCI_RUNTIME_PM_ON_AC/BAT is activated.
1723 AHCI_RUNTIME_PM_TIMEOUT=15
1725 # PCI Express Active State Power Management (PCIe ASPM):
1726 # default(*), performance, powersave.
1727 # (*) keeps BIOS ASPM defaults (recommended)
1729 #PCIE_ASPM_ON_AC=default
1730 #PCIE_ASPM_ON_BAT=default
1732 # Set the min/max/turbo frequency for the Intel GPU.
1733 # Possible values depend on your hardware. For available frequencies see
1734 # the output of tlp-stat -g.
1736 #INTEL_GPU_MIN_FREQ_ON_AC=0
1737 #INTEL_GPU_MIN_FREQ_ON_BAT=0
1738 #INTEL_GPU_MAX_FREQ_ON_AC=0
1739 #INTEL_GPU_MAX_FREQ_ON_BAT=0
1740 #INTEL_GPU_BOOST_FREQ_ON_AC=0
1741 #INTEL_GPU_BOOST_FREQ_ON_BAT=0
1743 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
1744 # auto = mid on BAT, high on AC.
1746 RADEON_POWER_PROFILE_ON_AC=default
1747 RADEON_POWER_PROFILE_ON_BAT=default
1749 # Radeon dynamic power management method (DPM): battery, performance.
1751 RADEON_DPM_STATE_ON_AC=performance
1752 RADEON_DPM_STATE_ON_BAT=battery
1754 # Radeon DPM performance level: auto, low, high; auto is recommended.
1755 # Note: effective only when RADEON_DPM_STATE_ON_AC/BAT is activated.
1757 RADEON_DPM_PERF_LEVEL_ON_AC=auto
1758 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
1760 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
1765 # Disable wake on LAN: Y/N.
1769 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
1770 # A value of 0 disables, >=1 enables power saving (recommended: 1).
1772 SOUND_POWER_SAVE_ON_AC=0
1773 SOUND_POWER_SAVE_ON_BAT=0
1775 # Disable controller too (HDA only): Y/N.
1776 # Note: effective only when SOUND_POWER_SAVE_ON_AC/BAT is activated.
1778 SOUND_POWER_SAVE_CONTROLLER=N
1780 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
1781 # Drive can be powered on again by releasing (and reinserting) the eject lever
1782 # or by pressing the disc eject button on newer models.
1783 # Note: an UltraBay/MediaBay hard disk is never powered off.
1785 BAY_POWEROFF_ON_AC=0
1786 BAY_POWEROFF_ON_BAT=0
1787 # Optical drive device to power off
1791 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
1794 RUNTIME_PM_ON_BAT=auto
1796 # Exclude PCI(e) device adresses the following list from Runtime PM
1797 # (separate with spaces). Use lspci to get the adresses (1st column).
1799 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
1801 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
1802 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
1803 # prevents accidential power-on of dGPU in hybrid graphics setups.
1804 # Separate multiple drivers with spaces.
1805 # Default: "amdgpu mei_me nouveau nvidia pcieport radeon", use "" to disable
1807 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu mei_me nouveau nvidia pcieport radeon"
1809 # Set to 0 to disable, 1 to enable USB autosuspend feature.
1813 # Exclude listed devices from USB autosuspend (separate with spaces).
1814 # Use lsusb to get the ids.
1815 # Note: input devices (usbhid) are excluded automatically
1817 #USB_BLACKLIST="1111:2222 3333:4444"
1819 # Bluetooth devices are excluded from USB autosuspend:
1820 # 0=do not exclude, 1=exclude.
1822 USB_BLACKLIST_BTUSB=0
1824 # Phone devices are excluded from USB autosuspend:
1825 # 0=do not exclude, 1=exclude (enable charging).
1827 USB_BLACKLIST_PHONE=0
1829 # Printers are excluded from USB autosuspend:
1830 # 0=do not exclude, 1=exclude.
1832 USB_BLACKLIST_PRINTER=1
1834 # WWAN devices are excluded from USB autosuspend:
1835 # 0=do not exclude, 1=exclude.
1837 USB_BLACKLIST_WWAN=0
1839 # Include listed devices into USB autosuspend even if already excluded
1840 # by the blacklists above (separate with spaces). Use lsusb to get the ids.
1842 #USB_WHITELIST="1111:2222 3333:4444"
1844 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
1845 # (workaround for USB devices that cause shutdown problems).
1847 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
1849 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
1850 # on system startup: 0=disable, 1=enable.
1851 # Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
1852 # are ignored when this is enabled.
1854 #RESTORE_DEVICE_STATE_ON_STARTUP=0
1855 RESTORE_DEVICE_STATE_ON_STARTUP=1
1857 # Radio devices to disable on startup: bluetooth, wifi, wwan.
1858 # Separate multiple devices with spaces.
1860 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
1862 # Radio devices to enable on startup: bluetooth, wifi, wwan.
1863 # Separate multiple devices with spaces.
1865 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
1867 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
1868 # (workaround for devices that are blocking shutdown).
1870 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
1872 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
1873 # (to prevent other operating systems from missing radios).
1875 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
1877 # Radio devices to enable on AC: bluetooth, wifi, wwan.
1879 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
1881 # Radio devices to disable on battery: bluetooth, wifi, wwan.
1883 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
1884 DEVICES_TO_DISABLE_ON_BAT="bluetooth"
1886 # Radio devices to disable on battery when not in use (not connected):
1887 # bluetooth, wifi, wwan.
1889 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
1891 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
1892 # required). Charging starts when the remaining capacity falls below the
1893 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
1894 # Main / Internal battery (values in %)
1896 #START_CHARGE_THRESH_BAT0=75
1897 #STOP_CHARGE_THRESH_BAT0=80
1898 # Ultrabay / Slice / Replaceable battery (values in %)
1900 #START_CHARGE_THRESH_BAT1=75
1901 #STOP_CHARGE_THRESH_BAT1=80
1903 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
1905 #RESTORE_THRESHOLDS_ON_BAT=1
1907 # Battery feature drivers: 0=disable, 1=enable
1913 # ------------------------------------------------------------------------------
1914 # tlp-rdw - Parameters for the radio device wizard
1915 # Possible devices: bluetooth, wifi, wwan.
1918 # - Parameters are disabled by default, remove the leading # to enable them
1919 # - Separate multiple radio devices with spaces
1921 # Default: <none> (for all parameters below)
1923 # Radio devices to disable on connect.
1924 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
1925 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
1926 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
1928 # Radio devices to enable on disconnect.
1929 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
1930 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
1931 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
1933 # Radio devices to enable/disable when docked.
1934 #DEVICES_TO_ENABLE_ON_DOCK=""
1935 #DEVICES_TO_DISABLE_ON_DOCK=""
1937 # Radio devices to enable/disable when undocked.
1938 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
1939 #DEVICES_TO_DISABLE_ON_UNDOCK=""
1944 #+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
1945 # ------------------------------------------------------------------------------
1946 # tlp - Parameters for power saving
1947 # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
1949 # Hint: some features are disabled by default, remove the leading # to enable
1952 # Set to 0 to disable, 1 to enable TLP.
1955 # Operation mode when no power supply can be detected: AC, BAT.
1956 # Concerns some desktop and embedded hardware only.
1959 # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
1960 # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
1961 TLP_PERSISTENT_DEFAULT=0
1963 # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
1964 # Non-zero value enables, zero disables laptop mode.
1965 DISK_IDLE_SECS_ON_AC=0
1966 DISK_IDLE_SECS_ON_BAT=2
1968 # Dirty page values (timeouts in secs).
1969 MAX_LOST_WORK_SECS_ON_AC=15
1970 MAX_LOST_WORK_SECS_ON_BAT=60
1972 # Hint: CPU parameters below are disabled by default, remove the leading #
1973 # to enable them, otherwise kernel default values are used.
1975 # Select a CPU frequency scaling governor.
1976 # Intel Core i processor with intel_pstate driver:
1977 # powersave(*), performance.
1978 # Older hardware with acpi-cpufreq driver:
1979 # ondemand(*), powersave, performance, conservative, schedutil.
1980 # (*) is recommended.
1981 # Hint: use tlp-stat -p to show the active driver and available governors.
1983 # powersave for intel_pstate and ondemand for acpi-cpufreq are power
1984 # efficient for *almost all* workloads and therefore kernel and most
1985 # distributions have chosen them as defaults. If you still want to change,
1986 # you should know what you're doing! You *must* disable your distribution's
1987 # governor settings or conflicts will occur.
1988 #CPU_SCALING_GOVERNOR_ON_AC=powersave
1989 #CPU_SCALING_GOVERNOR_ON_BAT=powersave
1991 # Set the min/max frequency available for the scaling governor.
1992 # Possible values strongly depend on your CPU. For available frequencies see
1993 # the output of tlp-stat -p.
1994 #CPU_SCALING_MIN_FREQ_ON_AC=0
1995 #CPU_SCALING_MAX_FREQ_ON_AC=0
1996 #CPU_SCALING_MIN_FREQ_ON_BAT=0
1997 #CPU_SCALING_MAX_FREQ_ON_BAT=0
1999 # Set energy performance hints (HWP) for Intel P-state governor:
2000 # performance, balance_performance, default, balance_power, power
2001 # Values are given in order of increasing power saving.
2002 # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2003 CPU_HWP_ON_AC=balance_performance
2004 CPU_HWP_ON_BAT=balance_power
2006 # Set Intel P-state performance: 0..100 (%).
2007 # Limit the max/min P-state to control the power dissipation of the CPU.
2008 # Values are stated as a percentage of the available performance.
2009 # Requires an Intel Core i processor with intel_pstate driver.
2010 #CPU_MIN_PERF_ON_AC=0
2011 #CPU_MAX_PERF_ON_AC=100
2012 #CPU_MIN_PERF_ON_BAT=0
2013 #CPU_MAX_PERF_ON_BAT=30
2015 # Set the CPU "turbo boost" feature: 0=disable, 1=allow
2016 # Requires an Intel Core i processor.
2018 # - This may conflict with your distribution's governor settings
2019 # - A value of 1 does *not* activate boosting, it just allows it
2023 # Minimize number of used CPU cores/hyper-threads under light load conditions:
2024 # 0=disable, 1=enable.
2025 SCHED_POWERSAVE_ON_AC=0
2026 SCHED_POWERSAVE_ON_BAT=1
2028 # Kernel NMI Watchdog:
2029 # 0=disable (default, saves power), 1=enable (for kernel debugging only).
2032 # Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2033 # Frequency voltage pairs are written to:
2034 # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2035 # CAUTION: only use this, if you thoroughly understand what you are doing!
2036 #PHC_CONTROLS="F:V F:V F:V F:V"
2038 # Set CPU performance versus energy savings policy:
2039 # performance, balance-performance, default, balance-power, power.
2040 # Values are given in order of increasing power saving.
2041 # Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2042 ENERGY_PERF_POLICY_ON_AC=performance
2043 ENERGY_PERF_POLICY_ON_BAT=balance-power
2045 # Disk devices; separate multiple devices with spaces (default: sda).
2046 # Devices can be specified by disk ID also (lookup with: tlp diskid).
2047 DISK_DEVICES="sda sdb"
2049 # Disk advanced power management level: 1..254, 255 (max saving, min, off).
2050 # Levels 1..127 may spin down the disk; 255 allowable on most drives.
2051 # Separate values for multiple disks with spaces. Use the special value 'keep'
2052 # to keep the hardware default for the particular disk.
2053 DISK_APM_LEVEL_ON_AC="254 254"
2054 DISK_APM_LEVEL_ON_BAT="128 128"
2056 # Hard disk spin down timeout:
2057 # 0: spin down disabled
2058 # 1..240: timeouts from 5s to 20min (in units of 5s)
2059 # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2060 # See 'man hdparm' for details.
2061 # Separate values for multiple disks with spaces. Use the special value 'keep'
2062 # to keep the hardware default for the particular disk.
2063 #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2064 #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2066 # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
2067 # Separate values for multiple disks with spaces. Use the special value 'keep'
2068 # to keep the kernel default scheduler for the particular disk.
2069 #DISK_IOSCHED="cfq cfq"
2071 # AHCI link power management (ALPM) for disk devices:
2072 # min_power, med_power_with_dipm(*), medium_power, max_performance.
2073 # (*) Kernel >= 4.15 required, then recommended.
2074 # Multiple values separated with spaces are tried sequentially until success.
2075 SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2076 SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2078 # Exclude host devices from AHCI link power management.
2079 # Separate multiple hosts with spaces.
2080 #SATA_LINKPWR_BLACKLIST="host1"
2082 # Runtime Power Management for AHCI host and disks devices:
2083 # on=disable, auto=enable.
2084 # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
2085 #AHCI_RUNTIME_PM_ON_AC=on
2086 #AHCI_RUNTIME_PM_ON_BAT=on
2088 # Seconds of inactivity before disk is suspended.
2089 AHCI_RUNTIME_PM_TIMEOUT=15
2091 # PCI Express Active State Power Management (PCIe ASPM):
2092 # default, performance, powersave.
2093 PCIE_ASPM_ON_AC=performance
2094 PCIE_ASPM_ON_BAT=powersave
2096 # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2097 # auto = mid on BAT, high on AC; default = use hardware defaults.
2098 RADEON_POWER_PROFILE_ON_AC=high
2099 RADEON_POWER_PROFILE_ON_BAT=low
2101 # Radeon dynamic power management method (DPM): battery, performance.
2102 RADEON_DPM_STATE_ON_AC=performance
2103 RADEON_DPM_STATE_ON_BAT=battery
2105 # Radeon DPM performance level: auto, low, high; auto is recommended.
2106 RADEON_DPM_PERF_LEVEL_ON_AC=auto
2107 RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2109 # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2113 # Disable wake on LAN: Y/N.
2116 # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2117 # A value of 0 disables, >=1 enables power saving (recommended: 1).
2118 SOUND_POWER_SAVE_ON_AC=0
2119 SOUND_POWER_SAVE_ON_BAT=0
2121 # Disable controller too (HDA only): Y/N.
2122 SOUND_POWER_SAVE_CONTROLLER=N
2124 # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2125 # Drive can be powered on again by releasing (and reinserting) the eject lever
2126 # or by pressing the disc eject button on newer models.
2127 # Note: an UltraBay/MediaBay hard disk is never powered off.
2128 BAY_POWEROFF_ON_AC=0
2129 BAY_POWEROFF_ON_BAT=0
2130 # Optical drive device to power off (default sr0).
2133 # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2135 RUNTIME_PM_ON_BAT=auto
2137 # Exclude PCI(e) device adresses the following list from Runtime PM
2138 # (separate with spaces). Use lspci to get the adresses (1st column).
2139 #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2140 RUNTIME_PM_BLACKLIST="01:00.0"
2142 # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2143 # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2144 # prevents accidential power-on of dGPU in hybrid graphics setups.
2145 # Use "" to disable the feature completely.
2146 # Separate multiple drivers with spaces.
2147 #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
2149 # Set to 0 to disable, 1 to enable USB autosuspend feature.
2152 # Exclude listed devices from USB autosuspend (separate with spaces).
2153 # Use lsusb to get the ids.
2154 # Note: input devices (usbhid) are excluded automatically
2155 #USB_BLACKLIST="1111:2222 3333:4444"
2157 # Bluetooth devices are excluded from USB autosuspend:
2158 # 0=do not exclude, 1=exclude.
2159 USB_BLACKLIST_BTUSB=0
2161 # Phone devices are excluded from USB autosuspend:
2162 # 0=do not exclude, 1=exclude (enable charging).
2163 USB_BLACKLIST_PHONE=0
2165 # Printers are excluded from USB autosuspend:
2166 # 0=do not exclude, 1=exclude.
2167 USB_BLACKLIST_PRINTER=1
2169 # WWAN devices are excluded from USB autosuspend:
2170 # 0=do not exclude, 1=exclude.
2171 USB_BLACKLIST_WWAN=1
2173 # Include listed devices into USB autosuspend even if already excluded
2174 # by the blacklists above (separate with spaces).
2175 # Use lsusb to get the ids.
2176 #USB_WHITELIST="1111:2222 3333:4444"
2178 # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
2179 # (workaround for USB devices that cause shutdown problems).
2180 #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
2182 # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
2183 # on system startup: 0=disable, 1=enable.
2184 # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
2185 # are ignored when this is enabled!
2186 #RESTORE_DEVICE_STATE_ON_STARTUP=0
2187 RESTORE_DEVICE_STATE_ON_STARTUP=1
2189 # Radio devices to disable on startup: bluetooth, wifi, wwan.
2190 # Separate multiple devices with spaces.
2191 #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
2193 # Radio devices to enable on startup: bluetooth, wifi, wwan.
2194 # Separate multiple devices with spaces.
2195 #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
2197 # Radio devices to disable on shutdown: bluetooth, wifi, wwan.
2198 # (workaround for devices that are blocking shutdown).
2199 #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
2201 # Radio devices to enable on shutdown: bluetooth, wifi, wwan.
2202 # (to prevent other operating systems from missing radios).
2203 #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
2205 # Radio devices to enable on AC: bluetooth, wifi, wwan.
2206 #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
2208 # Radio devices to disable on battery: bluetooth, wifi, wwan.
2209 #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
2211 # Radio devices to disable on battery when not in use (not connected):
2212 # bluetooth, wifi, wwan.
2213 #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
2215 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
2216 # required). Charging starts when the remaining capacity falls below the
2217 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
2218 # Main / Internal battery (values in %)
2219 #START_CHARGE_THRESH_BAT0=75
2220 #STOP_CHARGE_THRESH_BAT0=80
2221 # Ultrabay / Slice / Replaceable battery (values in %)
2222 #START_CHARGE_THRESH_BAT1=75
2223 #STOP_CHARGE_THRESH_BAT1=80
2225 # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
2226 #RESTORE_THRESHOLDS_ON_BAT=1
2228 # ------------------------------------------------------------------------------
2229 # tlp-rdw - Parameters for the radio device wizard
2230 # Possible devices: bluetooth, wifi, wwan.
2233 # - Parameters are disabled by default, remove the leading # to enable them
2234 # - Separate multiple radio devices with spaces
2236 # Radio devices to disable on connect.
2237 #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
2238 #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
2239 #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
2241 # Radio devices to enable on disconnect.
2242 #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
2243 #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
2244 #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
2246 # Radio devices to enable/disable when docked.
2247 #DEVICES_TO_ENABLE_ON_DOCK=""
2248 #DEVICES_TO_DISABLE_ON_DOCK=""
2250 # Radio devices to enable/disable when undocked.
2251 #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
2252 #DEVICES_TO_DISABLE_ON_UNDOCK=""
2259 :header-args+: :tangle ~/.xprofile
2262 =~/.xprofile= is similar in style to =~/.xinitrc=, but on the
2263 contrary, it's automatically sourced by LightDM, my display manager of
2266 #+begin_src sh :tangle no
2267 xset -b # disable bell
2268 xset r rate 200 45 # repeat delay (ms) and rate (repeats/sec)
2270 # setxkbmap -option compose:ralt
2272 setxkbmap -option ctrl:nocaps # turn capslock into control
2273 setxkbmap -option altwin:swap_alt_win # swap alt and super
2275 if [ $(hostname) = "plasma" ]
2277 setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt
2280 if [ $(hostname) = "enigma" ]
2282 xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt
2285 light -Scrs "intel_backlight" 2
2287 source $HOME/.zprofile
2289 export _JAVA_AWT_WM_NONREPARENTING=1
2290 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
2292 if [ $(hostname) = "plasma" ]
2300 *** xkb us_ab keyboard layout
2302 #+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none
2303 default partial alphanumeric_keys
2304 xkb_symbols "us_ab" {
2306 name[Group1]= "English (US)(aminb)";
2308 key <MENU> { [ Alt_R ] };
2314 My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
2315 [[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
2320 :header-args+: :tangle ~/.zimrc
2332 # Select what modules you would like enabled.
2333 # The second line of modules may depend on options set by modules in the first
2334 # line. These dependencies are noted on the respective module's README.md.
2335 zmodules=(directory environment git git-info history input ssh utility custom \
2336 syntax-highlighting history-substring-search prompt completion)
2347 # Set your desired prompt here
2348 zprompt_theme='pure'
2349 #PURE_PROMPT_SYMBOL=λ
2350 #PURE_PROMPT_SYMBOL=δ
2351 PURE_PROMPT_SYMBOL=➜
2357 # set an optional host-specific filename for the completion cache file
2358 # if none is provided, the default '.zcompdump' is used.
2359 #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
2365 # Uncomment to enable command correction prompts
2366 # See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
2373 # Set the string below to the desired terminal title format string.
2374 # The terminal title is redrawn upon directory change, however, variables like
2375 # ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
2376 # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
2377 # The example below uses the following format: 'username@host:/current/directory'
2378 ztermtitle='%n@%m:%~'
2384 # Uncomment to enable double-dot expansion.
2385 # This appends '../' to your input for each '.' you type after an initial '..'
2386 #zdouble_dot_expand='true'
2389 # Syntax-Highlighting
2392 # This determines what highlighters will be used with the syntax-highlighting module.
2393 # Documentation of the highlighters can be found here:
2394 # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
2395 # For (u)rxvt, termite and gnome-terminal users,
2396 # removing the 'cursor' highlighter will fix the disappearing cursor problem
2397 #zhighlighters=(main brackets cursor)
2398 zhighlighters=(main brackets pattern)
2404 # Load these ssh identities with the ssh module
2405 zssh_ids=(id_ed25519_bandali)
2411 # Set (optional) pacman front-end.
2412 zpacman_frontend='yay'
2414 # Load any helper scripts as defined here
2415 #zpacman_helper=(aur)
2422 :header-args+: :tangle ~/.zlogin
2427 # User configuration sourced by login shells
2431 [[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
2437 :header-args+: :tangle ~/.zprofile
2441 #PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
2442 #PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
2443 export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH
2444 export XDG_CONFIG_HOME=$HOME/.config
2445 export XDG_DATA_HOME=$HOME/.local/share
2446 export XDG_DATA_DIRS=/usr/local/share:/usr/share
2447 export MAILDIR="$HOME/mail"
2449 #export MATHMODELS=$HOME/src/eiffel/mathmodels
2450 #export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
2451 #export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
2454 #export JAVA_HOME=/usr/lib/jvm/default
2455 #export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
2456 #export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
2457 #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
2459 #export PATH="$HOME/usr/build/pvs:$PATH"
2460 #export SBCLISP_HOME=/usr/share/sbcl-source
2461 #export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
2463 export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
2465 #export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
2466 #export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
2468 export NIXPKGS=$HOME/src/git/nixpkgs
2470 if [ -e /home/amin/.nix-profile/etc/profile.d/nix.sh ]; then . /home/amin/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
2472 export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
2473 export PATH="/$HOME/.config/guix/current/bin${PATH:+:}$PATH"
2474 export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
2475 export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
2476 export GIT_SSL_CAINFO="$SSL_CERT_FILE"
2481 :header-args+: :tangle ~/.zshenv
2485 # Ensure that a non-login, non-interactive shell has a defined environment.
2486 if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
2487 source "${ZDOTDIR:-$HOME}/.zprofile"
2493 :header-args+: :tangle ~/.zshrc
2497 # Bash-like navigation
2498 #export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
2499 #export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
2500 export WORDCHARS='*?[]~=&;!#$%^(){}<>'
2501 #ZLE_SPACE_SUFFIX_CHARS=$'|&'
2503 #disable -r time # disable shell reserved word
2504 #alias time='time -p' # -p for POSIX output
2506 # rehash if last command was pacaur or pacman
2507 # (so that zsh picks up changes in $PATH immediately)
2508 TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
2511 # User configuration sourced by interactive shells
2514 # Define zim location
2515 export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
2518 [[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
2520 ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
2521 #ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
2525 source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
2526 # source ~/.zsh/zsh-autopair/autopair.zsh
2531 source /usr/share/fzf/key-bindings.zsh
2532 source /usr/share/fzf/completion.zsh
2534 # Accept history selection instead of putting it on
2536 fzf-history-widget-accept() {
2540 #zle -N fzf-history-widget-accept
2541 #bindkey '^R' fzf-history-widget-accept
2544 export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
2550 alias mpv="mpv --ytdl-format mp4"
2554 alias jcl=journalctl
2555 alias m="mbsync csclub; mbsync uwaterloo; mbsync amin"
2556 alias best="youtube-dl -f best"
2563 git clone https://aur.archlinux.org/${1}.git
2575 This section contains various useful scripts and the ones used by the
2576 programs above. For instance, =toggle-tablet= for switching to and
2577 from tablet mode on my X220T, =toggle-presentation-mode= for toggling
2578 Xfce's presentation mode which keeps the screen awake, and
2579 =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
2580 exact brightness value.
2582 ** battery-percentage-time
2584 :header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
2587 #+begin_src sh :tangle no
2590 dbus-send --print-reply=literal --system \
2591 --dest=org.freedesktop.UPower \
2592 /org/freedesktop/UPower/devices/battery_BAT0 \
2593 org.freedesktop.DBus.Properties.Get \
2594 string:org.freedesktop.UPower.Device \
2595 string:"${label}" | awk '{print $3}'
2598 perc=$(dbus_send 'Percentage')
2599 state=$(dbus_send 'State')
2601 if [ "$state" -eq 2 ]; then # Discharging
2602 secs=$(dbus_send 'TimeToEmpty')
2603 elif [ "$state" -eq 1 ]; then # Charging
2604 secs=$(dbus_send 'TimeToFull')
2607 printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
2612 :header-args+: :tangle ~/.local/bin/my-i3status.py :shebang "#!/usr/bin/env python2"
2615 #+begin_src python :comments none
2616 # -*- coding: utf-8 -*-
2618 # This script is a simple wrapper which prefixes each i3status line with custom
2619 # information. It is based on:
2620 # https://github.com/i3/i3status/blob/master/contrib/wrapper.py
2622 # In ~/.i3status.conf, add the following line:
2623 # output_format = "i3bar"
2624 # in the 'general' section.
2625 # Then, in ~/.config/i3/config or ~/.config/sway/config add:
2626 # status_command i3status | my-i3status.py
2627 # in the 'bar' section. Make sure my-i3status.py is in $PATH.
2629 # © 2012 Valentin Haenel <valentin.haenel@gmx.de>
2630 # © 2018 Amin Bandali <bandali@gnu.org>
2632 # This program is free software. It comes without any warranty, to the extent
2633 # permitted by applicable law. You can redistribute it and/or modify it under
2634 # the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
2635 # 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
2643 """ Return true if ~/.nosleep exists. """
2644 return os.path.isfile(os.path.expanduser("~/.nosleep"))
2646 def print_line(message):
2647 """ Non-buffered printing to stdout. """
2648 sys.stdout.write(message + '\n')
2652 """ Interrupted respecting reader for stdin. """
2653 # try reading a line, removing any extra whitespace
2655 line = sys.stdin.readline().strip()
2656 # i3status sends EOF, or an empty line
2661 except KeyboardInterrupt:
2664 if __name__ == '__main__':
2665 # Skip the first line which contains the version header.
2666 print_line(read_line())
2668 # The second line contains the start of the infinite array.
2669 print_line(read_line())
2672 line, prefix = read_line(), ''
2673 # ignore comma at start of lines
2674 if line.startswith(','):
2675 line, prefix = line[1:], ','
2678 j = json.loads(line)
2679 # insert information into the start of the json, but could be anywhere
2680 j.insert(0, {'full_text' : '•', 'name' : 'nosleep'})
2681 # and echo back new encoded json
2682 print_line(prefix+json.dumps(j))
2684 print_line(prefix+line)
2689 :header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
2694 val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
2695 [ -n "$val" ] && light -S $val
2700 :header-args+: :tangle ~/.local/bin/rofi-remmina.py :shebang "#!/usr/bin/env python2"
2706 from subprocess import Popen, PIPE
2708 remmina_dir = os.path.expanduser("~/.local/share/remmina")
2712 for f in os.listdir(remmina_dir):
2713 fp = os.path.join(remmina_dir, f)
2714 c = ConfigParser.ConfigParser()
2716 n = c.get('remmina', 'name')
2719 lines = max(min(15, len(fdict)), 1);
2720 width = len(max(fdict.keys(), key=len))
2721 rofi = Popen(["rofi", "-i", "-dmenu", \
2722 "-l", str(lines), "-width", str(width), \
2723 "-p", "connection"], stdout=PIPE, stdin=PIPE)
2724 selected = rofi.communicate("\n" \
2725 .join(fdict.keys()) \
2726 .encode("utf-8"))[0] \
2731 r = Popen(["remmina", "-c", fdict[selected]])
2737 :header-args+: :tangle ~/.local/bin/s :shebang "#!/bin/bash"
2741 export _JAVA_AWT_WM_NONREPARENTING=1
2742 export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
2744 source $HOME/.zprofile
2750 :header-args+: :tangle ~/.local/bin/sway-ws-util :shebang "#!/bin/bash"
2754 curr_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true).name')
2755 [[ $curr_ws -eq 1 ]] && prev_ws=10 || prev_ws=$((curr_ws-1))
2756 [[ $curr_ws -eq 10 ]] && next_ws=1 || next_ws=$((curr_ws+1))
2760 if [ "$1" = "switch" ] || [ "$1" = "move" ]; then
2762 if [ "$2" = "prev" ]; then
2764 elif [ "$2" = "next" ]; then
2767 echo "Usage: $0 $1 {prev|next} [follow]"
2771 echo "Usage: $0 {switch|move} {prev|next} [follow]"
2775 if [ "$op" = "switch" ]; then
2776 sway workspace "$dest_ws"
2777 elif [ "$op" = "move" ]; then
2778 sway move container to workspace "$dest_ws"
2779 if [ "$3" = "follow" ]; then
2780 sway workspace "$dest_ws"
2785 ** toggle-presentation-mode
2787 :header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
2790 #+begin_src bash :tangle no
2791 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
2796 :header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash"
2799 This script toggles between a 'normal' mode and a 'tablet' mode, doing
2802 - rotates the screen using =xrandr=, so that rotating the physical
2803 display of my X220t would have the laptop's battery on the right
2805 - enables touch screen,
2806 - properly rotates the stylus pen and touch screen pointers, and
2807 - toggles between RGB and Vertical BGR sub-pixel order.
2809 #+begin_src bash :tangle no
2810 case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
2811 0) # Screen is not rotated, we should rotate it right (90°)
2813 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
2814 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
2815 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
2816 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
2818 1) # Currently top is rotated right, we should set it normal (0°)
2820 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
2821 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
2822 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
2823 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
2826 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
2834 :header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
2837 #+begin_src sh :tangle no
2838 cur_vol=$(pamixer --get-volume)
2840 if [ $(pamixer --get-mute) = true ]; then
2841 printf 'mt \n' "$cur_vol"
2843 printf '%02d \n' "$cur_vol"
2849 :header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
2855 zathura --synctex-forward "$pos" "$pdffile" || \
2857 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
2858 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )