]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/commitdiff
add function to create a puppet module and set up git for it master
authorHendrik Jäger <gitcommit@henk.geekmail.org>
Fri, 20 Sep 2024 12:00:20 +0000 (14:00 +0200)
committerHendrik Jäger <gitcommit@henk.geekmail.org>
Fri, 20 Sep 2024 12:00:20 +0000 (14:00 +0200)
.env [new file with mode: 0644]
.gitignore.d/zsh
.zprofile
.zsh_functions/,chromprof [new file with mode: 0644]
.zsh_functions/,pp_mod_git [new file with mode: 0644]
.zsh_functions/knock_hnjs [new file with mode: 0644]
.zsh_functions/mr_register_puppet_module [new file with mode: 0644]
.zshrc

diff --git a/.env b/.env
new file mode 100644 (file)
index 0000000..93a7596
--- /dev/null
+++ b/.env
@@ -0,0 +1,147 @@
+# I want my own bins to take precedence
+PATH="$HOME/bin:$HOME/usr/bin:$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
+# I want sbin executables available
+PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
+
+export DEBEMAIL=deb@henk.geekmail.org
+export GITURL=ssh://gitolite@git.netwichtig.ch
+
+#export BROWSER=iceweasel
+export EDITOR=nvim
+export PAGER=less
+
+
+# language should generally be english
+export LANG="en_US.UTF-8"
+export LC_MESSAGES="en_US.UTF-8"
+
+# everything else the local format
+export LC_CTYPE="de_CH.UTF-8"
+export LC_NUMERIC="de_CH.UTF-8"
+export LC_TIME="de_CH.UTF-8"
+export LC_COLLATE="de_CH.UTF-8"
+export LC_MONETARY="de_CH.UTF-8"
+export LC_PAPER="de_CH.UTF-8"
+export LC_NAME="de_CH.UTF-8"
+export LC_ADDRESS="de_CH.UTF-8"
+export LC_TELEPHONE="de_CH.UTF-8"
+export LC_MEASUREMENT="de_CH.UTF-8"
+export LC_IDENTIFICATION="de_CH.UTF-8"
+
+
+# do not use cowsay
+export ANSIBLE_NOCOWS=1
+# better strategy for multiple hosts
+export ANSIBLE_STRATEGY=mitogen_linear
+
+
+# read settings from user directory
+export TEXMFCNF=${HOME}/.texlive:
+
+
+export FZF_DEFAULT_COMMAND='fdfind --type f'
+
+
+# colors for newt/whiptail (for debconf, needrestart, etc.)
+# works better with selenized colorscheme
+# everything that seems irrelevant is set to brown
+NEWT_COLORS=''
+# foreground seems irrelevant
+NEWT_COLORS="${NEWT_COLORS};root=brown,blue"
+# text in the root window
+NEWT_COLORS="${NEWT_COLORS};roottext=yellow,blue"
+
+# box/window/button shadows
+NEWT_COLORS="${NEWT_COLORS};shadow=brown,black"
+
+# boxes/windows themselves
+NEWT_COLORS="${NEWT_COLORS};window=brown,lightgray"
+# box/window titles
+NEWT_COLORS="${NEWT_COLORS};title=yellow,lightgray"
+# box/window borders
+NEWT_COLORS="${NEWT_COLORS};border=gray,lightgray"
+
+# full buttons
+NEWT_COLORS="${NEWT_COLORS};button=black,red"
+# compact buttons
+NEWT_COLORS="${NEWT_COLORS};compactbutton=black,lightgray"
+# selected/active button
+NEWT_COLORS="${NEWT_COLORS};actbutton=green,gray"
+
+# checkbox itself and text
+NEWT_COLORS="${NEWT_COLORS};checkbox=black,blue"
+# selection marker for checkbox
+NEWT_COLORS="${NEWT_COLORS};actcheckbox=yellow,gray"
+
+# text input field fore- and background
+NEWT_COLORS="${NEWT_COLORS};entry=yellow,blue"
+# TODO FIXME: no clue what that is
+NEWT_COLORS="${NEWT_COLORS};disentry=brown,yellow"
+
+# TODO FIXME: no clue what that is
+NEWT_COLORS="${NEWT_COLORS};label=yellow,red"
+
+# unselected entries in menus
+NEWT_COLORS="${NEWT_COLORS};listbox=lightgray,gray"
+# selected entries in menus
+NEWT_COLORS="${NEWT_COLORS};actsellistbox=yellow,blue"
+# TODO FIXME: no clue what that is
+NEWT_COLORS="${NEWT_COLORS};actlistbox=brown,red"
+# TODO FIXME: no clue what that is
+NEWT_COLORS="${NEWT_COLORS};sellistbox=black,brown"
+
+NEWT_COLORS="${NEWT_COLORS};textbox=black,lightgray"
+NEWT_COLORS="${NEWT_COLORS};acttextbox=brown,green"
+
+# TODO FIXME: no clue what that is
+NEWT_COLORS="${NEWT_COLORS};helpline=yellow,brown"
+
+# probably for gauges
+NEWT_COLORS="${NEWT_COLORS};emptyscale=red"
+NEWT_COLORS="${NEWT_COLORS};fullscale=blue"
+
+export NEWT_COLORS
+
+# black
+# darkgray
+# brown
+# yellow
+#
+# blue
+# cyan
+# gray
+# green
+# magenta
+# red
+#
+# lightblue
+# lightcyan
+# lightgray
+# lightgreen
+# lightmagenta
+# lightred
+
+
+# 'less' colors for man pages
+# Colors
+default=$(tput sgr0)
+red=$(tput setaf 1)
+green=$(tput setaf 2)
+purple=$(tput setaf 5)
+orange=$(tput setaf 9)
+
+# Begin blinking
+export LESS_TERMCAP_mb=$red
+# Begin bold
+export LESS_TERMCAP_md=$orange
+# End mode
+export LESS_TERMCAP_me=$default
+# End standout-mode
+export LESS_TERMCAP_se=$default
+# Begin standout-mode - info box
+export LESS_TERMCAP_so=$purple
+# End underline
+export LESS_TERMCAP_ue=$default
+# Begin underline
+export LESS_TERMCAP_us=$green
+
index df9c2c45cfd1382c664eed2847aa64e55af0b7c3..8cef335e25c45ed077e7f8c344acb501485da8f6 100644 (file)
@@ -9,6 +9,7 @@
 /.zsh_comprc~
 /.zsh_history
 !/.motd
