From 29d1e69dadf0b5e382a6edd6d5fb6f10b07c9fb2 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 8 Sep 2016 14:48:47 +0200 Subject: [PATCH] laptop stuff --- cal/.config/khal/khal.conf | 7 +++- cal/.config/vdirsyncer/config | 15 +++++++++ email/{.mutt/msmtprc => .config/msmtp/config} | 0 .../notmuch-config => .config/notmuch/config} | 0 email/.config/offlineimap/.gitignore | 1 + .../offlineimap/config} | 2 +- .../offlineimap}/offlineimap.py | 2 +- email/.mutt/mailcap | 33 ++++++++++++++++++- email/.mutt/muttrc | 15 +++++++-- music/.ncmpcpp/config | 1 + pgp/.gnupg/gpg-agent.conf | 2 ++ pgp/.gnupg/gpg.conf | 1 - shell/.bashrc | 2 +- x/.config/i3/config | 14 ++++---- x/.config/i3status/config | 26 +++++++++++---- x/.xinitrc | 4 ++- 16 files changed, 101 insertions(+), 24 deletions(-) rename email/{.mutt/msmtprc => .config/msmtp/config} (100%) rename email/{.mutt/notmuch-config => .config/notmuch/config} (100%) create mode 100644 email/.config/offlineimap/.gitignore rename email/{.mutt/offlineimaprc => .config/offlineimap/config} (92%) rename email/{.mutt => .config/offlineimap}/offlineimap.py (93%) diff --git a/cal/.config/khal/khal.conf b/cal/.config/khal/khal.conf index 9f3745e..6ea0795 100644 --- a/cal/.config/khal/khal.conf +++ b/cal/.config/khal/khal.conf @@ -5,7 +5,7 @@ color = light green [[elvira]] path = ~/.vdirsyncer/cal/elvira -color = light red +color = light magenta [[default]] path = ~/.vdirsyncer/cal/default @@ -15,6 +15,11 @@ color = light blue path = ~/.vdirsyncer/cal/vuilnis color = brown +[[uni]] +path = ~/.vdirsyncer/uni +color = light red +readonly = True + [sqlite] path = ~/.vdirsyncer/khal.db diff --git a/cal/.config/vdirsyncer/config b/cal/.config/vdirsyncer/config index 91265d8..0bb3a69 100644 --- a/cal/.config/vdirsyncer/config +++ b/cal/.config/vdirsyncer/config @@ -47,3 +47,18 @@ url = https://ygdrassil.martlubbers.net/baikal/cal.php/calendars/mart/default auth = digest username = mart password.fetch = ["command", "pass", "show", "caldav_ygdrassil/mart"] + +# UNI +[pair uni] +a = uni_local +b = uni_remote +collections = null + +[storage uni_local] +type = filesystem +path = ~/.vdirsyncer/uni +fileext = .ics + +[storage uni_remote] +type = http +url = "http://persoonlijkrooster.ru.nl/ical?57b59e14&eu=czQxMDk1MDM=&t=9d96e939-2d1b-4b49-b376-93937bc08725" diff --git a/email/.mutt/msmtprc b/email/.config/msmtp/config similarity index 100% rename from email/.mutt/msmtprc rename to email/.config/msmtp/config diff --git a/email/.mutt/notmuch-config b/email/.config/notmuch/config similarity index 100% rename from email/.mutt/notmuch-config rename to email/.config/notmuch/config diff --git a/email/.config/offlineimap/.gitignore b/email/.config/offlineimap/.gitignore new file mode 100644 index 0000000..5733a0f --- /dev/null +++ b/email/.config/offlineimap/.gitignore @@ -0,0 +1 @@ +offlineimap.pyc diff --git a/email/.mutt/offlineimaprc b/email/.config/offlineimap/config similarity index 92% rename from email/.mutt/offlineimaprc rename to email/.config/offlineimap/config index 107a1f4..50466cc 100644 --- a/email/.mutt/offlineimaprc +++ b/email/.config/offlineimap/config @@ -1,5 +1,5 @@ [general] -pythonfile = ~/.mutt/offlineimap.py +pythonfile = ~/.config/offlineimap/offlineimap.py metadata = ~/.mutt/offlineimap_meta accounts = net ui = quiet diff --git a/email/.mutt/offlineimap.py b/email/.config/offlineimap/offlineimap.py similarity index 93% rename from email/.mutt/offlineimap.py rename to email/.config/offlineimap/offlineimap.py index 02e4e2b..99aeec0 100644 --- a/email/.mutt/offlineimap.py +++ b/email/.config/offlineimap/offlineimap.py @@ -13,6 +13,6 @@ def folderfilter(x): if match: return abs(datetime.date.today() - datetime.date(int(match.group(1)), int(match.group(2)), 1) - ).days <= 31*2 + ).days <= 31*4 else: return not x.startswith('archive') diff --git a/email/.mutt/mailcap b/email/.mutt/mailcap index c0569ab..8f502d4 100644 --- a/email/.mutt/mailcap +++ b/email/.mutt/mailcap @@ -1,3 +1,34 @@ -application/msword; libreoffice %s; +# Fork off a process application/pdf; gv %s; +text/html; firefox -new-tab %s & sleep 5; + +# Open document formats +application/vnd.oasis.opendocument.text; libreoffice '%s'; +application/vnd.oasis.opendocument.text-template; libreoffice '%s'; +application/vnd.oasis.opendocument.text-web; libreoffice '%s'; +application/vnd.oasis.opendocument.text-master; libreoffice '%s'; +application/vnd.oasis.opendocument.graphics; libreoffice '%s'; +application/vnd.oasis.opendocument.graphics-template; libreoffice '%s'; +application/vnd.oasis.opendocument.presentation; libreoffice '%s'; +application/vnd.oasis.opendocument.presentation-template; libreoffice '%s'; +application/vnd.oasis.opendocument.spreadsheet; libreoffice '%s'; +application/vnd.oasis.opendocument.spreadsheet-template; libreoffice '%s'; +application/vnd.oasis.opendocument.chart; libreoffice '%s'; +application/vnd.oasis.opendocument.formula; libreoffice '%s'; +application/vnd.oasis.opendocument.database; libreoffice '%s'; +application/vnd.oasis.opendocument.image; libreoffice '%s'; + +# Microsoft Office formats +application/msword; libreoffice '%s'; +application/vnd.ms-excel; libreoffice '%s'; +application/vnd.ms-powerpoint; libreoffice '%s'; +application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice '%s'; +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice '%s'; +application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice '%s'; + +# All the autoview text/html; w3m -I %{charset} -T text/html; copiousoutput; +application/pdf; pdftotext '%s' -; copiousoutput; +application/msword; libreoffice --headless --cat '%s'; copiousoutput; +application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --headless --cat '%s'; copiousoutput; +application/vnd.oasis.opendocument.text; libreoffice --headless --cat '%s'; copiousoutput; diff --git a/email/.mutt/muttrc b/email/.mutt/muttrc index 2743046..b99644b 100644 --- a/email/.mutt/muttrc +++ b/email/.mutt/muttrc @@ -11,9 +11,9 @@ set mask="!^\\.[^.]" source ~/.mutt/mailboxes # Receiving, sending and searching -set sendmail="msmtp -C /home/mrl/.mutt/msmtprc" +set sendmail="msmtp -C /home/mrl/.config/msmtp/config" set send_charset="us-ascii:utf-8" -macro index,pager $ "offlineimap -c ~/.mutt/offlineimaprc &" "Force refresh" +macro index,pager $ "offlineimap &" "Force refresh" macro attach B "firefox \"data:text/html;base64,$(base64 -w 0 <&0)\"" # Key bindings @@ -23,7 +23,7 @@ bind pager k previous-line bind pager j next-line bind pager gg top bind pager G bottom -bind pager R group-reply +bind index,pager R group-reply # Misc options set timeout=2 @@ -45,7 +45,16 @@ ignore headers * unignore headers from to subject date cc set mailcap_path=~/.mutt/mailcap set mailcap_sanitize=yes + +# w3m --dump auto_view text/html +# pdftotext +auto_view application/pdf +# libreoffice --cat +auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document +auto_view application/msword +auto_view application/vnd.openxmlformats-officedocument.wordprocessingml.document +auto_view application/vnd.oasis.opendocument.text # Pager options set pager_index_lines=20 diff --git a/music/.ncmpcpp/config b/music/.ncmpcpp/config index 736e26d..c252e51 100644 --- a/music/.ncmpcpp/config +++ b/music/.ncmpcpp/config @@ -9,6 +9,7 @@ visualizer_look = .* browser_sort_mode = name browser_sort_format = {%A - }{%t}|{%f} {(%l)} +song_columns_list_format = (6f)[green]{NE} (30)[]{a} (30)[white]{t} (30)[cyan]{b} (7f)[magenta]{l} execute_on_song_change = "~/.ncmpcpp/cover.sh" diff --git a/pgp/.gnupg/gpg-agent.conf b/pgp/.gnupg/gpg-agent.conf index 360079f..c3e2eda 100644 --- a/pgp/.gnupg/gpg-agent.conf +++ b/pgp/.gnupg/gpg-agent.conf @@ -1 +1,3 @@ +pinentry-program /usr/bin/pinentry-qt default-cache-ttl 3600 +enable-ssh-support diff --git a/pgp/.gnupg/gpg.conf b/pgp/.gnupg/gpg.conf index 0dd69bd..92cbe52 100644 --- a/pgp/.gnupg/gpg.conf +++ b/pgp/.gnupg/gpg.conf @@ -193,5 +193,4 @@ keyserver hkp://keys.gnupg.net # # Use your MIME handler to view photos: # photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG" -armor use-agent diff --git a/shell/.bashrc b/shell/.bashrc index 4427af9..b0f0fd4 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -13,7 +13,7 @@ export BROWSER=firefox export PAGER=more export SUDO_ASKPASS=/usr/lib/ssh/ssh-askpass -export NOTMUCH_CONFIG=~/.mutt/notmuch-config +export NOTMUCH_CONFIG=~/.config/notmuch/config export CLEAN_HOME=/opt/clean export PATH=~/.local/bin:$PATH:$CLEAN_HOME/lib/exe:$CLEAN_HOME/bin diff --git a/x/.config/i3/config b/x/.config/i3/config index 489bcfa..1400a89 100644 --- a/x/.config/i3/config +++ b/x/.config/i3/config @@ -16,20 +16,17 @@ set $fontsize 12 # lock the screen after 10 minutes exec xautolock -locker ~/.local/bin/lock.sh &\ dunst &\ - ~/.local/bin/bg &\ urxvtd -q -o &\ + .local/bin/bg &\ setxkbmap -layout dvorak,ru -variant ,phonetic_dvorak -option compose:ralt,grp:menu_toggle # Toggle playback bindsym Pause exec mpc toggle -# Printscreen current window -bindsym Shift+Print exec ~/.local/bin/scr window # Printscreen +bindsym Shift+Print exec ~/.local/bin/scr window bindsym Print exec ~/.local/bin/scr # put a password in the clipboard bindsym $mod+y exec /usr/share/doc/pass/examples/dmenu/passmenu -bindsym $mod+b exec ~/.local/bin/network -bindsym $mod+Shift+b exec ~/.local/bin/wifi # font for window titles. font pango:$font 8 @@ -41,6 +38,9 @@ hide_edge_borders none # start a terminal bindsym $mod+Return exec i3-sensible-terminal +# lock +bindsym $mod+l exec xautolock -locknow + # kill focused window bindsym $mod+Shift+quotedbl kill @@ -54,8 +54,8 @@ bindsym $mod+n focus up bindsym $mod+s focus right # alternatively, you can use the cursor keys: -bindsym XF86MonBrightnessUp exec xbacklight -inc 10 -bindsym XF86MonBrightnessDown exec xbacklight -dec 10 +bindsym XF86MonBrightnessUp exec xbacklight -inc 5 +bindsym XF86MonBrightnessDown exec xbacklight -dec 5 bindsym XF86AudioMute exec amixer -c 1 set Master toggle bindsym XF86AudioLowerVolume exec amixer -c 1 set Master 5%- bindsym XF86AudioRaiseVolume exec amixer -c 1 set Master 5%+ diff --git a/x/.config/i3status/config b/x/.config/i3status/config index d3b3458..3067d41 100644 --- a/x/.config/i3status/config +++ b/x/.config/i3status/config @@ -1,24 +1,36 @@ general { colors = true - interval = 5 + interval = 3 } -order += "ethernet enp5s0" +order += "wireless wlp2s0" order += "volume master" order += "disk /" +order += "battery 0" order += "tztime local" +battery 0 { + format = "%status %percentage" + integer_battery_capacity = true + format_down = "No battery" + status_chr = "⚇ CHR" + status_bat = "⚡ BAT" + status_full = "☻ FULL" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 10 +} + +wireless wlp2s0 { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + volume master { format = "♪: %volume" format_muted = "♪: muted (%volume)" device = "hw:1" } -ethernet enp3s0f1 { - format_up = "E: %ip" - format_down ="E: down" -} - tztime local { format = "%Y-%m-%d %H:%M:%S" } diff --git a/x/.xinitrc b/x/.xinitrc index 18727cd..b757c66 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,3 +1,5 @@ #!/bin/bash -#eval "$(gpg-agent --daemon)" + +eval "$(gpg-agent --daemon)" + exec i3 -- 2.20.1