systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit a8b85ae37d05e2ae8ebd408b63d346aa52f8ea60
parent a75f0899568166120134cc2d58727af79d0909a4
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sat, 14 Jul 2018 20:05:20 +0200

add termux setup

termux/.bash_aliases                               |  66 +++++++
termux/.bashrc                                     | 119 ++++++++++++
termux/1-system.sh                                 |  31 +++
termux/3-home.sh                                   |  28 +++
termux/Makefile                                    | 209 +++++++++++++++++++++
termux/diffHome.sh                                 |  41 ++++
termux/scMakefileDiff                              |  25 +++
...Commit_f2a9e957d1a174630ba1e726653c1fa10c31af8b |   0
termux/systemSetupCommit.sh                        |   4 +
termux/updateHome.sh                               |  23 +++
termux/wordexp.h                                   |  20 ++
11 files changed, 566 insertions(+)

Diffstat:
Atermux/.bash_aliases | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atermux/.bashrc | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atermux/1-system.sh | 31+++++++++++++++++++++++++++++++
Atermux/3-home.sh | 28++++++++++++++++++++++++++++
Atermux/Makefile | 209+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atermux/diffHome.sh | 41+++++++++++++++++++++++++++++++++++++++++
Atermux/scMakefileDiff | 25+++++++++++++++++++++++++
Atermux/scimCommit_f2a9e957d1a174630ba1e726653c1fa10c31af8b | 0
Atermux/systemSetupCommit.sh | 4++++
Atermux/updateHome.sh | 23+++++++++++++++++++++++
Atermux/wordexp.h | 20++++++++++++++++++++
11 files changed, 566 insertions(+), 0 deletions(-)

