[retriever]
type = SimplePOP3SSLRetriever
server = fencepost.gnu.org
-username = aminb
+username = bandali
password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg")
port = 995
use_apop = True
#+begin_src conf
[user]
name = Amin Bandali
- email = amin@gnu.org
- signingkey = CDDE75F903538E71813CDA27D1FBA36627D65876
+ email = bandali@gnu.org
+ signingkey = BE6273738E616D6D1B3A08E8A21A020248816103
#+end_src
**** signing
**** send-email
#+begin_src conf
[sendemail]
- smtpuser = aminb
+ smtpuser = bandali
smtpserver = fencepost.gnu.org
smtpserverport = 587
smtpencryption = tls
general {
colors = true
interval = 5
+ output_format = "i3bar"
}
# order += "ipv6"
account gnu
host fencepost.gnu.org
# use `msmtp -a gnu --serverinfo --tls --tls-certcheck=off --tls-fingerprint=` to get the current fingerprint
-tls_fingerprint 28:70:42:76:1C:EC:91:5F:D1:B3:27:A1:CD:3B:32:A4:8B:0B:DC:3A:CD:CA:F6:6F:E4:61:BA:69:D7:4D:0D:0B
+tls_fingerprint 34:60:91:B5:71:5B:76:87:50:F3:83:13:26:0F:EE:75:42:83:93:9A:E2:AF:1E:87:72:02:C9:61:CE:28:1B:8E
tls_starttls on
-from aminb@gnu.org
-user aminb
+from bandali@gnu.org
+user bandali
passwordeval gpg2 --no-tty -q -d ~/.passwd/gnu.gpg
-# gnu (amin)
+# gnu (old)
+account gnu-aminb : gnu
+from aminb@gnu.org
account gnu-amin : gnu
from amin@gnu.org
-
-# gnu (mab)
account gnu-mab : gnu
from mab@gnu.org
[user]
name=Amin Bandali
primary_email=amin@aminb.org
-other_email=amin@gnu.org;abandali@uwaterloo.ca;mab@gnu.org;aminb@gnu.org;
+other_email=bandali@gnu.org;abandali@uwaterloo.ca;
# Configuration for "notmuch new"
#
#+begin_src sh
# apply sent tag to messages sent by me
-notmuch tag -new +sent -- from:amin@aminb.org or from:amin@gnu.org or from:mab@gnu.org or from:aminb@gnu.org or from:abandali@uwaterloo.ca
+notmuch 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
# initial tagging
notmuch tag -latest -- tag:latest
:END:
#+begin_src conf
-rofi.font: Ubuntu Mono 13
+! rofi.font: Ubuntu Mono 13
! rofi.font: Inconsolata 16
! rofi.font: Iosevka 13
! rofi.font: Source Code Pro 11
+rofi.font: Source Code Pro 10.5
rofi.modi: run,window
! rofi.width: 640
rofi.width: 600
#+end_src
** sway
+
+*** main
:PROPERTIES:
:header-args+: :tangle ~/.config/sway/config
:END:
#+begin_src conf
-exec xrdb .Xresources
-exec dunst
-exec pgrep -x "systemd-inhibit" || \
- systemd-inhibit --what=handle-power-key --who=aminb \
- --why="Handle power button in sway" sleep infinity
-
### Variables
# super
set $mod Mod4
### Idle configuration
exec swayidle \
- timeout 120 swaylock \
- timeout 180 'swaymsg "output * dpms off"' \
- resume 'swaymsg "output * dpms on"' \
+ timeout 120 '[ -f ~/.nosleep ] || swaymsg "output * dpms off"' \
+ resume '[ -f ~/.nosleep ] || swaymsg "output * dpms on"' \
before-sleep swaylock
-### Input configuration
-
-input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
- dwt enabled
- tap enabled
- natural_scroll enabled
- middle_emulation enabled
- click_method clickfinger
-}
-
-input "2:7:SynPS/2_Synaptics_TouchPad" {
- events disabled
- dwt enabled
- tap enabled
- natural_scroll enabled
- click_method clickfinger
-}
-
-input "1:1:AT_Translated_Set_2_keyboard" {
- repeat_delay 200
- repeat_rate 45
- xkb_layout us_ab,ir
- xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
-}
-
### Key bindings
#
#
# Power button
#
-set $locker swaylock && sleep 1
set $mode_system System (l)ock, (e)xit sway, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown
mode "$mode_system" {
- bindsym l exec $locker, mode "default"
- bindsym e exec swaymsg exit, mode "default"
- bindsym s exec $locker && systemctl suspend, mode "default"
- bindsym h exec $locker && systemctl hibernate, mode "default"
- bindsym r exec systemctl reboot, mode "default"
- bindsym Shift+s exec systemctl poweroff -i, mode "default"
+ bindsym l exec swaylock, mode "default"
+ bindsym e exec swaymsg exit, mode "default"
+ bindsym s exec systemctl suspend, mode "default"
+ bindsym h exec systemctl hibernate, mode "default"
+ bindsym r exec systemctl reboot, mode "default"
+ bindsym Shift+s exec systemctl poweroff -i, mode "default"
# back to normal: Enter, Escape, or q
bindsym Return mode "default"
}
bindsym XF86PowerOff mode "$mode_system"
+#
+# Presentation mode
+#
+
+bindsym $mod+$mod2+p exec ([ ! -e ~/.nosleep ] && touch ~/.nosleep || rm ~/.nosleep) && killall -USR1 i3status
+
+#
+# Notifications
+#
+
+bindsym $mod+Shift+n mode notifications
+mode notifications {
+ bindsym Return exec makoctl invoke; exec makoctl dismiss; mode default
+ bindsym d exec makoctl dismiss; mode default
+ bindsym Shift+d exec makoctl dismiss -a; mode default
+
+ bindsym Escape mode default
+ bindsym q mode default
+}
+
+#
+# Screenshotting
+#
+
+bindsym $mod+Shift+s mode screenshot
+mode screenshot {
+ bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
+ bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
+
+ bindsym Escape mode default
+ bindsym q mode default
+}
+
#
# Status Bar:
#
background #323232
inactive_workspace #32323200 #32323200 #5c5c5c
}
- status_command i3status
+ status_command i3status | my-i3status.py
}
# font pango: benis uushi 9
font pango: DejaVu Sans Mono 9
# font pango: Liberation Mono 9
+exec xrdb .Xresources
+exec pgrep -x "systemd-inhibit" || \
+ systemd-inhibit --what=handle-power-key --who=aminb \
+ --why="Handle power button in sway" sleep infinity
+exec mako 2>&1 >/tmp/mako.log
+exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
+
include /etc/sway/config.d/*
+include ~/.config/sway/`hostname`
+
+exec systemd-notify --ready || true
+
+#+end_src
+
+*** langa
+:PROPERTIES:
+:header-args+: :tangle ~/.config/sway/langa
+:END:
+
+#+begin_src conf
+input "2:7:SynPS/2_Synaptics_TouchPad" {
+ events disabled
+ dwt enabled
+ tap enabled
+ natural_scroll enabled
+ click_method clickfinger
+}
+
+input "1:1:AT_Translated_Set_2_keyboard" {
+ repeat_delay 200
+ repeat_rate 45
+ xkb_layout us_ab,ir
+ xkb_options ctrl:nocaps,altwin:swap_alt_win,grp:shifts_toggle
+}
#+end_src
+*** shemshak
+:PROPERTIES:
+:header-args+: :tangle ~/.config/sway/shemshak
+:END:
+
+#+begin_src conf
+input "1739:31251:DLL07BE:01_06CB:7A13_Touchpad" {
+ dwt enabled
+ tap enabled
+ natural_scroll enabled
+ middle_emulation enabled
+ click_method clickfinger
+}
+
+input "1:1:AT_Translated_Set_2_keyboard" {
+ repeat_delay 200
+ repeat_rate 45
+ xkb_layout us,ir
+ xkb_options ctrl:nocaps,altwin:swap_alt_win,ctrl:rctrl_ralt,grp:shifts_toggle
+}
+#+end_src
** swaylock
:PROPERTIES:
:header-args+: :tangle ~/.config/swaylock/config
#DEVICES_TO_DISABLE_ON_UNDOCK=""
#+end_src
-*** pary
+*** shemshak
-#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "pary")) "/sudo::/etc/default/tlp")
+#+begin_src conf :tangle (when (and (eq system-type 'gnu/linux) (string= (system-name) "shemshak")) "/sudo::/etc/default/tlp")
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
! Emacs.font: Inconsolata:size=16
! Emacs.font: Inconsolata LGC:size=14
! Emacs.font: Source Code Pro Medium-10.5
-Emacs.font: Ubuntu Mono:size=16
+Emacs.font: Source Code Pro:size=14
+! Emacs.font: Ubuntu Mono:size=16
! Emacs.font: Iosevka:size=16
#+end_src
#+begin_src conf-xdefaults
! Font
-URxvt.font: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
-URxvt.boldFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
-URxvt.italicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
-URxvt.bolditalicFont: xft:ubuntu mono:pixelsize=16:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
+URxvt.font: xft:source code pro:pixelsize=14:antialias=true:hinting=true, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true
+URxvt.boldFont: xft:source code pro semibold:pixelsize=14:antialias=true:hinting=true:bold, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bold
+URxvt.italicFont: xft:source code pro italic:pixelsize=14:antialias=true:hinting=true:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:italic
+URxvt.bolditalicFont: xft:source code pro semibold italic:pixelsize=14:antialias=true:hinting=true:bold:italic, xft:dejavu sans mono:pixelsize=15:antialias=true:hinting=true:bolditalic
URxvt.xftAntialias: true
URxvt.letterSpace: 0
!URxvt.color6: #06989A
!URxvt.color14: #34E2E2
! orange (replaces cyan)
-*color6: #ce5c00
-*color14: #fcaf3e
+,*color6: #ce5c00
+,*color14: #fcaf3e
! White
URxvt.color7: #D3D7CF
#
# Load these ssh identities with the ssh module
-zssh_ids=(id_ed25519_amin)
+zssh_ids=(id_ed25519_bandali)
#
alias cp="cp -iv"
alias scl=systemctl
alias jcl=journalctl
-alias m="mbsync -Va; getmail; notmuch new"
+alias m="mbsync -a; getmail; notmuch new"
alias best="youtube-dl -f best"
alias nixx="ssh amin@nix.aminb.org"
alias fence="ssh aminb@fencepost.gnu.org"
printf '%s%%%%%2dh%02dm \n' "$perc" $((secs / 3600)) $((secs % 3600 / 60))
#+end_src
+** my-i3status.py
+:PROPERTIES:
+:header-args+: :tangle ~/.local/bin/my-i3status.py :shebang "#!/usr/bin/env python2"
+:END:
+
+#+begin_src python :comments none
+# -*- coding: utf-8 -*-
+
+# This script is a simple wrapper which prefixes each i3status line with custom
+# information. It is based on:
+# https://github.com/i3/i3status/blob/master/contrib/wrapper.py
+#
+# In ~/.i3status.conf, add the following line:
+# output_format = "i3bar"
+# in the 'general' section.
+# Then, in ~/.config/i3/config or ~/.config/sway/config add:
+# status_command i3status | my-i3status.py
+# in the 'bar' section. Make sure my-i3status.py is in $PATH.
+#
+# © 2012 Valentin Haenel <valentin.haenel@gmx.de>
+# © 2018 Amin Bandali <bandali@gnu.org>
+#
+# This program is free software. It comes without any warranty, to the extent
+# permitted by applicable law. You can redistribute it and/or modify it under
+# the terms of the Do What The Fuck You Want To Public License (WTFPL), Version
+# 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
+# details.
+
+import sys
+import json
+import os
+
+def get_nosleep():
+ """ Return true if ~/.nosleep exists. """
+ return os.path.isfile(os.path.expanduser("~/.nosleep"))
+
+def print_line(message):
+ """ Non-buffered printing to stdout. """
+ sys.stdout.write(message + '\n')
+ sys.stdout.flush()
+
+def read_line():
+ """ Interrupted respecting reader for stdin. """
+ # try reading a line, removing any extra whitespace
+ try:
+ line = sys.stdin.readline().strip()
+ # i3status sends EOF, or an empty line
+ if not line:
+ sys.exit(3)
+ return line
+ # exit on ctrl-c
+ except KeyboardInterrupt:
+ sys.exit()
+
+if __name__ == '__main__':
+ # Skip the first line which contains the version header.
+ print_line(read_line())
+
+ # The second line contains the start of the infinite array.
+ print_line(read_line())
+
+ while True:
+ line, prefix = read_line(), ''
+ # ignore comma at start of lines
+ if line.startswith(','):
+ line, prefix = line[1:], ','
+
+ if get_nosleep():
+ j = json.loads(line)
+ # insert information into the start of the json, but could be anywhere
+ j.insert(0, {'full_text' : '🖵 ', 'name' : 'nosleep'})
+ # and echo back new encoded json
+ print_line(prefix+json.dumps(j))
+ else:
+ print_line(prefix+line)
+#+end_src
+
** rofi-light
:PROPERTIES:
:header-args+: :tangle ~/.local/bin/rofi-light :shebang "#!/bin/bash"
#+begin_src bash
export _JAVA_AWT_WM_NONREPARENTING=1
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
-light -Scrs "intel_backlight" 2
+light -Nr 2
source $HOME/.zprofile
sway
#+end_src