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
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"
sl_test_hook="$2"
shift
;;
- --sl_rsync_args)
- sl_rsync_args="$2"
- shift
- ;;
+ --sl-rsync-args)
+ sl_rsync_args="$2"
+ shift
+ ;;
*)
break
;;
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
# * 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
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 \
+++ /dev/null
-../../.bashrc
\ No newline at end of file
+++ /dev/null
-/home/iank/.emacs.d
\ No newline at end of file
+++ /dev/null
-../../.inputrc
\ No newline at end of file
+++ /dev/null
-../../brc
\ No newline at end of file
+++ /dev/null
-/a/bin/errhandle/err
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisqueletiona-nox/info
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisqueletiona-nox/lib-src
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisqueletiona-nox/lisp
\ No newline at end of file
+++ /dev/null
-/a/bin/small-misc-bash/ll-function
\ No newline at end of file
+++ /dev/null
-/a/bin/distro-functions/src/package-manager-abstractions
\ No newline at end of file
+++ /dev/null
-../../path-add-function
\ No newline at end of file
+++ /dev/null
-../../.bashrc
\ No newline at end of file
+++ /dev/null
-/home/iank/.emacs.d
\ No newline at end of file
+++ /dev/null
-../../.inputrc
\ No newline at end of file
+++ /dev/null
-../../brc
\ No newline at end of file
+++ /dev/null
-/a/bin/errhandle/err
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisquelflidas-nox/info
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisquelflidas-nox/lib-src
\ No newline at end of file
+++ /dev/null
-/a/opt/emacs-trisquelflidas-nox/lisp
\ No newline at end of file
+++ /dev/null
-/a/bin/small-misc-bash/ll-function
\ No newline at end of file
+++ /dev/null
-/a/bin/distro-functions/src/package-manager-abstractions
\ No newline at end of file
+++ /dev/null
-../../path-add-function
\ No newline at end of file
+++ /dev/null
-/.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
--- /dev/null
+- /.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/**
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.
<!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>