[emacs] update org and a few other packages
[~bandali/configs] / rc.org
... / ...
CommitLineData
1#+title: rc.org
2#+property: header-args :comments link :mkdirp yes :results silent
3
4* About
5
6This org file contains the configuration files of pretty much every
7program I use. The files are tangled (i.e. exported, or derived) from
8this file using =org-babel=.
9
10Note: This file is best viewed inside Emacs with org mode.
11
12* Configs
13
14This section contains the configuration files (dotfiles) of various
15programs I use.
16
17** compton
18:PROPERTIES:
19:header-args+: :tangle ~/.config/compton.conf
20:END:
21
22#+begin_src conf :tangle no
23# Shadow
24shadow = false; # Enabled client-side shadows on windows.
25no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
26no-dnd-shadow = true; # Don't draw shadows on DND windows.
27clear-shadow = true; # Zero the part of the shadow's mask behind the
28 # window. Fix some weirdness with ARGB windows.
29shadow-radius = 5; # The blur radius for shadows. (default 12)
30shadow-offset-x = -5; # The left offset for shadows. (default -15)
31shadow-offset-y = -5; # The top offset for shadows. (default -15)
32# shadow-opacity = 0.7; # The translucency for shadows. (default .75)
33# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
34# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
35# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
36shadow-exclude = [ "n:e:Notification", "class_g = 'Chromium'", "class_g = 'Dmenu'", "class_g = 'Firefox' && argb" ]; # Exclude conditions for shadows.
37# shadow-exclude = "n:e:Notification";
38#shadow-exclude = [ "_GTK_FRAME_EXTENTS@:c" ] # Fix dual shadow on some gtk3 powered applications
39shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
40 # (see also: --detect-rounded-corners)
41
42# Opacity
43menu-opacity = 1.0; # The opacity for menus. (default 1.0)
44#inactive-opacity = 0.9; # Default opacity of inactive windows. (0.0 - 1.0)
45# active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
46frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0)
47# inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
48 # value of _NET_WM_OPACITY. Bad choice.
49alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
50 # it may result in less X resource usage,
51 # Yet fading may look bad.
52#inactive-dim = 0.5; # Dim inactive windows. (0.0 - 1.0)
53#inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
54# blur-background = true; # Blur background of transparent windows.
55 # Bad performance with X Render backend.
56 # GLX backend is preferred.
57# blur-background-frame = true; # Blur background of opaque windows with transparent
58 # frames as well.
59blur-background-fixed = true; # Do not let blur radius adjust based on window opacity.
60blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
61 # Exclude conditions for background blur.
62
63# Fading
64fading = false; # Fade windows during opacity changes.
65fade-delta = 3; # The time between steps in a fade in milliseconds. (default 10).
66fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
67fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
68# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
69fade-exclude = [ ]; # Exclude conditions for fading.
70
71# Other
72backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
73 # much faster but depends on a sane driver.
74mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
75mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
76use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
77 # instead of using FocusIn/Out events. Usually more reliable but
78 # depends on a EWMH-compliant WM.
79detect-rounded-corners = false; # Detect rounded corners and treat them as rectangular when --shadow-ignore- shaped is on.
80detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
81 # managers not passing _NET_WM_OPACITY of client windows to frame
82 # windows.
83refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
84vsync = "drm"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
85 # See man page for more details.
86dbe = false; # Enable DBE painting mode. Rarely needed.
87paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
88sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
89 # Incompatible with certain VSync methods.
90unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
91 # detected, to maximize performance for full-screen windows.
92focus-exclude = [ ]; # A list of conditions of windows that should always be considered
93 # focused.
94detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
95 # the same group focused at the same time.
96detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
97invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
98
99# GLX backend # GLX backend fine-tune options. See man page for more info.
100glx-no-stencil = true; # Recommended.
101glx-copy-from-front = false; # Useful with --glx-swap-method,
102# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
103# glx-no-rebind-pixmap = true; # Recommended if it works.
104glx-no-rebind-pixmap = true; # Recommended if it works.
105#glx-swap-method = "4"; # See man page.
106glx-swap-method = "4"; # See man page.
107
108# Window type settings
109wintypes:
110{
111 tooltip = { fade = true; shadow = false; opacity = 1; focus = true; };
112 menu = { shadow = false; };
113 dropdown_menu = { shadow = false; };
114 popup_menu = { shadow = false; };
115 utility = { shadow = false; };
116 # fade: Fade the particular type of windows.
117 # shadow: Give those windows shadow
118 # opacity: Default opacity for the type of windows.
119 # focus: Whether to always consider windows of this type focused.
120};
121#+end_src
122
123** dovecot
124:PROPERTIES:
125:header-args+: :tangle "/sudo::/etc/dovecot/dovecot.conf"
126:END:
127
128#+begin_src conf
129protocols = imap
130
131listen = 127.0.0.1
132log_path = /var/log/dovecot.log
133info_log_path = /var/log/dovecot-info.log
134
135ssl = no
136disable_plaintext_auth = no
137
138auth_verbose = yes
139auth_mechanisms = plain
140
141passdb {
142 driver = passwd-file
143 args = /etc/dovecot/passwd
144}
145
146userdb {
147 driver = static
148 args = uid=amin gid=amin home=/home/amin/mail/%d/%n
149 default_fields = mail=maildir:/home/amin/mail/%d/%n/mail
150}
151
152# mail_home = /home/amin/mail/%d/%n
153# mail_location = maildir:/home/amin/mail/%d/%n/mail:LAYOUT=fs:INBOX=/home/amin/mail/%d/%n/mail/Inbox
154
155# namespace {
156# inbox = yes
157# separator = /
158# }
159
160mail_plugins = $mail_plugins fts fts_lucene
161
162plugin {
163 fts = lucene
164 fts_lucene = whitespace_chars=@.
165 fts_autoindex = yes
166}
167#+end_src
168
169** Dunst
170:PROPERTIES:
171:header-args+: :tangle ~/.config/dunst/dunstrc
172:END:
173
174#+begin_src conf
175[global]
176#font = Ubuntu Mono 10.5
177font = Inconsolata 11
178
179# Path to default icons.
180icon_folders = /usr/share/icons/Moka/16x16/status/:/usr/share/icons/Moka/16x16/devices/:/usr/share/icons/Faba-Mono/16x16/status/:/usr/share/icons/Faba-Mono/16x16/devices/:/usr/share/icons/Moka/16x16/actions/:/usr/share/icons/Moka/16x16/categories/:/usr/share/icons/Moka/16x16/mimetypes/:/usr/share/icons/Moka/16x16/apps/:/usr/share/icons/Moka/16x16/places/:/usr/share/icons/Paper/16x16/status/
181
182icon_position = left
183# <b>bold</b>
184# <i>italic</i>
185# <s>strikethrough<s/>
186# <u>underline</u>
187markup = full
188# The format of the message. Possible variables are:
189# %a appname
190# %s summary
191# %b body
192# %i iconname (including its path)
193# %I iconname (without its path)
194# %p progress value if set ([ 0%] to [100%]) or nothing
195# Markup is allowed
196format = "<b>%s</b>\n%b"
197# Sort messages by urgency
198sort = yes
199# Show how many messages are currently hidden (because of geometry)
200indicate_hiddenl= no
201# Alignment of message text.
202# Possible values are "left", "center" and "right"
203alignment = center
204# The frequency with wich text that is longer than the notification
205# window allows bounces back and forth.
206# This option conflicts with 'word_wrap'.
207# Set to 0 to disable
208bounce_freq = 3
209# show age of message if message is older than show_age_threshold seconds.
210# set to -1 to disable
211show_age_threshold = -1
212# split notifications into multiple lines if they don't fit into geometry
213word_wrap = yes
214# ignore newlines '\n' in notifications
215ignore_newline = no
216# The geometry of the message window.
217# geometry [{width}]x{height}][+/-{x}+/-{y}]
218# The height is measured in number of notifications everything else in pixels. If the width
219# is omitted but the height is given ("-geometry x2"), the message window
220# expands over the whole screen (dmenu-like). If width is 0,
221# the window expands to the longest message displayed.
222# A positive x is measured from the left, a negative from the
223# right side of the screen. Y is measured from the top and down respectevly.
224# The width can be negative. In this case the actual width is the
225# screen width minus the width defined in within the geometry option.
226#geometry = "410x12-12+12"
227#geometry = "0x0-30-30"
228geometry = "260x12-30-30"
229# The transparency of the window. range: [0; 100]
230# This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
231transparency = 0
232# Don't remove messages, if the user is idle (no mouse or keyboard input)
233# for longer than idle_threshold seconds.
234# Set to 0 to disable.
235idle_threshold = 120
236# Which monitor should the notifications be displayed on.
237monitor = 0
238# Display notification on focused monitor. Possible modes are:
239# mouse: follow mouse pointer
240# keyboard: follow window with keyboard focus
241# none: don't follow anything
242#
243# "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
244# This should be the case for almost all modern windowmanagers.
245#
246# If this option is set to mouse or keyboard, the monitor option will be
247# ignored.
248follow = keyboard
249# should a notification popped up from history be sticky or
250# timeout as if it would normally do.
251sticky_history = yes
252# The height of a single line. If the height is smaller than the font height,
253# it will get raised to the font height.
254# This adds empty space above and under the text.
255line_height = 0
256
257show_indicators = yes
258
259# Draw a line of 'separatpr_height' pixel height between two notifications.
260# Set to 0 to disable
261separator_height = 3
262# padding between text and separator
263padding = 8
264# horizontal padding
265horizontal_padding = 8
266# Define a color for the separator.
267# possible values are:
268# * auto: dunst tries to find a color fitting to the background
269# * foreground: use the same color as the foreground
270# * frame: use the same color as the frame.
271# * anything else will be interpreted as a X color
272separator_color = foreground
273# print a notification on startup
274# This is mainly for error detection, since dbus (re-)starts dunst
275# automatically after a crash.
276startup_notification = false
277# dmenu path
278#dmenu = /usr/bin/dmenu -p dunst:
279dmenu = /usr/bin/rofi -dmenu -p dunst:
280# browser for opening urls in context menu
281browser = /usr/bin/firefox -new-tab
282[frame]
283width = 0
284color = "#377222"
285[shortcuts]
286# shortcuts are specified as [modifier+][modifier+]...key
287# available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3'
288# and 'mod4' (windows-key)
289# xev might be helpful to find names for keys
290# close notification
291close = ctrl+space
292# close all notifications
293close_all = ctrl+shift+space
294# redisplay last message(s)
295# On the US keyboard layout 'grave' is normally above TAB and left of '1'.
296history = ctrl+shift+h
297# context menu
298context = ctrl+shift+period
299[urgency_low]
300# IMPORTANT: colors have to be defined in quotation marks.
301# Otherwise the '#' and following would be interpreted as a comment.
302background = "#1d2a30"
303foreground = "#71c2af"
304timeout = 3
305[urgency_normal]
306background = "#1d2a30"
307foreground = "#71c2af"
308timeout = 0
309[urgency_critical]
310background = "#1d2a30"
311foreground = "#ff9982"
312timeout = 0
313
314# Every section that isn't one of the above is interpreted as a rules
315# to override settings for certain messages.
316# Messages can be matched by 'appname', 'summary', 'body' or 'icon'
317# and you can override the 'timeout', 'urgency', 'foreground', 'background'
318# and 'format'.
319# Shell-like globbing will get expanded.
320#
321# SCRIPTING
322# you can specify a script that gets run when the rule matches by setting
323# the 'script' option.
324# The script will be called as follows:
325# script appname summary body icon urgency
326# where urgency can be "LOW", "NORMAL" or "CRITICAL".
327#
328# NOTE: if you don't want a notification to be displayed, set the format to ""
329# NOTE: It might be helpful to run dunst -print in a terminal in order to find
330# fitting options for rules.
331#[espeak]
332# summary = "*"
333# script = dunst_espeak.sh
334#[script-test]
335# summary = "*script*"
336# script = dunst_test.sh
337#[ignore]
338## This notification will not be displayed
339# summary = "foobar"
340# format = ""
341#[signed_on]
342# appname = Pidgin
343# summary = "*signed on*"
344# urgency = low
345#
346#[signed_off]
347# appname = Pidgin
348# summary = *signed off*
349# urgency = low
350#
351#[says]
352# appname = Pidgin
353# summary = *says*
354# urgency = critical
355#
356#[twitter]
357# appname = Pidgin
358# summary = *twitter.com*
359# urgency = normal
360#
361[xfpm-backlight]
362 summary = *Brightness*
363 urgency = low
364#+end_src
365
366** Fontconfig
367:PROPERTIES:
368:header-args+: :tangle ~/.config/fontconfig/fonts.conf :comments none
369:END:
370
371#+begin_src xml
372<?xml version="1.0"?>
373<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
374<fontconfig>
375 <match target="font">
376 <edit mode="assign" name="rgba">
377 <const>rgb</const>
378 </edit>
379 </match>
380 <match target="font">
381 <edit mode="assign" name="hinting">
382 <bool>true</bool>
383 </edit>
384 </match>
385 <match target="font">
386 <edit mode="assign" name="hintstyle">
387 <const>hintslight</const>
388 </edit>
389 </match>
390 <match target="font">
391 <edit mode="assign" name="antialias">
392 <bool>true</bool>
393 </edit>
394 </match>
395 <match target="font">
396 <edit mode="assign" name="lcdfilter">
397 <const>lcddefault</const>
398 </edit>
399 </match>
400 <dir>~/.fonts</dir>
401
402 <!-- Use Liberation Sans for Helvetica (instead of Nimbus Sans) -->
403 <alias binding="same">
404 <family>Helvetica</family>
405 <prefer>
406 <family>Liberation Sans</family>
407 </prefer>
408</alias>
409</fontconfig>
410#+end_src
411
412** getmail
413
414*** getmailrc
415:PROPERTIES:
416:header-args+: :tangle ~/.getmail/getmailrc
417:END:
418
419#+begin_src conf
420[retriever]
421type = SimplePOP3SSLRetriever
422server = fencepost.gnu.org
423username = bandali
424password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg")
425port = 995
426use_apop = True
427
428[destination]
429type = Maildir
430path = ~/mail/gnu/Inbox/
431
432[options]
433delete = True
434#+end_src
435
436*** getmail.service
437:PROPERTIES:
438:header-args+: :tangle ~/.config/systemd/user/getmail.service
439:END:
440
441#+begin_src conf :tangle no
442[Unit]
443Description=getmail service
444
445[Service]
446Type=oneshot
447ExecStart=/usr/bin/getmail
448StandardOutput=syslog
449StandardError=syslog
450#+end_src
451
452*** getmail.timer
453:PROPERTIES:
454:header-args+: :tangle ~/.config/systemd/user/getmail.timer
455:END:
456
457#+begin_src conf :tangle no
458[Unit]
459Description=getmail timer
460
461[Timer]
462OnCalendar=*:0/30
463Persistent=true
464Unit=getmail.service
465
466[Install]
467WantedBy=timers.target
468#+end_src
469
470** Git
471
472*** gitconfig
473:PROPERTIES:
474:header-args+: :tangle ~/.gitconfig
475:END:
476
477**** user
478#+begin_src conf
479[user]
480 name = Amin Bandali
481 email = bandali@gnu.org
482 signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
483#+end_src
484
485**** signing
486#+begin_src conf
487[commit]
488 gpgsign = true
489# [format]
490# signoff = true
491#+end_src
492
493**** core
494#+begin_src conf
495[core]
496 autocrlf = input # CRLF -> LF on commit
497 editor = emacsclient -t
498 excludesfile = ~/.gitignore_global
499 pager = "less"
500#+end_src
501
502**** gpg
503#+begin_src conf
504[gpg]
505 program = gpg2
506#+end_src
507
508**** alias
509#+begin_src conf
510[alias]
511 git = !exec git # handle nested git calls, e.g. git git status
512 aliases = config --get-regexp '^alias\\.'
513 a = add
514 s = status
515 sl = status --long
516 c = checkout
517 cb = checkout -b
518 b = branch
519 r = rebase
520 p = pull
521 pr = pull --rebase
522 ps = push
523 psf = push --force
524 nmam = "!f() { notmuch show --format=raw $1 | git am -; }; f"
525 nmam3 = "!f() { notmuch show --format=raw $1 | git am -3 -; }; f"
526#+end_src
527
528**** color
529#+begin_src conf
530[color]
531 ui = auto
532[color "status"]
533 added = green bold
534 changed = red bold
535 untracked = red bold
536[color "branch"]
537 current = green bold
538 remote = magenta bold
539[color "diff"]
540 new = green bold
541 old = red bold
542#+end_src
543
544**** status
545#+begin_src conf
546[status]
547 # showUntrackedFiles = all
548 short=true
549 branch=true
550#+end_src
551
552**** github
553#+begin_src conf
554[github]
555 user = aminb
556#+end_src
557
558**** send-email
559#+begin_src conf
560[sendemail]
561 smtpuser = bandali
562 smtpserver = fencepost.gnu.org
563 smtpserverport = 587
564 smtpencryption = tls
565 annotate = yes
566#+end_src
567
568*** gitignore
569:PROPERTIES:
570:header-args+: :tangle ~/.gitignore_global
571:END:
572
573#+begin_src conf
574*.orig
575*.py[co]
576*.sublime-workspace
577*~
578.DS_Store
579*.elc
580*-autoloads.el
581#+end_src
582
583** GnuPG
584:PROPERTIES:
585:header-args+: :tangle ~/.gnupg/gpg-agent.conf
586:END:
587
588#+begin_src conf
589default-cache-ttl 43200
590max-cache-ttl 43200
591
592default-cache-ttl-ssh 10800
593max-cache-ttl-ssh 10800
594
595# pinentry-program /usr/bin/pinentry-qt
596#+end_src
597
598** GTK
599
600*** gtk-2.0
601:PROPERTIES:
602:header-args+: :tangle ~/.gtkrc-2.0
603:END:
604
605#+begin_src conf
606gtk-theme-name="Greybird"
607gtk-icon-theme-name="Paper"
608gtk-font-name="Ubuntu 10"
609gtk-menu-images=0
610# gtk-key-theme-name = "Emacs"
611#+end_src
612
613*** gtk-3.0
614:PROPERTIES:
615:header-args+: :tangle ~/.config/gtk-3.0/settings.ini
616:END:
617
618#+begin_src conf :tangle no
619[Settings]
620gtk-icon-theme-name = Paper
621# gtk-theme-name = Adwaita
622
623gtk-theme-name = Greybird
624# gtk-theme-name = Arc-Darker
625# gtk-theme-name = Numix-ArchBlue
626
627gtk-font-name = Ubuntu 10
628# gtk-key-theme-name = Emacs
629#+end_src
630
631** [[https://github.com/Leinnan/i3gs][i3gs]]
632:PROPERTIES:
633:header-args+: :tangle ~/.config/i3gs/config
634:END:
635
636#+begin_src conf :comments none :tangle no
637borders_width=0 0 2 0
638separator_width=10
639
640#[mpd]
641#preset=MPD
642#title=<span weight='heavy' fgcolor='#7FDBFF'> </span>
643#borders_color=#7FDBFF
644
645[ram]
646preset=RAM
647title=<span weight='heavy' fgcolor='#3D9970'> </span>
648borders_color=#3D9970
649
650#[cpu]
651#preset=CPU
652#title=<span weight='heavy' fgcolor='#2ECC40'> </span>
653#borders_color=#2ECC40
654
655#[hdd]
656#preset=HDD
657#title=<span weight='heavy' fgcolor='#01FF70'> </span>
658#borders_color=#01FF70
659
660[volume]
661command=volume-info
662title=<span weight='heavy' fgcolor='#7FDBFF'></span>
663borders_color=#7FDBFF
664
665[battery]
666preset=BAT
667command=battery-percentage-time
668title=<span weight='heavy' fgcolor='#39CCCC'> </span>
669borders_color=#39CCCC
670
671[wifi]
672preset=WIFI
673title=<span weight='heavy' fgcolor='#01FF70'> </span>
674borders_color=#01FF70
675
676[date]
677preset=DATE
678command=date '+%-I:%M, %a %b %d '
679title=<span weight='heavy' fgcolor='#FFDC00'> </span>
680borders_color=#FFDC00
681separator_width=0
682#+end_src
683
684** i3status
685:PROPERTIES:
686:header-args+: :tangle ~/.config/i3status/config
687:END:
688
689#+begin_src conf :comments none
690# i3status configuration file.
691# see "man i3status" for documentation.
692
693# It is important that this file is edited as UTF-8.
694# The following line should contain a sharp s:
695# ß
696# If the above line is not correctly displayed, fix your editor first!
697
698general {
699 colors = true
700 interval = 5
701 output_format = "i3bar"
702}
703
704# order += "ipv6"
705order += "disk /"
706order += "disk /data"
707order += "wireless _first_"
708order += "ethernet _first_"
709order += "battery 0"
710order += "volume master"
711order += "load"
712order += "tztime local"
713
714wireless _first_ {
715 format_up = "W:%quality %essid %ip"
716 format_down = "W: down"
717}
718
719ethernet _first_ {
720 # if you use %speed, i3status requires root privileges
721 format_up = "E: %ip (%speed)"
722 format_down = "E: down"
723}
724
725battery 0 {
726 format = "%status %percentage %remaining (%consumption)"
727 path = "/sys/class/power_supply/BAT%d/uevent"
728 low_threshold = "10"
729 threshold_type = "percentage"
730 last_full_capacity = true
731 integer_battery_capacity = true
732 hide_seconds = true
733}
734
735tztime local {
736 format = "%-I:%M%P %a %b %d"
737}
738
739volume master {
740 format = "♪ %volume"
741 format_muted = "🔇 %volume"
742 device = "pulse"
743}
744
745load {
746 format = "%1min"
747}
748
749disk "/" {
750 format = "/ %avail"
751}
752
753disk "/data" {
754 format = "/data %avail"
755}
756#+end_src
757
758** isync
759
760*** mbsyncrc
761:PROPERTIES:
762:header-args+: :tangle ~/.mbsyncrc
763:END:
764
765#+begin_src conf
766# Global defaults
767CopyArrivalDate yes
768Create Both
769Expunge Both
770
771######
772IMAPAccount amin
773Host mail.aminb.org
774User amin@aminb.org
775PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin.gpg"
776SSLType IMAPS
777
778IMAPStore amin-remote
779Account amin
780
781IMAPAccount amin-dovecot
782Host 127.0.0.1
783Port 143
784User amin@aminb.org
785PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/amin-dovecot.gpg"
786SSLType None
787
788IMAPStore amin-local
789Account amin-dovecot
790
791Channel amin
792Master :amin-remote:
793Slave :amin-local:
794Patterns *
795
796######
797IMAPAccount uwaterloo
798Host connect.uwaterloo.ca
799User abandali
800PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo.gpg"
801SSLType IMAPS
802
803IMAPStore uwaterloo-remote
804Account uwaterloo
805
806IMAPAccount uwaterloo-dovecot
807Host 127.0.0.1
808Port 143
809User abandali@uwaterloo.ca
810PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.passwd/uwaterloo-dovecot.gpg"
811SSLType None
812
813IMAPStore uwaterloo-local
814Account uwaterloo-dovecot
815
816Channel uwaterloo
817Master :uwaterloo-remote:
818Slave :uwaterloo-local:
819Patterns *
820#+end_src
821
822*** mbsync.service
823:PROPERTIES:
824:header-args+: :tangle ~/.config/systemd/user/mbsync.service
825:END:
826
827#+begin_src conf :tangle no
828[Unit]
829Description=mbsync service
830
831[Service]
832Type=oneshot
833ExecStart=/usr/bin/mbsync -Va
834StandardOutput=syslog
835StandardError=syslog
836#+end_src
837
838*** mbsync.timer
839:PROPERTIES:
840:header-args+: :tangle ~/.config/systemd/user/mbsync.timer
841:END:
842
843#+begin_src conf :tangle no
844[Unit]
845Description=mbsync timer
846
847[Timer]
848OnCalendar=*:0/15
849Persistent=true
850Unit=mbsync.service
851
852[Install]
853WantedBy=timers.target
854#+end_src
855
856** Latexmk
857:PROPERTIES:
858:header-args+: :tangle ~/.latexmkrc
859:END:
860
861#+begin_src conf
862$pdf_previewer = "start zathura %O %S";
863$clean_ext = "aux out";
864
865# $pdf_update_method = 4;
866# $pdf_update_command = "zathura %O %S";
867
868# Synctex allows one to jump to from the PDF in Zathura to the source in Emacs
869# by Ctrl+click in the PDF.
870# Tell latexmk to use Zathura as a previewer, and run emacsclient as the Synctex
871# editor.
872# $pdf_previewer = 'exec zathura --synctex-forward -x \'emacsclient --no-wait +%{line} %{input}\' %O %S';
873#+end_src
874
875** libinput
876
877Improve XPS 15 9560's touchpad experience.
878
879# begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "plasma")) "/sudo::/etc/X11/xorg.conf.d/30-touchpad.conf")
880#+begin_src conf :tangle no
881Section "InputClass"
882 Identifier "libinput touchpad catchall"
883 Driver "libinput"
884 MatchIsTouchpad "on"
885 Option "ClickMethod" "clickfinger"
886 Option "NaturalScrolling" "true"
887 Option "Tapping" "on"
888 Option "TappingButtonMap" "lrm"
889EndSection
890#+end_src
891
892** mpd
893:PROPERTIES:
894:header-args+: :tangle ~/.config/mpd/mpd.conf
895:END:
896
897#+begin_src conf
898# An example configuration file for MPD.
899# Read the user manual for documentation: http://www.musicpd.org/doc/user/
900
901
902# Files and directories #######################################################
903#
904# This setting controls the top directory which MPD will search to discover the
905# available audio files and add them to the daemon's online database. This
906# setting defaults to the XDG directory, otherwise the music directory will be
907# be disabled and audio files will only be accepted over ipc socket (using
908# file:// protocol) or streaming files over an accepted protocol.
909#
910music_directory "~/usr/music"
911#
912# This setting sets the MPD internal playlist directory. The purpose of this
913# directory is storage for playlists created by MPD. The server will use
914# playlist files not created by the server but only if they are in the MPD
915# format. This setting defaults to playlist saving being disabled.
916#
917playlist_directory "~/.mpd/playlists"
918#
919# This setting sets the location of the MPD database. This file is used to
920# load the database at server start up and store the database while the
921# server is not up. This setting defaults to disabled which will allow
922# MPD to accept files over ipc socket (using file:// protocol) or streaming
923# files over an accepted protocol.
924#
925db_file "~/.mpd/database"
926#
927# These settings are the locations for the daemon log files for the daemon.
928# These logs are great for troubleshooting, depending on your log_level
929# settings.
930#
931# The special value "syslog" makes MPD use the local syslog daemon. This
932# setting defaults to logging to syslog, otherwise logging is disabled.
933#
934log_file "~/.mpd/log"
935#
936# This setting sets the location of the file which stores the process ID
937# for use of mpd --kill and some init scripts. This setting is disabled by
938# default and the pid file will not be stored.
939#
940pid_file "~/.mpd/pid"
941#
942# This setting sets the location of the file which contains information about
943# most variables to get MPD back into the same general shape it was in before
944# it was brought down. This setting is disabled by default and the server
945# state will be reset on server start up.
946#
947state_file "~/.mpd/state"
948#
949# The location of the sticker database. This is a database which
950# manages dynamic information attached to songs.
951#
952sticker_file "~/.mpd/sticker.sql"
953#
954###############################################################################
955
956
957# General music daemon options ################################################
958#
959# This setting specifies the user that MPD will run as. MPD should never run as
960# root and you may use this setting to make MPD change its user ID after
961# initialization. This setting is disabled by default and MPD is run as the
962# current user.
963#
964#user "nobody"
965#
966# This setting specifies the group that MPD will run as. If not specified
967# primary group of user specified with "user" setting will be used (if set).
968# This is useful if MPD needs to be a member of group such as "audio" to
969# have permission to use sound card.
970#
971#group "nogroup"
972#
973# This setting sets the address for the daemon to listen on. Careful attention
974# should be paid if this is assigned to anything other then the default, any.
975# This setting can deny access to control of the daemon. Not effective if
976# systemd socket activiation is in use.
977#
978# For network
979#bind_to_address "any"
980#
981# And for Unix Socket
982#bind_to_address "~/.mpd/socket"
983#
984# This setting is the TCP port that is desired for the daemon to get assigned
985# to.
986#
987#port "6600"
988#
989# This setting controls the type of information which is logged. Available
990# setting arguments are "default", "secure" or "verbose". The "verbose" setting
991# argument is recommended for troubleshooting, though can quickly stretch
992# available resources on limited hardware storage.
993#
994#log_level "default"
995#
996# If you have a problem with your MP3s ending abruptly it is recommended that
997# you set this argument to "no" to attempt to fix the problem. If this solves
998# the problem, it is highly recommended to fix the MP3 files with vbrfix
999# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
1000# point gapless MP3 playback can be enabled.
1001#
1002#gapless_mp3_playback "yes"
1003#
1004# Setting "restore_paused" to "yes" puts MPD into pause mode instead
1005# of starting playback after startup.
1006#
1007#restore_paused "no"
1008#
1009# This setting enables MPD to create playlists in a format usable by other
1010# music players.
1011#
1012#save_absolute_paths_in_playlists "no"
1013#
1014# This setting defines a list of tag types that will be extracted during the
1015# audio file discovery process. The complete list of possible values can be
1016# found in the user manual.
1017#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
1018#
1019# This setting enables automatic update of MPD's database when files in
1020# music_directory are changed.
1021#
1022#auto_update "yes"
1023#
1024# Limit the depth of the directories being watched, 0 means only watch
1025# the music directory itself. There is no limit by default.
1026#
1027#auto_update_depth "3"
1028#
1029###############################################################################
1030
1031
1032# Symbolic link behavior ######################################################
1033#
1034# If this setting is set to "yes", MPD will discover audio files by following
1035# symbolic links outside of the configured music_directory.
1036#
1037#follow_outside_symlinks "yes"
1038#
1039# If this setting is set to "yes", MPD will discover audio files by following
1040# symbolic links inside of the configured music_directory.
1041#
1042#follow_inside_symlinks "yes"
1043#
1044###############################################################################
1045
1046
1047# Zeroconf / Avahi Service Discovery ##########################################
1048#
1049# If this setting is set to "yes", service information will be published with
1050# Zeroconf / Avahi.
1051#
1052#zeroconf_enabled "yes"
1053#
1054# The argument to this setting will be the Zeroconf / Avahi unique name for
1055# this MPD server on the network.
1056#
1057#zeroconf_name "Music Player"
1058#
1059###############################################################################
1060
1061
1062# Permissions #################################################################
1063#
1064# If this setting is set, MPD will require password authorization. The password
1065# setting can be specified multiple times for different password profiles.
1066#
1067#password "password@read,add,control,admin"
1068#
1069# This setting specifies the permissions a user has who has not yet logged in.
1070#
1071#default_permissions "read,add,control,admin"
1072#
1073###############################################################################
1074
1075
1076# Database #######################################################################
1077#
1078
1079#database {
1080# plugin "proxy"
1081# host "other.mpd.host"
1082# port "6600"
1083#}
1084
1085# Input #######################################################################
1086#
1087
1088input {
1089 plugin "curl"
1090# proxy "proxy.isp.com:8080"
1091# proxy_user "user"
1092# proxy_password "password"
1093}
1094
1095#
1096###############################################################################
1097
1098# Audio Output ################################################################
1099#
1100
1101audio_output {
1102 type "pulse"
1103 name "pulse audio"
1104}
1105
1106audio_output {
1107 type "fifo"
1108 name "my_fifo"
1109 path "/tmp/mpd.fifo"
1110 format "44100:16:2"
1111}
1112
1113# MPD supports various audio output types, as well as playing through multiple
1114# audio outputs at the same time, through multiple audio_output settings
1115# blocks. Setting this block is optional, though the server will only attempt
1116# autodetection for one sound card.
1117#
1118# An example of an ALSA output:
1119#
1120#audio_output {
1121# type "alsa"
1122# name "My ALSA Device"
1123## device "hw:0,0" # optional
1124## mixer_type "hardware" # optional
1125## mixer_device "default" # optional
1126## mixer_control "PCM" # optional
1127## mixer_index "0" # optional
1128#}
1129#
1130# An example of an OSS output:
1131#
1132#audio_output {
1133# type "oss"
1134# name "My OSS Device"
1135## device "/dev/dsp" # optional
1136## mixer_type "hardware" # optional
1137## mixer_device "/dev/mixer" # optional
1138## mixer_control "PCM" # optional
1139#}
1140#
1141# An example of a shout output (for streaming to Icecast):
1142#
1143#audio_output {
1144# type "shout"
1145# encoder "vorbis" # optional
1146# name "My Shout Stream"
1147# host "localhost"
1148# port "8000"
1149# mount "/mpd.ogg"
1150# password "hackme"
1151# quality "5.0"
1152# bitrate "128"
1153# format "44100:16:1"
1154## protocol "icecast2" # optional
1155## user "source" # optional
1156## description "My Stream Description" # optional
1157## url "http://example.com" # optional
1158## genre "jazz" # optional
1159## public "no" # optional
1160## timeout "2" # optional
1161## mixer_type "software" # optional
1162#}
1163#
1164# An example of a recorder output:
1165#
1166#audio_output {
1167# type "recorder"
1168# name "My recorder"
1169# encoder "vorbis" # optional, vorbis or lame
1170# path "/var/lib/mpd/recorder/mpd.ogg"
1171## quality "5.0" # do not define if bitrate is defined
1172# bitrate "128" # do not define if quality is defined
1173# format "44100:16:1"
1174#}
1175#
1176# An example of a httpd output (built-in HTTP streaming server):
1177#
1178#audio_output {
1179# type "httpd"
1180# name "My HTTP Stream"
1181# encoder "vorbis" # optional, vorbis or lame
1182# port "8000"
1183# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
1184## quality "5.0" # do not define if bitrate is defined
1185# bitrate "128" # do not define if quality is defined
1186# format "44100:16:1"
1187# max_clients "0" # optional 0=no limit
1188#}
1189#
1190# An example of a pulseaudio output (streaming to a remote pulseaudio server)
1191#
1192#audio_output {
1193# type "pulse"
1194# name "My Pulse Output"
1195## server "remote_server" # optional
1196## sink "remote_server_sink" # optional
1197#}
1198#
1199# An example of a winmm output (Windows multimedia API).
1200#
1201#audio_output {
1202# type "winmm"
1203# name "My WinMM output"
1204## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1205# or
1206## device "0" # optional
1207## mixer_type "hardware" # optional
1208#}
1209#
1210# An example of an openal output.
1211#
1212#audio_output {
1213# type "openal"
1214# name "My OpenAL output"
1215## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
1216#}
1217#
1218# An example of an sndio output.
1219#
1220#audio_output {
1221# type "sndio"
1222# name "sndio output"
1223# mixer_type "software"
1224#}
1225#
1226# An example of an OS X output:
1227#
1228#audio_output {
1229# type "osx"
1230# name "My OS X Device"
1231## device "Built-in Output" # optional
1232## channel_map "-1,-1,0,1" # optional
1233#}
1234#
1235## Example "pipe" output:
1236#
1237#audio_output {
1238# type "pipe"
1239# name "my pipe"
1240# command "aplay -f cd 2>/dev/null"
1241## Or if you're want to use AudioCompress
1242# command "AudioCompress -m | aplay -f cd 2>/dev/null"
1243## Or to send raw PCM stream through PCM:
1244# command "nc example.org 8765"
1245# format "44100:16:2"
1246#}
1247#
1248## An example of a null output (for no audio output):
1249#
1250#audio_output {
1251# type "null"
1252# name "My Null Output"
1253# mixer_type "none" # optional
1254#}
1255#
1256###############################################################################
1257
1258
1259# Normalization automatic volume adjustments ##################################
1260#
1261# This setting specifies the type of ReplayGain to use. This setting can have
1262# the argument "off", "album", "track" or "auto". "auto" is a special mode that
1263# chooses between "track" and "album" depending on the current state of
1264# random playback. If random playback is enabled then "track" mode is used.
1265# See <http://www.replaygain.org> for more details about ReplayGain.
1266# This setting is off by default.
1267#
1268#replaygain "album"
1269#
1270# This setting sets the pre-amp used for files that have ReplayGain tags. By
1271# default this setting is disabled.
1272#
1273#replaygain_preamp "0"
1274#
1275# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
1276# By default this setting is disabled.
1277#
1278#replaygain_missing_preamp "0"
1279#
1280# This setting enables or disables ReplayGain limiting.
1281# MPD calculates actual amplification based on the ReplayGain tags
1282# and replaygain_preamp / replaygain_missing_preamp setting.
1283# If replaygain_limit is enabled MPD will never amplify audio signal
1284# above its original level. If replaygain_limit is disabled such amplification
1285# might occur. By default this setting is enabled.
1286#
1287#replaygain_limit "yes"
1288#
1289# This setting enables on-the-fly normalization volume adjustment. This will
1290# result in the volume of all playing audio to be adjusted so the output has
1291# equal "loudness". This setting is disabled by default.
1292#
1293#volume_normalization "no"
1294#
1295###############################################################################
1296
1297# Character Encoding ##########################################################
1298#
1299# If file or directory names do not display correctly for your locale then you
1300# may need to modify this setting.
1301#
1302#filesystem_charset "UTF-8"
1303#
1304###############################################################################
1305#+end_src
1306
1307** msmtp
1308:PROPERTIES:
1309:header-args+: :tangle ~/.msmtprc
1310:END:
1311
1312#+begin_src conf
1313# Set default values for all following accounts.
1314defaults
1315port 587
1316tls on
1317auth on
1318#tls_trust_file /etc/ssl/certs/ca-certificates.crt
1319logfile ~/.msmtp.log
1320
1321# aminb
1322account aminb
1323host mail.aminb.org
1324# use `msmtp -a aminb --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1325tls_fingerprint C7:A4:2E:A3:11:FA:80:45:C4:29:D6:62:4D:73:DB:34:43:67:8F:16:F1:2E:54:43:06:1B:41:B6:A9:09:E0:37
1326tls_starttls on
1327from amin@aminb.org
1328user amin@aminb.org
1329passwordeval gpg2 --no-tty -q -d ~/.passwd/amin.gpg
1330
1331account bandali-me : aminb
1332from amin@bandali.me
1333
1334# gnu
1335account gnu
1336host fencepost.gnu.org
1337# use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
1338tls_fingerprint 93:59:52:1D:A6:95:13:31:7C:81:ED:DB:A5:BA:B5:2B:C8:BC:38:3E:71:A5:DF:8C:80:46:C1:E0:5D:2D:F4:E3
1339tls_starttls on
1340from bandali@gnu.org
1341user bandali
1342passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
1343
1344# gnu (old)
1345account gnu-aminb : gnu
1346from aminb@gnu.org
1347account gnu-amin : gnu
1348from amin@gnu.org
1349account gnu-mab : gnu
1350from mab@gnu.org
1351
1352# uwaterloo
1353account uwaterloo
1354host connect.uwaterloo.ca
1355tls_starttls on
1356from abandali@uwaterloo.ca
1357user abandali
1358passwordeval gpg2 --no-tty -q -d ~/.passwd/uwaterloo.gpg
1359tls_trust_file /etc/ssl/certs/ca-certificates.crt
1360
1361# Set a default account
1362account default : aminb
1363#+end_src
1364
1365** ncmpcpp
1366
1367*** config
1368:PROPERTIES:
1369:header-args+: :tangle ~/.ncmpcpp/config
1370:END:
1371
1372#+begin_src conf :tangle no
1373##############################################################
1374## This is the example configuration file. Copy it to ##
1375## $HOME/.ncmpcpp/config or $XDG_CONFIG_HOME/ncmpcpp/config ##
1376## and set up your preferences. ##
1377##############################################################
1378#
1379##### directories ######
1380##
1381## Directory for storing ncmpcpp related files.
1382## Changing it is useful if you want to store
1383## everything somewhere else and provide command
1384## line setting for alternative location to config
1385## file which defines that while launching ncmpcpp.
1386##
1387#
1388ncmpcpp_directory = ~/.ncmpcpp
1389#
1390##
1391## Directory for storing downloaded lyrics. It
1392## defaults to ~/.lyrics since other MPD clients
1393## (eg. ncmpc) also use that location.
1394##
1395#
1396#lyrics_directory = ~/.lyrics
1397#
1398##### connection settings #####
1399#
1400#mpd_host = localhost
1401#
1402#mpd_port = 6600
1403#
1404#mpd_connection_timeout = 5
1405#
1406## Needed for tag editor and file operations to work.
1407##
1408mpd_music_dir = ~/usr/music
1409#
1410#mpd_crossfade_time = 5
1411#
1412##### music visualizer #####
1413##
1414## Note: In order to make music visualizer work you'll
1415## need to use mpd fifo output, whose format parameter
1416## has to be set to 44100:16:1 for mono visualization
1417## or 44100:16:2 for stereo visualization. Example
1418## configuration (it has to be put into mpd.conf):
1419##
1420## audio_output {
1421## type "fifo"
1422## name "Visualizer feed"
1423## path "/tmp/mpd.fifo"
1424## format "44100:16:2"
1425## }
1426##
1427#
1428visualizer_fifo_path = /tmp/mpd.fifo
1429#
1430##
1431## Note: Below parameter is needed for ncmpcpp
1432## to determine which output provides data for
1433## visualizer and thus allow syncing between
1434## visualization and sound as currently there
1435## are some problems with it.
1436##
1437#
1438visualizer_output_name = my fifo
1439#
1440##
1441## If you set format to 44100:16:2, make it 'yes'.
1442##
1443visualizer_in_stereo = yes
1444#
1445##
1446## Multiply received samples by given value. Very
1447## useful for proper visualization of quiet music.
1448##
1449#visualizer_sample_multiplier = 1
1450#
1451##
1452## Note: Below parameter defines how often ncmpcpp
1453## has to "synchronize" visualizer and audio outputs.
1454## 30 seconds is optimal value, but if you experience
1455## synchronization problems, set it to lower value.
1456## Keep in mind that sane values start with >=10.
1457##
1458#
1459visualizer_sync_interval = 30
1460#
1461##
1462## Note: To enable spectrum frequency visualization
1463## you need to compile ncmpcpp with fftw3 support.
1464##
1465#
1466## Available values: spectrum, wave, wave_filled, ellipse.
1467##
1468visualizer_type = spectrum
1469#
1470#visualizer_look = ●▮
1471visualizer_look = "●•"
1472#
1473#visualizer_color = blue, cyan, green, yellow, magenta, red
1474#
1475## Alternative subset of 256 colors for terminals that support it.
1476##
1477#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
1478#
1479##### system encoding #####
1480##
1481## ncmpcpp should detect your charset encoding
1482## but if it failed to do so, you can specify
1483## charset encoding you are using here.
1484##
1485## Note: You can see whether your ncmpcpp build
1486## supports charset detection by checking output
1487## of `ncmpcpp --version`.
1488##
1489## Note: Since MPD uses UTF-8 by default, setting
1490## this option makes sense only if your encoding
1491## is different.
1492##
1493#
1494#system_encoding = ""
1495#
1496##### delays #####
1497#
1498## Time of inactivity (in seconds) after playlist
1499## highlighting will be disabled (0 = always on).
1500##
1501#playlist_disable_highlight_delay = 5
1502#
1503## Defines how long messages are supposed to be visible.
1504##
1505#message_delay_time = 5
1506#
1507##### song format #####
1508##
1509## For a song format you can use:
1510##
1511## %l - length
1512## %f - filename
1513## %D - directory
1514## %a - artist
1515## %A - album artist
1516## %t - title
1517## %b - album
1518## %y - date
1519## %n - track number (01/12 -> 01)
1520## %N - full track info (01/12 -> 01/12)
1521## %g - genre
1522## %c - composer
1523## %p - performer
1524## %d - disc
1525## %C - comment
1526## %P - priority
1527## $R - begin right alignment
1528##
1529## If you want to make sure that a part of the format is displayed
1530## only when certain tags are present, you can archieve it by
1531## grouping them with brackets, e.g. '{%a - %t}' will be evaluated
1532## to 'ARTIST - TITLE' if both tags are present or '' otherwise.
1533## It is also possible to define a list of alternatives by providing
1534## several groups and separating them with '|', e.g. '{%t}|{%f}'
1535## will be evaluated to 'TITLE' or 'FILENAME' if the former is not
1536## present.
1537##
1538## Note: If you want to set limit on maximal length of a tag, just
1539## put the appropriate number between % and character that defines
1540## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'.
1541##
1542## In addition, formats support markers used for text attributes.
1543## They are followed by character '$'. After that you can put:
1544##
1545## - 0 - default window color (discards all other colors)
1546## - 1 - black
1547## - 2 - red
1548## - 3 - green
1549## - 4 - yellow
1550## - 5 - blue
1551## - 6 - magenta
1552## - 7 - cyan
1553## - 8 - white
1554## - 9 - end of current color
1555## - b - bold text
1556## - u - underline text
1557## - r - reverse colors
1558## - a - use alternative character set
1559##
1560## If you don't want to use a non-color attribute anymore, just put it
1561## again, but this time insert character '/' between '$' and attribute
1562## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag
1563## or filename with reversed colors.
1564##
1565## If you want to use 256 colors and/or background colors in formats
1566## (the naming scheme is described below in section about color
1567## definitions), it can be done with the syntax $(COLOR), e.g. to set
1568## the artist tag to one of the non-standard colors and make it have
1569## yellow background, you need to write $(197_yellow)%a$(end). Note
1570## that for standard colors this is interchangable with attributes
1571## listed above.
1572##
1573## Note: colors can be nested.
1574##
1575#
1576#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
1577#
1578#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
1579#
1580#song_library_format = {%n - }{%t}|{%f}
1581#
1582#
1583#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
1584#
1585#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
1586#
1587#now_playing_prefix = $b
1588#
1589#now_playing_suffix = $/b
1590#
1591#browser_playlist_prefix = "$2playlist$9 "
1592#
1593#selected_item_prefix = $6
1594#
1595#selected_item_suffix = $9
1596#
1597#modified_item_prefix = $3> $9
1598#
1599##
1600## Note: attributes are not supported for the following variables.
1601##
1602#song_window_title_format = {%a - }{%t}|{%f}
1603##
1604## Note: Below variables are used for sorting songs in browser.
1605## The sort mode determines how songs are sorted, and can be used
1606## in combination with a sort format to specify a custom sorting format.
1607## Available values for browser_sort_mode are "name", "mtime", "format"
1608## and "noop".
1609##
1610#
1611#browser_sort_mode = name
1612#
1613#browser_sort_format = {%a - }{%t}|{%f} {(%l)}
1614#
1615##### columns settings #####
1616##
1617## syntax of song columns list format is "column column etc."
1618##
1619## - syntax for each column is:
1620##
1621## (width of the column)[color of the column]{displayed tag}
1622##
1623## Note: Width is by default in %, if you want a column to
1624## have fixed size, add 'f' after the value, e.g. (10)[white]{a}
1625## will be the column that take 10% of screen (so the real width
1626## will depend on actual screen size), whereas (10f)[white]{a}
1627## will take 10 terminal cells, no matter how wide the screen is.
1628##
1629## - color is optional (if you want the default one,
1630## leave the field empty).
1631##
1632## Note: You can give a column additional attributes by putting appropriate
1633## character after displayed tag character. Available attributes are:
1634##
1635## - r - column will be right aligned
1636## - E - if tag is empty, empty tag marker won't be displayed
1637##
1638## You can also:
1639##
1640## - give a column custom name by putting it after attributes,
1641## separated with character ':', e.g. {lr:Length} gives you
1642## right aligned column of lengths named "Length".
1643##
1644## - define sequence of tags, that have to be displayed in case
1645## predecessor is empty in a way similar to the one in classic
1646## song format, i.e. using '|' character, e.g. {a|c|p:Owner}
1647## creates column named "Owner" that tries to display artist
1648## tag and then composer and performer if previous ones are
1649## not available.
1650##
1651#
1652#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l}
1653#
1654##### various settings #####
1655#
1656##
1657## Note: Custom command that will be executed each
1658## time song changes. Useful for notifications etc.
1659##
1660#execute_on_song_change = ""
1661#
1662#playlist_show_mpd_host = no
1663#
1664#playlist_show_remaining_time = no
1665#
1666#playlist_shorten_total_times = no
1667#
1668#playlist_separate_albums = no
1669#
1670##
1671## Note: Possible display modes: classic, columns.
1672##
1673#playlist_display_mode = columns
1674#
1675#browser_display_mode = classic
1676#
1677#search_engine_display_mode = classic
1678#
1679#playlist_editor_display_mode = classic
1680#
1681#discard_colors_if_item_is_selected = yes
1682#
1683#incremental_seeking = yes
1684#
1685#seek_time = 1
1686#
1687#volume_change_step = 2
1688#
1689#autocenter_mode = no
1690#
1691#centered_cursor = no
1692#
1693##
1694## Note: You can specify third character which will
1695## be used to build 'empty' part of progressbar.
1696##
1697#progressbar_look = =>
1698progressbar_look = "─╼╶"
1699#progressbar_look = "─⊙╶"
1700#
1701#progressbar_boldness = yes
1702#
1703## Available values: database, playlist.
1704##
1705#default_place_to_search_in = database
1706#
1707## Available values: classic, alternative.
1708##
1709#user_interface = classic
1710#
1711#data_fetching_delay = yes
1712#
1713## Available values: artist, album_artist, date, genre, composer, performer.
1714##
1715#media_library_primary_tag = artist
1716#
1717## Available values: wrapped, normal.
1718##
1719#default_find_mode = wrapped
1720#
1721#default_tag_editor_pattern = %n - %t
1722#
1723#header_visibility = yes
1724#
1725#statusbar_visibility = yes
1726#
1727#titles_visibility = yes
1728#
1729#header_text_scrolling = yes
1730#
1731#cyclic_scrolling = no
1732#
1733#lines_scrolled = 2
1734#
1735#follow_now_playing_lyrics = no
1736#
1737#fetch_lyrics_for_current_song_in_background = no
1738#
1739#store_lyrics_in_song_dir = no
1740#
1741#generate_win32_compatible_filenames = yes
1742#
1743#allow_for_physical_item_deletion = no
1744#
1745##
1746## Note: If you set this variable, ncmpcpp will try to
1747## get info from last.fm in language you set and if it
1748## fails, it will fall back to english. Otherwise it will
1749## use english the first time.
1750##
1751## Note: Language has to be expressed as an ISO 639 alpha-2 code.
1752##
1753#lastfm_preferred_language = en
1754#
1755#show_hidden_files_in_local_browser = no
1756#
1757##
1758## How shall screen switcher work?
1759##
1760## - "previous" - switch between the current and previous screen.
1761## - "screen1,...,screenN" - switch between given sequence of screens.
1762##
1763## Screens available for use: help, playlist, browser, search_engine,
1764## media_library, playlist_editor, tag_editor, outputs, visualizer, clock.
1765##
1766#screen_switcher_mode = playlist, browser
1767#
1768##
1769## Note: You can define startup screen
1770## by choosing screen from the list above.
1771##
1772#startup_screen = playlist
1773#
1774##
1775## Note: You can define startup slave screen
1776## by choosing screen from the list above or
1777## an empty value for no slave screen.
1778##
1779#startup_slave_screen = ""
1780#
1781#startup_slave_screen_focus = no
1782#
1783##
1784## Default width of locked screen (in %).
1785## Acceptable values are from 20 to 80.
1786##
1787#
1788#locked_screen_width_part = 50
1789#
1790#ask_for_locked_screen_width_part = yes
1791#
1792#jump_to_now_playing_song_at_start = yes
1793#
1794#ask_before_clearing_playlists = yes
1795#
1796#clock_display_seconds = no
1797#
1798#display_volume_level = yes
1799#
1800#display_bitrate = no
1801#
1802#display_remaining_time = no
1803#
1804## Available values: none, basic, extended, perl.
1805##
1806#regular_expressions = perl
1807#
1808##
1809## Note: If below is enabled, ncmpcpp will ignore leading
1810## "The" word while sorting items in browser, tags in
1811## media library, etc.
1812##
1813#ignore_leading_the = no
1814#
1815#block_search_constraints_change_if_items_found = yes
1816#
1817#mouse_support = yes
1818#
1819#mouse_list_scroll_whole_page = yes
1820#
1821#empty_tag_marker = <empty>
1822#
1823#tags_separator = " | "
1824#
1825#tag_editor_extended_numeration = no
1826#
1827#media_library_sort_by_mtime = no
1828#
1829#enable_window_title = yes
1830#
1831##
1832## Note: You can choose default search mode for search
1833## engine. Available modes are:
1834##
1835## - 1 - use mpd built-in searching (no regexes, pattern matching)
1836## - 2 - use ncmpcpp searching (pattern matching with support for regexes,
1837## but if your mpd is on a remote machine, downloading big database
1838## to process it can take a while
1839## - 3 - match only exact values (this mode uses mpd function for searching
1840## in database and local one for searching in current playlist)
1841##
1842#
1843#search_engine_default_search_mode = 1
1844#
1845#external_editor = nano
1846#
1847## Note: set to yes if external editor is a console application.
1848##
1849#use_console_editor = yes
1850#
1851##### colors definitions #####
1852##
1853## It is possible to set a background color by setting a color
1854## value "<foreground>_<background>", e.g. red_black will set
1855## foregound color to red and background color to black.
1856##
1857## In addition, for terminals that support 256 colors it
1858## is possible to set one of them by using a number in range
1859## [1, 256] instead of color name, e.g. numerical value
1860## corresponding to red_black is 2_1. To find out if the
1861## terminal supports 256 colors, run ncmpcpp and check out
1862## the bottom of the help screen for list of available colors
1863## and their numerical values.
1864##
1865## Note: due to technical limitations of ncurses, if 256 colors
1866## are used, it is possible to either use only the colors with
1867## default background color, or all pairs from 1_1 up to 254_127,
1868## depending on the ncurses version used.
1869##
1870#
1871#colors_enabled = yes
1872#
1873#empty_tag_color = cyan
1874#
1875#header_window_color = default
1876#
1877#volume_color = default
1878#
1879#state_line_color = default
1880#
1881#state_flags_color = default
1882#
1883#main_window_color = yellow
1884#
1885#color1 = white
1886#
1887#color2 = green
1888#
1889#main_window_highlight_color = yellow
1890#
1891#progressbar_color = black
1892#
1893#progressbar_elapsed_color = green
1894#
1895#statusbar_color = default
1896#
1897#alternative_ui_separator_color = black
1898#
1899#active_column_color = red
1900#
1901#window_border_color = green
1902#
1903#active_window_border = red
1904#
1905#+end_src
1906
1907*** bindings
1908:PROPERTIES:
1909:header-args+: :tangle ~/.ncmpcpp/bindings
1910:END:
1911
1912#+begin_src conf :tangle no
1913def_key "j"
1914 scroll_down
1915def_key "k"
1916 scroll_up
1917
1918def_key "ctrl-u"
1919 page_up
1920def_key "ctrl-d"
1921 page_down
1922
1923def_key "h"
1924 previous_column
1925def_key "l"
1926 next_column
1927
1928def_key "."
1929 show_lyrics
1930
1931def_key "n"
1932 next_found_item
1933def_key "N"
1934 previous_found_item
1935
1936def_key "J"
1937 move_sort_order_down
1938def_key "K"
1939 move_sort_order_up
1940#+end_src
1941
1942** notmuch
1943
1944*** notmuch-config
1945:PROPERTIES:
1946:header-args+: :tangle ~/.notmuch-config
1947:END:
1948
1949#+begin_src conf
1950# .notmuch-config - Configuration file for the notmuch mail system
1951#
1952# For more information about notmuch, see https://notmuchmail.org
1953
1954# Database configuration
1955#
1956# The only value supported here is 'path' which should be the top-level
1957# directory where your mail currently exists and to where mail will be
1958# delivered in the future. Files should be individual email messages.
1959# Notmuch will store its database within a sub-directory of the path
1960# configured here named ".notmuch".
1961#
1962[database]
1963path=/home/amin/oldmail
1964
1965# User configuration
1966#
1967# Here is where you can let notmuch know how you would like to be
1968# addressed. Valid settings are
1969#
1970# name Your full name.
1971# primary_email Your primary email address.
1972# other_email A list (separated by ';') of other email addresses
1973# at which you receive email.
1974#
1975# Notmuch will use the various email addresses configured here when
1976# formatting replies. It will avoid including your own addresses in the
1977# recipient list of replies, and will set the From address based on the
1978# address to which the original email was addressed.
1979#
1980[user]
1981name=Amin Bandali
1982primary_email=amin@aminb.org
1983other_email=bandali@gnu.org;abandali@uwaterloo.ca;
1984
1985# Configuration for "notmuch new"
1986#
1987# The following options are supported here:
1988#
1989# tags A list (separated by ';') of the tags that will be
1990# added to all messages incorporated by "notmuch new".
1991#
1992# ignore A list (separated by ';') of file and directory names
1993# that will not be searched for messages by "notmuch new".
1994#
1995# NOTE: *Every* file/directory that goes by one of those
1996# names will be ignored, independent of its depth/location
1997# in the mail store.
1998#
1999[new]
2000tags=new;
2001#tags=unread;inbox;
2002ignore=.uidvalidity;.mbsyncstate;/.*/dovecot*/
2003
2004# Search configuration
2005#
2006# The following option is supported here:
2007#
2008# exclude_tags
2009# A ;-separated list of tags that will be excluded from
2010# search results by default. Using an excluded tag in a
2011# query will override that exclusion.
2012#
2013[search]
2014exclude_tags=deleted;spam;
2015
2016# Maildir compatibility configuration
2017#
2018# The following option is supported here:
2019#
2020# synchronize_flags Valid values are true and false.
2021#
2022# If true, then the following maildir flags (in message filenames)
2023# will be synchronized with the corresponding notmuch tags:
2024#
2025# Flag Tag
2026# ---- -------
2027# D draft
2028# F flagged
2029# P passed
2030# R replied
2031# S unread (added when 'S' flag is not present)
2032#
2033# The "notmuch new" command will notice flag changes in filenames
2034# and update tags, while the "notmuch tag" and "notmuch restore"
2035# commands will notice tag changes and update flags in filenames
2036#
2037[maildir]
2038synchronize_flags=true
2039
2040# Cryptography related configuration
2041#
2042# The following option is supported here:
2043#
2044# gpg_path
2045# binary name or full path to invoke gpg.
2046#
2047[crypto]
2048gpg_path=gpg
2049#+end_src
2050
2051*** pre-new hook
2052:PROPERTIES:
2053:header-args+: :tangle ~/mail/.notmuch/hooks/pre-new :shebang "#!/bin/sh"
2054:END:
2055
2056#+begin_src sh
2057touch /tmp/gnusieve.log
2058sieve-filter -eW -o postmaster_address=postmaster@aminb.org \
2059 -o mail_location=maildir:$MAILDIR/gnu:LAYOUT=fs:INBOX=$MAILDIR/gnu/Inbox ~/sieve/gnu.sieve INBOX delete &>>/tmp/gnusieve.log
2060#+end_src
2061
2062*** post-new hook
2063:PROPERTIES:
2064:header-args+: :tangle ~/mail/.notmuch/hooks/post-new :shebang "#!/bin/sh"
2065:END:
2066
2067#+begin_src sh
2068# apply sent tag to messages sent by me
2069notmuch tag -new +sent -- from:amin@aminb.org or from:bandali@gnu.org or from:aminb@gnu.org or from:amin@gnu.org or from:mab@gnu.org or from:abandali@uwaterloo.ca
2070
2071# initial tagging
2072notmuch tag -latest -- tag:latest
2073notmuch tag +inbox +unread +latest -new -- tag:new
2074
2075
2076# apply tags to lists
2077
2078# <aminb>
2079notmuch tag -inbox +lists/hackernewsletter -- folder:amin/lists/hackernewsletter
2080notmuch tag -inbox +lists/haskell-weekly -- folder:amin/lists/haskell-weekly
2081
2082notmuch tag -inbox +pay -- folder:amin/pay
2083notmuch tag -inbox +banking -- folder:amin/banking
2084notmuch tag -inbox +work -- folder:amin/work
2085# </aminb>
2086
2087# <uw>
2088notmuch tag -inbox +uw/cs136 -- folder:uwaterloo/lists/cs136
2089notmuch tag -inbox +uw/cs846 -- folder:uwaterloo/lists/cs846
2090notmuch tag -inbox +uw/ece750 -- folder:uwaterloo/lists/ece750
2091notmuch tag -inbox +uw/se212 -- folder:uwaterloo/lists/se212
2092notmuch tag -inbox +uw/se463 -- folder:uwaterloo/lists/se463
2093
2094notmuch tag -inbox +lists/alloytools -- folder:uwaterloo/lists/alloytools
2095notmuch tag -inbox +lists/clvsingle -- folder:uwaterloo/lists/Clvsingle
2096notmuch tag -inbox +lists/gsa -- folder:uwaterloo/lists/GSA
2097notmuch tag -inbox +lists/math-grad -- folder:uwaterloo/lists/Math-grad
2098notmuch tag -inbox +lists/scs-grads -- folder:uwaterloo/lists/scs-grads
2099notmuch tag -inbox +lists/watform-students -- folder:uwaterloo/lists/Watform-students
2100# </uw>
2101
2102# <gnu>
2103notmuch tag -inbox +l/emacs-devel -- folder:gnu/l/emacs-devel
2104notmuch tag -inbox +l/emacs-orgmode -- folder:gnu/l/emacs-orgmode
2105notmuch tag -inbox +l/emacsconf-discuss -- folder:gnu/l/emacsconf-discuss
2106notmuch tag -inbox +l/fencepost-users -- folder:gnu/l/fencepost-users
2107notmuch tag -inbox +l/guix-devel -- folder:gnu/l/guix-devel
2108notmuch tag -inbox +l/guile-devel -- folder:gnu/l/guile-devel
2109notmuch tag -inbox +l/help-gnu-emacs -- folder:gnu/l/help-gnu-emacs
2110notmuch tag -inbox +l/info-gnu-emacs -- folder:gnu/l/info-gnu-emacs
2111notmuch tag -inbox +l/www-commits -- folder:gnu/l/www-commits
2112notmuch tag -inbox +l/www-discuss -- folder:gnu/l/www-discuss
2113notmuch tag -inbox +webmasters -- folder:gnu/webmasters
2114
2115notmuch tag -inbox +l/deepspec -- folder:gnu/l/deepspec
2116notmuch tag -inbox +l/haskell-cafe -- folder:gnu/l/haskell-cafe
2117notmuch tag -inbox +l/haskell-art -- folder:gnu/l/haskell-art
2118notmuch tag -inbox +l/notmuch -- folder:gnu/l/notmuch
2119
2120notmuch tag -inbox +l/~aminb/test-priv -- folder:gnu/l/~aminb/test-priv
2121notmuch tag -inbox +l/~sircmpwn/sr.ht-admins -- folder:gnu/l/~sircmpwn/sr.ht-admins
2122notmuch tag -inbox +l/~sircmpwn/sr.ht-announce -- folder:gnu/l/~sircmpwn/sr.ht-announce
2123notmuch tag -inbox +l/~sircmpwn/sr.ht-dev -- folder:gnu/l/~sircmpwn/sr.ht-dev
2124notmuch tag -inbox +l/~sircmpwn/sr.ht-discuss -- folder:gnu/l/~sircmpwn/sr.ht-discuss
2125# </gnu>
2126
2127notmuch tag -inbox -unread +archive/notmuch -- path:archive/notmuch/**
2128notmuch tag -inbox -unread +archive/emacs-devel -- path:archive/emacs-devel/**
2129#+end_src
2130
2131*** notmuch.service
2132:PROPERTIES:
2133:header-args+: :tangle ~/.config/systemd/user/notmuch.service
2134:END:
2135
2136#+begin_src conf :tangle no
2137[Unit]
2138Description=notmuch service
2139
2140[Service]
2141Type=oneshot
2142ExecStart=/usr/bin/notmuch new
2143StandardOutput=syslog
2144StandardError=syslog
2145#+end_src
2146
2147*** notmuch.timer
2148:PROPERTIES:
2149:header-args+: :tangle ~/.config/systemd/user/notmuch.timer
2150:END:
2151
2152#+begin_src conf :tangle no
2153[Unit]
2154Description=notmuch timer
2155
2156[Timer]
2157OnCalendar=*:0/5
2158Persistent=true
2159Unit=notmuch.service
2160
2161[Install]
2162WantedBy=timers.target
2163#+end_src
2164
2165** pigeonhole
2166*** amin.sieve
2167:PROPERTIES:
2168:header-args+: :tangle ~/mail/aminb.org/amin/sieve/amin.sieve :comments none
2169:END:
2170
2171#+begin_src conf
2172require ["regex", "variables", "fileinto", "envelope",
2173 "mailbox", "imap4flags", "include"];
2174
2175# webmasters
2176if anyof (
2177 address :is "from" ["webmasters@gnu.org", "webmasters-comment@gnu.org"]) {
2178 fileinto :create "gnu.webmasters";
2179 stop;
2180}
2181
2182include :personal "lists";
2183#+end_src
2184
2185*** lists.sieve
2186:PROPERTIES:
2187:header-args+: :tangle ~/mail/aminb.org/amin/sieve/lists.sieve :comments none
2188:END:
2189
2190#+begin_src conf
2191require ["regex", "variables", "fileinto", "envelope",
2192 "mailbox", "imap4flags", "include"];
2193
2194# mailing lists
2195if anyof (
2196 header :contains "list-id"
2197 [ "<emacs-devel.gnu.org>"
2198 , "<emacs-orgmode.gnu.org>"
2199 , "<emacsconf-discuss.gnu.org>"
2200 , "<fencepost-users.gnu.org>"
2201 , "<guix-devel.gnu.org>"
2202 , "<guile-devel.gnu.org>"
2203 , "<help-gnu-emacs.gnu.org>"
2204 , "<info-gnu-emacs.gnu.org>"
2205 , "<info-guix.gnu.org>"
2206 , "<www-commits.gnu.org>"
2207 , "<www-discuss.gnu.org>"
2208 , "<deepspec.lists.cs.princeton.edu>"
2209 , "<haskell-cafe.haskell.org>"
2210 , "<haskell-art.we.lurk.org>"
2211 , "<notmuch.notmuchmail.org>"
2212 ] ) {
2213 if header :regex "list-id" "<([a-z_0-9-]+)[.@]" {
2214 set :lower "listname" "${1}";
2215 fileinto :create "gnu.${listname}";
2216 stop;
2217 }
2218}
2219
2220# sr.ht lists, with dots ('.') omitted
2221if anyof (
2222 header :contains "list-id"
2223 [ "<~bandali/public-inbox@lists.sr.ht>"
2224 , "<~sircmpwn/sr.ht-admins@lists.sr.ht>"
2225 , "<~sircmpwn/sr.ht-announce@lists.sr.ht>"
2226 , "<~sircmpwn/sr.ht-dev@lists.sr.ht>"
2227 , "<~sircmpwn/sr.ht-discuss@lists.sr.ht>"
2228 ] ) {
2229 if header :regex "list-id" "(~[a-z_0-9-]+)/([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)\\.?([^.]*)@" {
2230 set :lower "username" "${1}";
2231 set :lower "listname" "${2}${3}${4}${5}${6}${7}";
2232 fileinto :create "gnu.${username}.${listname}";
2233 stop;
2234 }
2235}
2236#+end_src
2237
2238** PowerTOP
2239:PROPERTIES:
2240:header-args+: :tangle "/sudo::/etc/systemd/system/powertop.service"
2241:END:
2242
2243#+begin_src conf
2244[Unit]
2245Description=Powertop tunings
2246
2247[Service]
2248ExecStart=/usr/bin/powertop --auto-tune
2249RemainAfterExit=true
2250
2251[Install]
2252WantedBy=multi-user.target
2253#+end_src
2254
2255** redshift
2256:PROPERTIES:
2257:header-args+: :tangle ~/.config/redshift.conf :comments none
2258:END:
2259
2260#+begin_src conf
2261; Global settings for redshift
2262[redshift]
2263; Set the day and night screen temperatures (Neutral is 6500K)
2264;temp-day=5700
2265;temp-night=3500
2266
2267;temp-day=6500
2268temp-day=6200
2269;temp-night=4800
2270;temp-night=5000
2271;temp-night=4500
2272temp-night=4000
2273
2274; Enable/Disable a smooth transition between day and night
2275; 0 will cause a direct change from day to night screen temperature.
2276; 1 will gradually increase or decrease the screen temperature.
2277transition=1
2278
2279; Set the screen brightness. Default is 1.0.
2280;brightness=0.9
2281; It is also possible to use different settings for day and night
2282; since version 1.8.
2283;brightness-day=0.7
2284;brightness-night=0.4
2285; Set the screen gamma (for all colors, or each color channel
2286; individually)
2287;gamma=0.8
2288;gamma=1.0
2289;gamma=0.8:0.7:0.8
2290; This can also be set individually for day and night since
2291; version 1.10.
2292;gamma-day=0.8:0.7:0.8
2293;gamma-night=0.6
2294
2295; Set the location-provider: 'geoclue2' or 'manual'
2296; type 'redshift -l list' to see possible values.
2297; The location provider settings are in a different section.
2298;location-provider=manual
2299location-provider=geoclue2
2300
2301; Set the adjustment-method: 'randr', 'vidmode'
2302; type 'redshift -m list' to see all possible values.
2303; 'randr' is the preferred method, 'vidmode' is an older API.
2304; but works in some cases when 'randr' does not.
2305; The adjustment method settings are in a different section.
2306adjustment-method=randr
2307
2308; Configuration of the location-provider:
2309; type 'redshift -l PROVIDER:help' to see the settings.
2310; ex: 'redshift -l manual:help'
2311; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
2312; are negative numbers.
2313;[manual]
2314;lat=48.1
2315;lon=11.6
2316
2317; Configuration of the adjustment-method
2318; type 'redshift -m METHOD:help' to see the settings.
2319; ex: 'redshift -m randr:help'
2320; In this example, randr is configured to adjust screen 1.
2321; Note that the numbering starts from 0, so this is actually the
2322; second screen. If this option is not specified, Redshift will try
2323; to adjust _all_ screens.
2324;[randr]
2325;screen=1
2326#+end_src
2327
2328** rofi
2329:PROPERTIES:
2330:header-args+: :tangle ~/.config/rofi/config
2331:END:
2332
2333#+begin_src conf
2334! rofi.font: Ubuntu Mono 13
2335! rofi.font: Inconsolata 16
2336! rofi.font: Iosevka 13
2337! rofi.font: Source Code Pro 11
2338rofi.font: Source Code Pro 10.5
2339rofi.modi: run,window
2340! rofi.width: 640
2341rofi.width: 600
2342!rofi.location: 2
2343!rofi.yoffset: 200
2344rofi.monitor: -1
2345!rofi.lines: 10
2346
2347!rofi.theme: /usr/share/rofi/themes//Arc.rasi
2348!rofi.theme: /usr/share/rofi/themes//Paper.rasi
2349!rofi.theme: /usr/share/rofi/themes//sidebar.rasi
2350
2351rofi.theme: /usr/share/rofi/themes//gruvbox-light.rasi
2352#+end_src
2353
2354** rofi-pass
2355:PROPERTIES:
2356:header-args+: :tangle ~/.config/rofi-pass/config
2357:END:
2358
2359#+begin_src conf
2360# permanently set alternative root dir
2361# root=/path/to/root
2362
2363# rofi command. Make sure to have "$@" as last argument
2364_rofi () {
2365 #rofi -no-auto-select -kb-accept-entry "!Return" -i -no-levenshtein-sort "$@"
2366 rofi -i -no-auto-select -kb-accept-entry "!Return" "$@"
2367}
2368
2369# xdotool needs the keyboard layout to be set using setxkbmap
2370# You can do this in your autostart scripts (e.g. xinitrc)
2371
2372# If for some reason, you cannot do this, you can set the command here.
2373# and set fix_layout to true
2374fix_layout=false
2375
2376layout_cmd () {
2377 setxkbmap us
2378}
2379
2380# fields to be used
2381URL_field='url'
2382USERNAME_field='user'
2383AUTOTYPE_field='autotype'
2384
2385# delay to be used for :delay keyword
2386delay=2
2387
2388## Programs to be used
2389# Editor
2390EDITOR='gvim -f'
2391
2392# Browser
2393BROWSER='chromium'
2394
2395## Misc settings
2396
2397default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
2398auto_enter='false'
2399notify='false'
2400default_autotype='user :tab pass'
2401
2402# color of the help messages
2403# leave empty for autodetection
2404help_color="#4872FF"
2405
2406# Clipboard settings
2407# Possible options: primary, clipboard, both
2408clip=primary
2409
2410# Options for generating new password entries
2411# default_user is also used for password files that have no user field.
2412default_user=aminb
2413default_user2=aminban
2414password_length=30
2415
2416# Custom Keybindings
2417#autotype="Alt+1"
2418autotype="Alt+m"
2419type_user="Alt+2"
2420type_pass="Alt+3"
2421open_url="Alt+4"
2422copy_name="Alt+u"
2423copy_url="Alt+l"
2424copy_pass="Alt+p"
2425show="Alt+o"
2426copy_entry="Alt+2"
2427type_entry="Alt+1"
2428copy_menu="Alt+c"
2429action_menu="Alt+a"
2430type_menu="Alt+t"
2431help="Alt+h"
2432switch="Alt+x"
2433insert_pass="Alt+n"
2434#+end_src
2435
2436** sway
2437
2438*** main
2439:PROPERTIES:
2440:header-args+: :tangle ~/.config/sway/config
2441:END:
2442
2443#+begin_src conf
2444### Variables
2445# super
2446set $mod Mod4
2447# alt
2448set $mod2 Mod1
2449set $left h
2450set $down j
2451set $up k
2452set $right l
2453set $term urxvt
2454set $menu rofi -show run -display-run '> ' -display-window ' 🗔 '
2455
2456### Output configuration
2457#
2458# Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
2459output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
2460#
2461# Example configuration:
2462#
2463# output HDMI-A-1 resolution 1920x1080 position 1920,0
2464#
2465# You can get the names of your outputs by running: swaymsg -t get_outputs
2466
2467### Idle configuration
2468
2469exec swayidle \
2470 timeout 120 '[ -f ~/.nosleep ] || swaymsg "output * dpms off"' \
2471 resume '[ -f ~/.nosleep ] || swaymsg "output * dpms on"' \
2472
2473
2474### Key bindings
2475#
2476# Basics:
2477#
2478 # start a terminal
2479 bindsym $mod+Return exec $term -name floating
2480 bindsym $mod+Shift+Return exec $term
2481 for_window [class="URxvt" instance="floating"] floating enable
2482
2483 # kill focused window
2484 bindsym $mod+Shift+q kill
2485
2486 # start your launcher
2487 bindsym $mod+d exec $menu
2488
2489 # password manager
2490 bindsym $mod2+space exec rofi-pass
2491
2492 # Drag floating windows by holding down $mod and left mouse button.
2493 # Resize them with right mouse button + $mod.
2494 # Despite the name, also works for non-floating windows.
2495 # Change normal to inverse to use left mouse button for resizing and right
2496 # mouse button for dragging.
2497 floating_modifier $mod normal
2498
2499 # reload the configuration file
2500 bindsym $mod+Shift+c reload
2501
2502 # exit sway (logs you out of your wayland session)
2503 # bindsym $mod+Shift+e exit
2504
2505 bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
2506 bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
2507 bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
2508
2509 bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
2510 bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
2511 bindsym XF86AudioMute exec pamixer --toggle-mute
2512 bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
2513
2514 bindsym $mod+Shift+apostrophe exec rofi-remmina.py # choose remmina connection
2515
2516 # original sway workspace switch and window move
2517 bindsym $mod+bracketleft workspace prev
2518 bindsym $mod+bracketright workspace next
2519 bindsym $mod+braceleft move container to workspace prev
2520 bindsym $mod+braceright move container to workspace next
2521
2522 # bspwm-esque workspace switch and window move
2523 bindsym $mod2+bracketleft exec sway-ws-util switch prev
2524 bindsym $mod2+bracketright exec sway-ws-util switch next
2525 bindsym $mod2+braceleft exec sway-ws-util move prev follow
2526 bindsym $mod2+braceright exec sway-ws-util move next follow
2527#
2528# Moving around:
2529#
2530 # Move your focus around
2531 bindsym $mod+$left focus left
2532 bindsym $mod+$down focus down
2533 bindsym $mod+$up focus up
2534 bindsym $mod+$right focus right
2535 # or use $mod+[up|down|left|right]
2536 bindsym $mod+Left focus left
2537 bindsym $mod+Down focus down
2538 bindsym $mod+Up focus up
2539 bindsym $mod+Right focus right
2540
2541 # _move_ the focused window with the same, but add Shift
2542 bindsym $mod+Shift+$left move left
2543 bindsym $mod+Shift+$down move down
2544 bindsym $mod+Shift+$up move up
2545 bindsym $mod+Shift+$right move right
2546 # ditto, with arrow keys
2547 bindsym $mod+Shift+Left move left
2548 bindsym $mod+Shift+Down move down
2549 bindsym $mod+Shift+Up move up
2550 bindsym $mod+Shift+Right move right
2551#
2552# Workspaces:
2553#
2554 # switch to workspace
2555 bindsym $mod+1 workspace 1
2556 bindsym $mod+2 workspace 2
2557 bindsym $mod+3 workspace 3
2558 bindsym $mod+4 workspace 4
2559 bindsym $mod+5 workspace 5
2560 bindsym $mod+6 workspace 6
2561 bindsym $mod+7 workspace 7
2562 bindsym $mod+8 workspace 8
2563 bindsym $mod+9 workspace 9
2564 bindsym $mod+0 workspace 10
2565 # move focused container to workspace
2566 bindsym $mod+Shift+1 move container to workspace 1
2567 bindsym $mod+Shift+2 move container to workspace 2
2568 bindsym $mod+Shift+3 move container to workspace 3
2569 bindsym $mod+Shift+4 move container to workspace 4
2570 bindsym $mod+Shift+5 move container to workspace 5
2571 bindsym $mod+Shift+6 move container to workspace 6
2572 bindsym $mod+Shift+7 move container to workspace 7
2573 bindsym $mod+Shift+8 move container to workspace 8
2574 bindsym $mod+Shift+9 move container to workspace 9
2575 bindsym $mod+Shift+0 move container to workspace 10
2576 # Note: workspaces can have any name you want, not just numbers.
2577 # We just use 1-10 as the default.
2578#
2579# Layout stuff:
2580#
2581 # You can "split" the current object of your focus with
2582 # $mod+b or $mod+v, for horizontal and vertical splits
2583 # respectively.
2584 bindsym $mod+b splith
2585 bindsym $mod+v splitv
2586
2587 # Switch the current container between different layout styles
2588 bindsym $mod+s layout stacking
2589 bindsym $mod+w layout tabbed
2590 bindsym $mod+e layout toggle split
2591
2592 # Make the current focus fullscreen
2593 bindsym $mod+f fullscreen
2594
2595 # Toggle the current focus between tiling and floating mode
2596 bindsym $mod+Shift+space floating toggle
2597
2598 # Swap focus between the tiling area and the floating area
2599 bindsym $mod+space focus mode_toggle
2600
2601 # move focus to the parent container
2602 bindsym $mod+a focus parent
2603#
2604# Scratchpad:
2605#
2606 # Sway has a "scratchpad", which is a bag of holding for windows.
2607 # You can send windows there and get them back later.
2608
2609 # Move the currently focused window to the scratchpad
2610 bindsym $mod+Shift+minus move scratchpad
2611
2612 # Show the next scratchpad window or hide the focused scratchpad window.
2613 # If there are multiple scratchpad windows, this command cycles through them.
2614 bindsym $mod+minus scratchpad show
2615#
2616# Resizing containers:
2617#
2618mode "resize" {
2619 # left will shrink the containers width
2620 # right will grow the containers width
2621 # up will shrink the containers height
2622 # down will grow the containers height
2623 bindsym $left resize shrink width 10px
2624 bindsym $down resize grow height 10px
2625 bindsym $up resize shrink height 10px
2626 bindsym $right resize grow width 10px
2627
2628 # ditto, with arrow keys
2629 bindsym Left resize shrink width 10px
2630 bindsym Down resize grow height 10px
2631 bindsym Up resize shrink height 10px
2632 bindsym Right resize grow width 10px
2633
2634 # return to default mode
2635 bindsym Return mode "default"
2636 bindsym Escape mode "default"
2637}
2638bindsym $mod+Shift+r mode "resize"
2639
2640#
2641# Power button
2642#
2643
2644set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown
2645mode "$mode_system" {
2646 bindsym l exec swaylock, mode "default"
2647 bindsym e exec swaymsg exit, mode "default"
2648 bindsym s exec systemctl suspend, mode "default"
2649 bindsym h exec systemctl hibernate, mode "default"
2650 bindsym r exec systemctl reboot, mode "default"
2651 bindsym Shift+s exec systemctl poweroff -i, mode "default"
2652
2653 # back to normal: Enter, Escape, or q
2654 bindsym Return mode "default"
2655 bindsym Escape mode "default"
2656 bindsym q mode "default"
2657}
2658# bindsym XF86PowerOff mode "$mode_system"
2659bindsym $mod+Shift+e mode "$mode_system"
2660
2661#
2662# Presentation mode
2663#
2664
2665bindsym $mod+$mod2+p exec ([ ! -e ~/.nosleep ] && touch ~/.nosleep || rm ~/.nosleep) && killall -USR1 i3status
2666
2667#
2668# Notifications
2669#
2670
2671bindsym $mod+Shift+n mode notifications
2672mode notifications {
2673 bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default
2674 bindsym d exec makoctl dismiss; mode default
2675 bindsym Shift+d exec makoctl dismiss -a; mode default
2676
2677 bindsym Escape mode default
2678 bindsym q mode default
2679}
2680
2681#
2682# Screenshotting
2683#
2684
2685bindsym $mod+Shift+s mode screenshot
2686mode screenshot {
2687 bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2688 bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
2689
2690 bindsym Escape mode default
2691 bindsym q mode default
2692}
2693
2694#
2695# Status Bar:
2696#
2697# Read `man 5 sway-bar` for more information about this section.
2698bar {
2699 position bottom
2700 colors {
2701 statusline #ffffff
2702 background #212121
2703 inactive_workspace #21212100 #21212100 #5c5c5c
2704 }
2705 status_command i3status | my-i3status.py
2706}
2707
2708# font pango: benis uushi 9
2709# font pango: Ubuntu Mono 11
2710# font pango: Inconsolata 11
2711font pango: DejaVu Sans Mono 9
2712# font pango: Liberation Mono 9
2713
2714exec xrdb .Xresources
2715# exec pgrep -x "systemd-inhibit" || \
2716# systemd-inhibit --what=handle-power-key --who=aminb \
2717# --why="Handle power button in sway" sleep infinity
2718exec mako 2>&1 >/tmp/mako.log
2719exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
2720
2721include /etc/sway/config.d/*
2722include ~/.config/sway/`hostname`
2723
2724exec systemd-notify --ready || true
2725
2726#+end_src
2727
2728*** langa
2729:PROPERTIES:
2730:header-args+: :tangle ~/.config/sway/langa
2731:END:
2732
2733#+begin_src conf
2734input "2:7:SynPS/2_Synaptics_TouchPad" {
2735 events disabled
2736 dwt enabled
2737 tap enabled
2738 natural_scroll enabled
2739 click_method clickfinger
2740}
2741
2742input "1:1:AT_Translated_Set_2_keyboard" {
2743 repeat_delay 200
2744 repeat_rate 45
2745 xkb_layout us_ab,ir
2746 xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
2747}
2748#+end_src
2749
2750*** shemshak
2751:PROPERTIES:
2752:header-args+: :tangle ~/.config/sway/shemshak
2753:END:
2754
2755#+begin_src conf
2756input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
2757 dwt enabled
2758 tap enabled
2759 natural_scroll enabled
2760 middle_emulation enabled
2761 click_method clickfinger
2762}
2763
2764input "1:1:AT_Translated_Set_2_keyboard" {
2765 repeat_delay 200
2766 repeat_rate 45
2767 xkb_layout us,ir
2768 xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
2769}
2770#+end_src
2771** swaylock
2772:PROPERTIES:
2773:header-args+: :tangle ~/.config/swaylock/config
2774:END:
2775
2776#+begin_src conf
2777image=/home/amin/usr/pics/wp/wp2445784-blurred-wallpapers.jpg
2778scaling=fill
2779#+end_src
2780
2781** TLP
2782
2783*** langa
2784
2785#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "langa")) "/sudo::/etc/default/tlp")
2786# ------------------------------------------------------------------------------
2787# tlp - Parameters for power saving
2788# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
2789
2790# Hint: some features are disabled by default, remove the leading # to enable
2791# them.
2792
2793# Set to 0 to disable, 1 to enable TLP.
2794TLP_ENABLE=1
2795
2796# Operation mode when no power supply can be detected: AC, BAT.
2797# Concerns some desktop and embedded hardware only.
2798TLP_DEFAULT_MODE=AC
2799
2800# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
2801# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
2802TLP_PERSISTENT_DEFAULT=0
2803
2804# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
2805# Non-zero value enables, zero disables laptop mode.
2806DISK_IDLE_SECS_ON_AC=0
2807DISK_IDLE_SECS_ON_BAT=2
2808
2809# Dirty page values (timeouts in secs).
2810MAX_LOST_WORK_SECS_ON_AC=15
2811MAX_LOST_WORK_SECS_ON_BAT=60
2812
2813# Hint: CPU parameters below are disabled by default, remove the leading #
2814# to enable them, otherwise kernel default values are used.
2815
2816# Select a CPU frequency scaling governor.
2817# Intel Core i processor with intel_pstate driver:
2818# powersave(*), performance.
2819# Older hardware with acpi-cpufreq driver:
2820# ondemand(*), powersave, performance, conservative, schedutil.
2821# (*) is recommended.
2822# Hint: use tlp-stat -p to show the active driver and available governors.
2823# Important:
2824# powersave for intel_pstate and ondemand for acpi-cpufreq are power
2825# efficient for *almost all* workloads and therefore kernel and most
2826# distributions have chosen them as defaults. If you still want to change,
2827# you should know what you're doing! You *must* disable your distribution's
2828# governor settings or conflicts will occur.
2829#CPU_SCALING_GOVERNOR_ON_AC=powersave
2830#CPU_SCALING_GOVERNOR_ON_BAT=powersave
2831
2832# Set the min/max frequency available for the scaling governor.
2833# Possible values strongly depend on your CPU. For available frequencies see
2834# the output of tlp-stat -p.
2835#CPU_SCALING_MIN_FREQ_ON_AC=0
2836#CPU_SCALING_MAX_FREQ_ON_AC=0
2837#CPU_SCALING_MIN_FREQ_ON_BAT=0
2838#CPU_SCALING_MAX_FREQ_ON_BAT=0
2839
2840# Set energy performance hints (HWP) for Intel P-state governor:
2841# performance, balance_performance, default, balance_power, power
2842# Values are given in order of increasing power saving.
2843# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
2844CPU_HWP_ON_AC=balance_performance
2845CPU_HWP_ON_BAT=balance_power
2846
2847# Set Intel P-state performance: 0..100 (%).
2848# Limit the max/min P-state to control the power dissipation of the CPU.
2849# Values are stated as a percentage of the available performance.
2850# Requires an Intel Core i processor with intel_pstate driver.
2851#CPU_MIN_PERF_ON_AC=0
2852#CPU_MAX_PERF_ON_AC=100
2853#CPU_MIN_PERF_ON_BAT=0
2854#CPU_MAX_PERF_ON_BAT=30
2855
2856# Set the CPU "turbo boost" feature: 0=disable, 1=allow
2857# Requires an Intel Core i processor.
2858# Important:
2859# - This may conflict with your distribution's governor settings
2860# - A value of 1 does *not* activate boosting, it just allows it
2861#CPU_BOOST_ON_AC=1
2862#CPU_BOOST_ON_BAT=0
2863
2864# Minimize number of used CPU cores/hyper-threads under light load conditions:
2865# 0=disable, 1=enable.
2866SCHED_POWERSAVE_ON_AC=0
2867SCHED_POWERSAVE_ON_BAT=1
2868
2869# Kernel NMI Watchdog:
2870# 0=disable (default, saves power), 1=enable (for kernel debugging only).
2871NMI_WATCHDOG=0
2872
2873# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
2874# Frequency voltage pairs are written to:
2875# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
2876# CAUTION: only use this, if you thoroughly understand what you are doing!
2877#PHC_CONTROLS="F:V F:V F:V F:V"
2878
2879# Set CPU performance versus energy savings policy:
2880# performance, balance-performance, default, balance-power, power.
2881# Values are given in order of increasing power saving.
2882# Requires kernel module msr and x86_energy_perf_policy from linux-tools.
2883ENERGY_PERF_POLICY_ON_AC=performance
2884ENERGY_PERF_POLICY_ON_BAT=balance-power
2885
2886# Disk devices; separate multiple devices with spaces (default: sda).
2887# Devices can be specified by disk ID also (lookup with: tlp diskid).
2888DISK_DEVICES="sda sdb"
2889
2890# Disk advanced power management level: 1..254, 255 (max saving, min, off).
2891# Levels 1..127 may spin down the disk; 255 allowable on most drives.
2892# Separate values for multiple disks with spaces. Use the special value 'keep'
2893# to keep the hardware default for the particular disk.
2894DISK_APM_LEVEL_ON_AC="254 254"
2895DISK_APM_LEVEL_ON_BAT="128 128"
2896
2897# Hard disk spin down timeout:
2898# 0: spin down disabled
2899# 1..240: timeouts from 5s to 20min (in units of 5s)
2900# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
2901# See 'man hdparm' for details.
2902# Separate values for multiple disks with spaces. Use the special value 'keep'
2903# to keep the hardware default for the particular disk.
2904#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
2905#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
2906
2907# Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
2908# Separate values for multiple disks with spaces. Use the special value 'keep'
2909# to keep the kernel default scheduler for the particular disk.
2910#DISK_IOSCHED="cfq cfq"
2911
2912# AHCI link power management (ALPM) for disk devices:
2913# min_power, med_power_with_dipm(*), medium_power, max_performance.
2914# (*) Kernel >= 4.15 required, then recommended.
2915# Multiple values separated with spaces are tried sequentially until success.
2916SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
2917SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
2918
2919# Exclude host devices from AHCI link power management.
2920# Separate multiple hosts with spaces.
2921#SATA_LINKPWR_BLACKLIST="host1"
2922
2923# Runtime Power Management for AHCI host and disks devices:
2924# on=disable, auto=enable.
2925# EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
2926#AHCI_RUNTIME_PM_ON_AC=on
2927#AHCI_RUNTIME_PM_ON_BAT=on
2928
2929# Seconds of inactivity before disk is suspended.
2930AHCI_RUNTIME_PM_TIMEOUT=15
2931
2932# PCI Express Active State Power Management (PCIe ASPM):
2933# default, performance, powersave.
2934PCIE_ASPM_ON_AC=performance
2935PCIE_ASPM_ON_BAT=powersave
2936
2937# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
2938# auto = mid on BAT, high on AC; default = use hardware defaults.
2939RADEON_POWER_PROFILE_ON_AC=high
2940RADEON_POWER_PROFILE_ON_BAT=low
2941
2942# Radeon dynamic power management method (DPM): battery, performance.
2943RADEON_DPM_STATE_ON_AC=performance
2944RADEON_DPM_STATE_ON_BAT=battery
2945
2946# Radeon DPM performance level: auto, low, high; auto is recommended.
2947RADEON_DPM_PERF_LEVEL_ON_AC=auto
2948RADEON_DPM_PERF_LEVEL_ON_BAT=auto
2949
2950# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
2951WIFI_PWR_ON_AC=off
2952WIFI_PWR_ON_BAT=on
2953
2954# Disable wake on LAN: Y/N.
2955WOL_DISABLE=Y
2956
2957# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
2958# A value of 0 disables, >=1 enables power saving (recommended: 1).
2959SOUND_POWER_SAVE_ON_AC=0
2960SOUND_POWER_SAVE_ON_BAT=0
2961
2962# Disable controller too (HDA only): Y/N.
2963SOUND_POWER_SAVE_CONTROLLER=N
2964
2965# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
2966# Drive can be powered on again by releasing (and reinserting) the eject lever
2967# or by pressing the disc eject button on newer models.
2968# Note: an UltraBay/MediaBay hard disk is never powered off.
2969BAY_POWEROFF_ON_AC=0
2970BAY_POWEROFF_ON_BAT=0
2971# Optical drive device to power off (default sr0).
2972BAY_DEVICE="sr0"
2973
2974# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
2975RUNTIME_PM_ON_AC=on
2976RUNTIME_PM_ON_BAT=auto
2977
2978# Exclude PCI(e) device adresses the following list from Runtime PM
2979# (separate with spaces). Use lspci to get the adresses (1st column).
2980#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
2981
2982# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
2983# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
2984# prevents accidential power-on of dGPU in hybrid graphics setups.
2985# Use "" to disable the feature completely.
2986# Separate multiple drivers with spaces.
2987#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
2988
2989# Set to 0 to disable, 1 to enable USB autosuspend feature.
2990USB_AUTOSUSPEND=1
2991
2992# Exclude listed devices from USB autosuspend (separate with spaces).
2993# Use lsusb to get the ids.
2994# Note: input devices (usbhid) are excluded automatically
2995#USB_BLACKLIST="1111:2222 3333:4444"
2996
2997# Bluetooth devices are excluded from USB autosuspend:
2998# 0=do not exclude, 1=exclude.
2999USB_BLACKLIST_BTUSB=0
3000
3001# Phone devices are excluded from USB autosuspend:
3002# 0=do not exclude, 1=exclude (enable charging).
3003USB_BLACKLIST_PHONE=0
3004
3005# Printers are excluded from USB autosuspend:
3006# 0=do not exclude, 1=exclude.
3007USB_BLACKLIST_PRINTER=1
3008
3009# WWAN devices are excluded from USB autosuspend:
3010# 0=do not exclude, 1=exclude.
3011USB_BLACKLIST_WWAN=1
3012
3013# Include listed devices into USB autosuspend even if already excluded
3014# by the blacklists above (separate with spaces).
3015# Use lsusb to get the ids.
3016#USB_WHITELIST="1111:2222 3333:4444"
3017
3018# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3019# (workaround for USB devices that cause shutdown problems).
3020#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3021
3022# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3023# on system startup: 0=disable, 1=enable.
3024# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3025# are ignored when this is enabled!
3026#RESTORE_DEVICE_STATE_ON_STARTUP=0
3027RESTORE_DEVICE_STATE_ON_STARTUP=0
3028
3029# Radio devices to disable on startup: bluetooth, wifi, wwan.
3030# Separate multiple devices with spaces.
3031#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3032DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
3033
3034# Radio devices to enable on startup: bluetooth, wifi, wwan.
3035# Separate multiple devices with spaces.
3036#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3037
3038# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3039# (workaround for devices that are blocking shutdown).
3040#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3041
3042# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3043# (to prevent other operating systems from missing radios).
3044#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3045
3046# Radio devices to enable on AC: bluetooth, wifi, wwan.
3047#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3048
3049# Radio devices to disable on battery: bluetooth, wifi, wwan.
3050#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3051
3052# Radio devices to disable on battery when not in use (not connected):
3053# bluetooth, wifi, wwan.
3054#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3055
3056# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3057# required). Charging starts when the remaining capacity falls below the
3058# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3059# Main / Internal battery (values in %)
3060#START_CHARGE_THRESH_BAT0=75
3061#STOP_CHARGE_THRESH_BAT0=80
3062# Ultrabay / Slice / Replaceable battery (values in %)
3063#START_CHARGE_THRESH_BAT1=75
3064#STOP_CHARGE_THRESH_BAT1=80
3065
3066# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3067#RESTORE_THRESHOLDS_ON_BAT=1
3068
3069# ------------------------------------------------------------------------------
3070# tlp-rdw - Parameters for the radio device wizard
3071# Possible devices: bluetooth, wifi, wwan.
3072
3073# Hints:
3074# - Parameters are disabled by default, remove the leading # to enable them
3075# - Separate multiple radio devices with spaces
3076
3077# Radio devices to disable on connect.
3078#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3079#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3080#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3081
3082# Radio devices to enable on disconnect.
3083#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3084#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3085#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3086
3087# Radio devices to enable/disable when docked.
3088#DEVICES_TO_ENABLE_ON_DOCK=""
3089#DEVICES_TO_DISABLE_ON_DOCK=""
3090
3091# Radio devices to enable/disable when undocked.
3092#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3093#DEVICES_TO_DISABLE_ON_UNDOCK=""
3094#+end_src
3095
3096*** shemshak
3097
3098#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
3099# ------------------------------------------------------------------------------
3100# tlp - Parameters for power saving
3101# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
3102
3103# Hint: some features are disabled by default, remove the leading # to enable
3104# them.
3105
3106# Set to 0 to disable, 1 to enable TLP.
3107TLP_ENABLE=1
3108
3109# Operation mode when no power supply can be detected: AC, BAT.
3110# Concerns some desktop and embedded hardware only.
3111TLP_DEFAULT_MODE=AC
3112
3113# Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
3114# Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC.
3115TLP_PERSISTENT_DEFAULT=0
3116
3117# Seconds laptop mode has to wait after the disk goes idle before doing a sync.
3118# Non-zero value enables, zero disables laptop mode.
3119DISK_IDLE_SECS_ON_AC=0
3120DISK_IDLE_SECS_ON_BAT=2
3121
3122# Dirty page values (timeouts in secs).
3123MAX_LOST_WORK_SECS_ON_AC=15
3124MAX_LOST_WORK_SECS_ON_BAT=60
3125
3126# Hint: CPU parameters below are disabled by default, remove the leading #
3127# to enable them, otherwise kernel default values are used.
3128
3129# Select a CPU frequency scaling governor.
3130# Intel Core i processor with intel_pstate driver:
3131# powersave(*), performance.
3132# Older hardware with acpi-cpufreq driver:
3133# ondemand(*), powersave, performance, conservative, schedutil.
3134# (*) is recommended.
3135# Hint: use tlp-stat -p to show the active driver and available governors.
3136# Important:
3137# powersave for intel_pstate and ondemand for acpi-cpufreq are power
3138# efficient for *almost all* workloads and therefore kernel and most
3139# distributions have chosen them as defaults. If you still want to change,
3140# you should know what you're doing! You *must* disable your distribution's
3141# governor settings or conflicts will occur.
3142#CPU_SCALING_GOVERNOR_ON_AC=powersave
3143#CPU_SCALING_GOVERNOR_ON_BAT=powersave
3144
3145# Set the min/max frequency available for the scaling governor.
3146# Possible values strongly depend on your CPU. For available frequencies see
3147# the output of tlp-stat -p.
3148#CPU_SCALING_MIN_FREQ_ON_AC=0
3149#CPU_SCALING_MAX_FREQ_ON_AC=0
3150#CPU_SCALING_MIN_FREQ_ON_BAT=0
3151#CPU_SCALING_MAX_FREQ_ON_BAT=0
3152
3153# Set energy performance hints (HWP) for Intel P-state governor:
3154# performance, balance_performance, default, balance_power, power
3155# Values are given in order of increasing power saving.
3156# Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
3157CPU_HWP_ON_AC=balance_performance
3158CPU_HWP_ON_BAT=balance_power
3159
3160# Set Intel P-state performance: 0..100 (%).
3161# Limit the max/min P-state to control the power dissipation of the CPU.
3162# Values are stated as a percentage of the available performance.
3163# Requires an Intel Core i processor with intel_pstate driver.
3164#CPU_MIN_PERF_ON_AC=0
3165#CPU_MAX_PERF_ON_AC=100
3166#CPU_MIN_PERF_ON_BAT=0
3167#CPU_MAX_PERF_ON_BAT=30
3168
3169# Set the CPU "turbo boost" feature: 0=disable, 1=allow
3170# Requires an Intel Core i processor.
3171# Important:
3172# - This may conflict with your distribution's governor settings
3173# - A value of 1 does *not* activate boosting, it just allows it
3174#CPU_BOOST_ON_AC=1
3175#CPU_BOOST_ON_BAT=0
3176
3177# Minimize number of used CPU cores/hyper-threads under light load conditions:
3178# 0=disable, 1=enable.
3179SCHED_POWERSAVE_ON_AC=0
3180SCHED_POWERSAVE_ON_BAT=1
3181
3182# Kernel NMI Watchdog:
3183# 0=disable (default, saves power), 1=enable (for kernel debugging only).
3184NMI_WATCHDOG=0
3185
3186# Change CPU voltages aka "undervolting" - Kernel with PHC patch required.
3187# Frequency voltage pairs are written to:
3188# /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
3189# CAUTION: only use this, if you thoroughly understand what you are doing!
3190#PHC_CONTROLS="F:V F:V F:V F:V"
3191
3192# Set CPU performance versus energy savings policy:
3193# performance, balance-performance, default, balance-power, power.
3194# Values are given in order of increasing power saving.
3195# Requires kernel module msr and x86_energy_perf_policy from linux-tools.
3196ENERGY_PERF_POLICY_ON_AC=performance
3197ENERGY_PERF_POLICY_ON_BAT=balance-power
3198
3199# Disk devices; separate multiple devices with spaces (default: sda).
3200# Devices can be specified by disk ID also (lookup with: tlp diskid).
3201DISK_DEVICES="sda sdb"
3202
3203# Disk advanced power management level: 1..254, 255 (max saving, min, off).
3204# Levels 1..127 may spin down the disk; 255 allowable on most drives.
3205# Separate values for multiple disks with spaces. Use the special value 'keep'
3206# to keep the hardware default for the particular disk.
3207DISK_APM_LEVEL_ON_AC="254 254"
3208DISK_APM_LEVEL_ON_BAT="128 128"
3209
3210# Hard disk spin down timeout:
3211# 0: spin down disabled
3212# 1..240: timeouts from 5s to 20min (in units of 5s)
3213# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
3214# See 'man hdparm' for details.
3215# Separate values for multiple disks with spaces. Use the special value 'keep'
3216# to keep the hardware default for the particular disk.
3217#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
3218#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
3219
3220# Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq).
3221# Separate values for multiple disks with spaces. Use the special value 'keep'
3222# to keep the kernel default scheduler for the particular disk.
3223#DISK_IOSCHED="cfq cfq"
3224
3225# AHCI link power management (ALPM) for disk devices:
3226# min_power, med_power_with_dipm(*), medium_power, max_performance.
3227# (*) Kernel >= 4.15 required, then recommended.
3228# Multiple values separated with spaces are tried sequentially until success.
3229SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
3230SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
3231
3232# Exclude host devices from AHCI link power management.
3233# Separate multiple hosts with spaces.
3234#SATA_LINKPWR_BLACKLIST="host1"
3235
3236# Runtime Power Management for AHCI host and disks devices:
3237# on=disable, auto=enable.
3238# EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss.
3239#AHCI_RUNTIME_PM_ON_AC=on
3240#AHCI_RUNTIME_PM_ON_BAT=on
3241
3242# Seconds of inactivity before disk is suspended.
3243AHCI_RUNTIME_PM_TIMEOUT=15
3244
3245# PCI Express Active State Power Management (PCIe ASPM):
3246# default, performance, powersave.
3247PCIE_ASPM_ON_AC=performance
3248PCIE_ASPM_ON_BAT=powersave
3249
3250# Radeon graphics clock speed (profile method): low, mid, high, auto, default;
3251# auto = mid on BAT, high on AC; default = use hardware defaults.
3252RADEON_POWER_PROFILE_ON_AC=high
3253RADEON_POWER_PROFILE_ON_BAT=low
3254
3255# Radeon dynamic power management method (DPM): battery, performance.
3256RADEON_DPM_STATE_ON_AC=performance
3257RADEON_DPM_STATE_ON_BAT=battery
3258
3259# Radeon DPM performance level: auto, low, high; auto is recommended.
3260RADEON_DPM_PERF_LEVEL_ON_AC=auto
3261RADEON_DPM_PERF_LEVEL_ON_BAT=auto
3262
3263# WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
3264WIFI_PWR_ON_AC=off
3265WIFI_PWR_ON_BAT=on
3266
3267# Disable wake on LAN: Y/N.
3268WOL_DISABLE=Y
3269
3270# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
3271# A value of 0 disables, >=1 enables power saving (recommended: 1).
3272SOUND_POWER_SAVE_ON_AC=0
3273SOUND_POWER_SAVE_ON_BAT=0
3274
3275# Disable controller too (HDA only): Y/N.
3276SOUND_POWER_SAVE_CONTROLLER=N
3277
3278# Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
3279# Drive can be powered on again by releasing (and reinserting) the eject lever
3280# or by pressing the disc eject button on newer models.
3281# Note: an UltraBay/MediaBay hard disk is never powered off.
3282BAY_POWEROFF_ON_AC=0
3283BAY_POWEROFF_ON_BAT=0
3284# Optical drive device to power off (default sr0).
3285BAY_DEVICE="sr0"
3286
3287# Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable.
3288RUNTIME_PM_ON_AC=on
3289RUNTIME_PM_ON_BAT=auto
3290
3291# Exclude PCI(e) device adresses the following list from Runtime PM
3292# (separate with spaces). Use lspci to get the adresses (1st column).
3293#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
3294RUNTIME_PM_BLACKLIST="01:00.0"
3295
3296# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
3297# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
3298# prevents accidential power-on of dGPU in hybrid graphics setups.
3299# Use "" to disable the feature completely.
3300# Separate multiple drivers with spaces.
3301#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
3302
3303# Set to 0 to disable, 1 to enable USB autosuspend feature.
3304USB_AUTOSUSPEND=1
3305
3306# Exclude listed devices from USB autosuspend (separate with spaces).
3307# Use lsusb to get the ids.
3308# Note: input devices (usbhid) are excluded automatically
3309#USB_BLACKLIST="1111:2222 3333:4444"
3310
3311# Bluetooth devices are excluded from USB autosuspend:
3312# 0=do not exclude, 1=exclude.
3313USB_BLACKLIST_BTUSB=0
3314
3315# Phone devices are excluded from USB autosuspend:
3316# 0=do not exclude, 1=exclude (enable charging).
3317USB_BLACKLIST_PHONE=0
3318
3319# Printers are excluded from USB autosuspend:
3320# 0=do not exclude, 1=exclude.
3321USB_BLACKLIST_PRINTER=1
3322
3323# WWAN devices are excluded from USB autosuspend:
3324# 0=do not exclude, 1=exclude.
3325USB_BLACKLIST_WWAN=1
3326
3327# Include listed devices into USB autosuspend even if already excluded
3328# by the blacklists above (separate with spaces).
3329# Use lsusb to get the ids.
3330#USB_WHITELIST="1111:2222 3333:4444"
3331
3332# Set to 1 to disable autosuspend before shutdown, 0 to do nothing
3333# (workaround for USB devices that cause shutdown problems).
3334#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
3335
3336# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
3337# on system startup: 0=disable, 1=enable.
3338# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
3339# are ignored when this is enabled!
3340#RESTORE_DEVICE_STATE_ON_STARTUP=0
3341RESTORE_DEVICE_STATE_ON_STARTUP=1
3342
3343# Radio devices to disable on startup: bluetooth, wifi, wwan.
3344# Separate multiple devices with spaces.
3345#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
3346
3347# Radio devices to enable on startup: bluetooth, wifi, wwan.
3348# Separate multiple devices with spaces.
3349#DEVICES_TO_ENABLE_ON_STARTUP="wifi"
3350
3351# Radio devices to disable on shutdown: bluetooth, wifi, wwan.
3352# (workaround for devices that are blocking shutdown).
3353#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
3354
3355# Radio devices to enable on shutdown: bluetooth, wifi, wwan.
3356# (to prevent other operating systems from missing radios).
3357#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
3358
3359# Radio devices to enable on AC: bluetooth, wifi, wwan.
3360#DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
3361
3362# Radio devices to disable on battery: bluetooth, wifi, wwan.
3363#DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
3364
3365# Radio devices to disable on battery when not in use (not connected):
3366# bluetooth, wifi, wwan.
3367#DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
3368
3369# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
3370# required). Charging starts when the remaining capacity falls below the
3371# START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
3372# Main / Internal battery (values in %)
3373#START_CHARGE_THRESH_BAT0=75
3374#STOP_CHARGE_THRESH_BAT0=80
3375# Ultrabay / Slice / Replaceable battery (values in %)
3376#START_CHARGE_THRESH_BAT1=75
3377#STOP_CHARGE_THRESH_BAT1=80
3378
3379# Restore charge thresholds when AC is unplugged: 0=disable, 1=enable.
3380#RESTORE_THRESHOLDS_ON_BAT=1
3381
3382# ------------------------------------------------------------------------------
3383# tlp-rdw - Parameters for the radio device wizard
3384# Possible devices: bluetooth, wifi, wwan.
3385
3386# Hints:
3387# - Parameters are disabled by default, remove the leading # to enable them
3388# - Separate multiple radio devices with spaces
3389
3390# Radio devices to disable on connect.
3391#DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
3392#DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
3393#DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
3394
3395# Radio devices to enable on disconnect.
3396#DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
3397#DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
3398#DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
3399
3400# Radio devices to enable/disable when docked.
3401#DEVICES_TO_ENABLE_ON_DOCK=""
3402#DEVICES_TO_DISABLE_ON_DOCK=""
3403
3404# Radio devices to enable/disable when undocked.
3405#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
3406#DEVICES_TO_DISABLE_ON_UNDOCK=""
3407#+end_src
3408
3409** X
3410
3411*** xprofile
3412:PROPERTIES:
3413:header-args+: :tangle ~/.xprofile
3414:END:
3415
3416=~/.xprofile= is similar in style to =~/.xinitrc=, but on the
3417contrary, it's automatically sourced by LightDM, my display manager of
3418choice.
3419
3420#+begin_src sh :tangle no
3421xset -b # disable bell
3422xset r rate 200 45 # repeat delay (ms) and rate (repeats/sec)
3423
3424# setxkbmap -option compose:ralt
3425
3426setxkbmap -option ctrl:nocaps # turn capslock into control
3427setxkbmap -option altwin:swap_alt_win # swap alt and super
3428
3429if [ $(hostname) = "plasma" ]
3430then
3431 setxkbmap -option ctrl:rctrl_ralt # turn right control into right alt
3432fi
3433
3434if [ $(hostname) = "enigma" ]
3435then
3436 xmodmap -e "keycode 135 = Alt_R" # remap menu key to alt
3437fi
3438
3439light -Scrs "intel_backlight" 2
3440
3441source $HOME/.zprofile
3442
3443export _JAVA_AWT_WM_NONREPARENTING=1
3444export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
3445
3446if [ $(hostname) = "plasma" ]
3447then
3448 unlock-def-gk.py &
3449fi
3450
3451bspwm &
3452#+end_src
3453
3454*** X resources
3455
3456**** Xresources
3457:PROPERTIES:
3458:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources")
3459:END:
3460
3461#+begin_src conf-xdefaults
3462#include ".Xresources.d/fonts"
3463! #include ".Xresources.d/colors"
3464#include ".Xresources.d/emacs"
3465#include ".Xresources.d/rxvt-unicode"
3466#+end_src
3467
3468**** Xresources.d
3469
3470***** fonts
3471:PROPERTIES:
3472:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/fonts")
3473:END:
3474
3475#+begin_src conf-xdefaults
3476Xft.lcdfilter: lcddefault
3477Xft.antialias: true
3478Xft.autohint: 0
3479Xft.hinting: true
3480Xft.hintstyle: hintslight
3481! Xft.hintstyle: hintfull
3482Xft.rgba: rgb
3483Xft.dpi: 96
3484#+end_src
3485
3486***** colors
3487:PROPERTIES:
3488:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/colors")
3489:END:
3490
3491#+begin_src conf-xdefaults :tangle no
3492#include "gruvbox-light.xresources"
3493! #include "gruvbox-dark.xresources"
3494#include "gruvbox-urxvt256.xresources"
3495#+end_src
3496
3497#+begin_src conf-xdefaults :tangle no
3498! -----------------------------------------------------------------------------
3499! File: gruvbox-light.xresources
3500! Description: Retro groove colorscheme generalized
3501! Author: morhetz <morhetz@gmail.com>
3502! Source: https://github.com/morhetz/gruvbox-generalized
3503! Last Modified: 6 Sep 2014
3504! -----------------------------------------------------------------------------
3505
3506! hard contrast: *background: #f9f5d7
3507*background: #fbf1c7
3508! soft contrast: *background: #f2e5bc
3509*foreground: #3c3836
3510! Black + DarkGrey
3511*color0: #fdf4c1
3512*color8: #928374
3513! DarkRed + Red
3514*color1: #cc241d
3515*color9: #9d0006
3516! DarkGreen + Green
3517*color2: #98971a
3518*color10: #79740e
3519! DarkYellow + Yellow
3520*color3: #d79921
3521*color11: #b57614
3522! DarkBlue + Blue
3523*color4: #458588
3524*color12: #076678
3525! DarkMagenta + Magenta
3526*color5: #b16286
3527*color13: #8f3f71
3528! DarkCyan + Cyan
3529*color6: #689d6a
3530*color14: #427b58
3531! LightGrey + White
3532*color7: #7c6f64
3533*color15: #3c3836
3534#+end_src
3535
3536#+begin_src conf-xdefaults :tangle no
3537! -----------------------------------------------------------------------------
3538! File: gruvbox-dark.xresources
3539! Description: Retro groove colorscheme generalized
3540! Author: morhetz <morhetz@gmail.com>
3541! Source: https://github.com/morhetz/gruvbox-generalized
3542! Last Modified: 6 Sep 2014
3543! -----------------------------------------------------------------------------
3544
3545! hard contrast: *background: #1d2021
3546*background: #282828
3547! soft contrast: *background: #32302f
3548*foreground: #ebdbb2
3549! Black + DarkGrey
3550*color0: #282828
3551*color8: #928374
3552! DarkRed + Red
3553*color1: #cc241d
3554*color9: #fb4934
3555! DarkGreen + Green
3556*color2: #98971a
3557*color10: #b8bb26
3558! DarkYellow + Yellow
3559*color3: #d79921
3560*color11: #fabd2f
3561! DarkBlue + Blue
3562*color4: #458588
3563*color12: #83a598
3564! DarkMagenta + Magenta
3565*color5: #b16286
3566*color13: #d3869b
3567! DarkCyan + Cyan
3568*color6: #689d6a
3569*color14: #8ec07c
3570! LightGrey + White
3571*color7: #a89984
3572*color15: #ebdbb2
3573#+end_src
3574
3575#+begin_src conf-xdefaults :tangle no
3576! -----------------------------------------------------------------------------
3577! File: gruvbox-urxvt256.xresources
3578! Description: Retro groove colorscheme generalized
3579! Author: morhetz <morhetz@gmail.com>
3580! Source: https://github.com/morhetz/gruvbox-generalized
3581! Last Modified: 13 Dec 2013
3582! -----------------------------------------------------------------------------
3583
3584URxvt.color24: #076678
3585URxvt.color66: #427b58
3586URxvt.color88: #9d0006
3587URxvt.color96: #8f3f71
3588URxvt.color100: #79740e
3589URxvt.color108: #8ec07c
3590URxvt.color109: #83a598
3591URxvt.color130: #af3a03
3592URxvt.color136: #b57614
3593URxvt.color142: #b8bb26
3594URxvt.color167: #fb4934
3595URxvt.color175: #d3869b
3596URxvt.color208: #fe8019
3597URxvt.color214: #fabd2f
3598URxvt.color223: #ebdbb2
3599URxvt.color228: #f2e5bc
3600URxvt.color229: #fbf1c7
3601URxvt.color230: #f9f5d7
3602URxvt.color234: #1d2021
3603URxvt.color235: #282828
3604URxvt.color236: #32302f
3605URxvt.color237: #3c3836
3606URxvt.color239: #504945
3607URxvt.color241: #665c54
3608URxvt.color243: #7c6f64
3609URxvt.color244: #928374
3610URxvt.color245: #928374
3611URxvt.color246: #a89984
3612URxvt.color248: #bdae93
3613URxvt.color250: #d5c4a1
3614#+end_src
3615
3616***** emacs
3617:PROPERTIES:
3618:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/emacs")
3619:END:
3620
3621#+begin_src conf-xdefaults
3622Emacs.menuBar: off
3623Emacs.toolBar: off
3624Emacs.verticalScrollBars: off
3625Emacs.cursorBlink: off
3626Emacs.FontBackend: xft,x
3627! Emacs.font: Ubuntu Mono-12
3628! Emacs.font: Triplicate T4C-11
3629! Emacs.font: Ubuntu Mono-10.5
3630! Emacs.font: Ubuntu Mono-12
3631! Emacs.font: Iosevka-11
3632
3633! Emacs.font: Fira Mono:size=15
3634! Emacs.font: DejaVu Sans Mono:size=15
3635! Emacs.font: Inconsolata:size=17
3636! Emacs.font: Inconsolata:size=16
3637! Emacs.font: Inconsolata LGC:size=14
3638! Emacs.font: Source Code Pro Medium-10.5
3639Emacs.font: Source Code Pro:size=14
3640! Emacs.font: Ubuntu Mono:size=16
3641! Emacs.font: Iosevka:size=16
3642#+end_src
3643
3644***** rxvt-unicode
3645:PROPERTIES:
3646:header-args+: :tangle (when (eq system-type 'gnu/linux) "~/.Xresources.d/rxvt-unicode")
3647:END:
3648
3649#+begin_src conf-xdefaults
3650! Font
3651URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
3652URxvt.boldFont: xft:source code pro semibold:pixelsize=14:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
3653URxvt.italicFont: xft:source code pro italic:pixelsize=14:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
3654URxvt.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
3655
3656URxvt.xftAntialias: true
3657URxvt.letterSpace: 0
3658
3659URxvt.depth: 0
3660URxvt.loginShell: true
3661URxvt.saveLines: 100000
3662URxvt.internalBorder: 3
3663URxvt.lineSpace: 0
3664URxvt.scrollBar: false
3665URxvt.scrollStyle: rxvt
3666URxvt*scrollTtyOutput: false
3667URxvt*scrollWithBuffer: true
3668URxvt*scrollTtyKeypress: true
3669URxvt.keysym.Shift-Up: command:\033]720;1\007
3670URxvt.keysym.Shift-Down: command:\033]721;1\007
3671
3672URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
3673URxvt.url-select.launcher: firefox
3674URxvt.url-select.underline: true
3675URxvt.keysym.M-u: perl:url-select:select_next
3676URxvt.keysym.M-Escape: perl:keyboard-select:activate
3677URxvt.keysym.M-s: perl:keyboard-select:search
3678URxvt.url-launcher: /usr/bin/firefox
3679URxvt.matcher.button: 1
3680URxvt.iso14755: false
3681URxvt.iso14755_53: false
3682URxvt.keysym.M-c: perl:clipboard:copy
3683URxvt.keysym.M-v: perl:clipboard:paste
3684URxvt.keysym.C-A-V: perl:clipboard:paste_escaped
3685URxvt.keysym.C-Up: font-size:increase
3686URxvt.keysym.C-Down: font-size:decrease
3687URxvt.keysym.C-S-Up: font-size:incglobal
3688URxvt.keysym.C-S-Down: font-size:decglobal
3689URxvt.keysym.C-equal: font-size:reset
3690!URxvt.keysym.C-question: font-size:show
3691
3692URxvt.iconFile: /usr/share/icons/Paper/48x48/apps/utilities-terminal.png
3693
3694!urxvt*foreground: white
3695!urxvt*background: black
3696
3697!*color0: #2E3436
3698!*color1: #a40000
3699!*color2: #4E9A06
3700!*color3: #C4A000
3701!*color4: #3465A4
3702!*color5: #75507B
3703!*color6: #ce5c00
3704!*color7: #babdb9
3705!*color8: #555753
3706!*color9: #EF2929
3707!*color10: #8AE234
3708!*color11: #FCE94F
3709!*color12: #729FCF
3710!*color13: #AD7FA8
3711!*color14: #fcaf3e
3712!*color15: #EEEEEC
3713
3714!URxvt.foreground: #C8C8C8
3715!URxvt.background: #FFFFFF
3716
3717!! black
3718!*color0: #2E3436
3719!*color8: #555753
3720!! red
3721!*color1: #a40000
3722!*color9: #EF2929
3723!! green
3724!*color2: #4E9A06
3725!*color10: #8AE234
3726!! yellow
3727!*color3: #C4A000
3728!*color11: #FCE94F
3729!! blue
3730!*color4: #3465A4
3731!*color12: #729FCF
3732!! purple
3733!*color5: #75507B
3734!*color13: #AD7FA8
3735!! orange (replaces cyan)
3736!*color6: #ce5c00
3737!*color14: #fcaf3e
3738!! white
3739!*color7: #babdb9
3740!*color15: #EEEEEC
3741
3742! Tango colour theme for rxvt-unicode
3743URxvt.background: #FFFFFF
3744URxvt.foreground: #000000
3745
3746! Black
3747URxvt.color0: #2E3436
3748URxvt.color8: #757773
3749
3750! Red
3751URxvt.color1: #CC0000
3752URxvt.color9: #EF2929
3753
3754! Green
3755URxvt.color2: #4E9A06
3756URxvt.color10: #8AE234
3757
3758! Yellow
3759URxvt.color3: #C4A000
3760URxvt.color11: #FCE94F
3761
3762! Blue
3763URxvt.color4: #3465A4
3764URxvt.color12: #729FCF
3765
3766! Magenta
3767URxvt.color5: #75507B
3768URxvt.color13: #AD7FA8
3769
3770!! Cyan
3771!URxvt.color6: #06989A
3772!URxvt.color14: #34E2E2
3773! orange (replaces cyan)
3774,*color6: #ce5c00
3775,*color14: #fcaf3e
3776
3777! White
3778URxvt.color7: #D3D7CF
3779URxvt.color15: #EEEEEC
3780#+end_src
3781
3782*** xkb us_ab keyboard layout
3783
3784#+begin_src conf :tangle "/sudo::/usr/share/X11/xkb/symbols/us_ab" :comments none
3785default partial alphanumeric_keys
3786xkb_symbols "us_ab" {
3787 include "us(basic)"
3788 name[Group1]= "English (US)(aminb)";
3789
3790 key <MENU> { [ Alt_R ] };
3791};
3792#+end_src
3793
3794** XDG
3795:PROPERTIES:
3796:header-args+: :tangle ~/.config/user-dirs.dirs
3797:END:
3798
3799#+begin_src conf
3800XDG_DESKTOP_DIR="$HOME/Desktop"
3801XDG_DOCUMENTS_DIR="$HOME/usr/docs"
3802XDG_DOWNLOAD_DIR="$HOME/usr/dls"
3803XDG_MUSIC_DIR="$HOME/usr/music"
3804XDG_PICTURES_DIR="$HOME/usr/pics"
3805XDG_PUBLICSHARE_DIR="$HOME/usr/Public"
3806XDG_TEMPLATES_DIR="$HOME/usr/Templates"
3807XDG_VIDEOS_DIR="$HOME/usr/vids"
3808#+end_src
3809
3810** Zathura
3811:PROPERTIES:
3812:header-args+: :tangle ~/.config/zathura/zathurarc
3813:END:
3814
3815#+begin_src conf
3816set smooth-scroll true
3817set selection-clipboard clipboard
3818set zoom-step 05
3819set default-bg "#272727"
3820set statusbar-bg "#272727"
3821set inputbar-bg "#373737"
3822#+end_src
3823
3824** Zsh
3825
3826My zsh setup is built on [[https://github.com/zimfw/zimfw][Zim]]. Further, my zshrc references [[https://github.com/junegunn/fzf][fzf]],
3827[[https://github.com/zsh-users/zsh-autosuggestions][zsh-autosuggestions]], and [[https://github.com/hlissner/zsh-autopair][zsh-autopair]]; so be sure to have them
3828installed.
3829
3830*** zimrc
3831:PROPERTIES:
3832:header-args+: :tangle ~/.zimrc
3833:END:
3834
3835#+begin_src sh
3836
3837
3838#################
3839# CORE SETTINGS #
3840#################
3841
3842#
3843# Zim settings
3844#
3845
3846# Select what modules you would like enabled.
3847# The second line of modules may depend on options set by modules in the first
3848# line. These dependencies are noted on the respective module's README.md.
3849zmodules=(directory environment git git-info history input ssh utility custom \
3850 syntax-highlighting history-substring-search prompt completion)
3851
3852
3853###################
3854# MODULE SETTINGS #
3855###################
3856
3857#
3858# Prompt
3859#
3860
3861# Set your desired prompt here
3862zprompt_theme='pure'
3863#PURE_PROMPT_SYMBOL=λ
3864#PURE_PROMPT_SYMBOL=δ
3865PURE_PROMPT_SYMBOL=➜
3866
3867#
3868# Completion
3869#
3870
3871# set an optional host-specific filename for the completion cache file
3872# if none is provided, the default '.zcompdump' is used.
3873#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
3874
3875#
3876# Utility
3877#
3878
3879# Uncomment to enable command correction prompts
3880# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
3881setopt CORRECT
3882
3883#
3884# Environment
3885#
3886
3887# Set the string below to the desired terminal title format string.
3888# The terminal title is redrawn upon directory change, however, variables like
3889# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
3890# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
3891# The example below uses the following format: 'username@host:/current/directory'
3892ztermtitle='%n@%m:%~'
3893
3894#
3895# Input
3896#
3897
3898# Uncomment to enable double-dot expansion.
3899# This appends '../' to your input for each '.' you type after an initial '..'
3900#zdouble_dot_expand='true'
3901
3902#
3903# Syntax-Highlighting
3904#
3905
3906# This determines what highlighters will be used with the syntax-highlighting module.
3907# Documentation of the highlighters can be found here:
3908# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
3909# For (u)rxvt, termite and gnome-terminal users,
3910# removing the 'cursor' highlighter will fix the disappearing cursor problem
3911#zhighlighters=(main brackets cursor)
3912zhighlighters=(main brackets pattern)
3913
3914
3915#
3916# SSH
3917#
3918
3919# Load these ssh identities with the ssh module
3920zssh_ids=(id_ed25519_bandali)
3921
3922
3923#
3924# Pacman
3925#
3926
3927# Set (optional) pacman front-end.
3928zpacman_frontend='yay'
3929
3930# Load any helper scripts as defined here
3931#zpacman_helper=(aur)
3932#+end_src
3933
3934*** zlogin
3935:PROPERTIES:
3936:header-args+: :tangle ~/.zlogin
3937:END:
3938
3939#+begin_src sh
3940
3941
3942#
3943# User configuration sourced by login shells
3944#
3945
3946# Initialize zim
3947[[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh
3948#+end_src
3949
3950*** zprofile
3951:PROPERTIES:
3952:header-args+: :tangle ~/.zprofile
3953:END:
3954
3955#+begin_src sh
3956#PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
3957#PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
3958export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$HOME/.elan/bin:$PATH
3959export XDG_CONFIG_HOME=$HOME/.config
3960export XDG_DATA_HOME=$HOME/.local/share
3961export XDG_DATA_DIRS=/usr/local/share:/usr/share
3962export MAILDIR="$HOME/mail"
3963export CVS_RSH=ssh
3964#export MATHMODELS=$HOME/src/eiffel/mathmodels
3965#export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
3966#export PATH=$PATH:$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
3967
3968# Eiffel2Java stuff
3969#export JAVA_HOME=/usr/lib/jvm/default
3970#export CPATH=$CPATH:"$JAVA_HOME/include:$JAVA_HOME/include/linux"
3971#export LIBRARY_PATH=$LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
3972#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$JAVA_HOME/jre/lib/amd64/server"
3973
3974#export PATH="$HOME/usr/build/pvs:$PATH"
3975#export SBCLISP_HOME=/usr/share/sbcl-source
3976#export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
3977
3978export MOZ_USE_XINPUT2=1 # precise scrolling in firefox
3979
3980#export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
3981#export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
3982
3983export NIXPKGS=$HOME/src/git/nixpkgs
3984
3985if [ -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
3986
3987export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
3988export PATH="/$HOME/.config/guix/current/bin${PATH:+:}$PATH"
3989export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
3990export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
3991export GIT_SSL_CAINFO="$SSL_CERT_FILE"
3992#+end_src
3993
3994*** zshenv
3995:PROPERTIES:
3996:header-args+: :tangle ~/.zshenv
3997:END:
3998
3999#+begin_src sh
4000# Ensure that a non-login, non-interactive shell has a defined environment.
4001if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
4002 source "${ZDOTDIR:-$HOME}/.zprofile"
4003fi
4004#+end_src
4005
4006*** zshrc
4007:PROPERTIES:
4008:header-args+: :tangle ~/.zshrc
4009:END:
4010
4011#+begin_src sh
4012# Bash-like navigation
4013#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
4014#export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
4015export WORDCHARS='*?[]~=&;!#$%^(){}<>'
4016#ZLE_SPACE_SUFFIX_CHARS=$'|&'
4017
4018#disable -r time # disable shell reserved word
4019#alias time='time -p' # -p for POSIX output
4020
4021# rehash if last command was pacaur or pacman
4022# (so that zsh picks up changes in $PATH immediately)
4023TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
4024
4025#
4026# User configuration sourced by interactive shells
4027#
4028
4029# Change default zim location
4030export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
4031
4032# Start zim
4033[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
4034
4035ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
4036#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
4037
4038setopt globdots
4039
4040source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
4041# source ~/.zsh/zsh-autopair/autopair.zsh
4042
4043
4044### fzf ###
4045
4046source /usr/share/fzf/key-bindings.zsh
4047source /usr/share/fzf/completion.zsh
4048
4049# Accept history selection instead of putting it on
4050# the command line
4051fzf-history-widget-accept() {
4052 fzf-history-widget
4053 zle accept-line
4054}
4055#zle -N fzf-history-widget-accept
4056#bindkey '^R' fzf-history-widget-accept
4057
4058# alt+c preview
4059export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
4060
4061### fzf ###
4062
4063
4064# aliases
4065alias mpv="mpv --ytdl-format mp4"
4066alias mv="mv -iv"
4067alias cp="cp -iv"
4068alias scl=systemctl
4069alias jcl=journalctl
4070alias m="mbsync uwaterloo; mbsync amin"
4071alias best="youtube-dl -f best"
4072alias sd="ssh deb"
4073alias sf="ssh fp"
4074alias sn="ssh nix"
4075
4076aur() {
4077 cd ~/usr/build
4078 git clone https://aur.archlinux.org/${1}.git
4079 cd ${1}
4080}
4081
4082# i-beam cursor
4083echo -e "\033[5 q"
4084#echo -e "\033[6 q"
4085#+end_src
4086
4087* Scripts
4088
4089This section contains various useful scripts and the ones used by the
4090programs above. For instance, =toggle-tablet= for switching to and
4091from tablet mode on my X220T, =toggle-presentation-mode= for toggling
4092Xfce's presentation mode which keeps the screen awake, and
4093=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
4094exact brightness value.
4095
4096** battery-percentage-time
4097:PROPERTIES:
4098:header-args+: :tangle ~/.local/bin/battery-percentage-time :shebang "#!/bin/sh"
4099:END:
4100
4101#+begin_src sh :tangle no
4102dbus_send() {
4103 label=$1
4104 dbus-send --print-reply=literal --system \
4105 --dest=org.freedesktop.UPower \
4106 /org/freedesktop/UPower/devices/battery_BAT0 \
4107 org.freedesktop.DBus.Properties.Get \
4108 string:org.freedesktop.UPower.Device \
4109 string:"${label}" | awk '{print $3}'
4110}
4111
4112perc=$(dbus_send 'Percentage')
4113state=$(dbus_send 'State')
4114
4115if [ "$state" -eq 2 ]; then # Discharging
4116 secs=$(dbus_send 'TimeToEmpty')
4117elif [ "$state" -eq 1 ]; then # Charging
4118 secs=$(dbus_send 'TimeToFull')
4119fi
4120
4121printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
4122#+end_src
4123
4124** my-i3status.py
4125:PROPERTIES:
4126:header-args+: :tangle ~/.local/bin/my-i3status.py :shebang "#!/usr/bin/env python2"
4127:END:
4128
4129#+begin_src python :comments none
4130# -*- coding: utf-8 -*-
4131
4132# This script is a simple wrapper which prefixes each i3status line with custom
4133# information. It is based on:
4134# https://github.com/i3/i3status/blob/master/contrib/wrapper.py
4135#
4136# In ~/.i3status.conf, add the following line:
4137# output_format = "i3bar"
4138# in the 'general' section.
4139# Then, in ~/.config/i3/config or ~/.config/sway/config add:
4140# status_command i3status | my-i3status.py
4141# in the 'bar' section. Make sure my-i3status.py is in $PATH.
4142#
4143# © 2012 Valentin Haenel <valentin.haenel@gmx.de>
4144# © 2018 Amin Bandali <bandali@gnu.org>
4145#
4146# This program is free software. It comes without any warranty, to the extent
4147# permitted by applicable law. You can redistribute it and/or modify it under
4148# the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
4149# 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
4150# details.
4151
4152import sys
4153import json
4154import os
4155
4156def get_nosleep():
4157 """ Return true if ~/.nosleep exists. """
4158 return os.path.isfile(os.path.expanduser("~/.nosleep"))
4159
4160def print_line(message):
4161 """ Non-buffered printing to stdout. """
4162 sys.stdout.write(message + '\n')
4163 sys.stdout.flush()
4164
4165def read_line():
4166 """ Interrupted respecting reader for stdin. """
4167 # try reading a line, removing any extra whitespace
4168 try:
4169 line = sys.stdin.readline().strip()
4170 # i3status sends EOF, or an empty line
4171 if not line:
4172 sys.exit(3)
4173 return line
4174 # exit on ctrl-c
4175 except KeyboardInterrupt:
4176 sys.exit()
4177
4178if __name__ == '__main__':
4179 # Skip the first line which contains the version header.
4180 print_line(read_line())
4181
4182 # The second line contains the start of the infinite array.
4183 print_line(read_line())
4184
4185 while True:
4186 line, prefix = read_line(), ''
4187 # ignore comma at start of lines
4188 if line.startswith(','):
4189 line, prefix = line[1:], ','
4190
4191 if get_nosleep():
4192 j = json.loads(line)
4193 # insert information into the start of the json, but could be anywhere
4194 j.insert(0, {'full_text' : '🖵 ', 'name' : 'nosleep'})
4195 # and echo back new encoded json
4196 print_line(prefix+json.dumps(j))
4197 else:
4198 print_line(prefix+line)
4199#+end_src
4200
4201** rofi-light
4202:PROPERTIES:
4203:header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
4204:END:
4205
4206#+begin_src bash
4207cur=$(light -G)
4208val=$(rofi -dmenu -mesg "light $cur" -p "light -S " -l 0 -width 12)
4209[ -n "$val" ] && light -S $val
4210#+end_src
4211
4212** rofi-remmina.py
4213:PROPERTIES:
4214:header-args+: :tangle ~/.local/bin/rofi-remmina.py :shebang "#!/usr/bin/env python2"
4215:END:
4216
4217#+begin_src python
4218import ConfigParser
4219import os
4220from subprocess import Popen, PIPE
4221
4222remmina_dir = os.path.expanduser("~/.local/share/remmina")
4223
4224fdict = dict()
4225
4226for f in os.listdir(remmina_dir):
4227 fp = os.path.join(remmina_dir, f)
4228 c = ConfigParser.ConfigParser()
4229 c.read(fp)
4230 n = c.get('remmina', 'name')
4231 fdict[n] = fp
4232
4233lines = max(min(15, len(fdict)), 1);
4234width = len(max(fdict.keys(), key=len))
4235rofi = Popen(["rofi", "-i", "-dmenu", \
4236 "-l", str(lines), "-width", str(width), \
4237 "-p", "connection"], stdout=PIPE, stdin=PIPE)
4238selected = rofi.communicate("\n" \
4239 .join(fdict.keys()) \
4240 .encode("utf-8"))[0] \
4241 .decode("utf-8") \
4242 .strip()
4243rofi.wait()
4244
4245r = Popen(["remmina", "-c", fdict[selected]])
4246r.wait()
4247#+end_src
4248
4249** s (run sway)
4250:PROPERTIES:
4251:header-args+: :tangle ~/.local/bin/s :shebang "#!/bin/bash"
4252:END:
4253
4254#+begin_src bash
4255export _JAVA_AWT_WM_NONREPARENTING=1
4256export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
4257light -Nr 2
4258source $HOME/.zprofile
4259sway
4260#+end_src
4261
4262** sway-ws-util
4263:PROPERTIES:
4264:header-args+: :tangle ~/.local/bin/sway-ws-util :shebang "#!/bin/bash"
4265:END:
4266
4267#+begin_src bash
4268curr_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused==true).name')
4269[[ $curr_ws -eq 1 ]] && prev_ws=10 || prev_ws=$((curr_ws-1))
4270[[ $curr_ws -eq 10 ]] && next_ws=1 || next_ws=$((curr_ws+1))
4271dest_ws=-1
4272op=-1
4273
4274if [ "$1" = "switch" ] || [ "$1" = "move" ]; then
4275 op="$1"
4276 if [ "$2" = "prev" ]; then
4277 dest_ws="$prev_ws"
4278 elif [ "$2" = "next" ]; then
4279 dest_ws="$next_ws"
4280 else
4281 echo "Usage: $0 $1 {prev|next} [follow]"
4282 exit 1
4283 fi
4284else
4285 echo "Usage: $0 {switch|move} {prev|next} [follow]"
4286 exit 1
4287fi
4288
4289if [ "$op" = "switch" ]; then
4290 sway workspace "$dest_ws"
4291elif [ "$op" = "move" ]; then
4292 sway move container to workspace "$dest_ws"
4293 if [ "$3" = "follow" ]; then
4294 sway workspace "$dest_ws"
4295 fi
4296fi
4297#+end_src
4298
4299** toggle-layout
4300:PROPERTIES:
4301:header-args+: :tangle ~/.local/bin/toggle-layout :shebang "#!/bin/bash"
4302:END:
4303
4304#+begin_src bash :tangle no
4305lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"
4306
4307if [ "$lang" = "us" ]; then
4308 setxkbmap ir
4309else
4310 setxkbmap us
4311 # xmodmap $HOME/.Xmodmap
4312fi
4313#+end_src
4314
4315** toggle-presentation-mode
4316:PROPERTIES:
4317:header-args+: :tangle ~/.local/bin/toggle-presentation-mode :shebang "#!/bin/bash"
4318:END:
4319
4320#+begin_src bash :tangle no
4321xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
4322#+end_src
4323
4324** toggle-tablet
4325:PROPERTIES:
4326:header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash"
4327:END:
4328
4329This script toggles between a 'normal' mode and a 'tablet' mode, doing
4330a few things:
4331
4332- rotates the screen using =xrandr=, so that rotating the physical
4333 display of my X220t would have the laptop's battery on the right
4334 hand side,
4335- enables touch screen,
4336- properly rotates the stylus pen and touch screen pointers, and
4337- toggles between RGB and Vertical BGR sub-pixel order.
4338
4339#+begin_src bash :tangle no
4340case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
4341 0) # Screen is not rotated, we should rotate it right (90°)
4342 xrandr -o 3
4343 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
4344 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
4345 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
4346 xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
4347 ;;
4348 1) # Currently top is rotated right, we should set it normal (0°)
4349 xrandr -o 0
4350 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
4351 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
4352 xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
4353 xfconf-query -c xsettings -p /Xft/RGBA -s rgb
4354 ;;
4355 *)
4356 echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
4357 exit 1
4358 ;;
4359esac
4360#+end_src
4361
4362** unlock-def-gk.py
4363:PROPERTIES:
4364:header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"
4365:END:
4366
4367#+begin_src python :tangle no
4368import gnomekeyring as gk
4369# list_item_ids_sync('login')[0] == 1L
4370gk.unlock_sync('Default_keyring',gk.item_get_info_sync('login',1L).get_secret())
4371#+end_src
4372
4373** volume-info
4374:PROPERTIES:
4375:header-args+: :tangle ~/.local/bin/volume-info :shebang "#!/bin/sh"
4376:END:
4377
4378#+begin_src sh :tangle no
4379cur_vol=$(pamixer --get-volume)
4380
4381if [ $(pamixer --get-mute) = true ]; then
4382 printf 'mt \n' "$cur_vol"
4383else
4384 printf '%02d \n' "$cur_vol"
4385fi
4386#+end_src
4387
4388** wp
4389
4390My little wallpaper changer script.
4391
4392*** wp
4393:PROPERTIES:
4394:header-args+: :tangle ~/.local/bin/wp :shebang "#!/bin/bash"
4395:END:
4396
4397#+begin_src bash :tangle no
4398export DISPLAY=:0
4399
4400case "$1" in
4401 "day")
4402 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4403 ;;
4404 "night")
4405 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4406 ;;
4407 *)
4408 echo $"Usage: $0 {day|night}"
4409 exit 1
4410esac
4411#+end_src
4412
4413*** wp-auto
4414:PROPERTIES:
4415:header-args+: :tangle ~/.local/bin/wp-auto :shebang "#!/bin/bash"
4416:END:
4417
4418#+begin_src bash :tangle no
4419SED=$(which sed)
4420ROFI=$(which rofi)
4421
4422export DISPLAY=:0
4423HOUR=$(date +%H)
4424
4425if [ -z "${SED}" ]
4426then
4427 echo "Did not find 'sed', script cannot continue."
4428 exit 1
4429fi
4430if [ -z "${ROFI}" ]
4431then
4432 echo "Did not find rofi, there is no point to continue."
4433 exit 1
4434fi
4435
4436###
4437# Create if not exists, then removes #include of .theme file (if present) and add the selected theme to the end.
4438# Repeated calls should leave the config clean-ish
4439###
4440function set_theme()
4441{
4442 CDIR="${HOME}/.config/rofi/"
4443 if [ ! -d "${CDIR}" ]
4444 then
4445 mkdir -p ${CDIR}
4446 fi
4447 if [ -f "${CDIR}/config" ]
4448 then
4449 ${SED} -i "/rofi\.theme: .*\.rasi$/d" "${CDIR}/config"
4450 fi
4451 echo "rofi.theme: ${1}" >> "${CDIR}/config"
4452
4453}
4454
4455if [ "$HOUR" -gt "19" ] || [ "$HOUR" -lt "7" ]
4456 then
4457 feh --bg-scale $HOME/usr/pics/island_night_by_arsenixc-d6cz757.jpg
4458 xrdb -merge $HOME/.Xresources.d/gruvbox-dark.xresources
4459 set_theme "/usr/share/rofi/themes//gruvbox-dark.rasi"
4460 else
4461 feh --bg-scale $HOME/usr/pics/island_day_by_arsenixc-d6ctqon.jpg
4462 xrdb -merge $HOME/.Xresources.d/gruvbox-light.xresources
4463 set_theme "/usr/share/rofi/themes//gruvbox-light.rasi"
4464fi
4465#+end_src
4466
4467*** wp.service
4468:PROPERTIES:
4469:header-args+: :tangle ~/.config/systemd/user/wp.service
4470:END:
4471
4472#+begin_src conf :tangle no
4473[Unit]
4474Description=wallpaper service
4475
4476[Service]
4477Type=oneshot
4478ExecStart=/usr/bin/bash -c %h/.local/bin/wp-auto
4479#+end_src
4480
4481*** wp.timer
4482:PROPERTIES:
4483:header-args+: :tangle ~/.config/systemd/user/wp.timer
4484:END:
4485
4486#+begin_src conf :tangle no
4487[Unit]
4488[Unit]
4489Description=wallpaper timer
4490
4491[Timer]
4492OnCalendar=07,21:00
4493Unit=wp.service
4494Persistent=true
4495
4496[Install]
4497WantedBy=timers.target
4498#+end_src
4499
4500** zathura-sync.sh
4501:PROPERTIES:
4502:header-args+: :tangle ~/.local/bin/zathura-sync.sh :shebang "#!/bin/sh"
4503:END:
4504
4505#+begin_src sh
4506pos="$1"
4507pdffile="$2"
4508zathura --synctex-forward "$pos" "$pdffile" || \
4509 (
4510 zathura -x "emacsclient --eval '(progn (switch-to-buffer (file-name-nondirectory \"%{input}\")) (goto-line %{line}))'" "$pdffile" &
4511 sleep 1; zathura --synctex-forward "$pos" "$pdffile" )
4512#+end_src
4513** Fun :)
4514
4515*** eat-em
4516:PROPERTIES:
4517:header-args+: :tangle ~/.local/bin/eat-em :shebang "#!/bin/sh"
4518:END:
4519
4520#+begin_src sh
4521# Original Posted at http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4522# [ESC] character in original post removed here.
4523
4524# ANSI Color -- use these variables to easily have different color
4525# and format output. Make sure to output the reset sequence after
4526# colors (f = foreground, b = background), and use the 'off'
4527# feature for anything you turn on.
4528
4529initializeANSI()
4530{
4531 esc="$(echo -en '\e')"
4532
4533 blackf="${esc}[30m"; redf="${esc}[31m"; greenf="${esc}[32m"
4534 yellowf="${esc}[33m" bluef="${esc}[34m"; purplef="${esc}[35m"
4535 cyanf="${esc}[36m"; whitef="${esc}[37m"
4536
4537 blackb="${esc}[40m"; redb="${esc}[41m"; greenb="${esc}[42m"
4538 yellowb="${esc}[43m" blueb="${esc}[44m"; purpleb="${esc}[45m"
4539 cyanb="${esc}[46m"; whiteb="${esc}[47m"
4540
4541 boldon="${esc}[1m"; boldoff="${esc}[22m"
4542 italicson="${esc}[3m"; italicsoff="${esc}[23m"
4543 ulon="${esc}[4m"; uloff="${esc}[24m"
4544 invon="${esc}[7m"; invoff="${esc}[27m"
4545
4546 reset="${esc}[0m"
4547}
4548
4549# note in this first use that switching colors doesn't require a reset
4550# first - the new color overrides the old one.
4551
4552#clear
4553
4554initializeANSI
4555
4556cat << EOF
4557
4558 ${yellowf} ▄███████▄${reset} ${redf} ▄██████▄${reset} ${greenf} ▄██████▄${reset} ${bluef} ▄██████▄${reset} ${purplef} ▄██████▄${reset} ${cyanf} ▄██████▄${reset}
4559 ${yellowf}▄█████████▀▀${reset} ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄${reset} ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄${reset} ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄${reset} ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄${reset} ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
4560 ${yellowf}███████▀${reset} ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███${reset} ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███${reset} ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███${reset} ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███${reset} ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
4561 ${yellowf}███████▄${reset} ${redf}████████████${reset} ${greenf}████████████${reset} ${bluef}████████████${reset} ${purplef}████████████${reset} ${cyanf}████████████${reset}
4562 ${yellowf}▀█████████▄▄${reset} ${redf}██▀██▀▀██▀██${reset} ${greenf}██▀██▀▀██▀██${reset} ${bluef}██▀██▀▀██▀██${reset} ${purplef}██▀██▀▀██▀██${reset} ${cyanf}██▀██▀▀██▀██${reset}
4563 ${yellowf} ▀███████▀${reset} ${redf}▀ ▀ ▀ ▀${reset} ${greenf}▀ ▀ ▀ ▀${reset} ${bluef}▀ ▀ ▀ ▀${reset} ${purplef}▀ ▀ ▀ ▀${reset} ${cyanf}▀ ▀ ▀ ▀${reset}
4564
4565 ${boldon}${yellowf} ▄███████▄ ${redf} ▄██████▄ ${greenf} ▄██████▄ ${bluef} ▄██████▄ ${purplef} ▄██████▄ ${cyanf} ▄██████▄${reset}
4566 ${boldon}${yellowf}▄█████████▀▀ ${redf}▄${whitef}█▀█${redf}██${whitef}█▀█${redf}██▄ ${greenf}▄${whitef}█▀█${greenf}██${whitef}█▀█${greenf}██▄ ${bluef}▄${whitef}█▀█${bluef}██${whitef}█▀█${bluef}██▄ ${purplef}▄${whitef}█▀█${purplef}██${whitef}█▀█${purplef}██▄ ${cyanf}▄${whitef}█▀█${cyanf}██${whitef}█▀█${cyanf}██▄${reset}
4567 ${boldon}${yellowf}███████▀ ${redf}█${whitef}▄▄█${redf}██${whitef}▄▄█${redf}███ ${greenf}█${whitef}▄▄█${greenf}██${whitef}▄▄█${greenf}███ ${bluef}█${whitef}▄▄█${bluef}██${whitef}▄▄█${bluef}███ ${purplef}█${whitef}▄▄█${purplef}██${whitef}▄▄█${purplef}███ ${cyanf}█${whitef}▄▄█${cyanf}██${whitef}▄▄█${cyanf}███${reset}
4568 ${boldon}${yellowf}███████▄ ${redf}████████████ ${greenf}████████████ ${bluef}████████████ ${purplef}████████████ ${cyanf}████████████${reset}
4569 ${boldon}${yellowf}▀█████████▄▄ ${redf}██▀██▀▀██▀██ ${greenf}██▀██▀▀██▀██ ${bluef}██▀██▀▀██▀██ ${purplef}██▀██▀▀██▀██ ${cyanf}██▀██▀▀██▀██${reset}
4570 ${boldon}${yellowf} ▀███████▀ ${redf}▀ ▀ ▀ ▀ ${greenf}▀ ▀ ▀ ▀ ${bluef}▀ ▀ ▀ ▀ ${purplef}▀ ▀ ▀ ▀ ${cyanf}▀ ▀ ▀ ▀${reset}
4571
4572EOF
4573#+end_src
4574
4575*** invade-em
4576:PROPERTIES:
4577:header-args+: :tangle ~/.local/bin/invade-em :shebang "#!/bin/bash"
4578:END:
4579
4580#+begin_src bash
4581#
4582# ANSI color scheme script featuring Space Invaders
4583#
4584# Original: http://crunchbang.org/forums/viewtopic.php?pid=126921%23p126921#p126921
4585# Modified by lolilolicon
4586#
4587
4588f=3 b=4
4589for j in f b; do
4590 for i in {0..7}; do
4591 printf -v $j$i %b "\e[${!j}${i}m"
4592 done
4593done
4594bld=$'\e[1m'
4595rst=$'\e[0m'
4596
4597cat << EOF
4598
4599 $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4600 $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4601 $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst
4602 $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst
4603
4604 $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst
4605 $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst
4606 $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst
4607 $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst
4608
4609
4610 $f7▌$rst
4611
4612 $f7▌$rst
4613
4614 $f7 ▄█▄ $rst
4615 $f7▄█████████▄$rst
4616 $f7▀▀▀▀▀▀▀▀▀▀▀$rst
4617
4618EOF
4619#+end_src