+!/.env
 !/.tzvt_config
 !/.gitignore.d
 !/.gitignore.d/zsh
index 6abd585c09387f067a0d358a3c05756219d1455d..4c6d92fdccc8fc9d443253109ff9a8944c34c5a6 100644 (file)
--- a/.zprofile
+++ b/.zprofile
-# I want my own bins to take precedence
-PATH="$HOME/bin:$HOME/usr/bin:$HOME/usr/local/bin:$HOME/.local/bin:$PATH"
-# I want sbin executables available
-PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
+source ~/.env
+
+
 # remove duplicates because tmux starts login shells
 typeset -U path
 export PATH
 
 
-export DEBEMAIL=deb@henk.geekmail.org
-#export BROWSER=iceweasel
-export EDITOR=nvim
-export PAGER=less
-
-
-# language should generally be english
-export LANG="en_US.UTF-8"
-export LC_MESSAGES="en_US.UTF-8"
-
-# everything else the local format
-export LC_CTYPE="de_CH.UTF-8"
-export LC_NUMERIC="de_CH.UTF-8"
-export LC_TIME="de_CH.UTF-8"
-export LC_COLLATE="de_CH.UTF-8"
-export LC_MONETARY="de_CH.UTF-8"
-export LC_PAPER="de_CH.UTF-8"
-export LC_NAME="de_CH.UTF-8"
-export LC_ADDRESS="de_CH.UTF-8"
-export LC_TELEPHONE="de_CH.UTF-8"
-export LC_MEASUREMENT="de_CH.UTF-8"
-export LC_IDENTIFICATION="de_CH.UTF-8"
-
-
-# do not use cowsay
-export ANSIBLE_NOCOWS=1
-# better strategy for multiple hosts
-export ANSIBLE_STRATEGY=mitogen_linear
-
-
-# read settings from user directory
-export TEXMFCNF=${HOME}/.texlive:
-
-
-export FZF_DEFAULT_COMMAND='fdfind --type f'
-
-
 # zsh you-should-use
 YSU_MODE=ALL
 
