From 8c9f3c9c69a1f76d8ffba1343fc0ab308fb4661a Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 6 Aug 2017 22:42:51 -0700 Subject: [PATCH] lots of misc updates --- .gitconfig | 58 +++--- .gitignore_global | 11 +- brc | 187 +++++++++++++++--- filesystem/etc/apt/preferences.d/radicale | 3 + filesystem/etc/client.conf | 2 + filesystem/etc/cron.d/ian | 2 +- filesystem/etc/modprobe.d/blacklist.conf | 2 + filesystem/etc/profile.d/environment.sh | 5 +- .../etc/systemd/system/mailroute.service | 16 -- fsf.sieve | 51 +++++ fsf.svbin | Bin 0 -> 1274 bytes .../{db.iank.pw => db.iank.life} | 5 +- .../li/filesystem/etc/bind/named.conf.local | 10 +- .../treetowl/filesystem/etc/cron.d/treetowl | 2 +- playlists/music/sad.xsp | 11 ++ playlists/music/sad5.xsp | 11 ++ subdir_files/.config/mpv/mpv.conf | 11 +- subdir_files/.config/sakura/sakura.conf | 2 +- subdir_files/.gnupg/gpg.conf | 8 +- subdir_files/.mpv/config | 2 - subdir_files/.xmonad/xmonad.hs | 18 +- subdir_files/sieve/maintest.sieve | 24 +++ 22 files changed, 340 insertions(+), 101 deletions(-) create mode 100644 filesystem/etc/apt/preferences.d/radicale create mode 100644 filesystem/etc/client.conf create mode 100644 filesystem/etc/modprobe.d/blacklist.conf delete mode 100644 filesystem/etc/systemd/system/mailroute.service create mode 100644 fsf.sieve create mode 100644 fsf.svbin rename machine_specific/li/filesystem/etc/bind/bind-writable/{db.iank.pw => db.iank.life} (75%) create mode 100644 playlists/music/sad.xsp create mode 100644 playlists/music/sad5.xsp delete mode 100644 subdir_files/.mpv/config create mode 100644 subdir_files/sieve/maintest.sieve diff --git a/.gitconfig b/.gitconfig index 0f70721..c4fd69d 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,47 +1,51 @@ [user] - name = Ian Kelling - email = ian@iankelling.org +name = Ian Kelling +email = iank@fsf.org [alias] - co = checkout - s = status - ci = commit - lol = log --graph --decorate --pretty=oneline --abbrev-commit --all +# Always use the git lg alias instead of git log. It's too easy to get +# confused by not seeing branches in git log output. +lg = log --graph --decorate +co = checkout +s = status +ci = commit +lol = log --graph --decorate --pretty=oneline --abbrev-commit --all + [core] - excludesfile = /home/ian/.gitignore_global +excludesfile = ~/.gitignore_global [github] - user = ian-kelling - token = d2dc0c5c6fef5378cc896a617e53c1a9 +user = ian-kelling +token = d2dc0c5c6fef5378cc896a617e53c1a9 [credential] - helper = cache +helper = cache - # new option, but not available yet on debian wheezy - # [push] +# new option, but not available yet on debian wheezy +# [push] # default = simple # based on ghc advice, # https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources [diff] - ignoreSubmodules = dirty - tool = meld +ignoreSubmodules = dirty +tool = meld [gitreview] - username = iank - remote = origin +username = iank +remote = origin # this is for newer git version. Doesn't work for ubuntu 12.04's version #[push] # default = simple [color] - ui = auto - status = auto - branch = auto - interactive = auto - diff = auto +ui = auto +status = auto +branch = auto +interactive = auto +diff = auto # for hooks. http://stackoverflow.com/questions/2293498/git-commit-hooks-global-settings [init] - templatedir = ~/.git_template +templatedir = ~/.git_template [difftool] - tool = meld - prompt = false +tool = meld +prompt = false [format] # This seemed like a good idea, but it broke interactive rebase, so disabled. # for format-patch, use --base=auto. This means we need to do @@ -57,5 +61,7 @@ # or git checkout -b my-branch origin/whatever # autoSetupMerge = always - # git pull always does rebase by default - autoSetupRebase = always +# git pull always does rebase by default +autoSetupRebase = always +[push] +default = simple diff --git a/.gitignore_global b/.gitignore_global index 4c5a3b9..5bc0376 100644 --- a/.gitignore_global +++ b/.gitignore_global @@ -1,5 +1,8 @@ +# file generated when emacs has a file open \#*\# -/GPATH -/GRTAGS -/GTAGS -*.~undo-tree~ +# files generated from gnu global +GPATH +GRTAGS +GTAGS +# file generated when vi has a file open +*.swp diff --git a/brc b/brc index 2d3f198..b163a09 100644 --- a/brc +++ b/brc @@ -543,28 +543,37 @@ fastboot() { /a/opt/androidsdk/platform-tools/fastboot "$@"; } # automatically installed/preinstalled apps fdroid_pkgs=( at.bitfire.davdroid + com.alaskalinuxuser.justnotes + com.artifex.mupdfdemo com.fsck.k9 com.ichi2.anki + com.jmstudios.redmoon com.notecryptpro com.nutomic.syncthingandroid com.termux + com.zoffcc.applications.zanavi + cz.martykan.forecastie de.danoeh.antennapod de.marmaro.krt.ffupdater im.vector.alpha # riot + info.papdt.blackblub me.ccrama.redditslide + me.tripsit.tripmobile net.gaast.giggity net.osmand.plus + net.sourceforge.opencamera org.dmfs.tasks # caldav tasks thing org.fdroid.fdroid + org.isoron.uhabits + org.kde.kdeconnect_tp org.quantumbadger.redreader - org.secuso.privacyfriendlyweather org.smssecure.smssecure org.fedorahosted.freeotp - com.ghostsq.commander - me.tripsit.tripmobile - # https://forum.xda-developers.com/android/software-hacking/wip-selinux-capable-superuser-t3216394 - me.phh.superuser ) +# https://forum.xda-developers.com/android/software-hacking/wip-selinux-capable-superuser-t3216394 +# for maru, +#me.phh.superuser + fdup() { local -A installed updated local p @@ -583,6 +592,20 @@ fdup() { done } +firefox-default-profile() { + key=Default value=1 section=$1 + file=/p/c/subdir_files/.mozilla/firefox/profiles.ini + sed -ri "/^ *$key/d" "$file" + sed -ri "/ *\[$section\]/,/^ *\[[^]]+\]/{/^\s*$key[[:space:]=]/d};/ *\[$section\]/a $key=$value" "$file" +} +fdhome() { #firefox default home profile + firefox-default-profile Profile0 +} + +fdwork() { + firefox-default-profile Profile4 +} + ff() { if type -P firefox &>/dev/null; then firefox "$@" @@ -916,6 +939,10 @@ k() { # history search grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | tail -n 80; } +ks() { # history search + grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | uniq; +} + make-targets() { # show make targets, via http://stackoverflow.com/questions/3063507/list-goals-targets-in-gnu-make @@ -947,8 +974,19 @@ mkc() { c "$1" } +mkt() { # mkdir and touch file + local path="$1" + mkdir -p "$(dirname "$path")" + touch "$path" +} + mkdir() { command mkdir -p "$@"; } +otp() { + echo "oathtool --totp -b" + oathtool --totp -b "$@" +} + pithos() { cd / export PYTHONPATH=/a/opt/Pithosfly @@ -1006,6 +1044,8 @@ pick-trash() { done } +ping8() { ping 8.8.8.8; } + pub() { rld /a/h/_site/ li:/var/www/iankelling.org/html } @@ -1099,13 +1139,15 @@ r2eadd() { # usage: name url # initial setup of rss2email: # r2e new r2e@iankelling.org # that initializes files, and sets default email. - # Would have been simpler to just leave it off since i\'m not - # using the default email. Symlinks won\'t work, so we use binds. - # mkdir /p/c/binds/.config/ - # mv ~/.config/rss2email.cfg /p/c/binds/.config/ - # mkdir /p/c/binds/.local/share/ - # mv ~/.local/share/rss2email.json /p/c/binds/.local/share/ - # conflink + # symlink to the config doesn't work, so I copied it to /p/c + # and then use cli option to specify explicit path. + # Only option changed from default config is to set + # force-from = True + # + # or else for a few feeds, the from address is set by the feed, and + # if I fail delivery, then I send a bounce message to that from + # address, which makes me be a spammer. + r2e add $1 "$2" $1@r2e.iankelling.org # get up to date and don't send old entries now: r2e run --no-send $1 @@ -1126,6 +1168,10 @@ EOF fi } +rmstrips() { + ssh fencepost head -n 300 /gd/gnuorg/EventAndTravelInfo/rms-current-trips.txt +} + s() { # background # I use a function because otherwise we can't use in a script, @@ -1199,6 +1245,40 @@ shellck() { shellcheck -e 2086,2046,2068,2006,2119 "$@" } +skaraoke() { + local tmp out + in="$1" + out=${2:-${1%.*}.sh} + tmp=$(mktemp -d) + script -t -c "mpv --no-config --no-resume-playback --no-terminal --no-audio-display '$1'" $tmp/typescript 2>$tmp/timing + # todo, the current sleep seems pretty good, but it + # would be nice to have an empirical measurement, or + # some better wait to sync up. + # + # note: --loop-file=no prevents it from hanging if you have that + # set to inf the mpv config. + # --loop=no prevents it from exit code 3 due to stdin if you + # had it set to inf in mpv config. + # + # args go to mpv, for example --volume=80, 50% + cat >$out </a/tmp/slog 2> >(tail) && sed -rn '/^Performed actions:/{n;n;p}' /a/tmp/slog | sort -u + sieve-filter ~/sieve/maintest.sieve "$@" >/tmp/testsieve.log 2> >(tail) && sed -rn '/^Performed actions:/{n;n;p}' /tmp/testsieve.log | sort -u } +# plain sieve testsieve() { sieve-filter ~/sieve/main.sieve "$@" } @@ -1373,14 +1466,14 @@ tu() { } tx() { # toggle set -x, and the prompt so it doesn't spam - if [[ $- == *x* ]]; then - set +x - PROMPT_COMMAND=prompt_command - else - unset PROMPT_COMMAND - PS1="\w \$ " - set -x - fi + if [[ $- == *x* ]]; then + set +x + PROMPT_COMMAND=prompt_command + else + unset PROMPT_COMMAND + PS1="\w \$ " + set -x + fi } psnetns() { @@ -1403,7 +1496,7 @@ vpncmd() { m s nsenter -t $(pgrep -f "/usr/sbin/openvpn --suppress-timestamps --nobind --config /etc/openvpn/client/client.conf") -n -m "$@" } vpnf() { - vpncmd gksudo -u ian firefox &r + vpncmd gksudo -u ian "firefox -no-remote -P firefox-main-profile" &r } vpnbash() { vpncmd bash @@ -1451,14 +1544,16 @@ vmunshare() { vm-set-listen $1 127.0.0.1 } + vpn() { - s systemctl start openvpn@client& - journalctl --unit=openvpn@client -f -n0 + [[ $1 ]] || { echo need arg; return 1; } + journalctl --unit=openvpn-client@$1 -f -n0 & + s systemctl start openvpn-client@$1 } - vpnoff() { - s systemctl stop openvpn@client + [[ $1 ]] || { echo need arg; return 1; } + s systemctl stop openvpn-client@$1 } @@ -1476,13 +1571,43 @@ vspicy() { # usage: VIRSH_DOMAIN } -whatismyip() { curl ipecho.net/plain ; echo; } +wtr() { curl wttr.in/boston; } +xl() { + # this succeeds even if gnome-screensaver isn't running. + gnome-screensaver-command --exit &>/dev/null + if ! pidof xscreensaver; then + xscreensaver & + # 1 was not long enough + sleep 3 + fi + xscreensaver-command -lock +} ############################# ######### misc stuff ######## ############################# +# from curl cheat.sh/:bash_completion +_cheatsh_complete_curl() +{ + local cur prev opts + _get_comp_words_by_ref -n : cur + + COMPREPLY=() + #cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="$(curl -s cheat.sh/:list | sed s@^@cheat.sh/@)" + + if [[ ${cur} == cheat.sh/* ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + __ltrim_colon_completions "$cur" + return 0 + fi +} +complete -F _cheatsh_complete_curl curl + + if [[ $- == *i* ]]; then # commands to run when bash exits normally trap "hl" EXIT diff --git a/filesystem/etc/apt/preferences.d/radicale b/filesystem/etc/apt/preferences.d/radicale new file mode 100644 index 0000000..073b78a --- /dev/null +++ b/filesystem/etc/apt/preferences.d/radicale @@ -0,0 +1,3 @@ +Package: firefox +Pin: release a=unstable +Pin-Priority: 500 diff --git a/filesystem/etc/client.conf b/filesystem/etc/client.conf new file mode 100644 index 0000000..d78e09b --- /dev/null +++ b/filesystem/etc/client.conf @@ -0,0 +1,2 @@ +# note, this needs to be disabled to print elsewhere. +ServerName printserver0.office.fsf.org diff --git a/filesystem/etc/cron.d/ian b/filesystem/etc/cron.d/ian index 65612f4..8327a14 100755 --- a/filesystem/etc/cron.d/ian +++ b/filesystem/etc/cron.d/ian @@ -1,2 +1,2 @@ SHELL=/bin/bash -*/10 * * * * ian /a/exe/rootsshsync +*/10 * * * * ian /a/exe/rootsshsync 2>&1 | /usr/local/bin/log-once -15 diff --git a/filesystem/etc/modprobe.d/blacklist.conf b/filesystem/etc/modprobe.d/blacklist.conf new file mode 100644 index 0000000..5318126 --- /dev/null +++ b/filesystem/etc/modprobe.d/blacklist.conf @@ -0,0 +1,2 @@ +blacklist pcspkr +blacklist snd_pcsp diff --git a/filesystem/etc/profile.d/environment.sh b/filesystem/etc/profile.d/environment.sh index 17b3b06..bc81673 100644 --- a/filesystem/etc/profile.d/environment.sh +++ b/filesystem/etc/profile.d/environment.sh @@ -60,7 +60,8 @@ fi # every user in a same group, so if you copy files there with exact # perms, that is probably not what you want. I don't use a system like # that. I don't care much either way, but the ubuntu one seems a bit -# more user friendly. -if (( EUID >= 1000 )); then +# more user friendly, and copying files between them is a pita with +# different umasks. +if test "$(id -u)" -ge 1000; then umask 002 fi diff --git a/filesystem/etc/systemd/system/mailroute.service b/filesystem/etc/systemd/system/mailroute.service deleted file mode 100644 index 68a6655..0000000 --- a/filesystem/etc/systemd/system/mailroute.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -# this unit is configured to start and stop whenever openvpn-client@mail.service -# does -Description=Routing for email vpn -After=network.target -BindsTo=openvpn-client@mail.service -After=openvpn-client@mail.service - -[Service] -Type=oneshot -ExecStart=/a/bin/distro-setup/mail-route start -ExecStop=/a/bin/distro-setup/mail-route stop -RemainAfterExit=yes - -[Install] -RequiredBy=openvpn-client@mail.service diff --git a/fsf.sieve b/fsf.sieve new file mode 100644 index 0000000..bf10e9d --- /dev/null +++ b/fsf.sieve @@ -0,0 +1,51 @@ +require [ "regex", "variables", "fileinto", "envelope", "mailbox", "imap4flags", "include" ]; + +if anyof ( + address :is "from" "sysadmin@gnu.org", + address :is "to" "sysadmin-nonrt@gnu.org", + address :is "from" "sysadmin-comment@gnu.org" + ) { + fileinto :create "sysadmin"; + stop; + } +elsif anyof ( + header :contains "list-id" "", + header :is "Return-path" "" + ) { +fileinto :create "rtcc"; + stop; +} + +if anyof ( + header :contains "list-id" "", + header :contains "list-id" "" + ) { + fileinto :create "sec"; + stop; + } + +if anyof ( + header :regex "subject" "mailing list memberships reminder", + address :is "to" "rtbounces@gnu.org", + address :is "to" "faxmaster@fsf.org", + address :is "from" "FaxMaster@fsf.org" + ) { + fileinto :create "log"; + stop; + } +# Return-path: + +if allof ( + address :is "from" "mailman-owner@zope.org", + header :is "subject" "zope.org mailing list memberships reminder" + ) { + discard; + stop; + } + +if anyof ( + header :contains "list-id" "" + ) { + fileinto :create "pirate-party"; + stop; + } diff --git a/fsf.svbin b/fsf.svbin new file mode 100644 index 0000000000000000000000000000000000000000..a6b13684b2044d61363dcb547b018a3596c00c06 GIT binary patch literal 1274 zcmah}L2uJA6n;&!rriqbG&FhuDZ8>Z6%s-mqG?%S1rf=4cHZajeeXRxA3yy1+yWQ2z&_W}JS*odw5K>; zmTL#?aU0-UxyC7c!r{C2gEk!;KXIb1el(w(u#^H^osda9Nn{d8Mi=;@;`g=$ozW#C zdkZ2MiBc+Y(bd}+SGk^3zMyG7$6erMgr!lg@!KpT^E*jOW_p9ic$^kf3N05Zt!>Z7 zK@|?PO`;v>f`j=wZX)swoPk_PGR+u2neigX#msCzD?tv%cMdAZnCD!m2Jmi^ZCFF& zJj*C=f_pmW;VxYEFR!42ZUqLnhnia8cqx-=%%Yg(`^R)~=qgh0S zJZE$13yPhaQemocvEH=3janGYX#kKoKb0&zQ zQb#R&n2}Y&gjBYRn&(Dc{l10caT02Uw*{|^z2i^K)fvD5e4zLqzz|*;>%%*=eH^!8 zyGD)Rjq!%?w)7st&YJhD@s8j}>AhKd`!Is{#ybSous*!5(T>})zbz}tN*Tcy=+#66 SB>G-%xQ}V*bn5>SxW56uzXx~# literal 0 HcmV?d00001 diff --git a/machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.pw b/machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.life similarity index 75% rename from machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.pw rename to machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.life index b55b642..6480971 100644 --- a/machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.pw +++ b/machine_specific/li/filesystem/etc/bind/bind-writable/db.iank.life @@ -1,6 +1,6 @@ $ORIGIN . $TTL 60 ; 1 minute -iank.pw IN SOA iank.pw. admin.iank.pw. ( +iank.life IN SOA iank.life. admin.iank.life. ( 25 ; serial 604800 ; refresh (1 week) 86400 ; retry (1 day) @@ -9,5 +9,4 @@ iank.pw IN SOA iank.pw. admin.iank.pw. ( ) NS n1.iankelling.org. NS n2.iankelling.org. -$TTL 86400 ; 1 day - A 67.170.73.44 + A 73.249.108.7 diff --git a/machine_specific/li/filesystem/etc/bind/named.conf.local b/machine_specific/li/filesystem/etc/bind/named.conf.local index de7b94e..8286002 100644 --- a/machine_specific/li/filesystem/etc/bind/named.conf.local +++ b/machine_specific/li/filesystem/etc/bind/named.conf.local @@ -9,13 +9,13 @@ include "/etc/bind/zones.rfc1918"; -zone "iank.pw" { +zone "iank.life" { type master; -file "/etc/bind/bind-writable/db.iank.pw"; +file "/etc/bind/bind-writable/db.iank.life"; update-policy { // allow host to update themselves with a key having their own name - grant iank.pw. name iank.pw. A TXT; - grant iank.pw. name *.iank.pw. A TXT; + grant iank.life. name iank.life. A TXT; + grant iank.life. name *.iank.life. A TXT; }; }; -include "/etc/bind/key.iank.pw"; +include "/etc/bind/key.iank.life"; diff --git a/machine_specific/treetowl/filesystem/etc/cron.d/treetowl b/machine_specific/treetowl/filesystem/etc/cron.d/treetowl index cded96a..485813f 100755 --- a/machine_specific/treetowl/filesystem/etc/cron.d/treetowl +++ b/machine_specific/treetowl/filesystem/etc/cron.d/treetowl @@ -6,7 +6,7 @@ # stored for 3 days, 2 months, and unlimited respectively SHELL=/bin/bash 0 4 * * * ian x=$(/usr/local/bin/logq /a/exe/small-backup --retry daily 2M); [[ $? != 0 ]] && echo "$x" -0 3 * * sun ian echo weekly backup results:; /a/exe/small-backup --retry weekly -batch -prefer ~/.mpv -silent 2>&1 | /usr/local/bin/log-once unison-mpv +0 3 * * sun ian echo weekly backup results:; /a/exe/small-backup --retry weekly */5 * * * * ian /a/bin/distro-setup/dynamic-ip-update.sh 2>&1 | /usr/local/bin/log-once -15 */10 * * * * ian /a/exe/small-backup 10minutes 3D 2>&1 | /usr/local/bin/log-once small-backup-10min # put things we don't want to send mail about below this: diff --git a/playlists/music/sad.xsp b/playlists/music/sad.xsp new file mode 100644 index 0000000..be00384 --- /dev/null +++ b/playlists/music/sad.xsp @@ -0,0 +1,11 @@ + + + sad + all + + sad + + + 7 + + diff --git a/playlists/music/sad5.xsp b/playlists/music/sad5.xsp new file mode 100644 index 0000000..7b86c5e --- /dev/null +++ b/playlists/music/sad5.xsp @@ -0,0 +1,11 @@ + + + sad5 + all + + sad + + + 9 + + diff --git a/subdir_files/.config/mpv/mpv.conf b/subdir_files/.config/mpv/mpv.conf index 8964c91..923bb30 100644 --- a/subdir_files/.config/mpv/mpv.conf +++ b/subdir_files/.config/mpv/mpv.conf @@ -1,4 +1,13 @@ #loop=inf + + +#loop-file=inf +loop-file=no +shuffle +#volume=50 +save-position-on-quit + +# use --profile d +[d] loop-file=inf shuffle -volume=50 \ No newline at end of file diff --git a/subdir_files/.config/sakura/sakura.conf b/subdir_files/.config/sakura/sakura.conf index 5e27d08..0e98edf 100644 --- a/subdir_files/.config/sakura/sakura.conf +++ b/subdir_files/.config/sakura/sakura.conf @@ -24,7 +24,7 @@ colorset6_back=rgb(0,0,0) colorset6_opacity=99 colorset6_key=F6 background=none -font=Ubuntu Mono,monospace 12 +font=Ubuntu Mono,monospace 13 show_always_first_tab=No scrollbar=true resize_grip=true diff --git a/subdir_files/.gnupg/gpg.conf b/subdir_files/.gnupg/gpg.conf index 189bf93..730369d 100644 --- a/subdir_files/.gnupg/gpg.conf +++ b/subdir_files/.gnupg/gpg.conf @@ -9,8 +9,8 @@ use-agent # standard short key ids are easy to collide # https://security.stackexchange.com/questions/84280/short-openpgp-key-ids-are-insecure-how-to-configure-gnupg-to-use-long-key-ids-i # https://evil32.com/ -#keyid-format 0xlong +# another option is 0xshort +keyid-format 0xlong -# however, not using for now, since I just want to -# identify the keys i have, not remote keys. -keyid-format 0xshort +# iank@fsf.org +default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF \ No newline at end of file diff --git a/subdir_files/.mpv/config b/subdir_files/.mpv/config deleted file mode 100644 index 7eca9ae..0000000 --- a/subdir_files/.mpv/config +++ /dev/null @@ -1,2 +0,0 @@ -# Write your default config options here! -save-position-on-quit diff --git a/subdir_files/.xmonad/xmonad.hs b/subdir_files/.xmonad/xmonad.hs index 6a0bd5a..b1b4e99 100644 --- a/subdir_files/.xmonad/xmonad.hs +++ b/subdir_files/.xmonad/xmonad.hs @@ -18,6 +18,7 @@ import XMonad.Config.Desktop import XMonad.Hooks.EwmhDesktops import XMonad.Config.Xfce import XMonad.Hooks.ManageDocks +import XMonad.Layout.NoFrillsDecoration import qualified XMonad.StackSet as W import qualified Data.Map as M @@ -29,8 +30,10 @@ import XMonad.Hooks.SetWMName -- /usr/share/xmonad/xmonad.hs on fedora has integration with gnome etc. but I -- had lots of problems with gnome integration. +myL = noFrillsDeco shrinkText def (layoutHook def) main = xmonad $ defaults +--main = xmonad def { layoutHook = myL } $ defaults defaults = desktopConfig @@ -81,10 +84,17 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [ ((modm, xK_q), io (exitWith ExitSuccess)) -- %! Quit xmonad , ((modm, xK_2), spawn "pavucontrol") - , ((modm, xK_3), spawn "firefox -no-remote -P sfw") - , ((modm, xK_4), spawn "firefox") - - , ((modm, xK_5), spawn "input-setup") +-- , ((modm, xK_3), spawn "firefox -no-remote -P sfw") +-- todo: clicking links in other applications won't open in +-- a firefox opened with -no-remote, so we have to hardcode a +-- primary firefox profile here. I'd rather have a command which +-- sets which is the pimary for opening links. It could alter a file, +-- and we could launch firefox with a wrapper script which looks at that file. + , ((modm, xK_3), spawn "firefox -P sfw") + , ((modm, xK_4), spawn "firefox -no-remote -P firefox-main-profile") + + , ((modm, xK_5), spawn "/a/exe/input-setup l") + , ((modm, xK_1), spawn "/a/exe/input-setup k") -- we would really want to keep track of which workspace is darkened, -- and change things depending on where that workspace is diff --git a/subdir_files/sieve/maintest.sieve b/subdir_files/sieve/maintest.sieve new file mode 100644 index 0000000..431fd67 --- /dev/null +++ b/subdir_files/sieve/maintest.sieve @@ -0,0 +1,24 @@ +# Sieve filter +# note: main is just a random name, since dovecot required a name +## +require [ "regex", "variables", "fileinto", "envelope", "mailbox", "imap4flags", "include" ]; + +# many examples out there check for "X-Spam-Status" "^Yes", but we do +# this in exim, which doesn't add that by default. We could modify it's +# config to add $spam_action to a header, like other headers, but simply +# using an integer threshold here is simpler: the default threshold for +# spamassassin is 5, so we have 5 plus symbols here. +if header :regex "x-spam_bar" "^\\+{5}" { + fileinto :create "Junk"; + stop; +} + +include :personal "personaltest"; + + +# note, i originally used something like this to filter mailing lists +# http://www.dovecot.org/list/dovecot/2014-September/097846.html +# However, I found that there were a lot of special cases +# where I did not want them filtered, like small mailing lists, etc, +# so I prefer to keep a list of lists that I want filed into folders. +# However, it was useful as an example for constructing that code. -- 2.30.2