diff options
author | Sam Chudnick <sam@chudnick.com> | 2022-02-12 17:54:06 -0500 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2022-02-12 17:54:06 -0500 |
commit | b0a2c1c5800c30ecf37311885ce11f244102873e (patch) | |
tree | 49329a7af06795ff5fb16479d7c3dfe3441555ee | |
parent | a7ec0d3b3e49837c52051de489b118b650bb2bf0 (diff) |
Bunch of changes
-rw-r--r-- | .config/abook/abookrc | 7 | ||||
-rw-r--r-- | .config/firejail/neomutt.profile | 93 | ||||
-rw-r--r-- | .config/fontconfig/fonts.conf | 28 | ||||
-rw-r--r-- | .config/mutt/mailcap | 4 | ||||
-rw-r--r-- | .config/mutt/muttrc | 171 | ||||
-rw-r--r-- | .config/shell/aliasrc | 3 | ||||
-rw-r--r-- | .config/shell/shortcutsrc | 1 | ||||
-rw-r--r-- | .config/sxhkd/sxhkdrc | 2 | ||||
-rw-r--r-- | .config/zsh/.zprofile | 1 | ||||
-rwxr-xr-x | .local/bin/check-repos | 10 | ||||
-rwxr-xr-x | .local/bin/kill-libvirtd | 22 | ||||
-rwxr-xr-x | .local/bin/start-vm | 9 | ||||
-rwxr-xr-x | .local/bin/stop-vm | 21 |
13 files changed, 371 insertions, 1 deletions
diff --git a/.config/abook/abookrc b/.config/abook/abookrc new file mode 100644 index 0000000..0d6c033 --- /dev/null +++ b/.config/abook/abookrc | |||
@@ -0,0 +1,7 @@ | |||
1 | set autosave=true | ||
2 | set show_all_emails=true | ||
3 | set mutt_command="firejail neomutt" | ||
4 | set www_command=w3m | ||
5 | set address_style=us | ||
6 | set add_email_prevent_duplicates=true | ||
7 | set show_cursor=false | ||
diff --git a/.config/firejail/neomutt.profile b/.config/firejail/neomutt.profile new file mode 100644 index 0000000..0a43c6f --- /dev/null +++ b/.config/firejail/neomutt.profile | |||
@@ -0,0 +1,93 @@ | |||
1 | # Local firejail profile for neomutt | ||
2 | name neomutt | ||
3 | quiet | ||
4 | |||
5 | whitelist ${HOME}/.Mail | ||
6 | whitelist ${HOME}/.cache/mutt | ||
7 | whitelist ${HOME}/.mail | ||
8 | whitelist ${HOME}/.msmtprc | ||
9 | whitelist ${HOME}/.signature | ||
10 | whitelist ${HOME}/.vim | ||
11 | whitelist ${HOME}/.viminfo | ||
12 | whitelist ${HOME}/.vimrc | ||
13 | whitelist ${HOME}/.local/share/mail/ | ||
14 | whitelist ${HOME}/.config/mutt/ | ||
15 | whitelist ${HOME}/.mbsyncrc | ||
16 | whitelist ${HOME}/.config/mbsync | ||
17 | whitelist ${HOME}/.config/msmtp | ||
18 | whitelist ${HOME}/.w3m | ||
19 | |||
20 | noblacklist ${HOME}/.Mail | ||
21 | noblacklist ${HOME}/.cache/mutt | ||
22 | noblacklist ${HOME}/.mail | ||
23 | noblacklist ${HOME}/.msmtprc | ||
24 | noblacklist ${HOME}/.signature | ||
25 | noblacklist ${HOME}/.vim | ||
26 | noblacklist ${HOME}/.viminfo | ||
27 | noblacklist ${HOME}/.vimrc | ||
28 | noblacklist ${HOME}/.local/share/mail/ | ||
29 | noblacklist ${HOME}/.config/mutt/ | ||
30 | noblacklist ${HOME}/.mbsyncrc | ||
31 | noblacklist ${HOME}/.config/mbsync | ||
32 | noblacklist ${HOME}/.config/msmtp | ||
33 | noblacklist ${HOME}/.w3m | ||
34 | |||
35 | # Access to GPG for encrypting/decrypting/signing mail and passwords with pass | ||
36 | whitelist ${HOME}/.gnupg | ||
37 | noblacklist ${HOME}/.gnupg | ||
38 | whitelist ${RUNUSER}/gnupg | ||
39 | |||
40 | # This assumes you keep mail account passwords under a separate directory named mail | ||
41 | # This to avoid exposing all passwords to the sandbox, only necessary ones | ||
42 | whitelist ${HOME}/.local/share/password-store/mail | ||
43 | noblacklist ${HOME}/.local/share/password-store/mail | ||
44 | |||
45 | # abook | ||
46 | whitelist ${HOME}/.config/abook | ||
47 | whitelist ${HOME}/.local/share/abook | ||
48 | |||
49 | #include whitelist-runuser-common.inc | ||
50 | writable-run-user | ||
51 | blacklist /tmp/.X11-unix | ||
52 | blacklist ${RUNUSER}/wayland-* | ||
53 | |||
54 | include disable-common.inc | ||
55 | include disable-devel.inc | ||
56 | include disable-interpreters.inc | ||
57 | include disable-passwdmgr.inc | ||
58 | include disable-programs.inc | ||
59 | |||
60 | # Required for using msmtp with passwordeval | ||
61 | apparmor | ||
62 | caps.drop all | ||
63 | netfilter | ||
64 | no3d | ||
65 | nodvd | ||
66 | nogroups | ||
67 | nonewprivs | ||
68 | noroot | ||
69 | nosound | ||
70 | notv | ||
71 | nou2f | ||
72 | novideo | ||
73 | protocol unix,inet,inet6 | ||
74 | seccomp | ||
75 | shell none | ||
76 | disable-mnt | ||
77 | machine-id | ||
78 | |||
79 | whitelist /dev/mapper | ||
80 | whitelist /dev/fd | ||
81 | whitelist /dev/full | ||
82 | whitelist /dev/log | ||
83 | whitelist /dev/null | ||
84 | whitelist /dev/ptmx | ||
85 | whitelist /dev/pts | ||
86 | whitelist /dev/random | ||
87 | whitelist /dev/shm | ||
88 | whitelist /dev/stderr | ||
89 | whitelist /dev/stdin | ||
90 | whitelist /dev/stdout | ||
91 | whitelist /dev/tty | ||
92 | whitelist /dev/urandom | ||
93 | whitelist /dev/zero | ||
diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..7512ee5 --- /dev/null +++ b/.config/fontconfig/fonts.conf | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version='1.0'?> | ||
2 | <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | ||
3 | <fontconfig> | ||
4 | <alias> | ||
5 | <family>serif</family> | ||
6 | <prefer> | ||
7 | <family>Liberation Serif</family> | ||
8 | <family>DejaVu Serif</family> | ||
9 | <family>Noto Color Emoji</family> | ||
10 | </prefer> | ||
11 | </alias> | ||
12 | <alias> | ||
13 | <family>sans</family> | ||
14 | <prefer> | ||
15 | <family>Liberation Sans</family> | ||
16 | <family>DejaVu Sans</family> | ||
17 | <family>Noto Color Emoji</family> | ||
18 | </prefer> | ||
19 | </alias> | ||
20 | <alias> | ||
21 | <family>monospace</family> | ||
22 | <prefer> | ||
23 | <family>Liberation Mono</family> | ||
24 | <family>DejaVu Sans Mono</family> | ||
25 | <family>Inconsolata</family> | ||
26 | </prefer> | ||
27 | </alias> | ||
28 | </fontconfig> | ||
diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap new file mode 100644 index 0000000..21cd88b --- /dev/null +++ b/.config/mutt/mailcap | |||
@@ -0,0 +1,4 @@ | |||
1 | text/plain; $EDITOR ; | ||
2 | text/html; w3m %s ; | ||
3 | image/*; feh %s; | ||
4 | application/pdf; zathura %s; | ||
diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc new file mode 100644 index 0000000..c429fed --- /dev/null +++ b/.config/mutt/muttrc | |||
@@ -0,0 +1,171 @@ | |||
1 | ### General Variables | ||
2 | set editor = "vim -i NONE" | ||
3 | set signature = "~/.config/mutt/signature" | ||
4 | #set index_format = "%2C %Z - %D - %a - %s (%-4.4c)" | ||
5 | folder-hook . 'set index_format = "%2C %Z - %D - %a - %s (%-4.4c)"' | ||
6 | folder-hook Sent 'set index_format = "%2C %Z - %D - %F - %s (%-4.4c)"' | ||
7 | set date_format = "%m/%d/%y %I:%M %p" | ||
8 | set mailcap_path = "~/.config/mutt/mailcap" | ||
9 | set query_command = "abook --config ~/.config/abook/abookrc --datafile ~/.local/share/abook/addressbook --mutt-query '%s'" | ||
10 | set sort = "reverse-date" | ||
11 | set sleep_time = 0 | ||
12 | set markers = no | ||
13 | set mark_old = no | ||
14 | set wait_key = no | ||
15 | set fast_reply | ||
16 | set include | ||
17 | set reverse_name | ||
18 | set delete = yes | ||
19 | set confirmappend = no | ||
20 | set ssl_force_tls = yes | ||
21 | set ssl_starttls = no | ||
22 | set ssl_use_sslv3 = no | ||
23 | set ssl_use_tlsv1 = no | ||
24 | set ssl_use_tlsv1_1 = no | ||
25 | set ssl_use_tlsv1_2 = yes | ||
26 | set ssl_use_tlsv1_3 = yes | ||
27 | set ssl_verify_dates = yes | ||
28 | set ssl_verify_host = yes | ||
29 | |||
30 | ### Sidebar | ||
31 | set sidebar_visible | ||
32 | set mail_check_stats | ||
33 | set sidebar_format = "%B%* %?N?%N/?%?S?%S?" | ||
34 | set sidebar_short_path = yes | ||
35 | set sidebar_folder_indent = yes | ||
36 | set sidebar_indent_string = " " | ||
37 | bind index,pager V sidebar-toggle-visible | ||
38 | |||
39 | ### Keybindings | ||
40 | bind index u noop | ||
41 | bind index U noop | ||
42 | bind index g noop | ||
43 | bind index h noop | ||
44 | bind index,pager v noop | ||
45 | bind index,pager i noop | ||
46 | bind index,pager d noop | ||
47 | bind index,pager y noop | ||
48 | bind index,pager m noop | ||
49 | bind index,pager c noop | ||
50 | |||
51 | bind generic / search | ||
52 | bind generic n search-next | ||
53 | bind generic N search-opposite | ||
54 | bind generic H top-page | ||
55 | bind generic M middle-page | ||
56 | bind generic L bottom-page | ||
57 | bind generic ? help | ||
58 | bind generic <Enter> select-entry | ||
59 | bind generic <Return> select-entry | ||
60 | |||
61 | bind index gg first-entry | ||
62 | bind index G last-entry | ||
63 | bind index j next-entry | ||
64 | bind index k previous-entry | ||
65 | bind index \Cu previous-unread | ||
66 | bind index \Cd next-unread | ||
67 | bind index l display-message | ||
68 | bind index L limit | ||
69 | bind index Q query | ||
70 | bind index a create-alias | ||
71 | bind index <Space> tag-entry | ||
72 | bind index n mail | ||
73 | |||
74 | bind pager h exit | ||
75 | bind pager j next-line | ||
76 | bind pager k previous-line | ||
77 | bind pager l view-attachments | ||
78 | bind pager { previous-page | ||
79 | bind pager } next-page | ||
80 | bind pager f display-toggle-weed | ||
81 | bind pager \Cu half-up | ||
82 | bind pager \Cd half-down | ||
83 | |||
84 | bind index,pager r reply | ||
85 | bind index,pager R group-reply | ||
86 | bind index,pager s sort-mailbox | ||
87 | bind index,pager S sort-reverse | ||
88 | |||
89 | bind editor <Tab> complete-query | ||
90 | |||
91 | bind attach * noop | ||
92 | bind attach h exit | ||
93 | |||
94 | ### Macros | ||
95 | macro index,pager D ";<delete-message><sync-mailbox><check-stats>" "send to trash (delete)" | ||
96 | macro index P ";<purge-message><sync-mailbox><check-stats>" "permanently delete message" | ||
97 | macro index U ";<undelete-message><sync-mailbox><check-stats>" "undelete message" | ||
98 | macro index,pager mi ";<save-message>=Inbox<enter><sync-mailbox><check-stats>" "move to inbox" | ||
99 | macro index,pager ms ";<save-message>=Sent<enter><sync-mailbox><check-stats>" "move to sent" | ||
100 | macro index,pager mj ";<save-message>=Spam<enter><sync-mailbox><check-stats>" "move to spam" | ||
101 | |||
102 | macro index,pager yi ";<copy-message>=Inbox<enter><sync-mailbox><check-stats>" "copy to inbox" | ||
103 | macro index,pager ys ";<copy-message>=Sent<enter><sync-mailbox><check-stats>" "copy to sent" | ||
104 | macro index,pager yj ";<copy-message>=Spam<enter><sync-mailbox><check-stats>" "copy to spam" | ||
105 | |||
106 | macro index,pager ci ";<change-folder>=Inbox<enter>" "cd to inbox" | ||
107 | macro index,pager cs ";<change-folder>=Sent<enter>" "cd to sent" | ||
108 | macro index,pager cd ";<change-folder>=Drafts<enter>" "cd to drafts" | ||
109 | macro index,pager ct ";<change-folder>=Trash<enter>" "cd to trash" | ||
110 | macro index,pager cj ";<change-folder>=Spam<enter>" "cd to spam" | ||
111 | macro index,pager ca ";<change-folder>=Archive<enter>" "cd to archive" | ||
112 | |||
113 | macro index,pager J "<sidebar-next><sidebar-open>" "next mailbox" | ||
114 | macro index,pager K "<sidebar-prev><sidebar-open>" "previous mailbox" | ||
115 | |||
116 | macro index,pager A "|abook --config ~/.config/abook/abookrc --datafile ~/.local/share/abook/addressbook --add-email\n" "add address to abook" | ||
117 | |||
118 | ### Headers | ||
119 | ignore * | ||
120 | unignore from date subject to cc | ||
121 | unignore Authentication-Results | ||
122 | unhdr_order * | ||
123 | hdr_order Authentication-Results: From: To: Subject: Date: | ||
124 | |||
125 | ### Colors | ||
126 | mono bold bold | ||
127 | mono underline underline | ||
128 | mono indicator reverse | ||
129 | mono error bold | ||
130 | ### Index | ||
131 | color index white default "~A" | ||
132 | color index_number blue default | ||
133 | color index_author blue default "~A" | ||
134 | color index_subject blue default "~A" | ||
135 | # New | ||
136 | color index brightyellow default "~N" | ||
137 | color index_author underline brightblue default "~N" | ||
138 | color index_subject underline brightblue default "~N" | ||
139 | # Tagged | ||
140 | color index brightwhite blue "~T" | ||
141 | color index_author brightwhite blue "~T" | ||
142 | color index_subject brightwhite blue "~T" | ||
143 | ### Header | ||
144 | color hdrdefault blue default | ||
145 | color header brightred default "^From:" | ||
146 | color header brightred default "^Subject:" | ||
147 | # highlight authentication headers based on pass/fail/none | ||
148 | color header green default "dkim=pass" | ||
149 | color header green default "spf=pass" | ||
150 | color header green default "dmarc=pass" | ||
151 | color header yellow default "dkim=none" | ||
152 | color header yellow default "spf=none" | ||
153 | color header yellow default "dmarc=none" | ||
154 | color header brightred default "dkim=fail" | ||
155 | color header brightred default "spf=fail" | ||
156 | color header brightred default "dmarc=fail" | ||
157 | ### Body | ||
158 | color body default default ".*" | ||
159 | ### Sidebar | ||
160 | |||
161 | ### Other | ||
162 | color normal default default | ||
163 | color tilde default default | ||
164 | color status default black | ||
165 | color signature default default | ||
166 | color attachment default default | ||
167 | color message default default | ||
168 | color quoted green default | ||
169 | color search brightred default | ||
170 | |||
171 | source ~/.config/mutt/accounts/testing | ||
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 66b7f75..a393bea 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc | |||
@@ -42,10 +42,13 @@ alias \ | |||
42 | 42 | ||
43 | # Start commands with specific options always | 43 | # Start commands with specific options always |
44 | alias \ | 44 | alias \ |
45 | abook="abook --config ~/.config/abook/abookrc --datafile ~/.local/share/abook/addressbook" \ | ||
45 | calcurse="calcurse -D ~/.config/calcurse" \ | 46 | calcurse="calcurse -D ~/.config/calcurse" \ |
46 | cp="cp -iv" \ | 47 | cp="cp -iv" \ |
47 | ffmpeg="ffmpeg -hide_banner" \ | 48 | ffmpeg="ffmpeg -hide_banner" \ |
48 | mv="mv -iv" \ | 49 | mv="mv -iv" \ |
50 | mutt="firejail neomutt" | ||
51 | neomutt="firejail neomutt" \ | ||
49 | rm="rm -Iv" | 52 | rm="rm -Iv" |
50 | 53 | ||
51 | source $XDG_CONFIG_HOME/shell/private-aliasrc | 54 | source $XDG_CONFIG_HOME/shell/private-aliasrc |
diff --git a/.config/shell/shortcutsrc b/.config/shell/shortcutsrc index b288c61..b8727ae 100644 --- a/.config/shell/shortcutsrc +++ b/.config/shell/shortcutsrc | |||
@@ -9,6 +9,7 @@ alias \ | |||
9 | cfs='vim $HOME/.config/shell/shortcutsrc' \ | 9 | cfs='vim $HOME/.config/shell/shortcutsrc' \ |
10 | dat='cd $HOME/.local/share' \ | 10 | dat='cd $HOME/.local/share' \ |
11 | dbc='cd $HOME/.local/src/dwmblocks; vim ~/.local/src/dwmblocks/blocks.h' \ | 11 | dbc='cd $HOME/.local/src/dwmblocks; vim ~/.local/src/dwmblocks/blocks.h' \ |
12 | doc='/usr/share/doc/' \ | ||
12 | dwc='cd $HOME/.local/src/dwm; vim ~/.local/src/dwm/config.h' \ | 13 | dwc='cd $HOME/.local/src/dwm; vim ~/.local/src/dwm/config.h' \ |
13 | dws='cd $HOME/.local/src/dwm' \ | 14 | dws='cd $HOME/.local/src/dwm' \ |
14 | gms='cd $HOME/.steam/debian-installation/steamapps/common' \ | 15 | gms='cd $HOME/.steam/debian-installation/steamapps/common' \ |
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 3263859..bf155cf 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc | |||
@@ -38,7 +38,7 @@ super + q | |||
38 | super + w | 38 | super + w |
39 | wireshark | 39 | wireshark |
40 | super + e | 40 | super + e |
41 | urxvt -e vim | 41 | urxvt -e firejail neomutt |
42 | super + r | 42 | super + r |
43 | urxvt -e ranger | 43 | urxvt -e ranger |
44 | super + a | 44 | super + a |
diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 127c867..3453af6 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile | |||
@@ -17,6 +17,7 @@ export TERMINAL="urxvt" | |||
17 | # Other vars | 17 | # Other vars |
18 | export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | 18 | export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' |
19 | export LESSHISTFILE='-' | 19 | export LESSHISTFILE='-' |
20 | export LIBVIRT_DEFAULT_URI="qemu:///system" | ||
20 | export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" | 21 | export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" |
21 | export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" | 22 | export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" |
22 | export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" | 23 | export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" |
diff --git a/.local/bin/check-repos b/.local/bin/check-repos new file mode 100755 index 0000000..d528ce6 --- /dev/null +++ b/.local/bin/check-repos | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd $HOME/repos | ||
4 | for repo in $(ls) | ||
5 | do | ||
6 | [ -d $repo/.git ] && echo $repo && \ | ||
7 | echo "------------------------------------------------------" && \ | ||
8 | git --git-dir=$repo/.git --work-tree=$repo status 2>/dev/null && \ | ||
9 | echo "------------------------------------------------------" | ||
10 | done | ||
diff --git a/.local/bin/kill-libvirtd b/.local/bin/kill-libvirtd new file mode 100755 index 0000000..2ea802d --- /dev/null +++ b/.local/bin/kill-libvirtd | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | # Stop all running domains and networks, and then stop all libvirtd daemons | ||
3 | |||
4 | # Save running domains | ||
5 | rundoms="$(virsh list | grep running | awk '{print $2}')" | ||
6 | for dom in $rundoms | ||
7 | do | ||
8 | virsh managedsave $dom | ||
9 | done | ||
10 | |||
11 | # Stop network | ||
12 | virsh net-destroy default | ||
13 | |||
14 | # Stop libvirtd | ||
15 | sudo systemctl stop libvirtd >/dev/null | ||
16 | sudo systemctl stop libvirtd-ro.socket >/dev/null | ||
17 | sudo systemctl stop libvirtd-admin.socket >/dev/null | ||
18 | sudo systemctl stop libvirtd.socket >/dev/null | ||
19 | sudo systemctl stop virtlogd >/dev/null | ||
20 | sudo systemctl stop virtlogd-admin.socket >/dev/null | ||
21 | sudo systemctl stop virtlogd.socket >/dev/null | ||
22 | sudo systemctl stop systemd-machined >/dev/null | ||
diff --git a/.local/bin/start-vm b/.local/bin/start-vm new file mode 100755 index 0000000..5ffea03 --- /dev/null +++ b/.local/bin/start-vm | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | # Starts libvirtd, default network, and optionally any domains given as arguments | ||
3 | |||
4 | pgrep libvirtd >/dev/null || sudo systemctl start libvirtd | ||
5 | virsh net-start default | ||
6 | for domain in "$@" | ||
7 | do | ||
8 | virsh start $domain | ||
9 | done | ||
diff --git a/.local/bin/stop-vm b/.local/bin/stop-vm new file mode 100755 index 0000000..6c92250 --- /dev/null +++ b/.local/bin/stop-vm | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/bin/sh | ||
2 | # Stops domains given as arguments | ||
3 | |||
4 | opts=$(getopt -o 'as' -l 'all,save' -- "$@") | ||
5 | eval set -- "$opts" | ||
6 | all=0 | ||
7 | save=0 | ||
8 | while true | ||
9 | do | ||
10 | case $1 in | ||
11 | '-a'|'--all') all=1; shift; continue ;; | ||
12 | '-s'|'--save') save=1; shift; continue ;; | ||
13 | '--') shift; break;; | ||
14 | esac | ||
15 | done | ||
16 | |||
17 | [ $all -eq 1 ] && domains="$(virsh list | grep running | awk '{print $2}')" || domains="$@" | ||
18 | for domain in $domains | ||
19 | do | ||
20 | [ $save -eq 1 ] && virsh managedsave $domain || virsh shutdown $domain | ||
21 | done | ||