From 01b859e0545f3140c04ea082d1ab3d2b8d360efa Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 4 Aug 2020 14:49:16 -0400 Subject: [PATCH] various improvements --- brc | 4 +-- brc2 | 36 ++++++++++++++++++------- filesystem/etc/profile.d/environment.sh | 2 ++ i3-sway/common.conf | 4 ++- mail-setup | 1 + pkgs | 1 + radicale-setup | 2 +- subdir_files/.config/i3/config | 4 ++- subdir_files/.config/sway/config | 4 ++- subdir_files/.gnupg/gpg.conf | 4 +-- xl | 1 + 11 files changed, 46 insertions(+), 17 deletions(-) diff --git a/brc b/brc index c815ffd..f00310c 100644 --- a/brc +++ b/brc @@ -657,9 +657,9 @@ grr() { # grep recursive # Don't return 1 on nonmatch because this is meant to be # interactive, not in a conditional. if [[ ${#@} == 1 ]]; then - grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -RiIP --color=auto "$@" . || [[ $? == 1 ]] + grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -riIP --color=auto "$@" . || [[ $? == 1 ]] else - grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -RiIP --color=auto "$@" || [[ $? == 1 ]] + grep --exclude-dir='*.emacs.d' --exclude-dir='*.git' -riIP --color=auto "$@" || [[ $? == 1 ]] fi } rg() { diff --git a/brc2 b/brc2 index 472718e..8da9bbf 100644 --- a/brc2 +++ b/brc2 @@ -45,6 +45,10 @@ tback() { } +gnupload(){ + /a/f/gnulib/build-aux/gnupload "$@" +} + # todo, update this complete -F _longopt la lower low rlt rld rl lld ts ll dircp ex fcp fct fpst gr @@ -1046,8 +1050,21 @@ sl() { # inspired from https://github.com/Russell91/sshrc - local now args remote dorsync haveinfo tmpa sshinfo tmp tmp2 type info_sec force_rsync + local now args remote dorsync haveinfo tmpa sshinfo tmp tmp2 type info_sec force_rsync \ + sshinfo_dir sync_files_dir sync_files_dir declare -a args tmpa + # This folder stores info about what we detected or synced. We expect it to exist + # ahead of time. Change it for your own system. + sshinfo_dir=/p/sshinfo + + # This folder should contain files or symlinks to all files that + # should be rsynced to unknown hosts. The directory name is important, + # it will be created on the remote host under /root. symlinks will be + # resolved. It is expected to contain at least a .bashrc file or + # symlink. + sync_files_dir=/b/ds/sl/.iank + sync_dirname=${sync_files_dir##*/} + now=$(date +%s) # ssh [-1246Antivivisectionist] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] @@ -1095,7 +1112,8 @@ sl() { fi dorsync=false haveinfo=false - tmpa=(/p/sshinfo/???????????"$remote") + + tmpa=($sshinfo_dir/???????????"$remote") sshinfo=${tmpa[0]} if [[ -e $sshinfo ]]; then if $force_rsync; then @@ -1110,7 +1128,7 @@ sl() { type=${tmp2: -1} if [[ $type == b ]]; then info_sec=${tmp::10} - for f in /b/ds/sl/.iank/*; do + for f in $sync_files_dir/*; do if (( $(stat -L -c%Y $f) > info_sec )); then dorsync=true rm -f $sshinfo @@ -1120,7 +1138,7 @@ sl() { fi else # use this weird yes thing to ensure we know ssh succeeded - if ! tmp=$(command ssh "${args[@]}" "$remote" "if test -e /a/bin/ds/.bashrc -a -L .bashrc; then echo yes; fi"); then + if ! tmp=$(command ssh "${args[@]}" "$remote" "if test -e $sync_files_dir/.bashrc -a -L .bashrc; then echo yes; fi"); then echo failed sl test. doing plain ssh -v command ssh -v "${args[@]}" "$remote" fi @@ -1132,10 +1150,10 @@ sl() { fi fi if $dorsync; then - RSYNC_RSH="ssh ${args[*]}" rsync -rptL /b/ds/sl/.iank "$remote": + RSYNC_RSH="ssh ${args[*]}" rsync -rptL $sync_files_dir "$remote": fi if $dorsync || ! $haveinfo; then - sshinfo=/p/sshinfo/$now$type"$remote" + sshinfo=$sshinfo_dir/$now$type"$remote" touch $sshinfo chmod 666 $sshinfo fi @@ -1145,14 +1163,14 @@ sl() { # Theres a couple ways to do this. im not sure whats best, # but relying on bash 4.4+ escape quoting seems most reliable. command ssh "${args[@]}" "$remote" \ - BRC=t bash -c '.\ .iank/.bashrc\;"\"\$@\""' bash ${@@Q} + BRC=t bash -c '.\ '$sync_dirname'/.bashrc\;"\"\$@\""' bash ${@@Q} elif [[ ! -t 0 ]]; then # This case is when commands are being piped to ssh. # Normally, no bashrc gets sourced. # But, since we are doing all this, lets source it because we can. - cat <(echo . .iank/.bashrc) - | command ssh "${args[@]}" "$remote" BRC=t bash + cat <(echo . $sync_dirname/.bashrc) - | command ssh "${args[@]}" "$remote" BRC=t bash else - command ssh -t "${args[@]}" "$remote" BRC=t INPUTRC=.iank/.inputrc bash --rcfile .iank/.bashrc + command ssh -t "${args[@]}" "$remote" BRC=t INPUTRC=$sync_dirname/.inputrc bash --rcfile $sync_dirname/.bashrc fi else if [[ -t 0 ]]; then diff --git a/filesystem/etc/profile.d/environment.sh b/filesystem/etc/profile.d/environment.sh index ef303ba..e880ab0 100644 --- a/filesystem/etc/profile.d/environment.sh +++ b/filesystem/etc/profile.d/environment.sh @@ -3,6 +3,8 @@ if [ -f $HOME/path-add-function ]; then . $HOME/path-add-function path-add /usr/sbin /usr/local/sbin /sbin /a/exe /a/opt/bin path-add --end $HOME/.cabal/bin + path-add --end /snap/bin + for p in $HOME/.gem/ruby/*/bin; do path-add --ifexists --end $p diff --git a/i3-sway/common.conf b/i3-sway/common.conf index e44baf5..7bc5fc2 100644 --- a/i3-sway/common.conf +++ b/i3-sway/common.conf @@ -85,6 +85,8 @@ font pango:monospace 8 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd # Start clipster daemon -exec --no-startup-id /a/opt/clipster/clipster -d +#exec --no-startup-id /a/opt/clipster/clipster -d + + # shortcut to selection widget (primary) bindsym $mod+End exec /a/opt/clipster/clipster -sp diff --git a/mail-setup b/mail-setup index 5b8cdf7..1e073ba 100755 --- a/mail-setup +++ b/mail-setup @@ -1044,6 +1044,7 @@ fi + # * reload exim if systemctl is-active exim4 >/dev/null; then diff --git a/pkgs b/pkgs index b36efb3..d073599 100644 --- a/pkgs +++ b/pkgs @@ -110,6 +110,7 @@ p3=( geoip-bin geoip-database geoip-database-extra + gimp git-doc git-email git-svn diff --git a/radicale-setup b/radicale-setup index 657a0e9..3e3a997 100755 --- a/radicale-setup +++ b/radicale-setup @@ -16,7 +16,7 @@ fi source /a/bin/bash_unpublished/source-state source /a/bin/distro-functions/src/package-manager-abstractions -# davdroid setup instructions at the bottom +# davx/davdroid setup instructions at the bottom # main docs: # http://radicale.org/user_documentation/ diff --git a/subdir_files/.config/i3/config b/subdir_files/.config/i3/config index b62b5e5..8c6f2e1 100644 --- a/subdir_files/.config/i3/config +++ b/subdir_files/.config/i3/config @@ -85,7 +85,9 @@ font pango:monospace 8 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd # Start clipster daemon -exec --no-startup-id /a/opt/clipster/clipster -d +#exec --no-startup-id /a/opt/clipster/clipster -d + + # shortcut to selection widget (primary) bindsym $mod+End exec /a/opt/clipster/clipster -sp # exit i3 (logs you out of your X session) diff --git a/subdir_files/.config/sway/config b/subdir_files/.config/sway/config index 928bb05..494f7a7 100644 --- a/subdir_files/.config/sway/config +++ b/subdir_files/.config/sway/config @@ -85,7 +85,9 @@ font pango:monospace 8 #exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd # Start clipster daemon -exec --no-startup-id /a/opt/clipster/clipster -d +#exec --no-startup-id /a/opt/clipster/clipster -d + + # shortcut to selection widget (primary) bindsym $mod+End exec /a/opt/clipster/clipster -sp # exit sway (logs you out of your Wayland session) diff --git a/subdir_files/.gnupg/gpg.conf b/subdir_files/.gnupg/gpg.conf index 172e3a0..19d62ea 100644 --- a/subdir_files/.gnupg/gpg.conf +++ b/subdir_files/.gnupg/gpg.conf @@ -40,10 +40,10 @@ default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF #keyserver hkp://pool.sks-keyservers.net #keyserver hkp://keys.openpgp.org -keyserver hkp://pgp.mit.edu +#keyserver hkp://pgp.mit.edu #keyserver hkp://keyserver.pgp.com #keyserver hkp://ipv4.pool.sks-keyservers.net -#keyserver hkp://keys.gnupg.net +keyserver hkp://keys.gnupg.net #keyserver hkp://keyserver.ubuntu.com #keyserver hkp://keyring.debian.org #keyserver keyserver.ubuntu.com diff --git a/xl b/xl index be441bc..3f6ac1f 100755 --- a/xl +++ b/xl @@ -1,4 +1,5 @@ #!/bin/bash + if pgrep gnome-screensav &>/dev/null; then # this command actually starts gnome-screensaver if it isn\'t running. # lololol, what crap -- 2.30.2