Merge branch 'main' of ssh://git.a09.uk:48765/alex/alex-environ
This commit is contained in:
commit
985a7b6159
9 changed files with 3835 additions and 8 deletions
3587
home/.bash_profile.d/bash_completions.d/git-completion.bash
Executable file
3587
home/.bash_profile.d/bash_completions.d/git-completion.bash
Executable file
File diff suppressed because it is too large
Load diff
170
home/.bash_profile.d/bash_completions.d/make
Normal file
170
home/.bash_profile.d/bash_completions.d/make
Normal file
|
@ -0,0 +1,170 @@
|
|||
# bash completion for GNU make -*- shell-script -*-
|
||||
|
||||
_make_target_extract_script()
|
||||
{
|
||||
local mode="$1"
|
||||
shift
|
||||
|
||||
local prefix="$1"
|
||||
local prefix_pat=$(command sed 's/[][\,.*^$(){}?+|/]/\\&/g' <<<"$prefix")
|
||||
local basename=${prefix##*/}
|
||||
local dirname_len=$((${#prefix} - ${#basename}))
|
||||
|
||||
if [[ $mode == -d ]]; then
|
||||
# display mode, only output current path component to the next slash
|
||||
local output="\2"
|
||||
else
|
||||
# completion mode, output full path to the next slash
|
||||
local output="\1\2"
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
1,/^# * Make data base/ d; # skip any makefile output
|
||||
/^# * Finished Make data base/,/^# * Make data base/{
|
||||
d; # skip any makefile output
|
||||
}
|
||||
/^# * Variables/,/^# * Files/ d; # skip until files section
|
||||
/^# * Not a target/,/^$/ d; # skip not target blocks
|
||||
/^${prefix_pat}/,/^$/! d; # skip anything user dont want
|
||||
|
||||
# The stuff above here describes lines that are not
|
||||
# explicit targets or not targets other than special ones
|
||||
# The stuff below here decides whether an explicit target
|
||||
# should be output.
|
||||
|
||||
/^# * File is an intermediate prerequisite/ {
|
||||
s/^.*$//;x; # unhold target
|
||||
d; # delete line
|
||||
}
|
||||
|
||||
/^$/ { # end of target block
|
||||
x; # unhold target
|
||||
/^$/d; # dont print blanks
|
||||
s|^\(.\{${dirname_len}\}\)\(.\{${#basename}\}[^:/]*/\{0,1\}\)[^:]*:.*$|${output}|p;
|
||||
d; # hide any bugs
|
||||
}
|
||||
|
||||
# This pattern includes a literal tab character as \t is not a portable
|
||||
# representation and fails with BSD sed
|
||||
/^[^# :%]\{1,\}:/ { # found target block
|
||||
/^\.PHONY:/ d; # special target
|
||||
/^\.SUFFIXES:/ d; # special target
|
||||
/^\.DEFAULT:/ d; # special target
|
||||
/^\.PRECIOUS:/ d; # special target
|
||||
/^\.INTERMEDIATE:/ d; # special target
|
||||
/^\.SECONDARY:/ d; # special target
|
||||
/^\.SECONDEXPANSION:/ d; # special target
|
||||
/^\.DELETE_ON_ERROR:/ d; # special target
|
||||
/^\.IGNORE:/ d; # special target
|
||||
/^\.LOW_RESOLUTION_TIME:/ d; # special target
|
||||
/^\.SILENT:/ d; # special target
|
||||
/^\.EXPORT_ALL_VARIABLES:/ d; # special target
|
||||
/^\.NOTPARALLEL:/ d; # special target
|
||||
/^\.ONESHELL:/ d; # special target
|
||||
/^\.POSIX:/ d; # special target
|
||||
/^\.NOEXPORT:/ d; # special target
|
||||
/^\.MAKE:/ d; # special target
|
||||
EOF
|
||||
|
||||
# don't complete with hidden targets unless we are doing a partial completion
|
||||
if [[ -z ${prefix_pat} || ${prefix_pat} == */ ]]; then
|
||||
cat <<EOF
|
||||
/^${prefix_pat}[^a-zA-Z0-9]/d; # convention for hidden tgt
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
h; # hold target
|
||||
d; # delete line
|
||||
}
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
_make()
|
||||
{
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
||||
local makef makef_dir=("-C" ".") i
|
||||
|
||||
case $prev in
|
||||
--file | --makefile | --old-file | --assume-old | --what-if | --new-file | \
|
||||
--assume-new | -!(-*)[foW])
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
--include-dir | --directory | -!(-*)[ICm])
|
||||
_filedir -d
|
||||
return
|
||||
;;
|
||||
-!(-*)E)
|
||||
COMPREPLY=($(compgen -v -- "$cur"))
|
||||
return
|
||||
;;
|
||||
--eval | -!(-*)[DVx])
|
||||
return
|
||||
;;
|
||||
--jobs | -!(-*)j)
|
||||
COMPREPLY=($(compgen -W "{1..$(($(_ncpus) * 2))}" -- "$cur"))
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
$split && return
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
local opts="$(_parse_help "$1")"
|
||||
COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur"))
|
||||
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
|
||||
elif [[ $cur == *=* ]]; then
|
||||
prev=${cur%%=*}
|
||||
cur=${cur#*=}
|
||||
local diropt
|
||||
[[ ${prev,,} == *dir?(ectory) ]] && diropt=-d
|
||||
_filedir $diropt
|
||||
else
|
||||
# before we check for makefiles, see if a path was specified
|
||||
# with -C/--directory
|
||||
for ((i = 1; i < ${#words[@]}; i++)); do
|
||||
if [[ ${words[i]} == -@(C|-directory) ]]; then
|
||||
# eval for tilde expansion
|
||||
eval "makef_dir=( -C \"${words[i + 1]}\" )"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# before we scan for targets, see if a Makefile name was
|
||||
# specified with -f/--file/--makefile
|
||||
for ((i = 1; i < ${#words[@]}; i++)); do
|
||||
if [[ ${words[i]} == -@(f|-?(make)file) ]]; then
|
||||
# eval for tilde expansion
|
||||
eval "makef=( -f \"${words[i + 1]}\" )"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# recognise that possible completions are only going to be displayed
|
||||
# so only the base name is shown
|
||||
local mode=--
|
||||
if ((COMP_TYPE != 9)); then
|
||||
mode=-d # display-only mode
|
||||
fi
|
||||
|
||||
local IFS=$' \t\n' script=$(_make_target_extract_script $mode "$cur")
|
||||
COMPREPLY=($(LC_ALL=C \
|
||||
$1 -npq __BASH_MAKE_COMPLETION__=1 \
|
||||
${makef+"${makef[@]}"} "${makef_dir[@]}" .DEFAULT 2>/dev/null |
|
||||
command sed -ne "$script"))
|
||||
|
||||
if [[ $mode != -d ]]; then
|
||||
# Completion will occur if there is only one suggestion
|
||||
# so set options for completion based on the first one
|
||||
[[ ${COMPREPLY-} == */ ]] && compopt -o nospace
|
||||
fi
|
||||
|
||||
fi
|
||||
} &&
|
||||
complete -F _make make gmake gnumake pmake colormake bmake
|
||||
|
||||
# ex: filetype=sh
|
61
home/.config/htop/htoprc
Normal file
61
home/.config/htop/htoprc
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.2.1
|
||||
config_reader_min_version=3
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=1
|
||||
show_program_path=1
|
||||
highlight_base_name=1
|
||||
highlight_deleted_exe=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=1
|
||||
header_margin=1
|
||||
screen_tabs=0
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_one=0
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
hide_function_bar=0
|
||||
header_layout=two_50_50
|
||||
column_meters_0=AllCPUs Memory Zram Swap
|
||||
column_meter_modes_0=1 1 1 1
|
||||
column_meters_1=Tasks LoadAverage Uptime Systemd DiskIO NetworkIO
|
||||
column_meter_modes_1=2 2 2 2 2 2
|
||||
tree_view=0
|
||||
sort_key=47
|
||||
tree_sort_key=47
|
||||
sort_direction=-1
|
||||
tree_sort_direction=-1
|
||||
tree_view_always_by_pid=0
|
||||
all_branches_collapsed=0
|
||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||
.sort_key=PERCENT_MEM
|
||||
.tree_sort_key=PERCENT_MEM
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=-1
|
||||
.all_branches_collapsed=0
|
||||
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE
|
||||
.sort_key=IO_RATE
|
||||
.tree_sort_key=PID
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
|
@ -140,7 +140,7 @@ confidence=
|
|||
# exception-escape,
|
||||
# comprehension-escape
|
||||
|
||||
disable=bad-continuation,unused-variable,line-too-long
|
||||
disable=bad-continuation,unused-variable,line-too-long,missing-class-docstring
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
|
|
|
@ -7,3 +7,5 @@ exe "source " . g:my_environ_dir . "/home/.vimrc.d/filetypes.vim"
|
|||
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/plugins.vim"
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/dev-environ.vim"
|
||||
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/gui.vim"
|
||||
|
|
|
@ -48,6 +48,7 @@ set hlsearch " Highlight all search matches
|
|||
set showmatch " Show the matching bracket
|
||||
set matchpairs=(:),{:},[:] " List of characters we expect in balanced pairs
|
||||
set cursorline " Highlights the current line
|
||||
set cursorcolumn " Highlights the current column
|
||||
|
||||
" Mouse options:
|
||||
set mouse=a " Enable the mouse for all modes
|
||||
|
@ -140,10 +141,6 @@ endif
|
|||
|
||||
" APPEARANCE
|
||||
" ---------------------------------------
|
||||
if has('gui_running')
|
||||
set guifont=Monospace\ 14
|
||||
endif
|
||||
|
||||
" Fallback colors
|
||||
colorscheme peachpuff
|
||||
|
||||
|
|
8
home/.vimrc.d/gui.vim
Normal file
8
home/.vimrc.d/gui.vim
Normal file
|
@ -0,0 +1,8 @@
|
|||
if has('gui_running')
|
||||
set guifont=Menlo\ Regular:h20
|
||||
set columns=90
|
||||
set lines=30
|
||||
|
||||
autocmd VimEnter * if !argc() | NERDTree | endif
|
||||
let g:NERDTreeMouseMode=3
|
||||
endif
|
|
@ -23,6 +23,7 @@ function! LoadPlugins()
|
|||
|
||||
Plug 'amanning9/django-plus.vim' " Improvements for identifying files in django projects.
|
||||
Plug 'towolf/vim-helm'
|
||||
Plug 'Glench/Vim-Jinja2-Syntax' " Jinja syntax detection.
|
||||
endfunction
|
||||
|
||||
" PLUGIN INITIALISATION
|
||||
|
@ -50,7 +51,6 @@ call plug#end()
|
|||
if has('gui_running')
|
||||
set background=dark
|
||||
colorscheme solarized
|
||||
"set guifont=Menlo\ Regular:h12
|
||||
else
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
|
|
|
@ -5,6 +5,8 @@ SSH_ENV=$HOME/.ssh/environment.`hostname`
|
|||
|
||||
start_agent ()
|
||||
{
|
||||
# $1 Socket path to bind to.
|
||||
|
||||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
|
@ -13,7 +15,7 @@ start_agent ()
|
|||
echo "Connecting to ssh-pageant..."
|
||||
eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME")
|
||||
else
|
||||
ssh-agent > ${SSH_ENV}
|
||||
ssh-agent $alex_agent_args > ${SSH_ENV}
|
||||
chmod 600 ${SSH_ENV}
|
||||
. ${SSH_ENV} > /dev/null
|
||||
echo "Created a new ssh-agent $SSH_AGENT_PID"
|
||||
|
@ -31,7 +33,7 @@ load_keys ()
|
|||
|
||||
# Source SSH settings, if applicable
|
||||
# If a ssh auth socket exists at this point, it must be from a forwarded agent.
|
||||
if [ -n "${SSH_AUTH_SOCK+set}" ]
|
||||
if [ -n "${SSH_AUTH_SOCK+set}" ] && [[ ${SSH_AUTH_SOCK} != *"com.apple.launchd"* ]]
|
||||
then
|
||||
if [ -f "${SSH_ENV}" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue