add_new_user.sh: support so36.NET users.

This commit is contained in:
2021-02-18 01:38:49 +01:00
parent 41717efb88
commit 4b41293637
17 changed files with 847 additions and 2 deletions

View File

@ -0,0 +1,4 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMyXy0+TVREnROtJOzuFFrFW18UXaRyWWLm4Z1vCOXU home
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKb9VsHdwzIW8MpEtOKzWPJW+toe1UL1odj4k0mtYPac work
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJywUxxa2hNC8DNGmiyyLDaY0BP8muqqR1upMS8vBx6O laptop
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDagKCAB1wvXdGlPMG5HWSB6SbIFuUkJ7A5PGvUnouVQ mobile

View File

@ -0,0 +1,49 @@
# prefix C-A like screen
set-option -g prefix C-a
bind-key C-a send-prefix
unbind-key C-b
# more screen-like behavior
unbind-key A
bind-key A command-prompt "rename-window %%"
unbind Space
bind Space next-window
unbind BSpace
bind BSpace previous-window
unbind-key '$'
bind-key k kill-window
# toggle status bar
bind-key b set-option status
# select windows with function keys
bind-key -n F1 select-window -t :1
bind-key -n F2 select-window -t :2
bind-key -n F3 select-window -t :3
bind-key -n F4 select-window -t :4
bind-key -n F5 select-window -t :5
bind-key -n F6 select-window -t :6
bind-key -n F7 select-window -t :7
bind-key -n F8 select-window -t :8
bind-key -n F9 select-window -t :9
bind-key -n F10 select-window -t :10
bind-key -n F11 select-window -t :11
# status line
set -g status-right '#H'
set -g status-bg black
set -g status-fg white
set-window-option -g window-status-current-bg white
set-window-option -g window-status-current-fg black
# rename client window to command
set-window-option -g automatic-rename on
# rename terminal window title
set-option -g set-titles on
set-option -g set-titles-string "#T - #W - #I - #S - tmux"
# window notifications
#set-window-option -g monitor-activity on
# browse URLs
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer"'

View File

@ -0,0 +1,86 @@
#-----------------------------
# settings
#-----------------------------
# parameters
export SAVEHIST="1000"
# colors
autoload -U colors && colors
# zshoptions
unsetopt EXTENDED_HISTORY # history: disable timestamp
setopt HIST_IGNORE_DUPS # history: no duplicates
setopt HIST_IGNORE_ALL_DUPS # history: no duplicates in entire history
setopt HIST_REDUCE_BLANKS # history: remove superfluous blanks
setopt SHARE_HISTORY # history: read and write on each command
setopt PRINT_EIGHT_BIT # print eight bit characters literally
unsetopt MAIL_WARNING # mail: disable notification
#-----------------------------
# keybindings
#-----------------------------
# http://zshwiki.org/home/zle/bindkeys#why_isn_t_control-r_working_anymore
bindkey -e
bindkey -M emacs "$terminfo[kdch1]" delete-char
bindkey -M emacs "$terminfo[khome]" beginning-of-line
bindkey -M emacs "$terminfo[kend]" end-of-line
# move between words with alt+arrow
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
# fix "del" key: https://git.suckless.org/st/plain/FAQ
if [ $TERM = "st-256color" ]
then
function zle-line-init () { echoti smkx }
function zle-line-finish () { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
fi
#-----------------------------
# prompt
#-----------------------------
EXITCODE="%(?..%?%1v )"
if [ $EXITCODE = 0 ]
then
unset COLORED_EXITCODE
else
COLORED_EXITCODE="%{$fg_bold[red]%}${EXITCODE}"
fi
if [ $UID = 0 ]
then
UID_COLOR="%{$fg_bold[red]%}"
else
UID_COLOR="%{$fg_bold[cyan]%}"
fi
PROMPT="${COLORED_EXITCODE}${UID_COLOR}%n%{$reset_color%}@%m %B%~%b %{$fg_bold[green]%}%#%{$reset_color%} "
#-----------------------------
# window title
#-----------------------------
case $TERM in
xterm*|rxvt*)
precmd () { print -Pn "\e]0;%n@%M %~ - $TERM\a" }
preexec () { print -Pn "\e]0;%n@%M %~ %# $1 - $TERM\a" }
;;
screen*)
precmd () { print -Pn "\e]0;%n@%M %~ \a" }
preexec () { print -Pn "\e]0;%n@%M %~ %# $1\a" }
;;
esac
#-----------------------------
# global shell settings
#-----------------------------
source ~alex/.shrc
ZLS_COLORS=$ZLS_COLORS