mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Compare commits
53 Commits
master
...
2022-03-11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50174a4f72 | ||
|
|
04470627c6 | ||
|
|
e6318c4cc1 | ||
|
|
15b575c34d | ||
|
|
2db123c772 | ||
|
|
2de511f5f3 | ||
|
|
890a24ec07 | ||
|
|
a3aaed6c0c | ||
|
|
9f4fbfb06a | ||
|
|
273d6b495f | ||
|
|
d41703820d | ||
|
|
5748d014f1 | ||
|
|
2779322b24 | ||
|
|
50948acee4 | ||
|
|
670cf5c8dc | ||
|
|
d213b3b234 | ||
|
|
37d606cc49 | ||
|
|
8f57fad78c | ||
|
|
f8ddb56b02 | ||
|
|
1f59627da9 | ||
|
|
2c88a59188 | ||
|
|
9ec67f4c1c | ||
|
|
db3193e0bc | ||
|
|
9c83b8fc40 | ||
|
|
3da887ffad | ||
|
|
f56b7d0b7b | ||
|
|
e18e66391b | ||
|
|
8b66586fe8 | ||
|
|
ac4109cee6 | ||
|
|
99af2287c5 | ||
|
|
6adaaffabd | ||
|
|
c6f217d47c | ||
|
|
733093ee7a | ||
|
|
441a533e2a | ||
|
|
8d30879224 | ||
|
|
f94a4dc67c | ||
|
|
0bb950b053 | ||
|
|
4ec8f22ab8 | ||
|
|
ba0c734b06 | ||
|
|
f24e3ebb24 | ||
|
|
4af40de24b | ||
|
|
351b136cbc | ||
|
|
a5b0677903 | ||
|
|
ebf5c1cd22 | ||
|
|
94abfa2fe2 | ||
|
|
15f5f91e2a | ||
|
|
2b6229acc3 | ||
|
|
e05a6aa473 | ||
|
|
673fca3c05 | ||
|
|
f6a7b372b7 | ||
|
|
685fb22dd3 | ||
|
|
e788dedf69 | ||
|
|
a482092fdb |
7
.gitmodules
vendored
7
.gitmodules
vendored
@@ -18,14 +18,7 @@
|
|||||||
path = dotfiles/vim/pack/matir/start/ctrlp
|
path = dotfiles/vim/pack/matir/start/ctrlp
|
||||||
url = https://github.com/ctrlpvim/ctrlp.vim.git
|
url = https://github.com/ctrlpvim/ctrlp.vim.git
|
||||||
fetchRecurseSubmodules = true
|
fetchRecurseSubmodules = true
|
||||||
[submodule "dotfiles/vim/pack/matir/start/vim-go"]
|
|
||||||
path = dotfiles/vim/pack/matir/start/vim-go
|
|
||||||
url = https://github.com/fatih/vim-go.git
|
|
||||||
fetchRecurseSubmodules = true
|
|
||||||
[submodule "dotfiles/tmux/tmux-logging"]
|
[submodule "dotfiles/tmux/tmux-logging"]
|
||||||
path = dotfiles/tmux/tmux-logging
|
path = dotfiles/tmux/tmux-logging
|
||||||
url = https://github.com/tmux-plugins/tmux-logging.git
|
url = https://github.com/tmux-plugins/tmux-logging.git
|
||||||
fetchRecurseSubmodules = true
|
fetchRecurseSubmodules = true
|
||||||
[submodule "dotfiles/vim/pack/matir/start/syntastic"]
|
|
||||||
path = dotfiles/vim/pack/matir/start/syntastic
|
|
||||||
url = https://github.com/vim-syntastic/syntastic.git
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ set -ue
|
|||||||
REINSTALL=0
|
REINSTALL=0
|
||||||
PACKAGES=1
|
PACKAGES=1
|
||||||
|
|
||||||
|
export GO111MODULE=on
|
||||||
|
|
||||||
while getopts -- "-:" a ; do
|
while getopts -- "-:" a ; do
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
case "${a}" in
|
case "${a}" in
|
||||||
@@ -31,8 +33,16 @@ done
|
|||||||
|
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
|
function list_tools {
|
||||||
|
echo "Options:" >/dev/stderr
|
||||||
|
awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' "$0" | sort | while read -r opt; do
|
||||||
|
echo -e "\\t${opt}" >/dev/stderr
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
if [ $# -ne 1 ] ; then
|
if [ $# -ne 1 ] ; then
|
||||||
echo "Usage: ${0} <tool>" >/dev/stderr
|
echo "Usage: ${0} <tool>" >/dev/stderr
|
||||||
|
list_tools
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
TOOL=${1}
|
TOOL=${1}
|
||||||
@@ -152,7 +162,7 @@ case ${TOOL} in
|
|||||||
;;
|
;;
|
||||||
android-sdk)
|
android-sdk)
|
||||||
# TODO: find a way to make this version independent
|
# TODO: find a way to make this version independent
|
||||||
asdk="https://dl.google.com/android/repository/tools_r25.2.3-linux.zip"
|
asdk="https://dl.google.com/android/repository/platform-tools_r31.0.2-linux.zip"
|
||||||
download ${asdk} /tmp/android-tools.zip
|
download ${asdk} /tmp/android-tools.zip
|
||||||
unzip -d "${DESTDIR}" /tmp/android-tools.zip
|
unzip -d "${DESTDIR}" /tmp/android-tools.zip
|
||||||
rm /tmp/android-tools.zip
|
rm /tmp/android-tools.zip
|
||||||
@@ -268,7 +278,7 @@ case ${TOOL} in
|
|||||||
;;
|
;;
|
||||||
aflplusplus)
|
aflplusplus)
|
||||||
install_pkgs libtool-bin libglib2.0-dev libpixman-1-dev clang clang-tools \
|
install_pkgs libtool-bin libglib2.0-dev libpixman-1-dev clang clang-tools \
|
||||||
llvm
|
llvm python3-setuptools
|
||||||
git clone "https://github.com/vanhauser-thc/AFLplusplus" "${DESTDIR}"
|
git clone "https://github.com/vanhauser-thc/AFLplusplus" "${DESTDIR}"
|
||||||
make -C "${DESTDIR}" distrib
|
make -C "${DESTDIR}" distrib
|
||||||
;;
|
;;
|
||||||
@@ -345,7 +355,17 @@ EOF
|
|||||||
install_pkgs golang-go silversearcher-ag
|
install_pkgs golang-go silversearcher-ag
|
||||||
go get -u github.com/tomnomnom/gf
|
go get -u github.com/tomnomnom/gf
|
||||||
mkdir -p ${HOME}/.config
|
mkdir -p ${HOME}/.config
|
||||||
git clone https://github.com/Matir/gf-patterns.git ${HOME}/.config/gf
|
if test -d ${HOME}/.config/gf ; then
|
||||||
|
git -C ${HOME}/.config/gf pull
|
||||||
|
else
|
||||||
|
git clone https://github.com/Matir/gf-patterns.git ${HOME}/.config/gf
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
gron)
|
||||||
|
go get -u github.com/tomnomnom/gron
|
||||||
|
;;
|
||||||
|
httprobe)
|
||||||
|
go get -u github.com/tomnomnom/httprobe
|
||||||
;;
|
;;
|
||||||
ffuf)
|
ffuf)
|
||||||
go get -u github.com/ffuf/ffuf
|
go get -u github.com/ffuf/ffuf
|
||||||
@@ -354,14 +374,33 @@ EOF
|
|||||||
go get -u github.com/OJ/gobuster
|
go get -u github.com/OJ/gobuster
|
||||||
;;
|
;;
|
||||||
amass)
|
amass)
|
||||||
go get -u github.com/OWASP/Amass/cmd/amass
|
go get -u github.com/OWASP/Amass/v3/...
|
||||||
|
;;
|
||||||
|
cht.sh)
|
||||||
|
install_pkgs rlwrap
|
||||||
|
mkdir -p ${DESTDIR}
|
||||||
|
curl https://cht.sh/:cht.sh > ${DESTDIR}/cht.sh
|
||||||
|
chmod +x ${DESTDIR}/cht.sh
|
||||||
|
add_bin_symlink cht.sh
|
||||||
|
;;
|
||||||
|
age)
|
||||||
|
go get -u filippo.io/age/cmd/age
|
||||||
|
go get -u filippo.io/age/cmd/age-keygen
|
||||||
|
;;
|
||||||
|
docker-compose)
|
||||||
|
mkdir -p ${DESTDIR}
|
||||||
|
curl -L \
|
||||||
|
"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" \
|
||||||
|
-o "${DESTDIR}/docker-compose"
|
||||||
|
chmod +x "${DESTDIR}/docker-compose"
|
||||||
|
add_bin_symlink docker-compose
|
||||||
|
;;
|
||||||
|
tldr)
|
||||||
|
pip3 install --user tldr
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||||
echo "Options:" >/dev/stderr
|
list_tools
|
||||||
awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' "$0" | sort | while read -r opt; do
|
|
||||||
echo -e "\\t${opt}" >/dev/stderr
|
|
||||||
done
|
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
33
dotfiles/config/fish/fish_variables
Normal file
33
dotfiles/config/fish/fish_variables
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR EDITOR:vim
|
||||||
|
SETUVAR __fish_initialized:3100
|
||||||
|
SETUVAR fish_color_autosuggestion:586e75
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:93a1a1
|
||||||
|
SETUVAR fish_color_comment:586e75
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:268bd2
|
||||||
|
SETUVAR fish_color_error:dc322f
|
||||||
|
SETUVAR fish_color_escape:00a6b2
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:00a6b2
|
||||||
|
SETUVAR fish_color_param:839496
|
||||||
|
SETUVAR fish_color_quote:657b83
|
||||||
|
SETUVAR fish_color_redirection:6c71c4
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:B3A06D
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D
|
||||||
|
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
11
dotfiles/config/gh/config.yml
Normal file
11
dotfiles/config/gh/config.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||||
|
git_protocol: https
|
||||||
|
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||||
|
editor: !!null vim
|
||||||
|
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||||
|
prompt: enabled
|
||||||
|
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
|
||||||
|
pager: !!null less -R
|
||||||
|
# Aliases allow you to create nicknames for gh commands
|
||||||
|
aliases:
|
||||||
|
co: pr checkout
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||||
# The parser is also very primitive, and not human-friendly.
|
# The parser is also very primitive, and not human-friendly.
|
||||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||||
sort_key=46
|
sort_key=49
|
||||||
sort_direction=-1
|
sort_direction=-1
|
||||||
tree_sort_key=0
|
tree_sort_key=0
|
||||||
tree_sort_direction=1
|
tree_sort_direction=1
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ bindsym $mod+Shift+8 move container to workspace 8
|
|||||||
bindsym $mod+Shift+9 move container to workspace 9
|
bindsym $mod+Shift+9 move container to workspace 9
|
||||||
bindsym $mod+Shift+0 move container to workspace 10
|
bindsym $mod+Shift+0 move container to workspace 10
|
||||||
|
|
||||||
|
# do some scratchpad
|
||||||
|
bindsym $mod+Shift+minus move scratchpad
|
||||||
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
# Move workspaces between monitors
|
# Move workspaces between monitors
|
||||||
bindsym $mod+Shift+greater move workspace to output right
|
bindsym $mod+Shift+greater move workspace to output right
|
||||||
bindsym $mod+Shift+less move workspace to output left
|
bindsym $mod+Shift+less move workspace to output left
|
||||||
|
|||||||
4
dotfiles/config/nvim/init.vim
Normal file
4
dotfiles/config/nvim/init.vim
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
" nvim config
|
||||||
|
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||||
|
let &packpath = &runtimepath
|
||||||
|
source ~/.vimrc
|
||||||
@@ -0,0 +1,195 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<channel name="xfce4-keyboard-shortcuts" version="1.0">
|
||||||
|
<property name="commands" type="empty">
|
||||||
|
<property name="default" type="empty">
|
||||||
|
<property name="<Alt>F1" type="empty"/>
|
||||||
|
<property name="<Alt>F2" type="empty">
|
||||||
|
<property name="startup-notify" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="<Alt>F3" type="empty">
|
||||||
|
<property name="startup-notify" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="<Primary><Alt>Delete" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>l" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>t" type="empty"/>
|
||||||
|
<property name="XF86Display" type="empty"/>
|
||||||
|
<property name="<Super>p" type="empty"/>
|
||||||
|
<property name="<Primary>Escape" type="empty"/>
|
||||||
|
<property name="XF86WWW" type="empty"/>
|
||||||
|
<property name="HomePage" type="empty"/>
|
||||||
|
<property name="XF86Mail" type="empty"/>
|
||||||
|
<property name="Print" type="empty"/>
|
||||||
|
<property name="<Alt>Print" type="empty"/>
|
||||||
|
<property name="<Shift>Print" type="empty"/>
|
||||||
|
<property name="<Super>e" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>f" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Escape" type="empty"/>
|
||||||
|
<property name="<Primary><Shift>Escape" type="empty"/>
|
||||||
|
<property name="<Super>r" type="empty">
|
||||||
|
<property name="startup-notify" type="empty"/>
|
||||||
|
</property>
|
||||||
|
</property>
|
||||||
|
<property name="custom" type="empty">
|
||||||
|
<property name="<Alt>F2" type="string" value="xfce4-appfinder --collapsed">
|
||||||
|
<property name="startup-notify" type="bool" value="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="<Alt>Print" type="string" value="xfce4-screenshooter -w"/>
|
||||||
|
<property name="<Super>r" type="string" value="xfce4-appfinder -c">
|
||||||
|
<property name="startup-notify" type="bool" value="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="XF86WWW" type="string" value="exo-open --launch WebBrowser"/>
|
||||||
|
<property name="XF86Mail" type="string" value="exo-open --launch MailReader"/>
|
||||||
|
<property name="<Alt>F3" type="string" value="xfce4-appfinder">
|
||||||
|
<property name="startup-notify" type="bool" value="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="Print" type="string" value="xfce4-screenshooter"/>
|
||||||
|
<property name="<Primary>Escape" type="string" value="xfdesktop --menu"/>
|
||||||
|
<property name="<Shift>Print" type="string" value="xfce4-screenshooter -r"/>
|
||||||
|
<property name="<Primary><Alt>Delete" type="string" value="xfce4-session-logout"/>
|
||||||
|
<property name="<Primary><Alt>t" type="string" value="exo-open --launch TerminalEmulator"/>
|
||||||
|
<property name="<Primary><Alt>f" type="string" value="thunar"/>
|
||||||
|
<property name="<Primary><Alt>l" type="string" value="xflock4"/>
|
||||||
|
<property name="<Alt>F1" type="string" value="xfce4-popup-applicationsmenu"/>
|
||||||
|
<property name="<Super>p" type="string" value="xfce4-display-settings --minimal"/>
|
||||||
|
<property name="<Primary><Shift>Escape" type="string" value="xfce4-taskmanager"/>
|
||||||
|
<property name="<Super>e" type="string" value="thunar"/>
|
||||||
|
<property name="<Primary><Alt>Escape" type="string" value="xkill"/>
|
||||||
|
<property name="HomePage" type="string" value="exo-open --launch WebBrowser"/>
|
||||||
|
<property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
|
||||||
|
<property name="override" type="bool" value="true"/>
|
||||||
|
<property name="<Super>l" type="string" value="xflock4"/>
|
||||||
|
</property>
|
||||||
|
</property>
|
||||||
|
<property name="xfwm4" type="empty">
|
||||||
|
<property name="default" type="empty">
|
||||||
|
<property name="<Alt>Insert" type="empty"/>
|
||||||
|
<property name="Escape" type="empty"/>
|
||||||
|
<property name="Left" type="empty"/>
|
||||||
|
<property name="Right" type="empty"/>
|
||||||
|
<property name="Up" type="empty"/>
|
||||||
|
<property name="Down" type="empty"/>
|
||||||
|
<property name="<Alt>Tab" type="empty"/>
|
||||||
|
<property name="<Alt><Shift>Tab" type="empty"/>
|
||||||
|
<property name="<Alt>Delete" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Down" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Left" type="empty"/>
|
||||||
|
<property name="<Shift><Alt>Page_Down" type="empty"/>
|
||||||
|
<property name="<Alt>F4" type="empty"/>
|
||||||
|
<property name="<Alt>F6" type="empty"/>
|
||||||
|
<property name="<Alt>F7" type="empty"/>
|
||||||
|
<property name="<Alt>F8" type="empty"/>
|
||||||
|
<property name="<Alt>F9" type="empty"/>
|
||||||
|
<property name="<Alt>F10" type="empty"/>
|
||||||
|
<property name="<Alt>F11" type="empty"/>
|
||||||
|
<property name="<Alt>F12" type="empty"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Left" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>End" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Home" type="empty"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Right" type="empty"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Up" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_1" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_2" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_3" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_4" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_5" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_6" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_7" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_8" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>KP_9" type="empty"/>
|
||||||
|
<property name="<Alt>space" type="empty"/>
|
||||||
|
<property name="<Shift><Alt>Page_Up" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Right" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>d" type="empty"/>
|
||||||
|
<property name="<Primary><Alt>Up" type="empty"/>
|
||||||
|
<property name="<Super>Tab" type="empty"/>
|
||||||
|
<property name="<Primary>F1" type="empty"/>
|
||||||
|
<property name="<Primary>F2" type="empty"/>
|
||||||
|
<property name="<Primary>F3" type="empty"/>
|
||||||
|
<property name="<Primary>F4" type="empty"/>
|
||||||
|
<property name="<Primary>F5" type="empty"/>
|
||||||
|
<property name="<Primary>F6" type="empty"/>
|
||||||
|
<property name="<Primary>F7" type="empty"/>
|
||||||
|
<property name="<Primary>F8" type="empty"/>
|
||||||
|
<property name="<Primary>F9" type="empty"/>
|
||||||
|
<property name="<Primary>F10" type="empty"/>
|
||||||
|
<property name="<Primary>F11" type="empty"/>
|
||||||
|
<property name="<Primary>F12" type="empty"/>
|
||||||
|
<property name="<Super>KP_Left" type="empty"/>
|
||||||
|
<property name="<Super>KP_Right" type="empty"/>
|
||||||
|
<property name="<Super>KP_Up" type="empty"/>
|
||||||
|
<property name="<Super>KP_Down" type="empty"/>
|
||||||
|
<property name="<Super>KP_Page_Up" type="empty"/>
|
||||||
|
<property name="<Super>KP_Home" type="empty"/>
|
||||||
|
<property name="<Super>KP_End" type="empty"/>
|
||||||
|
<property name="<Super>KP_Next" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="custom" type="empty">
|
||||||
|
<property name="<Primary>F12" type="string" value="workspace_12_key"/>
|
||||||
|
<property name="<Alt>F4" type="string" value="close_window_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_3" type="string" value="move_window_workspace_3_key"/>
|
||||||
|
<property name="<Primary><Alt>Down" type="string" value="down_workspace_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_9" type="string" value="move_window_workspace_9_key"/>
|
||||||
|
<property name="<Primary><Alt>End" type="string" value="move_window_next_workspace_key"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Left" type="string" value="move_window_left_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_4" type="string" value="move_window_workspace_4_key"/>
|
||||||
|
<property name="Right" type="string" value="right_key"/>
|
||||||
|
<property name="Down" type="string" value="down_key"/>
|
||||||
|
<property name="<Shift><Alt>Page_Down" type="string" value="lower_window_key"/>
|
||||||
|
<property name="<Alt>Tab" type="string" value="cycle_windows_key"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Right" type="string" value="move_window_right_key"/>
|
||||||
|
<property name="<Primary><Alt>Right" type="string" value="right_workspace_key"/>
|
||||||
|
<property name="<Alt>F6" type="string" value="stick_window_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_5" type="string" value="move_window_workspace_5_key"/>
|
||||||
|
<property name="<Primary>F11" type="string" value="workspace_11_key"/>
|
||||||
|
<property name="<Alt>F10" type="string" value="maximize_window_key"/>
|
||||||
|
<property name="<Alt>Delete" type="string" value="del_workspace_key"/>
|
||||||
|
<property name="<Super>Tab" type="string" value="switch_window_key"/>
|
||||||
|
<property name="<Primary><Alt>d" type="string" value="show_desktop_key"/>
|
||||||
|
<property name="<Super>KP_Page_Up" type="string" value="tile_up_right_key"/>
|
||||||
|
<property name="<Alt>F7" type="string" value="move_window_key"/>
|
||||||
|
<property name="Up" type="string" value="up_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_6" type="string" value="move_window_workspace_6_key"/>
|
||||||
|
<property name="<Alt>F11" type="string" value="fullscreen_key"/>
|
||||||
|
<property name="<Alt>space" type="string" value="popup_menu_key"/>
|
||||||
|
<property name="<Super>KP_Home" type="string" value="tile_up_left_key"/>
|
||||||
|
<property name="Escape" type="string" value="cancel_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_1" type="string" value="move_window_workspace_1_key"/>
|
||||||
|
<property name="<Shift><Alt>Page_Up" type="string" value="raise_window_key"/>
|
||||||
|
<property name="<Primary><Alt>Home" type="string" value="move_window_prev_workspace_key"/>
|
||||||
|
<property name="<Alt><Shift>Tab" type="string" value="cycle_reverse_windows_key"/>
|
||||||
|
<property name="<Primary><Alt>Left" type="string" value="left_workspace_key"/>
|
||||||
|
<property name="<Alt>F12" type="string" value="above_key"/>
|
||||||
|
<property name="<Primary><Shift><Alt>Up" type="string" value="move_window_up_key"/>
|
||||||
|
<property name="<Alt>F8" type="string" value="resize_window_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_7" type="string" value="move_window_workspace_7_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_2" type="string" value="move_window_workspace_2_key"/>
|
||||||
|
<property name="<Super>KP_End" type="string" value="tile_down_left_key"/>
|
||||||
|
<property name="<Primary><Alt>Up" type="string" value="up_workspace_key"/>
|
||||||
|
<property name="<Alt>F9" type="string" value="hide_window_key"/>
|
||||||
|
<property name="Left" type="string" value="left_key"/>
|
||||||
|
<property name="<Primary><Alt>KP_8" type="string" value="move_window_workspace_8_key"/>
|
||||||
|
<property name="<Alt>Insert" type="string" value="add_workspace_key"/>
|
||||||
|
<property name="override" type="bool" value="true"/>
|
||||||
|
<property name="<Super>1" type="string" value="workspace_1_key"/>
|
||||||
|
<property name="<Super>2" type="string" value="workspace_2_key"/>
|
||||||
|
<property name="<Super>3" type="string" value="workspace_3_key"/>
|
||||||
|
<property name="<Super>4" type="string" value="workspace_4_key"/>
|
||||||
|
<property name="<Super>5" type="string" value="workspace_5_key"/>
|
||||||
|
<property name="<Super>6" type="string" value="workspace_6_key"/>
|
||||||
|
<property name="<Super>7" type="string" value="workspace_7_key"/>
|
||||||
|
<property name="<Super>8" type="string" value="workspace_8_key"/>
|
||||||
|
<property name="<Super>9" type="string" value="workspace_9_key"/>
|
||||||
|
<property name="<Super>0" type="string" value="workspace_10_key"/>
|
||||||
|
<property name="<Super>Left" type="string" value="tile_left_key"/>
|
||||||
|
<property name="<Super>Right" type="string" value="tile_right_key"/>
|
||||||
|
<property name="<Super>Up" type="string" value="tile_down_key"/>
|
||||||
|
<property name="<Super>Down" type="string" value="tile_up_key"/>
|
||||||
|
<property name="<Super>Page_Down" type="string" value="tile_down_right_key"/>
|
||||||
|
</property>
|
||||||
|
</property>
|
||||||
|
<property name="providers" type="array">
|
||||||
|
<value type="string" value="xfwm4"/>
|
||||||
|
<value type="string" value="commands"/>
|
||||||
|
</property>
|
||||||
|
</channel>
|
||||||
93
dotfiles/config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
Normal file
93
dotfiles/config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<channel name="xfwm4" version="1.0">
|
||||||
|
<property name="general" type="empty">
|
||||||
|
<property name="activate_action" type="string" value="bring"/>
|
||||||
|
<property name="borderless_maximize" type="bool" value="true"/>
|
||||||
|
<property name="box_move" type="bool" value="false"/>
|
||||||
|
<property name="box_resize" type="bool" value="false"/>
|
||||||
|
<property name="button_layout" type="string" value="O|SHMC"/>
|
||||||
|
<property name="button_offset" type="int" value="0"/>
|
||||||
|
<property name="button_spacing" type="int" value="0"/>
|
||||||
|
<property name="click_to_focus" type="bool" value="false"/>
|
||||||
|
<property name="cycle_apps_only" type="bool" value="false"/>
|
||||||
|
<property name="cycle_draw_frame" type="bool" value="true"/>
|
||||||
|
<property name="cycle_raise" type="bool" value="false"/>
|
||||||
|
<property name="cycle_hidden" type="bool" value="true"/>
|
||||||
|
<property name="cycle_minimum" type="bool" value="true"/>
|
||||||
|
<property name="cycle_minimized" type="bool" value="false"/>
|
||||||
|
<property name="cycle_preview" type="bool" value="true"/>
|
||||||
|
<property name="cycle_tabwin_mode" type="int" value="0"/>
|
||||||
|
<property name="cycle_workspaces" type="bool" value="false"/>
|
||||||
|
<property name="double_click_action" type="string" value="maximize"/>
|
||||||
|
<property name="double_click_distance" type="int" value="5"/>
|
||||||
|
<property name="double_click_time" type="int" value="250"/>
|
||||||
|
<property name="easy_click" type="string" value="Alt"/>
|
||||||
|
<property name="focus_delay" type="int" value="316"/>
|
||||||
|
<property name="focus_hint" type="bool" value="true"/>
|
||||||
|
<property name="focus_new" type="bool" value="true"/>
|
||||||
|
<property name="frame_opacity" type="int" value="100"/>
|
||||||
|
<property name="frame_border_top" type="int" value="0"/>
|
||||||
|
<property name="full_width_title" type="bool" value="true"/>
|
||||||
|
<property name="horiz_scroll_opacity" type="bool" value="false"/>
|
||||||
|
<property name="inactive_opacity" type="int" value="100"/>
|
||||||
|
<property name="maximized_offset" type="int" value="0"/>
|
||||||
|
<property name="mousewheel_rollup" type="bool" value="true"/>
|
||||||
|
<property name="move_opacity" type="int" value="100"/>
|
||||||
|
<property name="placement_mode" type="string" value="center"/>
|
||||||
|
<property name="placement_ratio" type="int" value="20"/>
|
||||||
|
<property name="popup_opacity" type="int" value="100"/>
|
||||||
|
<property name="prevent_focus_stealing" type="bool" value="false"/>
|
||||||
|
<property name="raise_delay" type="int" value="250"/>
|
||||||
|
<property name="raise_on_click" type="bool" value="true"/>
|
||||||
|
<property name="raise_on_focus" type="bool" value="false"/>
|
||||||
|
<property name="raise_with_any_button" type="bool" value="true"/>
|
||||||
|
<property name="repeat_urgent_blink" type="bool" value="false"/>
|
||||||
|
<property name="resize_opacity" type="int" value="100"/>
|
||||||
|
<property name="scroll_workspaces" type="bool" value="true"/>
|
||||||
|
<property name="shadow_delta_height" type="int" value="0"/>
|
||||||
|
<property name="shadow_delta_width" type="int" value="0"/>
|
||||||
|
<property name="shadow_delta_x" type="int" value="0"/>
|
||||||
|
<property name="shadow_delta_y" type="int" value="-3"/>
|
||||||
|
<property name="shadow_opacity" type="int" value="50"/>
|
||||||
|
<property name="show_app_icon" type="bool" value="false"/>
|
||||||
|
<property name="show_dock_shadow" type="bool" value="true"/>
|
||||||
|
<property name="show_frame_shadow" type="bool" value="true"/>
|
||||||
|
<property name="show_popup_shadow" type="bool" value="false"/>
|
||||||
|
<property name="snap_resist" type="bool" value="false"/>
|
||||||
|
<property name="snap_to_border" type="bool" value="true"/>
|
||||||
|
<property name="snap_to_windows" type="bool" value="false"/>
|
||||||
|
<property name="snap_width" type="int" value="10"/>
|
||||||
|
<property name="vblank_mode" type="string" value="auto"/>
|
||||||
|
<property name="theme" type="string" value="Default"/>
|
||||||
|
<property name="tile_on_move" type="bool" value="true"/>
|
||||||
|
<property name="title_alignment" type="string" value="center"/>
|
||||||
|
<property name="title_font" type="string" value="Sans Bold 9"/>
|
||||||
|
<property name="title_horizontal_offset" type="int" value="0"/>
|
||||||
|
<property name="titleless_maximize" type="bool" value="false"/>
|
||||||
|
<property name="title_shadow_active" type="string" value="false"/>
|
||||||
|
<property name="title_shadow_inactive" type="string" value="false"/>
|
||||||
|
<property name="title_vertical_offset_active" type="int" value="0"/>
|
||||||
|
<property name="title_vertical_offset_inactive" type="int" value="0"/>
|
||||||
|
<property name="toggle_workspaces" type="bool" value="false"/>
|
||||||
|
<property name="unredirect_overlays" type="bool" value="true"/>
|
||||||
|
<property name="urgent_blink" type="bool" value="false"/>
|
||||||
|
<property name="use_compositing" type="bool" value="true"/>
|
||||||
|
<property name="workspace_count" type="int" value="6"/>
|
||||||
|
<property name="wrap_cycle" type="bool" value="true"/>
|
||||||
|
<property name="wrap_layout" type="bool" value="true"/>
|
||||||
|
<property name="wrap_resistance" type="int" value="10"/>
|
||||||
|
<property name="wrap_windows" type="bool" value="true"/>
|
||||||
|
<property name="wrap_workspaces" type="bool" value="false"/>
|
||||||
|
<property name="zoom_desktop" type="bool" value="true"/>
|
||||||
|
<property name="zoom_pointer" type="bool" value="true"/>
|
||||||
|
<property name="workspace_names" type="array">
|
||||||
|
<value type="string" value="Workspace 1"/>
|
||||||
|
<value type="string" value="Workspace 2"/>
|
||||||
|
<value type="string" value="Workspace 3"/>
|
||||||
|
<value type="string" value="Workspace 4"/>
|
||||||
|
<value type="string" value="Workspace 5"/>
|
||||||
|
<value type="string" value="Workspace 6"/>
|
||||||
|
</property>
|
||||||
|
</property>
|
||||||
|
</channel>
|
||||||
@@ -5,8 +5,8 @@ umask 027
|
|||||||
|
|
||||||
# Paths and preferences
|
# Paths and preferences
|
||||||
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
||||||
export GOPATH="$HOME/Projects/Go:/usr/share/gocode"
|
export GOPATH="$HOME/go:$HOME/Projects/Go:/usr/share/gocode"
|
||||||
export PATH="$HOME/bin:$HOME/bin/tools:/sbin:/usr/sbin:$PATH:$HOME/Projects/Go/bin"
|
export PATH="$HOME/bin:$HOME/bin/tools:/sbin:/usr/sbin:$PATH:$HOME/go/bin"
|
||||||
export VISUAL=vim
|
export VISUAL=vim
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export DEBEMAIL="david@systemoverlord.com"
|
export DEBEMAIL="david@systemoverlord.com"
|
||||||
@@ -34,6 +34,7 @@ if [ -z "${BROWSER}" ] ; then
|
|||||||
for t in google-chrome-beta google-chrome firefox ; do
|
for t in google-chrome-beta google-chrome firefox ; do
|
||||||
if BROWSER=$(command -v ${t}); then
|
if BROWSER=$(command -v ${t}); then
|
||||||
export BROWSER
|
export BROWSER
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -77,5 +78,8 @@ else
|
|||||||
fi
|
fi
|
||||||
export LC_COLLATE=C
|
export LC_COLLATE=C
|
||||||
|
|
||||||
|
# Opt out of .net telemetry
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
test -e "$HOME/.localenv" && . "$HOME/.localenv"
|
test -e "$HOME/.localenv" && . "$HOME/.localenv"
|
||||||
|
|||||||
@@ -20,3 +20,6 @@ id_ecdsa
|
|||||||
|
|
||||||
# Kicad backup files
|
# Kicad backup files
|
||||||
*.kicad_pcb-bak
|
*.kicad_pcb-bak
|
||||||
|
|
||||||
|
# Mypy cache path
|
||||||
|
.mypy_cache
|
||||||
|
|||||||
@@ -26,4 +26,12 @@ if [ "$(uname)" = "Darwin" ] ; then
|
|||||||
export CLICOLOR
|
export CLICOLOR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Setup for libvirt
|
||||||
|
if [ -z "${LIBVIRT_DEFAULT_URI}" ] ; then
|
||||||
|
if [ "$(id -u)" = "0" ] || (id -g -n | grep -q "\blibvirt\b") ; then
|
||||||
|
LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||||
|
export LIBVIRT_DEFAULT_URI
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
|
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
|
||||||
|
|||||||
@@ -25,3 +25,8 @@ VirtualBox VMs
|
|||||||
tmp
|
tmp
|
||||||
tools
|
tools
|
||||||
.minikube
|
.minikube
|
||||||
|
.config/unity3d/cache
|
||||||
|
.xsession-errors*
|
||||||
|
.config/google-chrome-beta
|
||||||
|
.config/google-chrome
|
||||||
|
Unity
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ Protocol 2
|
|||||||
# Permit Local Overrides
|
# Permit Local Overrides
|
||||||
Include ~/.ssh/config.d/*
|
Include ~/.ssh/config.d/*
|
||||||
|
|
||||||
|
# SSH known host hashing doesn't buy much with shell history, etc.
|
||||||
|
HashKnownHosts no
|
||||||
|
|
||||||
# Enable canonicalization, unless overridden
|
# Enable canonicalization, unless overridden
|
||||||
CanonicalizeHostname yes
|
CanonicalizeHostname yes
|
||||||
CanonicalizeFallbackLocal yes
|
CanonicalizeFallbackLocal yes
|
||||||
|
|||||||
Submodule dotfiles/vim/pack/matir/start/ctrlp deleted from 3866ae170a
Submodule dotfiles/vim/pack/matir/start/fugitive updated: 89e6b5e4e1...2a53d79248
Submodule dotfiles/vim/pack/matir/start/syntastic deleted from dd22667306
Submodule dotfiles/vim/pack/matir/start/vim-go deleted from b919c60a6d
@@ -31,7 +31,9 @@ set number
|
|||||||
set ruler
|
set ruler
|
||||||
|
|
||||||
" Setup viminfo for recording positions, etc.
|
" Setup viminfo for recording positions, etc.
|
||||||
set viminfo='10,\"100,:20,%,n~/.viminfo
|
if !has('nvim')
|
||||||
|
set viminfo='10,\"100,:20,%,n~/.viminfo
|
||||||
|
endif
|
||||||
" Jump back when editing a file
|
" Jump back when editing a file
|
||||||
function! ResCur()
|
function! ResCur()
|
||||||
" Don't jump in git commits since they're generated.
|
" Don't jump in git commits since they're generated.
|
||||||
@@ -91,7 +93,6 @@ imap <silent> <F4> <ESC>:set invpaste<CR>:set paste?<CR>
|
|||||||
" Mediocre Hex editing in vim
|
" Mediocre Hex editing in vim
|
||||||
" Source: http://vim.wikia.com/wiki/Improved_hex_editing
|
" Source: http://vim.wikia.com/wiki/Improved_hex_editing
|
||||||
" TODO: move to an include
|
" TODO: move to an include
|
||||||
nnoremap <C-H> :Hexmode<CR>
|
|
||||||
command -bar Hexmode call ToggleHex()
|
command -bar Hexmode call ToggleHex()
|
||||||
function ToggleHex()
|
function ToggleHex()
|
||||||
" hex mode should be considered a read-only operation
|
" hex mode should be considered a read-only operation
|
||||||
@@ -133,21 +134,56 @@ endfunction
|
|||||||
" Options for syntastic
|
" Options for syntastic
|
||||||
let g:syntastic_enable_signs = 1
|
let g:syntastic_enable_signs = 1
|
||||||
let g:syntastic_auto_loc_list = 2
|
let g:syntastic_auto_loc_list = 2
|
||||||
|
let g:syntastic_check_on_wq = 0
|
||||||
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
|
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
|
||||||
let g:syntastic_python_checkers=['flake8']
|
let g:syntastic_python_checkers=['flake8']
|
||||||
" Because XXE
|
" Because XXE
|
||||||
let g:syntastic_xml_checkers=['']
|
let g:syntastic_xml_checkers=['']
|
||||||
let g:syntastic_xslt_checkers=['']
|
let g:syntastic_xslt_checkers=['']
|
||||||
|
autocmd BufReadPost *
|
||||||
|
\ if &readonly
|
||||||
|
\| let b:syntastic_mode = 'passive'
|
||||||
|
\| else
|
||||||
|
\| silent! unlet b:syntastic_mode
|
||||||
|
\| endif
|
||||||
|
|
||||||
" Have F5 run the tests and display errors
|
" Have F5 run the tests and display errors
|
||||||
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
|
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
|
||||||
|
|
||||||
" Load vim-ycm if installed on the system level
|
" Load vim-ycm if installed on the system level
|
||||||
if isdirectory("/usr/share/vim-youcompleteme")
|
" Currently only works on debian-based systems...
|
||||||
|
" It also does not play nicely with virtual envs, so we skip it then
|
||||||
|
if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV)
|
||||||
|
let g:ycm_gopls_binary_path='gopls'
|
||||||
let g:ycm_autoclose_preview_window_after_insertion=1
|
let g:ycm_autoclose_preview_window_after_insertion=1
|
||||||
set runtimepath+=/usr/share/vim-youcompleteme
|
set runtimepath+=/usr/share/vim-youcompleteme
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Enable vim-bracketed-paste mode
|
||||||
|
" From
|
||||||
|
" https://github.com/ConradIrwin/vim-bracketed-paste/blob/master/plugin/bracketed-paste.vim
|
||||||
|
if exists("g:loaded_bracketed_paste")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_bracketed_paste = 1
|
||||||
|
|
||||||
|
let &t_ti .= "\<Esc>[?2004h"
|
||||||
|
let &t_te = "\e[?2004l" . &t_te
|
||||||
|
|
||||||
|
function! XTermPasteBegin(ret)
|
||||||
|
set pastetoggle=<f29>
|
||||||
|
set paste
|
||||||
|
return a:ret
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
execute "set <f28>=\<Esc>[200~"
|
||||||
|
execute "set <f29>=\<Esc>[201~"
|
||||||
|
map <expr> <f28> XTermPasteBegin("i")
|
||||||
|
imap <expr> <f28> XTermPasteBegin("")
|
||||||
|
vmap <expr> <f28> XTermPasteBegin("c")
|
||||||
|
cmap <f28> <nop>
|
||||||
|
cmap <f29> <nop>
|
||||||
|
|
||||||
" Include a .vimrc.local if it exists
|
" Include a .vimrc.local if it exists
|
||||||
if filereadable(glob("~/.vimrc.local"))
|
if filereadable(glob("~/.vimrc.local"))
|
||||||
source ~/.vimrc.local
|
source ~/.vimrc.local
|
||||||
|
|||||||
@@ -107,11 +107,13 @@ if [[ $- == *i* ]] ; then
|
|||||||
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
|
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
|
||||||
fi
|
fi
|
||||||
if command ls --version >/dev/null 2>&1 ; then
|
if command ls --version >/dev/null 2>&1 ; then
|
||||||
alias ls="$(whence -p ls) --color -C"
|
alias ls="$(whence -p ls) --color=auto -C"
|
||||||
fi
|
fi
|
||||||
# Syntax highlighting and substring search
|
# Syntax highlighting and substring search
|
||||||
if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
|
if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
|
||||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
elif test -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
|
||||||
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
fi
|
fi
|
||||||
if test -f ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh ; then
|
if test -f ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh ; then
|
||||||
source ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh
|
source ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh
|
||||||
@@ -140,9 +142,13 @@ if test -d ${HOME}/.cargo/bin ; then
|
|||||||
PATH=${PATH}:${HOME}/.cargo/bin
|
PATH=${PATH}:${HOME}/.cargo/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Most is nice, if we have it
|
# Pip packages
|
||||||
if command -v most >/dev/null 2>&1; then
|
if test -d ${HOME}/.local/bin ; then
|
||||||
export PAGER="most"
|
PATH=${PATH}:${HOME}/.local/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "${PAGER}" && command -v less >/dev/null 2>&1; then
|
||||||
|
export PAGER="less"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load any local settings
|
# Load any local settings
|
||||||
|
|||||||
3
dotfiles/zshrc.d/functions.zsh
Normal file
3
dotfiles/zshrc.d/functions.zsh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function dumpenv {
|
||||||
|
tr '\0' '\n' < /proc/${1}/environ
|
||||||
|
}
|
||||||
@@ -2,6 +2,10 @@ if ! which gpg-agent >/dev/null 2>&1 ; then
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -f ${HOME}/.no-gpg-agent ; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the default paths to gpg-agent files.
|
# Set the default paths to gpg-agent files.
|
||||||
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
|
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
|
||||||
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
|
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ prune-broken-symlinks() {
|
|||||||
ASK=1
|
ASK=1
|
||||||
fi
|
fi
|
||||||
DIR=${1:-.}
|
DIR=${1:-.}
|
||||||
FINDCMD=(find -L ${DIR} -type l)
|
FINDCMD=(find -L ${DIR} -xdev -type l)
|
||||||
if (($ASK)) ; then
|
if (($ASK)) ; then
|
||||||
local FILES
|
local FILES
|
||||||
FILES=`${FINDCMD} -print`
|
FILES=`${FINDCMD} -print`
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
# Enable RVM if available
|
|
||||||
if [[ -s ${HOME}/.rvm/scripts/rvm ]] ; then
|
|
||||||
source ${HOME}/.rvm/scripts/rvm
|
|
||||||
else
|
|
||||||
function install_rvm {
|
|
||||||
export rvm_ignore_dotfiles=yes
|
|
||||||
pushd `mktemp -d`
|
|
||||||
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer
|
|
||||||
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
|
|
||||||
gpg --verify rvm-installer.asc && \
|
|
||||||
bash rvm-installer stable
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
184
install.sh
184
install.sh
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# shellcheck disable=SC2155,SC2223
|
||||||
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
||||||
@@ -18,7 +20,7 @@ case $(uname) in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
is_comment() {
|
is_comment() {
|
||||||
if [ $(echo "${1}" | cut -c1-1) = '#' ] ; then
|
if [ "$(echo "${1}" | cut -c1-1)" = '#' ] ; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
@@ -26,17 +28,17 @@ is_comment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prerequisites() {
|
prerequisites() {
|
||||||
if which zsh > /dev/null 2>&1 ; then
|
if command -v zsh > /dev/null 2>&1 ; then
|
||||||
case $- in
|
case $- in
|
||||||
*i*)
|
*i*)
|
||||||
case $(getent passwd $USER | cut -d: -f7) in
|
case "$(getent passwd "${USER}" | cut -d: -f7)" in
|
||||||
*/zsh)
|
*/zsh)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ $(id) -ne 0 ] ; then
|
if [ "$(id)" -ne 0 ] ; then
|
||||||
echo 'Enter password to change shell.' >&2
|
echo 'Enter password to change shell.' >&2
|
||||||
fi
|
fi
|
||||||
chsh -s $(which zsh)
|
chsh -s "$(command -v zsh)"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -51,9 +53,10 @@ install_dotfile_dir() {
|
|||||||
local dotfile
|
local dotfile
|
||||||
local submodule_prune="$(git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
local submodule_prune="$(git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||||
awk '{print $2}' | \
|
awk '{print $2}' | \
|
||||||
while read submod ; do
|
while read -r submod ; do
|
||||||
echo -n " -o -path ${BASEDIR}/${submod}"
|
echo -n " -o -path ${BASEDIR}/${submod}"
|
||||||
done)"
|
done)"
|
||||||
|
# shellcheck disable=SC2086
|
||||||
find "${SRCDIR}" \( -name .git -o \
|
find "${SRCDIR}" \( -name .git -o \
|
||||||
-path "${SRCDIR}/private_dotfiles" -o \
|
-path "${SRCDIR}/private_dotfiles" -o \
|
||||||
-name install.sh -o \
|
-name install.sh -o \
|
||||||
@@ -61,17 +64,17 @@ install_dotfile_dir() {
|
|||||||
-name .gitignore \
|
-name .gitignore \
|
||||||
${submodule_prune} \) \
|
${submodule_prune} \) \
|
||||||
-prune -o ${FINDTYPE} f -print | \
|
-prune -o ${FINDTYPE} f -print | \
|
||||||
while read dotfile ; do
|
while read -r dotfile ; do
|
||||||
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
|
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
|
||||||
mkdir -p $(dirname "${TARGET}")
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
ln -s -f "${dotfile}" "${TARGET}"
|
ln -s -f "${dotfile}" "${TARGET}"
|
||||||
done
|
done
|
||||||
git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||||
awk '{print $2}' | \
|
awk '{print $2}' | \
|
||||||
while read submodule ; do
|
while read -r submodule ; do
|
||||||
local FULLNAME="${BASEDIR}/${submodule}"
|
local FULLNAME="${BASEDIR}/${submodule}"
|
||||||
local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}"
|
local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}"
|
||||||
mkdir -p $(dirname "${TARGET}")
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
if test -L "${TARGET}" ; then
|
if test -L "${TARGET}" ; then
|
||||||
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
|
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
|
||||||
echo "${TARGET} points to $(readlink "${TARGET}") not ${FULLNAME}!" >/dev/stderr
|
echo "${TARGET} points to $(readlink "${TARGET}") not ${FULLNAME}!" >/dev/stderr
|
||||||
@@ -89,39 +92,39 @@ install_basic_dir() {
|
|||||||
local DESTDIR="${2}"
|
local DESTDIR="${2}"
|
||||||
local file
|
local file
|
||||||
find "${SRCDIR}" ${FINDTYPE} f -print | \
|
find "${SRCDIR}" ${FINDTYPE} f -print | \
|
||||||
while read file ; do
|
while read -r file ; do
|
||||||
local TARGET="${2}/${file#${SRCDIR}/}"
|
local TARGET="${2}/${file#${SRCDIR}/}"
|
||||||
mkdir -p $(dirname "${TARGET}")
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
ln -s -f "${file}" "${TARGET}"
|
ln -s -f "${file}" "${TARGET}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install_git() {
|
install_git() {
|
||||||
# Install or update a git repository
|
# Install or update a git repository
|
||||||
if ! which git > /dev/null ; then
|
if ! command -v git > /dev/null 2>&1 ; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local REPO="${*: -2:1}"
|
local REPO="${*: -2:1}"
|
||||||
local DESTDIR="${*: -1:1}"
|
local DESTDIR="${*: -1:1}"
|
||||||
set -- ${@:1:$(($#-2))}
|
set -- "${@:1:$(($#-2))}"
|
||||||
if [ -d ${DESTDIR}/.git ] ; then
|
if [ -d "${DESTDIR}/.git" ] ; then
|
||||||
( cd ${DESTDIR} ; git pull -q )
|
( cd "${DESTDIR}" ; git pull -q )
|
||||||
else
|
else
|
||||||
if [ ${MINIMAL} -eq 1 ] ; then
|
if [ "${MINIMAL}" -eq 1 ] ; then
|
||||||
git clone --depth 1 $* ${REPO} ${DESTDIR}
|
git clone --depth 1 "$@" "${REPO}" "${DESTDIR}"
|
||||||
else
|
else
|
||||||
git clone $* ${REPO} ${DESTDIR}
|
git clone "$@" "${REPO}" "${DESTDIR}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
add_bin_symlink() {
|
add_bin_symlink() {
|
||||||
local LINKNAME=${HOME}/bin/${2:-$(basename $1)}
|
local LINKNAME="${HOME}/bin/${2:-$(basename "$1")}"
|
||||||
if [ -e ${LINKNAME} -a ! -h ${LINKNAME} ] ; then
|
if [ -e "${LINKNAME}" ] && ! [ -h "${LINKNAME}" ] ; then
|
||||||
echo "Refusing to overwrite ${LINKNAME}" >&2
|
echo "Refusing to overwrite ${LINKNAME}" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
ln -sf ${1} ${LINKNAME}
|
ln -sf "${1}" "${LINKNAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
postinstall() {
|
postinstall() {
|
||||||
@@ -131,24 +134,24 @@ postinstall() {
|
|||||||
ssh_key_already_installed() {
|
ssh_key_already_installed() {
|
||||||
# Return 1 if the key isn't already installed, 0 if it is
|
# Return 1 if the key isn't already installed, 0 if it is
|
||||||
local AK="${HOME}/.ssh/authorized_keys"
|
local AK="${HOME}/.ssh/authorized_keys"
|
||||||
if [ ! -f $AK ] ; then
|
if [ ! -f "$AK" ] ; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local KEYFP=$(ssh-keygen -l -f $1 2>/dev/null | awk '{print $2}')
|
local KEYFP="$(ssh-keygen -l -f "$1" 2>/dev/null | awk '{print $2}')"
|
||||||
local TMPF=$(mktemp)
|
local TMPF="$(mktemp)"
|
||||||
local key
|
local key
|
||||||
while read key ; do
|
while read -r key ; do
|
||||||
if is_comment "${key}" ; then
|
if is_comment "${key}" ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "$key" > $TMPF
|
echo "$key" > "$TMPF"
|
||||||
local EFP=$(ssh-keygen -l -f ${TMPF} 2>/dev/null | awk '{print $2}')
|
local EFP="$(ssh-keygen -l -f "${TMPF}" 2>/dev/null | awk '{print $2}')"
|
||||||
if [ "$EFP" = "$KEYFP" ] ; then
|
if [ "$EFP" = "$KEYFP" ] ; then
|
||||||
rm $TMPF 2>/dev/null
|
rm "$TMPF" 2>/dev/null
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done < ${AK}
|
done < "${AK}"
|
||||||
rm $TMPF 2>/dev/null
|
rm "$TMPF" 2>/dev/null
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,30 +161,30 @@ install_ssh_keys() {
|
|||||||
local AK="${HOME}/.ssh/authorized_keys"
|
local AK="${HOME}/.ssh/authorized_keys"
|
||||||
local key
|
local key
|
||||||
local keydir
|
local keydir
|
||||||
if test ${TRUST_ALL_KEYS} = 1 ; then
|
if test "${TRUST_ALL_KEYS}" = 1 ; then
|
||||||
keydir=${BASEDIR}/keys/ssh
|
keydir="${BASEDIR}/keys/ssh"
|
||||||
else
|
else
|
||||||
keydir=${BASEDIR}/keys/ssh/trusted
|
keydir="${BASEDIR}/keys/ssh/trusted"
|
||||||
fi
|
fi
|
||||||
for key in ${keydir}/* ; do
|
for key in "${keydir}"/* ; do
|
||||||
if [ ! -f "${key}" ] ; then
|
if [ ! -f "${key}" ] ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if ssh_key_already_installed "${key}" ; then
|
if ssh_key_already_installed "${key}" ; then
|
||||||
verbose "Key $(basename ${key}) already installed..."
|
verbose "Key $(basename "${key}") already installed..."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "# $(basename ${key}) added from skel on $(date +%Y-%m-%d)" >> ${AK}
|
echo "# $(basename "${key}") added from skel on $(date +%Y-%m-%d)" >> "${AK}"
|
||||||
cat ${key} >> ${AK}
|
cat "${key}" >> "${AK}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install_gpg_keys() {
|
install_gpg_keys() {
|
||||||
which gpg >/dev/null 2>&1 || \
|
command -v gpg >/dev/null 2>&1 || \
|
||||||
return 0
|
return 0
|
||||||
local key
|
local key
|
||||||
for key in ${BASEDIR}/keys/gpg/* ; do
|
for key in "${BASEDIR}"/keys/gpg/* ; do
|
||||||
gpg --import < ${key} >/dev/null 2>&1
|
gpg --import < "${key}" >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,13 +193,14 @@ install_known_hosts() {
|
|||||||
if [ ! -f "${BASEDIR}/keys/known_hosts" ] ; then
|
if [ ! -f "${BASEDIR}/keys/known_hosts" ] ; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
mkdir -p ${HOME}/.ssh
|
mkdir -p "${HOME}/.ssh"
|
||||||
if [ -f "${HOME}/.ssh/known_hosts" ] ; then
|
if [ -f "${HOME}/.ssh/known_hosts" ] ; then
|
||||||
local tmpf=$(mktemp)
|
local tmpf="$(mktemp)"
|
||||||
cat ${BASEDIR}/keys/known_hosts ${HOME}/.ssh/known_hosts | sort -u > $tmpf
|
cat "${BASEDIR}"/keys/known_hosts "${HOME}"/.ssh/known_hosts \
|
||||||
mv $tmpf ${HOME}/.ssh/known_hosts
|
| sort -u > "$tmpf"
|
||||||
|
mv "$tmpf" "${HOME}"/.ssh/known_hosts
|
||||||
else
|
else
|
||||||
cp ${BASEDIR}/keys/known_hosts ${HOME}/.ssh/known_hosts
|
cp "${BASEDIR}"/keys/known_hosts "${HOME}"/.ssh/known_hosts
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,10 +216,10 @@ is_deb_system() {
|
|||||||
|
|
||||||
run_as_root() {
|
run_as_root() {
|
||||||
# Attempt to run as root
|
# Attempt to run as root
|
||||||
if [ ${USER} = "root" ] ; then
|
if [ "${USER}" = "root" ] ; then
|
||||||
"$@"
|
"$@"
|
||||||
return $?
|
return $?
|
||||||
elif test -x $(which sudo 2>/dev/null) ; then
|
elif test -x "$(command -v sudo 2>/dev/null)" ; then
|
||||||
verbose "Using sudo to run ${1}..."
|
verbose "Using sudo to run ${1}..."
|
||||||
sudo "$@"
|
sudo "$@"
|
||||||
return $?
|
return $?
|
||||||
@@ -227,24 +231,25 @@ install_pkg_set() {
|
|||||||
local pkg_file=${BASEDIR}/${1}
|
local pkg_file=${BASEDIR}/${1}
|
||||||
local pkg_list=""
|
local pkg_list=""
|
||||||
if [ ! -f "${pkg_file}" ] ; then
|
if [ ! -f "${pkg_file}" ] ; then
|
||||||
echo "Package set $(basename ${pkg_file}) does not exist." 1>&2
|
echo "Package set $(basename "${pkg_file}") does not exist." 1>&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
while read line ; do
|
while read -r line ; do
|
||||||
if is_comment "${line}" ; then
|
if is_comment "${line}" ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ -z "${line}" ] ; then
|
if [ -z "${line}" ] ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$(apt-cache -q show ${line} 2>/dev/null)" != "" ] ; then
|
if [ "$(apt-cache -q show "${line}" 2>/dev/null)" != "" ] ; then
|
||||||
pkg_list="${pkg_list} ${line}"
|
pkg_list="${pkg_list} ${line}"
|
||||||
else
|
else
|
||||||
echo "Warning: package ${line} not found." >&2
|
echo "Warning: package ${line} not found." >&2
|
||||||
fi
|
fi
|
||||||
done < ${pkg_file}
|
done < "${pkg_file}"
|
||||||
if [ -n "${pkg_list}" ] ; then
|
if [ -n "${pkg_list}" ] ; then
|
||||||
verbose "Installing ${pkg_list}"
|
verbose "Installing ${pkg_list}"
|
||||||
|
# shellcheck disable=SC2086
|
||||||
run_as_root apt-get install -qqy ${pkg_list}
|
run_as_root apt-get install -qqy ${pkg_list}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -254,25 +259,25 @@ install_apt_pkgs() {
|
|||||||
( echo "Can't run apt-get commands" >&2 && \
|
( echo "Can't run apt-get commands" >&2 && \
|
||||||
return 1 )
|
return 1 )
|
||||||
install_pkg_set packages.minimal
|
install_pkg_set packages.minimal
|
||||||
if test $MINIMAL = 1 ; then
|
if test "$MINIMAL" = 1 ; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
test $HAVE_X = 1 && install_pkg_set packages.X
|
test "$HAVE_X" = 1 && install_pkg_set packages.X
|
||||||
test $IS_KALI = 1 && install_pkg_set packages.kali
|
test "$IS_KALI" = 1 && install_pkg_set packages.kali
|
||||||
install_pkg_set packages.${ARCH}
|
install_pkg_set "packages.${ARCH}"
|
||||||
test $HAVE_X = 1 && install_chrome
|
test "$HAVE_X" = 1 && install_chrome
|
||||||
}
|
}
|
||||||
|
|
||||||
install_chrome() {
|
install_chrome() {
|
||||||
local TMPD=$(mktemp -d)
|
local TMPD="$(mktemp -d)"
|
||||||
local CHROME_ARCH=$(echo ${ARCH} | sed 's/x86_64/amd64/')
|
local CHROME_ARCH="${ARCH/x86_64/amd64}"
|
||||||
dpkg-query -l 'google-chrome*' >/dev/null 2>&1 && return 0
|
dpkg-query -l 'google-chrome*' >/dev/null 2>&1 && return 0
|
||||||
/usr/bin/wget --quiet -O ${TMPD}/google-chrome.deb \
|
/usr/bin/wget --quiet -O "${TMPD}/google-chrome.deb" \
|
||||||
https://dl.google.com/linux/direct/google-chrome-beta_current_${CHROME_ARCH}.deb
|
"https://dl.google.com/linux/direct/google-chrome-beta_current_${CHROME_ARCH}.deb"
|
||||||
run_as_root /usr/bin/dpkg -i ${TMPD}/google-chrome.deb || \
|
run_as_root /usr/bin/dpkg -i "${TMPD}/google-chrome.deb" || \
|
||||||
run_as_root /usr/bin/apt-get install -qq -f -y || \
|
run_as_root /usr/bin/apt-get install -qq -f -y || \
|
||||||
( echo "Could not install chrome." >&2 && return 1 )
|
( echo "Could not install chrome." >&2 && return 1 )
|
||||||
rm -rf ${TMPD}
|
rm -rf "${TMPD}"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_git_email() {
|
setup_git_email() {
|
||||||
@@ -283,8 +288,8 @@ setup_git_email() {
|
|||||||
if [ "${USER:0:5}" != "david" ] ; then
|
if [ "${USER:0:5}" != "david" ] ; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
local domain="$(hostname -f | egrep -o '[a-z0-9-]+\.[a-z0-9-]+$')"
|
local domain="$(hostname -f | grep -E -o '[a-z0-9-]+\.[a-z0-9-]+$')"
|
||||||
case $(echo ${domain} | md5sum | awk '{print $1}') in
|
case "$(echo "${domain}" | md5sum | awk '{print $1}')" in
|
||||||
b21a24d528346ef7d3932306ed96ede5|a5ed434a3f5089b489576cceab824f25)
|
b21a24d528346ef7d3932306ed96ede5|a5ed434a3f5089b489576cceab824f25)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -296,27 +301,28 @@ setup_git_email() {
|
|||||||
|
|
||||||
read_saved_prefs() {
|
read_saved_prefs() {
|
||||||
# Can't use basedir here as we don't have it yet
|
# Can't use basedir here as we don't have it yet
|
||||||
local old_pref_file=$(dirname $0)/installed-prefs
|
local old_pref_file="$(dirname "$0")/installed-prefs"
|
||||||
local pref_file=$(dirname $0)/.installed-prefs
|
local pref_file="$(dirname "$0")/.installed-prefs"
|
||||||
if [ -f ${old_pref_file} -a ! -f ${pref_file} ] ; then
|
if [ -f "${old_pref_file}" ] && ! [ -f "${pref_file}" ] ; then
|
||||||
mv ${old_pref_file} ${pref_file}
|
mv "${old_pref_file}" "${pref_file}"
|
||||||
fi
|
fi
|
||||||
if [ -f ${pref_file} ] ; then
|
if [ -f "${pref_file}" ] ; then
|
||||||
verbose "Loading saved skel preferences from ${pref_file}"
|
verbose "Loading saved skel preferences from ${pref_file}"
|
||||||
# source is a bashism
|
# source is a bashism
|
||||||
. ${pref_file}
|
# shellcheck disable=SC1090
|
||||||
|
. "${pref_file}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
save_prefs() {
|
save_prefs() {
|
||||||
test $SAVE = 1 || return 0
|
test "$SAVE" = 1 || return 0
|
||||||
local pref_file=${BASEDIR}/.installed-prefs
|
local pref_file=${BASEDIR}/.installed-prefs
|
||||||
(echo_pref BASEDIR
|
(echo_pref BASEDIR
|
||||||
echo_pref MINIMAL
|
echo_pref MINIMAL
|
||||||
echo_pref INSTALL_KEYS
|
echo_pref INSTALL_KEYS
|
||||||
echo_pref TRUST_ALL_KEYS
|
echo_pref TRUST_ALL_KEYS
|
||||||
echo_pref INSTALL_PKGS
|
echo_pref INSTALL_PKGS
|
||||||
echo_pref VERBOSE) > $pref_file
|
echo_pref VERBOSE) > "$pref_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo_pref() {
|
echo_pref() {
|
||||||
@@ -338,42 +344,44 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
verbose() {
|
verbose() {
|
||||||
test ${VERBOSE:-0} = 1 && echo "$@" >&2 || return 0
|
test "${VERBOSE:-0}" = 1 && echo "$@" >&2 || return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Operations
|
# Operations
|
||||||
|
|
||||||
install_dotfiles() {
|
install_dotfiles() {
|
||||||
install_dotfile_dir "${BASEDIR}/dotfiles"
|
install_dotfile_dir "${BASEDIR}/dotfiles"
|
||||||
|
# shellcheck disable=SC2015
|
||||||
test -d "${BASEDIR}/private_dotfiles" && \
|
test -d "${BASEDIR}/private_dotfiles" && \
|
||||||
test -d "${BASEDIR}/.git/git-crypt" && \
|
test -d "${BASEDIR}/.git/git-crypt" && \
|
||||||
install_dotfile_dir "${BASEDIR}/private_dotfiles" || \
|
install_dotfile_dir "${BASEDIR}/private_dotfiles" || \
|
||||||
true
|
true
|
||||||
|
# shellcheck disable=SC2015
|
||||||
test -d "${BASEDIR}/local_dotfiles" && \
|
test -d "${BASEDIR}/local_dotfiles" && \
|
||||||
install_dotfile_dir "${BASEDIR}/local_dotfiles" || \
|
install_dotfile_dir "${BASEDIR}/local_dotfiles" || \
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
install_main() {
|
install_main() {
|
||||||
test -d ${BASEDIR}/.git && command -v git >/dev/null 2>&1 && \
|
test -d "${BASEDIR}/.git" && command -v git >/dev/null 2>&1 && \
|
||||||
git -C ${BASEDIR} pull --ff-only
|
git -C "${BASEDIR}" pull --ff-only
|
||||||
test $MINIMAL = 1 || ( command -v git >/dev/null 2>&1 && \
|
test "$MINIMAL" = 1 || ( command -v git >/dev/null 2>&1 && \
|
||||||
git -C ${BASEDIR} submodule update --init --recursive )
|
git -C "${BASEDIR}" submodule update --init --recursive )
|
||||||
test $MINIMAL = 1 || prerequisites
|
test "$MINIMAL" = 1 || prerequisites
|
||||||
test $INSTALL_PKGS = 1 && is_deb_system && install_apt_pkgs
|
test "$INSTALL_PKGS" = 1 && is_deb_system && install_apt_pkgs
|
||||||
install_dotfiles
|
install_dotfiles
|
||||||
install_basic_dir "${BASEDIR}/bin" "${HOME}/bin"
|
install_basic_dir "${BASEDIR}/bin" "${HOME}/bin"
|
||||||
test $MINIMAL = 1 || postinstall
|
test "$MINIMAL" = 1 || postinstall
|
||||||
test $INSTALL_KEYS = 1 && install_keys
|
test "$INSTALL_KEYS" = 1 && install_keys
|
||||||
save_prefs
|
save_prefs
|
||||||
setup_git_email
|
setup_git_email
|
||||||
cleanup
|
cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
install_dconf() {
|
install_dconf() {
|
||||||
which dconf >/dev/null 2>&1 || return 1
|
command -v dconf >/dev/null 2>&1 || return 1
|
||||||
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read dcpath ; do
|
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read -r dcpath ; do
|
||||||
dconf load ${dcpath}/ < "${BASEDIR}/dconf/${dcpath}"
|
dconf load "${dcpath}/" < "${BASEDIR}/dconf/${dcpath}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,12 +399,12 @@ read_saved_prefs
|
|||||||
: ${SAVE:=1}
|
: ${SAVE:=1}
|
||||||
|
|
||||||
# Check prerequisites
|
# Check prerequisites
|
||||||
if [ ! -d $BASEDIR ] ; then
|
if [ ! -d "$BASEDIR" ] ; then
|
||||||
echo "Please install to $BASEDIR!" 1>&2
|
echo "Please install to $BASEDIR!" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which dpkg-query > /dev/null 2>&1 ; then
|
if command -v dpkg-query > /dev/null 2>&1 ; then
|
||||||
HAVE_X=$(dpkg-query -s xserver-xorg 2>/dev/null | \
|
HAVE_X=$(dpkg-query -s xserver-xorg 2>/dev/null | \
|
||||||
grep -c 'Status.*installed' \
|
grep -c 'Status.*installed' \
|
||||||
|| true)
|
|| true)
|
||||||
@@ -418,7 +426,7 @@ case $OPERATION in
|
|||||||
;;
|
;;
|
||||||
package*)
|
package*)
|
||||||
PKG_SET=${2:-minimal}
|
PKG_SET=${2:-minimal}
|
||||||
install_pkg_set packages.${PKG_SET}
|
install_pkg_set "packages.${PKG_SET}"
|
||||||
;;
|
;;
|
||||||
test)
|
test)
|
||||||
# Do nothing, just sourcing
|
# Do nothing, just sourcing
|
||||||
|
|||||||
36
keys/sjca_cert.pem
Normal file
36
keys/sjca_cert.pem
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIGTDCCBDSgAwIBAgIUBJJdpXynkaMkAKg/4trLTOxqjrwwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwgZUxEzARBgoJkiaJk/IsZAEZFgNjb20xHjAcBgoJkiaJk/IsZAEZFg5zeXN0
|
||||||
|
ZW1vdmVybG9yZDESMBAGCgmSJomT8ixkARkWAnNqMRcwFQYDVQQKDA5TeXN0ZW1P
|
||||||
|
dmVybG9yZDEQMA4GA1UECwwHSG9tZSBDQTEfMB0GA1UEAwwWU3lzdGVtT3Zlcmxv
|
||||||
|
cmQgSG9tZSBDQTAeFw0yMDA1MTUwMzM0NTBaFw0yMjA1MTUwMzM0NTBaMIGVMRMw
|
||||||
|
EQYKCZImiZPyLGQBGRYDY29tMR4wHAYKCZImiZPyLGQBGRYOc3lzdGVtb3Zlcmxv
|
||||||
|
cmQxEjAQBgoJkiaJk/IsZAEZFgJzajEXMBUGA1UECgwOU3lzdGVtT3ZlcmxvcmQx
|
||||||
|
EDAOBgNVBAsMB0hvbWUgQ0ExHzAdBgNVBAMMFlN5c3RlbU92ZXJsb3JkIEhvbWUg
|
||||||
|
Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDc/NBJVtiUvuqvx4Id
|
||||||
|
DAJuHOJCcK4GKVcmHXDVeF/xyV/WjKwxGFQ8cTIbwxPPc6SNrIPLkdqiJZusILHZ
|
||||||
|
AD34xcK0ojuyRohTyBk2YJVyj/XRfVw8W3+ywoJ4dm+XVgyQxm1XRJGpxQZ8QD4s
|
||||||
|
Z4g32gzirCNCvZGxra9xTWqPZF3Q3YD2p2jPw4i9BbC9Ubav9/8d7KHhIvh0AI+h
|
||||||
|
qKJv63dNMAo6CsxB1uzJ8XdKY+doJRvZ5OBoJx5e95iQ0kzPt3HLBpl3qJRkSyDQ
|
||||||
|
8L1A35MhIu6Ua6lJF5aCijL9sbvB+PvdJWSENEZRQYG5+jxiXtXLaFv48cFnTvQP
|
||||||
|
ZGrn3RDX/WDQd9VtmHqa7fYkK50FmwwoTHht9ph+g4jQGxSbnZMgTLXXbDnSSsXs
|
||||||
|
w6AoE/aPsPuPyuHgl5ZYTq4rTU2MwGcwrFcr49I9o5xcmss4oTsjX7hTuRuWxF5e
|
||||||
|
20DqV/xq+tOSusw4jCpBVUvOHmzCEvS2wQE02+vGRQayU9x1cUxoO3ljeObnzVp5
|
||||||
|
8/X628pHydxO+UGw/Y0d70OCwtZPkBLKOYmIgKGYhvV7r+3knxSyPwYL2Or21Pkf
|
||||||
|
hKfEaLdhCOrrYAdT8SE3Y9l5jsrtIIqU0WlG8/43r2tBipERIKUwTGyGcOOtAShh
|
||||||
|
ewLJvqRbmoX91t03So+2lgoRywIDAQABo4GRMIGOMA4GA1UdDwEB/wQEAwIBBjAS
|
||||||
|
BgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBTri98GnxlLYIUxCljntpfw8Rui
|
||||||
|
vzAfBgNVHSMEGDAWgBTri98GnxlLYIUxCljntpfw8RuivzAoBgNVHR4BAf8EHjAc
|
||||||
|
oBowGIIWLnNqLnN5c3RlbW92ZXJsb3JkLmNvbTANBgkqhkiG9w0BAQsFAAOCAgEA
|
||||||
|
YLEfQ6YJucxzxmBt6wrutfJZsvpj5N6qgJ8oLePNmK8KOhRT0scBLS5Oy5thEl9X
|
||||||
|
1Kt1W5/Wk0zegc3IivovbIAGwyYRbhdn7rNVYZJhItRgNaoyfBAHQk5YyNiWjRgQ
|
||||||
|
MuNQUvS6n7nK8rizRINKwtcUozskjcDYnr71A+oyjGfl48a/RbuVL+bydRJ0jX7a
|
||||||
|
5uTPbiAZKf4K150jQSq9Rt6AbBwdRbgsudsh4m/LaNLIEvI2RdBuLqP2O8c5SVAM
|
||||||
|
KrVXwH5MPp/7nlPw2UZrKL/NkM0BJw5ldLndGa1hwKbZPxs7dvLnmaRN7CeYZ+mP
|
||||||
|
kefxBt+Ql2qcBLog9il5+3W3F2oc+Ti68mmI7h1oYRT3jh2YAV+WVM0hvre/kgt0
|
||||||
|
9rTAW3KAyGG0GRiaCfADUd1FwFFTyzwTL4fN6wlYnPRFoex/8QQUo6DNmWibvc0W
|
||||||
|
e4jW/rsc7KCqsAwasuHJYzxJgN1jOMfD7/6jgVQJEz+JZnEBvszgd+QMMlR38P/W
|
||||||
|
cpp8fYPtFs+TNDIG2/aqGcIl8j7ppjPOrEFNLHdS0633+mni34Qb+qD85jqPb24i
|
||||||
|
1vF1pBO5CJjvOcqOFbAS3IT4i74oM1BpuD6LBk5u5PYJa/VM2SKsEbGPqpvarAZe
|
||||||
|
vSgWTzwGJmUEVCnFM/EFbsxyfcoGwcfLMCM2ioyoxmk=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@@ -1 +0,0 @@
|
|||||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPee2Rw1yiE9RIrXzslop9dnYgIc3shhXVk5+bPv/BrC8swklnYUSjQOU/lJuAjJJ9X7rx9kvgmL337Taa7dGao= davidtomaschik@gibson
|
|
||||||
1
keys/ssh/id_ecdsa_kion.pub
Normal file
1
keys/ssh/id_ecdsa_kion.pub
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJzWFHQZm6jsh2V+ATJPlEKEQdt3tWNojc2elz3hDs5Q9TPHUolE0/R66osFra5Qr/jonEwqzqwRIduxFYSIATc= david@kion
|
||||||
@@ -1 +0,0 @@
|
|||||||
../id_ecdsa_human.pub
|
|
||||||
1
keys/ssh/trusted/id_ecdsa_scar.pub
Symbolic link
1
keys/ssh/trusted/id_ecdsa_scar.pub
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../id_ecdsa_scar.pub
|
||||||
@@ -1 +0,0 @@
|
|||||||
../id_rsa_human.pub
|
|
||||||
1
keys/ssh/trusted/id_rsa_scar.pub
Symbolic link
1
keys/ssh/trusted/id_rsa_scar.pub
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../id_rsa_scar.pub
|
||||||
@@ -10,6 +10,7 @@ iptraf
|
|||||||
ipython
|
ipython
|
||||||
ipython3
|
ipython3
|
||||||
jarwrapper
|
jarwrapper
|
||||||
|
jc
|
||||||
jq
|
jq
|
||||||
kpartx
|
kpartx
|
||||||
ldap-utils
|
ldap-utils
|
||||||
@@ -17,6 +18,7 @@ lvm2
|
|||||||
most
|
most
|
||||||
msitools
|
msitools
|
||||||
nasm
|
nasm
|
||||||
|
nvim
|
||||||
opensc
|
opensc
|
||||||
openvpn
|
openvpn
|
||||||
p7zip-full
|
p7zip-full
|
||||||
|
|||||||
Reference in New Issue
Block a user