terminal ssh stuff
authorIan Kelling <ian@iankelling.org>
Tue, 8 Sep 2020 19:43:03 +0000 (15:43 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 8 Sep 2020 19:43:03 +0000 (15:43 -0400)
29 files changed:
brc
brc2
distro-end
sl/.ianketiona/.bashrc [deleted symlink]
sl/.ianketiona/.emacs.d [deleted symlink]
sl/.ianketiona/.inputrc [deleted symlink]
sl/.ianketiona/brc [deleted symlink]
sl/.ianketiona/err [deleted symlink]
sl/.ianketiona/info [deleted symlink]
sl/.ianketiona/lib-src [deleted symlink]
sl/.ianketiona/lisp [deleted symlink]
sl/.ianketiona/ll-function [deleted symlink]
sl/.ianketiona/package-manager-abstractions [deleted symlink]
sl/.ianketiona/path-add-function [deleted symlink]
sl/.iankflidas/.bashrc [deleted symlink]
sl/.iankflidas/.emacs.d [deleted symlink]
sl/.iankflidas/.inputrc [deleted symlink]
sl/.iankflidas/brc [deleted symlink]
sl/.iankflidas/err [deleted symlink]
sl/.iankflidas/info [deleted symlink]
sl/.iankflidas/lib-src [deleted symlink]
sl/.iankflidas/lisp [deleted symlink]
sl/.iankflidas/ll-function [deleted symlink]
sl/.iankflidas/package-manager-abstractions [deleted symlink]
sl/.iankflidas/path-add-function [deleted symlink]
sl/rsync-excludes [deleted file]
sl/rsync-filter [new file with mode: 0644]
subdir_files/.local/share/kxmlgui5/konsole/README.ian
subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc

diff --git a/brc b/brc
index 76bcf1d4eb90196df2700ec971f3045811c55cc6..1e6bfb3c6c0393e7763f6f0591c58d154314591a 100644 (file)
--- a/brc
+++ b/brc
@@ -185,21 +185,20 @@ export SYSTEMD_LESS=$LESS
 
 export NNN_COLORS=2136
 
-export SL_FILES_DIR=/b/ds/sl/basic/.iank
+export SL_FILES_DIR=/b/ds/sl/.iank
 export SL_INFO_DIR=/p/sshinfo
-export SL_RSYNC_ARGS="--exclude-from=/b/ds/sl/rsync-excludes"
 
 
 # * include files
 
 if [[ -s $bashrc_dir/path-add-function ]]; then
   source $bashrc_dir/path-add-function
-  if [[ $SSH_CLIENT &&  -e $bashrc_dir/src/emacs ]]; then
-    path-add "$bashrc_dir/lib-src" "$bashrc_dir/src"
-    if [[ ! -e ~/.emacs.d ]]; then
-      # todo: patch emacs so it will look elsewhere. this is kinda sad:
-      # https://emacs.stackexchange.com/questions/4253/how-to-start-emacs-with-a-custom-user-emacs-directory
-      ln -sf $bashrc_dir/.emacs.d ~
+  if [[ $SSH_CLIENT ]]; then
+    if [[ -d /home/iank/.iank/e/e ]]; then
+      export EMACSDIR=/home/iank/.iank/e/e
+    fi
+    if [[ $EMACSDIR ]]; then
+      path-add "$EMACSDIR/lib-src" "$EMACSDIR/src"
     fi
   fi
 fi
@@ -706,17 +705,29 @@ and works in older versions of git which did not have that."
 
 g() {
 
-  local $narg
+  # todo: patch emacs so it will look elsewhere. this is kinda sad:
+  # https://emacs.stackexchange.com/questions/4253/how-to-start-emacs-with-a-custom-user-emacs-directory
+
+  local args
   if [[ $DISPLAY ]]; then
-    narg=-n
+    args=-n
   fi
-  if pgrep -u $EUID emacsclient && (( $# )); then
-    emacsclient -a "" $narg "$@"
+
+  if ! pgrep -u $EUID emacsclient || (( $# == 0 )); then
+    args+=" -c"
+  fi
+  if [[ $EMACSDIR ]]; then
+    EHOME=$HOME HOME=$EMACSDIR m emacsclient -a "" $args "$@"
   else
-    emacsclient -a "" $narg -c "$@"
+    m emacsclient -a "" $args "$@"
   fi
 }
 
+# force terminal verion
+gn() {
+  g -n "$@"
+}
+
 gh() {
   # i got an error, gh not found when doing a pull request, it seems like it wants itself in it\'s path.
   local _oldpath="$PATH"
@@ -1262,10 +1273,10 @@ sl() {
         sl_test_hook="$2"
         shift
         ;;
-      --sl_rsync_args)
-      sl_rsync_args="$2"
-      shift
-      ;;
+      --sl-rsync-args)
+        sl_rsync_args="$2"
+        shift
+        ;;
       *)
         break
         ;;
@@ -1338,7 +1349,7 @@ sl() {
     extra_info="${tmp:1}"
   fi
   if [[ $sl_test_hook ]]; then
-    $sl_test_hook "$extra_info"
+    RSYNC_RSH="ssh ${args[*]}" $sl_test_hook "$extra_info" "$remote"
   fi
 
   if $haveinfo && [[ $type == b ]]; then
diff --git a/brc2 b/brc2
index 322a8690542f2dc3f0fd2387f4edab186cd4f320..ded772062b32c99df55761718c20a44f3dfa277a 100644 (file)
--- a/brc2
+++ b/brc2
@@ -40,30 +40,50 @@ source /a/bin/log-quiet/logq-function
 
 # * functions
 
-export SL_TEST_CMD=". /etc/os-release ; echo \${VERSION//[^a-zA-Z0-9]/}"
-export SL_TEST_HOOK=slemacs
-
 slemacs() {
-  local arg
+  local arg rtime v
   arg="$1"
-  case $arg in
-    90Etiona)
-      export SL_FILES_DIR=/b/ds/sl/.ianketiona
-      ;;
-    80Flidas)
-      export SL_FILES_DIR=/b/ds/sl/.iankflidas
-      ;;
-    *)
-      export SL_FILES_DIR=/b/ds/sl/.iank
-      ;;
-  esac
+  remote="$2"
+  if [[ $arg == [89]0Etiona* ]]; then
+    v=${arg::1}
+    rtime=${arg#*Etiona} # remote time
+    if [[ ! $rtime ]]; then
+      rtime=0
+    fi
+    dir=/a/opt/emacs-trisquel${v}-nox/.iank
+    ltime=$(stat -c%Y $dir/e/e/.emacs.d/init.el)
+    if (( ltime > rtime )); then
+      m rsync -rptL --delete --filter=". /b/ds/sl/rsync-filter" $dir "$remote":/home/iank
+    fi
+  fi
 }
 
-slb() { # sl basic
-  export SL_FILES_DIR=/b/ds/sl/.iank
-  sl --sl-test-cmd "" --sl-test-hook "" --sl_rsync_args "" "$@"
+sle() { # sl emacs
+  local f=/home/iank/.emacs.d/init.el
+  sl --sl-test-cmd ". /etc/os-release ; printf %s \${VERSION//[^a-zA-Z0-9]/}; test -e $f && stat -c%Y $f" --sl-test-hook slemacs "$@"
 }
 
+# Run this manually after .emacs.d changes.  Otherwise, to check if
+# files changed with find takes 90ms. sl normally only adds 25ms.  We
+# could cut it down to 10ms if we put things on a btrfs filesystem and
+# looked for changes there, or used some inotify thing, but that seems
+# like too much work.
+egh() { # emacs gnuhope
+  RSYNC_RSH=ssh m rsync -rptL --delete --filter=". /b/ds/sl/rsync-filter" /a/opt/emacs-trisquel9-nox/.iank lists2d.fsf.org:.ianktrisquel_9
+  RSYNC_RSH=ssh m rsync -rptL --delete --filter=". /b/ds/sl/rsync-filter" /a/opt/emacs-trisquel8-nox/.iank lists2d.fsf.org:/home/iank
+}
+ekw() {
+  local shell="bash -s"
+  if [[ $HOSTNAME != kw ]]; then
+    shell="ssh kw.office.fsf.org"
+    bbk -m /a -t kw
+  fi
+  $shell <<'EOF'
+sudo mkdir /root/.ianktrisquel_9
+sudo rsync -rptL --delete --filter=". /b/ds/sl/rsync-filter" /a/opt/emacs-trisquel9-nox/.iank /root/.ianktrisquel_9
+rsync -rptL --delete --filter=". /b/ds/sl/rsync-filter" /a/opt/emacs-trisquel8-nox/.iank /home/iank
+EOF
+}
 
 mkschroot() {
   distro=$1
index 6de67d8d211bbcf5bf7681e257cef5184117a35a..f18d81001b1c30279054633d012ee8ca29267d5b 100755 (executable)
@@ -1620,6 +1620,18 @@ EOF
 fi
 
 
+if [[ $HOSTNAME == kw ]]; then
+  # hosts 1-199. 200+ are dynamic, avoid those
+  tu /etc/exports <<'EOF'
+/root/.ianktrisquel_9/.iank/e/e 192.168.0.0/25(rw,no_root_squash,async,no_subtree_check) 192.168.0.128/26(rw,no_root_squash,async,no_subtree_check) 192.168.0.192/29(rw,no_root_squash,async,no_subtree_check)
+/home/iank/.iank/e/e 192.168.0.0/25(rw,no_root_squash,async,no_subtree_check) 192.168.0.128/26(rw,no_root_squash,async,no_subtree_check) 192.168.0.192/29(rw,no_root_squash,async,no_subtree_check)
+EOF
+  ekw
+  sgo nfs-server
+  sudo exportfs -rav
+fi
+
+
 # if I was going to create a persistent vm, i might do it like this:
 # variant=something  # from: virt-install --os-variant list
 # s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
diff --git a/sl/.ianketiona/.bashrc b/sl/.ianketiona/.bashrc
deleted file mode 120000 (symlink)
index 4cd008b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../.bashrc
\ No newline at end of file
diff --git a/sl/.ianketiona/.emacs.d b/sl/.ianketiona/.emacs.d
deleted file mode 120000 (symlink)
index 2288841..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/iank/.emacs.d
\ No newline at end of file
diff --git a/sl/.ianketiona/.inputrc b/sl/.ianketiona/.inputrc
deleted file mode 120000 (symlink)
index 22cd52b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../.inputrc
\ No newline at end of file
diff --git a/sl/.ianketiona/brc b/sl/.ianketiona/brc
deleted file mode 120000 (symlink)
index 7a3ce73..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../brc
\ No newline at end of file
diff --git a/sl/.ianketiona/err b/sl/.ianketiona/err
deleted file mode 120000 (symlink)
index c877367..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/errhandle/err
\ No newline at end of file
diff --git a/sl/.ianketiona/info b/sl/.ianketiona/info
deleted file mode 120000 (symlink)
index df7daa8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisqueletiona-nox/info
\ No newline at end of file
diff --git a/sl/.ianketiona/lib-src b/sl/.ianketiona/lib-src
deleted file mode 120000 (symlink)
index ac271ba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisqueletiona-nox/lib-src
\ No newline at end of file
diff --git a/sl/.ianketiona/lisp b/sl/.ianketiona/lisp
deleted file mode 120000 (symlink)
index 5cab39d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisqueletiona-nox/lisp
\ No newline at end of file
diff --git a/sl/.ianketiona/ll-function b/sl/.ianketiona/ll-function
deleted file mode 120000 (symlink)
index 2633506..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/small-misc-bash/ll-function
\ No newline at end of file
diff --git a/sl/.ianketiona/package-manager-abstractions b/sl/.ianketiona/package-manager-abstractions
deleted file mode 120000 (symlink)
index 5e2f60f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/distro-functions/src/package-manager-abstractions
\ No newline at end of file
diff --git a/sl/.ianketiona/path-add-function b/sl/.ianketiona/path-add-function
deleted file mode 120000 (symlink)
index e5050c8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../path-add-function
\ No newline at end of file
diff --git a/sl/.iankflidas/.bashrc b/sl/.iankflidas/.bashrc
deleted file mode 120000 (symlink)
index 4cd008b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../.bashrc
\ No newline at end of file
diff --git a/sl/.iankflidas/.emacs.d b/sl/.iankflidas/.emacs.d
deleted file mode 120000 (symlink)
index 2288841..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/iank/.emacs.d
\ No newline at end of file
diff --git a/sl/.iankflidas/.inputrc b/sl/.iankflidas/.inputrc
deleted file mode 120000 (symlink)
index 22cd52b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../.inputrc
\ No newline at end of file
diff --git a/sl/.iankflidas/brc b/sl/.iankflidas/brc
deleted file mode 120000 (symlink)
index 7a3ce73..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../brc
\ No newline at end of file
diff --git a/sl/.iankflidas/err b/sl/.iankflidas/err
deleted file mode 120000 (symlink)
index c877367..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/errhandle/err
\ No newline at end of file
diff --git a/sl/.iankflidas/info b/sl/.iankflidas/info
deleted file mode 120000 (symlink)
index 0525e96..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisquelflidas-nox/info
\ No newline at end of file
diff --git a/sl/.iankflidas/lib-src b/sl/.iankflidas/lib-src
deleted file mode 120000 (symlink)
index fb57d92..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisquelflidas-nox/lib-src
\ No newline at end of file
diff --git a/sl/.iankflidas/lisp b/sl/.iankflidas/lisp
deleted file mode 120000 (symlink)
index 445e5d8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/opt/emacs-trisquelflidas-nox/lisp
\ No newline at end of file
diff --git a/sl/.iankflidas/ll-function b/sl/.iankflidas/ll-function
deleted file mode 120000 (symlink)
index 2633506..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/small-misc-bash/ll-function
\ No newline at end of file
diff --git a/sl/.iankflidas/package-manager-abstractions b/sl/.iankflidas/package-manager-abstractions
deleted file mode 120000 (symlink)
index 5e2f60f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/a/bin/distro-functions/src/package-manager-abstractions
\ No newline at end of file
diff --git a/sl/.iankflidas/path-add-function b/sl/.iankflidas/path-add-function
deleted file mode 120000 (symlink)
index e5050c8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../path-add-function
\ No newline at end of file
diff --git a/sl/rsync-excludes b/sl/rsync-excludes
deleted file mode 100644 (file)
index ab05ba7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/.iank*/.emacs.d/.ido.last
-/.iank*/.emacs.d/.savehist
-/.iank*/.emacs.d/.smex-items
-/.iank*/.emacs.d/ac-comphist.dat
-/.iank*/.emacs.d/auto-save-list
-/.iank*/.emacs.d/org-clock-save.el
-/.iank*/.emacs.d/recentf*
-/.iank*/.emacs.d/session.*
-/.iank*/.emacs.d/tramp
-/.iank*/.emacs.d/auto-save-list
-/.iank*/.emacs.d/%backup%~
-/.iank*/.emacs.d/network-security.data
-/.iank*/.emacs.d/elpa/gnupg/S.gpg-agent
-/.iank*/.emacs.d/url
-/.iank*/.emacs.d/.org-id-locations
-/.iank*/.emacs.d/eshell
-/.iank*/.emacs.d/bbdb
diff --git a/sl/rsync-filter b/sl/rsync-filter
new file mode 100644 (file)
index 0000000..db1cb51
--- /dev/null
@@ -0,0 +1,26 @@
+- /.iank/e/e/.emacs.d/.ido.last
+- /.iank/e/e/.emacs.d/.savehist
+- /.iank/e/e/.emacs.d/.smex-items
+- /.iank/e/e/.emacs.d/ac-comphist.dat
+- /.iank/e/e/.emacs.d/auto-save-list
+- /.iank/e/e/.emacs.d/org-clock-save.el
+- /.iank/e/e/.emacs.d/recentf*
+- /.iank/e/e/.emacs.d/session.*
+- /.iank/e/e/.emacs.d/tramp
+- /.iank/e/e/.emacs.d/auto-save-list
+- /.iank/e/e/.emacs.d/%backup%~
+- /.iank/e/e/.emacs.d/network-security.data
+- /.iank/e/e/.emacs.d/elpa/gnupg/S.gpg-agent
+- /.iank/e/e/.emacs.d/url
+- /.iank/e/e/.emacs.d/.org-id-locations
+- /.iank/e/e/.emacs.d/eshell
+- /.iank/e/e/.emacs.d/bbdb
++ /.iank/e/e/lisp/***
++ /.iank/e/e/lib-src/***
++ /.iank/e/e/info/***
++ /.iank/e/e/etc/***
++ /.iank/e/e/.emacs.d/***
++ /.iank/e/e/src
++ /.iank/e/e/src/emacs
++ /.iank/e/e/src/emacs.pdmp
+- /.iank/e/e/**
index c206592029d94e5a47870a4b2944dcbed2c15be0..2d156cd2bb241288cadbb52ae84dc8dfcfce600f 100644 (file)
@@ -1,3 +1,5 @@
 sessionui.rc is the result of starting konsole with no profile, and setting the following keybinds:
 open file manager with ctrl-shift-2.
-no shortcut for next tab and previous tab and view next container.
+no shortcut for next tab and previous tab and view next container
+
+Later in konsole i removed the keybind for ctrl-alt-s, but its as if it saved somewhere other than the file itself.
index 079fdef7ccee83bcdb8ad01a48ff1cc1dfb2375a..1a8d337b4ba34ab178cf8abe97dba1acd02b503a 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartgui>
-<kpartgui name="session" version="24">
+<kpartgui version="24" name="session">
  <MenuBar>
   <Menu name="file">
    <Action group="session-operations" name="file_save_as"/>
   <Action name="close-session"/>
  </Menu>
  <ActionProperties scheme="Default">
-  <Action name="open-browser" shortcut="Ctrl+@"/>
-  <Action name="edit_find_next" shortcut="Ctrl+Shift+R"/>
-  <Action name="edit_find_prev" shortcut="Ctrl+Shift+E"/>
-  <Action name="enlarge-font" shortcut="Ctrl++; "/>
+  <Action shortcut="Ctrl+@" name="open-browser"/>
+  <Action shortcut="Ctrl+Shift+R" name="edit_find_next"/>
+  <Action shortcut="Ctrl+Shift+E" name="edit_find_prev"/>
+  <Action shortcut="Ctrl++; " name="enlarge-font"/>
+  <Action shortcut="" name="rename-session"/>
+  <Action shortcut="" name="zmodem-upload"/>
  </ActionProperties>
 </kpartgui>