diff --git a/termux/.bash_aliases b/termux/.bash_aliases @@ -0,0 +1,66 @@ +if [ -f ~/.bash_aliases_local ]; then + . ~/.bash_aliases_local +fi + +alias pss='pwgen -s -y 20 6; echo ; pwgen -s 20 6' +alias l="ls -l -h" +alias la="ls -ltr" +alias ll="ls -al" +alias rd="rm -rf" +alias cd..='cd ..' +alias ..='cd ..' +alias ...='cd ../..' +alias suspend='sudo pm-suspend' +alias objdump='objdump -M intel' +alias g='git' +alias csv='sc-im --txtdelim=";"' +alias new='~/bin/new.sh' +alias mk='source ~/bin/mk.sh' +alias r='ranger' +alias z='sheepy' +alias h='history' + +# Display colors in less : +alias less="less -R" + +alias duu="du -h" +alias dfh="df -h" + +# Screen attach detach +alias sr="screen -r" +alias sd="screen -d" +alias ta="tmux attach" +alias tad="tmux attach -d" + +#alias webs="w3m -no-cookie -s -W www.google.com" +alias webs='~/bin/webs.sh' +alias cm="cmatrix -b -u 6 -a -C blue" + +# easydoneit +alias ,='edi' +alias ,l=', ls' +alias ,lc=',l -s|tac' +alias ,lt=',l -t|tac' +alias ,a=', add -t' +alias ,s=', search' +# Add task at bottom of list +alias ,bt=', topbot bottom;, cr' +# Add task on top of list +alias ,tt=', topbot top;, cr' + +# git +alias go='git checkout' +alias gi='git commit' +alias ga='git commit -a' +alias gd='git diff' +alias gp='git push' +alias gl='git pull' +alias gu='git status' +alias gg='git log' +alias gh='git gg' +alias gc='git clone' +alias gb='git blame' +alias gs='git show' + +alias lsb="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;35:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;31:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;35:*.au=00;35:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:\"" +alias lsd="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:\"" diff --git a/termux/.bashrc b/termux/.bashrc @@ -0,0 +1,119 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# don't put duplicate lines in the history. See bash(1) for more options +export HISTCONTROL=ignoredups + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +export HISTSIZE=100000 +export HISTFILESIZE=100000 +export HISTTIMEFORMAT="%y-%m-%d %T " + +# default editor +export EDITOR=vim + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + #PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h\[\e[33m\]:\w\[\e[0m\]> " + PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h\[\e[33m\]:\w\[\e[0m\] \D{%m-%d %H:%M}> " +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=always' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' + + export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" + export LESS=' -R ' +fi + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi diff --git a/termux/1-system.sh b/termux/1-system.sh @@ -0,0 +1,31 @@ +# easydoneit repo +#echo 'deb http://spartatek.se/packages/ unstable/' >> /etc/apt/sources.list + +pkg install vim curl wget tmux clang make tree screen ranger mc htop cmatrix dropbear elinks w3m nmap figlet lynx cowsay sl tig pwgen rsync valgrind fish gdb silversearcher-ag ncdu bmon toilet ncurses-dev + +# vim +#sed -i 's/"syntax on/syntax on/g' /etc/vim/vimrc +#cp vimrc.local /etc/vim/vimrc.local + +cp ../dotfiles/webs.sh /data/data/com.termux/files/usr/bin + +# diff-so-fancy +#git clone https://github.com/so-fancy/diff-so-fancy.git +#cp diff-so-fancy/diff-so-fancy /data/data/com.termux/files/usr/bin/ +#mkdir /data/data/com.termux/files/usr/bin/lib +#cp diff-so-fancy/lib/DiffHighlight.pm /data/data/com.termux/files/usr/bin/lib/ + +# sheepy +#git clone https://github.com/RemyNoulin/sheepy.git +#cd sheepy +#./install.sh +#spm install sheepyExamples -g + +# sc-im sc improved - vim-like spreadsheet calculator +cp wordexp.h /data/data/com.termux/files/usr/include/wordexp.h +pkg install bison +git clone https://github.com/andmarti1424/sc-im.git +cp Makefile sc-im/src/ +cd sc-im/src +make && make install +cd ../.. diff --git a/termux/3-home.sh b/termux/3-home.sh @@ -0,0 +1,28 @@ +./updateHome.sh + +#install vim vundle +git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +# in vim run :PluginInstall +echo 'in vim run :PluginInstall' + +# setup diff-so-fancy in gitconfig +## commented because it is in .gitconfig +git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" +git config --global color.ui true + +git config --global color.diff-highlight.oldNormal "red bold" +git config --global color.diff-highlight.oldHighlight "red bold 52" +git config --global color.diff-highlight.newNormal "green bold" +git config --global color.diff-highlight.newHighlight "green bold 22" + +git config --global color.diff.meta "227" +git config --global color.diff.frag "magenta bold" +git config --global color.diff.commit "227 bold" +git config --global color.diff.old "red bold" +git config --global color.diff.new "green bold" +git config --global color.diff.whitespace "red reverse" +git config --bool --global diff-so-fancy.markEmptyLines false +git config --bool --global diff-so-fancy.changeHunkIndicators false +git config --bool --global diff-so-fancy.stripLeadingSymbols false +git config --bool --global diff-so-fancy.useUnicodeRuler false diff --git a/termux/Makefile b/termux/Makefile @@ -0,0 +1,209 @@ +# Specify the name of the resulting executable file +name = sc-im + +# The base directory where everything should be installed. +prefix = /data/data/com.termux/files/usr/ + +EXDIR = $(prefix)/bin +HELPDIR = $(prefix)/share/$(name) +LIBDIR = $(prefix)/share/doc/$(name) + +# This is where the man page goes. +MANDIR = $(prefix)/share/man/man1 + +# Change these to your liking or use `make CC=gcc` etc +#CC = cc +#YACC = bison -y +#SED = sed + +LDLIBS += -lm -landroid-support -lncurses + +CFLAGS += -Wall -g -I/data/data/com.termux/files/usr/include/libandroid-support/ +CFLAGS += -DNCURSES +CFLAGS += -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE +CFLAGS += -DSNAME=\"$(name)\" +CFLAGS += -DHELP_PATH=\"$(HELPDIR)\" +CFLAGS += -DLIBDIR=\"$(LIBDIR)\" + +# Sets default pager, e.g. 'less' or 'more' +CFLAGS += -DDFLT_PAGER=\"less\" +# Sets default editor. Its use in case EDITOR env variable is not set +CFLAGS += -DDFLT_EDITOR=\"vim\" +# Comment out to disable color support +CFLAGS += -DUSECOLORS +# Command history file, relative to home directory. Comment out to disable commandline history +CFLAGS += -DHISTORY_FILE=\".$(name)info\" +# Input mode history. Same as previous, but for insert mode commands +CFLAGS += -DINS_HISTORY_FILE=\".$(name)info\" +# Comment out to disable undo/redo support +CFLAGS += -DUNDO +# Maximum number of rows in spreadsheet. Up to 1048576 +CFLAGS += -DMAXROWS=65536 +# Used for date formatting with C-d shortcut using you local d_fmt +CFLAGS += -DUSELOCALE + +# Clipboard support is OS dependent. +# +# Choose one of the following commands for copying to different clipboards: +# You can later change it at runtime. +#to copy to tmux clipboard: +CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\" +#to copy to X clipboard: +#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\" +#to copy to OSX clipboard: +#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""pbcopy <"\" +# +# Choose one of the proposed commands for pasting from different clipboards: +# You can later change it at runtime. +CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\" +#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\" +#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""pbpaste"\" + +# Uncomment for basic XLS import. Requires libxlsreader +#CFLAGS += -DXLS +#LDLIBS += -lxlsreader + +# Autobackup. If you unset this, no backup check nor autobackup feature will be available. +CFLAGS += -DAUTOBACKUP +# Have threads? Set these two, if you want the autobackup feature to work with threads. +CFLAGS += -DHAVE_PTHREAD + +ifneq ($(shell uname -s),Darwin) + LDLIBS += -pthread +endif + +# NOTE: libxlsxwriter is required for xlsx file export support +ifneq (,$(wildcard /usr/include/xlsxwriter.h)) + CFLAGS += -DXLSX_EXPORT + LDLIBS += -lxlsxwriter +endif +ifneq (,$(wildcard /usr/local/include/xlsxwriter.h)) + CFLAGS += -DXLSX_EXPORT + LDLIBS += -lxlsxwriter +endif + +# Check for gnuplot existance +ifneq (, $(shell which gnuplot)) + CFLAGS += -DGNUPLOT +endif + +# dynamic linking (not available in BSD) +ifneq ($(shell uname -s | grep -o BSD),BSD) + LDLIBS += -ldl +endif + +ifneq (, $(shell which pkg-config)) + # Any system with pkg-config + + # NOTE: ncursesw (required) + ifeq ($(shell uname -s),Darwin) + # macOS' ncurses is built with wide-char support + LDFLAGS += -lncurses + else ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no) + CFLAGS += $(shell pkg-config --cflags ncursesw) + LDLIBS += $(shell pkg-config --libs ncursesw) + else ifneq ($(shell pkg-config --exists ncurses || echo 'no'),no) + # hopefully this includes wide character support then + CFLAGS += $(shell pkg-config --cflags ncurses) + LDLIBS += $(shell pkg-config --libs ncurses) + else + LDLIBS += -lncursesw + endif + + # NOTE: libxml and libzip are required for xlsx file import support + ifneq ($(shell pkg-config --exists libzip libxml-2.0 || echo 'no'),no) + CFLAGS += -DXLSX $(shell pkg-config --cflags libxml-2.0 libzip) + LDLIBS += $(shell pkg-config --libs libxml-2.0 libzip) + endif + + # NOTE: lua support + ifneq ($(shell pkg-config --exists lua51 || echo 'no'),no) + CFLAGS += -DXLUA $(shell pkg-config --cflags lua51) + LDLIBS += $(shell pkg-config --libs lua51) -Wl,--export-dynamic + else ifneq ($(shell pkg-config --exists lua-5.1 || echo 'no'),no) # FreeBSD + CFLAGS += -DXLUA $(shell pkg-config --cflags lua-5.1) + ifneq ($(shell uname -s),Darwin) + LDLIBS += $(shell pkg-config --libs lua-5.1) -Wl,--export-dynamic + else + LDLIBS += $(shell pkg-config --libs lua-5.1) -rdynamic + endif + endif +else ifeq ($(shell uname -s),Darwin) + # macOS without pkg-config + + # macOS' ncurses is built with wide-char support + LDFLAGS += -lncurses +else ifeq ($(shell uname -s),NetBSD) + # NetBSD without pkg-config + + CFLAGS += -I/usr/pkg/include + CFLAGS += -I/usr/pkg/include/ncursesw + + LDFLAGS += -L/usr/pkg/lib + LDFLAGS += -Wl,-R/usr/pkg/lib + + LDLIBS += -lncursesw +endif + +OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard utils/*.c)) gram.o + +.PHONY : all clean install docs man_install man_uninstall + +all : $(name) + +install : + install -d $(DESTDIR)$(prefix)/bin + install $(name) $(DESTDIR)$(prefix)/bin/$(name) + install -d $(DESTDIR)$(HELPDIR) + install doc $(DESTDIR)$(HELPDIR)/$(name)_help + install plot_* $(DESTDIR)$(HELPDIR)/ + install -d $(DESTDIR)$(MANDIR)/ + install -m 644 sc-im.1 $(DESTDIR)$(MANDIR)/$(name).1 + +uninstall : + -rm $(DESTDIR)$(prefix)/bin/$(name) + -rm $(DESTDIR)$(HELPDIR)/$(name)_help + -rm $(DESTDIR)$(HELPDIR)/plot* + -rm $(DESTDIR)$(MANDIR)/$(name).1 + +$(name) : $(OBJS) + $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) + +$(name)qref: sc.h + $(CC) $(CFLAGS) $(LDFLAGS) -DQREF $(QREF_FMT) -DSCNAME=\"$(name)\" -o $(name)qref help.c $(LDLIBS) + +$(OBJS) : y.tab.h experres.h statres.h + +y.tab.h : gram.y gram.c + test -f y.tab.c && mv y.tab.c gram.c + +gram.c : gram.y + $(YACC) -d $< + +pvmtbl.o: sc.h pvmtbl.c + $(CC) ${CFLAGS} -c -DPSC pvmtbl.c + +experres.h : gram.y + sed -f eres.sed < gram.y > experres.h + +statres.h : gram.y + sed -f sres.sed < gram.y > statres.h + +docs: + doxygen Doxyfile + +man_install: + @cp -r ../docs/man/man3/ /usr/local/share/man/ + mandb + +# "sc-im" MUST match what is in Doxyfile `MAN_EXTENSION = .sc-im.3` +man_uninstall: + @rm -rf /usr/local/share/man/man3/*sc-im.3 + @mandb + +clean: + rm -f $(OBJS) + rm -f *res.h y.tab.h + rm -f core gram.c y.output pxmalloc.c pvmtbl.c tags $(name)qref + rm -f qhelp.c $(name) + rm -rf ../docs/ diff --git a/termux/diffHome.sh b/termux/diffHome.sh @@ -0,0 +1,41 @@ +echo diff ../dotfiles/.bash_aliases ~/.bash_aliases +diff ../dotfiles/.bash_aliases ~/.bash_aliases +echo diff ../dotfiles/.bashrc ~/.bashrc +diff ../dotfiles/.bashrc ~/.bashrc +echo diff ../dotfiles/.gdbinit ~/.gdbinit +diff ../dotfiles/.gdbinit ~/.gdbinit +echo diff ../dotfiles/.gitconfig ~/.gitconfig +diff ../dotfiles/.gitconfig ~/.gitconfig +echo diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +diff ../dotfiles/.gittemplates/hooks/prepare-commit-msg ~/.gittemplates/hooks/prepare-commit-msg +echo diff ../dotfiles/.tmux.conf ~/.tmux.conf +diff ../dotfiles/.tmux.conf ~/.tmux.conf +#diff -R ../dotfiles/.vim/* ~/.vim/ +echo diff ../dotfiles/.vimrc ~/.vimrc +diff ../dotfiles/.vimrc ~/.vimrc +#diff ../dotfiles/new.sh ~/bin/ +#diff ../dotfiles/updateXapianIndex.sh ~/bin/ +#diff ../dotfiles/xapianOmegaSearch.sh ~/bin/ +echo diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +diff ../dotfiles/gpg-agent.conf ~/.gnupg/gpg-agent.conf +echo diff ../dotfiles/.ssh/config ~/.ssh/config +diff ../dotfiles/.ssh/config ~/.ssh/config + +# i3 +#diff -R ../dotfiles/.i3/* ~/.i3/ + +# fluxbox +#diff -R ../dotfiles/.fluxbox/* ~/.fluxbox/ + +# mc +#diff -R ../dotfiles/mc/* ~/.config/mc/ + +# ranger sixel/mlterm configuration +echo diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +diff ../dotfiles/rc.conf ~/.config/ranger/rc.conf +echo diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py +diff ../dotfiles/default.py ~/.config/ranger/colorschemes/default.py + +echo +echo ---- +echo run ./systemSetupCommit.sh when the config is synchronized with latest commit diff --git a/termux/scMakefileDiff b/termux/scMakefileDiff @@ -0,0 +1,25 @@ +diff --git a/src/Makefile b/src/Makefile +index 652dc6a..e58b6d2 100755 +--- a/src/Makefile ++++ b/src/Makefile +@@ -2,7 +2,7 @@ + name = sc-im + + # The base directory where everything should be installed. +-prefix = /usr/local ++prefix = /data/data/com.termux/files/usr/ + + EXDIR = $(prefix)/bin + HELPDIR = $(prefix)/share/$(name) +@@ -16,9 +16,9 @@ MANDIR = $(prefix)/share/man/man1 + #YACC = bison -y + #SED = sed + +-LDLIBS += -lm ++LDLIBS += -lm -landroid-support -lncurses + +-CFLAGS += -Wall -g ++CFLAGS += -Wall -g -I/data/data/com.termux/files/usr/include/libandroid-support/ + CFLAGS += -DNCURSES + CFLAGS += -D_XOPEN_SOURCE_EXTENDED -D_GNU_SOURCE + CFLAGS += -DSNAME=\"$(name)\" diff --git a/termux/scimCommit_f2a9e957d1a174630ba1e726653c1fa10c31af8b b/termux/scimCommit_f2a9e957d1a174630ba1e726653c1fa10c31af8b diff --git a/termux/systemSetupCommit.sh b/termux/systemSetupCommit.sh @@ -0,0 +1,4 @@ +echo "last setup from commit:" > ~/.systemSetupCommit.txt +git show --oneline -s >> ~/.systemSetupCommit.txt +echo "Updated ~/.systemSetupCommit.txt" +cat ~/.systemSetupCommit.txt diff --git a/termux/updateHome.sh b/termux/updateHome.sh @@ -0,0 +1,23 @@ +cp .bash_aliases ~/ +cp .bashrc ~/ +cp ../dotfiles/.gdbinit ~/ +cp ../dotfiles/.gitconfig ~/ +mkdir ~/.gittemplates +cp -R ../dotfiles/.gittemplates/* ~/.gittemplates/ +cp ../dotfiles/.tmux.conf ~/ +mkdir ~/.vim +cp -R ../dotfiles/.vim/* ~/.vim/ +cp ../dotfiles/.vimrc ~/ +mkdir ~/bin +cp ../dotfiles/new.sh ~/bin/ +cp ../dotfiles/gf ~/bin/ +cp ../dotfiles/gr ~/bin/ +cp ../dotfiles/mk.sh ~/bin/ +mkdir ~/.gnupg +cp ../dotfiles/gpg-agent.conf ~/.gnupg/ +mkdir ~/.ssh +chmod 700 ~/.ssh +#cp ../dotfiles/.ssh/config ~/.ssh/ + +# save current commit in home +./systemSetupCommit.sh diff --git a/termux/wordexp.h b/termux/wordexp.h @@ -0,0 +1,20 @@ +#ifndef _WORDEXP_H_ +#define _WORDEXP_H_ + +#define WRDE_NOCMD 0 + +typedef struct { + size_t we_wordc; + char **we_wordv; + size_t we_offs; +} wordexp_t; + +static inline int wordexp(const char *c, wordexp_t *w, int _i) +{ + return -1; +} + +static inline void wordfree(wordexp_t *__wordexp) +{} + +#endif