-
-# colors for newt/whiptail (for debconf, needrestart, etc.)
-# works better with selenized colorscheme
-# everything that seems irrelevant is set to brown
-NEWT_COLORS=''
-# foreground seems irrelevant
-NEWT_COLORS="${NEWT_COLORS};root=brown,blue"
-# text in the root window
-NEWT_COLORS="${NEWT_COLORS};roottext=yellow,blue"
-
-# box/window/button shadows
-NEWT_COLORS="${NEWT_COLORS};shadow=brown,black"
-
-# boxes/windows themselves
-NEWT_COLORS="${NEWT_COLORS};window=brown,lightgray"
-# box/window titles
-NEWT_COLORS="${NEWT_COLORS};title=yellow,lightgray"
-# box/window borders
-NEWT_COLORS="${NEWT_COLORS};border=gray,lightgray"
-
-# full buttons
-NEWT_COLORS="${NEWT_COLORS};button=black,red"
-# compact buttons
-NEWT_COLORS="${NEWT_COLORS};compactbutton=black,lightgray"
-# selected/active button
-NEWT_COLORS="${NEWT_COLORS};actbutton=green,gray"
-
-# checkbox itself and text
-NEWT_COLORS="${NEWT_COLORS};checkbox=black,blue"
-# selection marker for checkbox
-NEWT_COLORS="${NEWT_COLORS};actcheckbox=yellow,gray"
-
-# text input field fore- and background
-NEWT_COLORS="${NEWT_COLORS};entry=yellow,blue"
-# TODO FIXME: no clue what that is
-NEWT_COLORS="${NEWT_COLORS};disentry=brown,yellow"
-
-# TODO FIXME: no clue what that is
-NEWT_COLORS="${NEWT_COLORS};label=yellow,red"
-
-# unselected entries in menus
-NEWT_COLORS="${NEWT_COLORS};listbox=lightgray,gray"
-# selected entries in menus
-NEWT_COLORS="${NEWT_COLORS};actsellistbox=yellow,blue"
-# TODO FIXME: no clue what that is
-NEWT_COLORS="${NEWT_COLORS};actlistbox=brown,red"
-# TODO FIXME: no clue what that is
-NEWT_COLORS="${NEWT_COLORS};sellistbox=black,brown"
-
-NEWT_COLORS="${NEWT_COLORS};textbox=black,lightgray"
-NEWT_COLORS="${NEWT_COLORS};acttextbox=brown,green"
-
-# TODO FIXME: no clue what that is
-NEWT_COLORS="${NEWT_COLORS};helpline=yellow,brown"
-
-# probably for gauges
-NEWT_COLORS="${NEWT_COLORS};emptyscale=red"
-NEWT_COLORS="${NEWT_COLORS};fullscale=blue"
-
-export NEWT_COLORS
-
-# black
-# darkgray
-# brown
-# yellow
-#
-# blue
-# cyan
-# gray
-# green
-# magenta
-# red
-#
-# lightblue
-# lightcyan
-# lightgray
-# lightgreen
-# lightmagenta
-# lightred
-
-
-# 'less' colors for man pages
-# Colors
-default=$(tput sgr0)
-red=$(tput setaf 1)
-green=$(tput setaf 2)
-purple=$(tput setaf 5)
-orange=$(tput setaf 9)
-
-# Begin blinking
-export LESS_TERMCAP_mb=$red
-# Begin bold
-export LESS_TERMCAP_md=$orange
-# End mode
-export LESS_TERMCAP_me=$default
-# End standout-mode
-export LESS_TERMCAP_se=$default
-# Begin standout-mode - info box
-export LESS_TERMCAP_so=$purple
-# End underline
-export LESS_TERMCAP_ue=$default
-# Begin underline
-export LESS_TERMCAP_us=$green
-
diff --git a/.zsh_functions/,chromprof b/.zsh_functions/,chromprof
new file mode 100644 (file)
index 0000000..cc8a81d
--- /dev/null
@@ -0,0 +1,3 @@
+profile_name=$1
+mkdir -p ${HOME}/.config/chromium_profile_${profile_name}
+chromium --user-data-dir=${HOME}/.config/chromium_profile_${profile_name}
diff --git a/.zsh_functions/,pp_mod_git b/.zsh_functions/,pp_mod_git
new file mode 100644 (file)
index 0000000..dfb815b
--- /dev/null
@@ -0,0 +1 @@
+g remote add origin ssh://git.netwichtig.de/user/henk/code/puppet/modules/${PWD##*/}.git
diff --git a/.zsh_functions/knock_hnjs b/.zsh_functions/knock_hnjs
new file mode 100644 (file)
index 0000000..e0aaf23
--- /dev/null
@@ -0,0 +1 @@
+knock --udp --ipv4 --verbose $@ 22 31337 23
diff --git a/.zsh_functions/mr_register_puppet_module b/.zsh_functions/mr_register_puppet_module
new file mode 100644 (file)
index 0000000..5019756
--- /dev/null
@@ -0,0 +1,4 @@
+MODULE=$1
+cd ${MODULE}
+GITURL=$(git remote get-url origin)
+echo "[\$HOME/Data/personal/henk/workinprograss/configs/puppet_modules/${MODULE}]\ncheckout = git clone '${GITURL%.git}.git' '$MODULE'" > ~/.config/mr/available.d/puppet_${MODULE}.repo
diff --git a/.zshrc b/.zshrc
index 9d9ed49591ffadadabdd852e7fe508b3a048259e..678b466ce676e51926d7c3c687b210166fc4d06e 100644 (file)
--- a/.zshrc
+++ b/.zshrc
@@ -222,6 +222,7 @@ eval "$(zoxide init zsh)"
 FZF_TMUX=1
 FZF_CTRL_T_COMMAND='command fdfind --hidden'
 FZF_ALT_C_COMMAND='command fdfind --hidden --type d'
+FZF_DEFAULT_COMMAND='command fdfind --hidden'
 source /usr/share/doc/fzf/examples/key-bindings.zsh
 source /usr/share/doc/fzf/examples/completion.zsh