Update 2024-01-17 18:18 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2024-01-17 18:18:42 +01:00
parent 1c1601e258
commit ca61530b02
14 changed files with 90 additions and 22 deletions

View File

@ -21,7 +21,7 @@ touch "${HISTFILE}"
read_input() { read_input() {
local S=$( { echo "paste_from_clipboard"; tail -r ${HISTFILE}; } \ local S=$( { echo "paste_from_clipboard"; tail -r ${HISTFILE}; } \
| awk '!seen[$0]++' \ | awk '!seen[$0]++' \
| ${DMENU_CMD} -p "Bookmarks") | ${DMENU_CMD} -p "Bookmarks" -l 20)
case "${S}" in case "${S}" in
paste_from_clipboard) S=$(xclip -o | head -n 1); ;; paste_from_clipboard) S=$(xclip -o | head -n 1); ;;
@ -85,7 +85,7 @@ Zalando"
esac esac
local S="$(printf "%s\n%s" "${DEFAULT}" "${SE}" \ local S="$(printf "%s\n%s" "${DEFAULT}" "${SE}" \
| ${DMENU_CMD} -p "Search Where?")" | ${DMENU_CMD} -p "Search Where?" -l 20)"
C=$(echo "$C" | sed 's/ /%20/g') C=$(echo "$C" | sed 's/ /%20/g')
case "${S}" in case "${S}" in
OPEN*) URI="${C}"; ;; OPEN*) URI="${C}"; ;;
@ -161,6 +161,6 @@ save_history() {
# main program starts here. # main program starts here.
read_input read_input
choose_wrapper choose_wrapper
choose_browser # choose_browser
save_history save_history
exec $BROWSER "$(printf '%s' "${URI}" | sed 's/ /%20/g')" exec $BROWSER "$(printf '%s' "${URI}" | sed 's/ /%20/g')"

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. $HOME/.bin/_config . $HOME/.bin/_config
S=$(dmenu_path | $DMENU_CMD -p Exec) S="$(dmenu_path | $DMENU_CMD -p "Terminal:")"
[ ! -z $S ] && sterm -e "$S" [ ! -z "$S" ] && sterm -e "ksh -ic \"$S\""

View File

@ -16,6 +16,7 @@ then
then then
doas wg-quick down $ACTIVE && NOTIFY_CMD "VPN: disconnected" doas wg-quick down $ACTIVE && NOTIFY_CMD "VPN: disconnected"
sleep 1 sleep 1
doas ifconfig trunk0 inet6 autoconf
fi fi
exit 0 exit 0
fi fi
@ -32,6 +33,9 @@ if [ ! -z "$ACTIVE" ]
then then
doas wg-quick down $ACTIVE && NOTIFY_CMD "VPN: disconnected" doas wg-quick down $ACTIVE && NOTIFY_CMD "VPN: disconnected"
sleep 1 sleep 1
doas ifconfig trunk0 inet6 autoconf
fi fi
doas ifconfig trunk0 -inet6
sleep 1
doas wg-quick up vpn && NOTIFY_CMD "VPN: $HOST" doas wg-quick up vpn && NOTIFY_CMD "VPN: $HOST"

View File

@ -1,5 +1,14 @@
#!/bin/sh #!/bin/sh
ZONE=codevoid.de
if [ ! -z $1 ]
then
ZONE=$1
fi
ssh -t dns.codevoid.de \ ssh -t dns.codevoid.de \
"doas vim /var/nsd/zones/master/codevoid.de \ "doas vim /var/nsd/zones/master/$ZONE \
&& doas nsd-control reload" && doas nsd-control reload"
sleep 2

View File

@ -1,3 +1,3 @@
#!/bin/sh +x #!/bin/sh +x
. $HOME/.bin/_config . $HOME/.bin/_config
$HTERM -T "term" $@ $HTERM $@

View File

@ -25,6 +25,9 @@ ARGS="reload restart stop start disable enable ls"
add "set -A complete_rcctl_1 -- " "$ARGS" add "set -A complete_rcctl_1 -- " "$ARGS"
add "set -A complete_rcctl_2 -- " "$(rcctl ls all)" add "set -A complete_rcctl_2 -- " "$(rcctl ls all)"
add "set -A complete_got_1 -- " "$(got -h 2>&1 | sed -n s/commands://p)" add "set -A complete_got_1 -- " "$(got -h 2>&1 | sed -n s/commands://p)"
add "set -A complete_xdl_1 -- " "$(cd ~/x && ls -d *)"
add "set -A complete_ydl_1 -- " "$(cd ~/Videos/YouTube && ls -d *)"
add "set -A complete_cg -- " "bitreich cufflink efnet hackint ircnet liberachat oftc robustirc uugrn" add "set -A complete_cg -- " "bitreich cufflink efnet hackint ircnet liberachat oftc robustirc uugrn"

View File

@ -10,7 +10,7 @@ JOBS="${JOBS:=$(sysctl -n hw.ncpuonline)}"
export CCACHE_DIR="/var/ccache" export CCACHE_DIR="/var/ccache"
export CCACHE_SLOPPINESS="locale,time_macros,random_seed,file_stat_matches,pch_defines" export CCACHE_SLOPPINESS="locale,time_macros,random_seed,file_stat_matches,pch_defines"
export CCACHE_MAXSIZE=60G export CCACHE_MAXSIZE=20G
export CCACHE_NOHASHDIR= export CCACHE_NOHASHDIR=
export CMAKE_CXX_COMPILER_LAUNCHER=ccache export CMAKE_CXX_COMPILER_LAUNCHER=ccache

View File

@ -1,9 +1,11 @@
#!/bin/sh -e #!/bin/sh
. ${HOME}/.bin/_config . ${HOME}/.bin/_config
trap cleanup 1 2 3 6 trap cleanup 1 2 3 6
cleanup() { rm -f "$file"; } cleanup() { rm -f "$file"; }
# FILENAME # FILENAME
file="${HOME}/Downloads/Screenshots/$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png" file="${HOME}/Downloads/Screenshots/$(date "+%Y-%m-%d_%H-%M-%S")-sshot.png"
mkdir -p "$(dirname "$file")" mkdir -p "$(dirname "$file")"

View File

@ -5,7 +5,7 @@
local theme = {} local theme = {}
-- Default settings -- Default settings
theme.font = "16px Terminus" theme.font = "16px Terminess"
theme.fg = "#D8D8D8" theme.fg = "#D8D8D8"
theme.bg = "#181818" theme.bg = "#181818"

View File

@ -20,7 +20,7 @@ color_unfocus_free = rgb:55/35/00
tile_gap = 16 tile_gap = 16
region_padding = 16 region_padding = 16
disable_border = 0 disable_border = 0
maximize_hide_bar = 1 maximize_hide_bar = 0
# +-------------------------------------------------- # +--------------------------------------------------
# | BAR SETTINGS # | BAR SETTINGS
@ -125,6 +125,7 @@ quirk[hl] = FLOAT + ANYWHERE + FOCUSPREV
quirk[hashlink] = FLOAT + ANYWHERE + FOCUSPREV quirk[hashlink] = FLOAT + ANYWHERE + FOCUSPREV
quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
quirk[XConsole:xconsole] = FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP quirk[XConsole:xconsole] = FLOAT + ANYWHERE + NOFOCUSCYCLE + NOFOCUSONMAP
quirk[Xmessage:xmessage] = FLOAT + ANYWHERE + FOCUSONMAP_SINGLE
# +-------------------------------------------------- # +--------------------------------------------------
# | RESET ALL KEYBOARD MAPPINGS # | RESET ALL KEYBOARD MAPPINGS
@ -157,9 +158,21 @@ bind[vpn] = MOD+V
program[exec] = dexec program[exec] = dexec
bind[exec] = MOD+D bind[exec] = MOD+D
program[cexec] = dexec_command
bind[cexec] = MOD+C
program[texec] = dexec_term
bind[texec] = MOD+Shift+D
program[ssh] = dexec_ssh program[ssh] = dexec_ssh
bind[ssh] = MOD+S bind[ssh] = MOD+S
program[ssh] = dexec_ssh
bind[ssh] = MOD+S
program[edit] = dexec_edit
bind[edit] = MOD+numbersign
program[scratchpad] = sp program[scratchpad] = sp
bind[scratchpad] = MOD+minus bind[scratchpad] = MOD+minus
@ -220,13 +233,13 @@ bind[iconify] = MOD+i
# MASTER # MASTER
bind[master_add] = MOD+comma bind[master_add] = MOD+comma
bind[master_del] = MOD+period bind[master_del] = MOD+period
bind[master_grow] = MOD+Right
bind[master_shrink] = MOD+Left bind[master_shrink] = MOD+Left
bind[stack_dec] = MOD+Shift+comma bind[stack_dec] = MOD+Shift+comma
bind[stack_inc] = MOD+Shift+period bind[stack_inc] = MOD+Shift+period
#bind[stack_reset] = MOD+Shift+space #bind[stack_reset] = MOD+Shift+space
bind[maximize_toggle] = MOD+f bind[maximize_toggle] = MOD+F
#bind[fullscreen_toggle] = MOD+f bind[fullscreen_toggle] = MOD+Control+F
# WS NAVIGATION # WS NAVIGATION
bind[ws_1] = MOD+1 bind[ws_1] = MOD+1

View File

@ -2,10 +2,6 @@
# YOUTUBE-DL # YOUTUBE-DL
######################################################################## ########################################################################
ytdl() {
yt-dlp "$@";
}
ytdl_playlist() { ytdl_playlist() {
yt-dlp \ yt-dlp \
-o '%(playlist_title)s/%(title)s.%(ext)s' \ -o '%(playlist_title)s/%(title)s.%(ext)s' \
@ -37,7 +33,23 @@ ytdl_audio() {
"$@"; "$@";
} }
xdl() { xdl() {
mkdir -p "$HOME/x/$1/" if [ ! -z $2 ]
cd "$HOME/x/$1/" && ytdl "$2" then
mkdir -p "$HOME/x/$1/"
cd "$HOME/x/$1/" && yt-dlp "$2"
ksh-update-completions
else
echo "First argument should be a category."
fi
} }
ytdl() {
if [ ! -z $2 ]
then
mkdir -p "$HOME/Videos/YouTube/$1/"
cd "$HOME/Videos/YouTube/$1/" && yt-dlp "$2"
ksh-update-completions
else
echo "First argument should be a category."
fi
}

6
.kshrc
View File

@ -47,6 +47,12 @@ export PRINTER
# MANDATORY ENVIRONMENT # MANDATORY ENVIRONMENT
######################################################################## ########################################################################
# hack for more colors in cool-retro-term
if [ ! -z $COLORFGBG ]
then
TERM=xterm-256color
fi
### HISTORY ### HISTORY
HISTCONTROL=ignoredups:ignorespace:erasedups HISTCONTROL=ignoredups:ignorespace:erasedups
HISTFILE=$HOME/.ksh-history HISTFILE=$HOME/.ksh-history

View File

@ -1,17 +1,19 @@
#!/bin/sh -e #!/bin/ksh -e
# needs converters/qprint # needs converters/qprint
# mutt: macro pager,attach \cs "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>" # mutt: macro pager,attach \cs "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>"
clear clear
. ~/.ksh/porttools.ksh
printf '\n---------------------------------------------------------------------\n' printf '\n---------------------------------------------------------------------\n'
grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}" grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}"
printf '---------------------------------------------------------------------\n\n' printf '---------------------------------------------------------------------\n\n'
printf "Apply patch on path? " printf "Apply patch on path? "
read -r _path read -r _path
_path=$(dev-dirs $_path) _path=$(port-jump $_path; pwd)
print "Using: $_path" print "Using: $_path"

View File

@ -46,8 +46,25 @@ Host sdf
User sdk User sdk
Host home Host home
Hostname home.codevoid.de
User sdk User sdk
Host dalek
Hostname dalek.home.codevoid.de
User sdk
Host tweety
Hostname tweety.home.codevoid.de
User sdk
Host cvs
Hostname cvs.openbsd.org
User sdk
Host osmc
Hostname osmc.home.codevoid.de
User osmc
# --- NOTES --- # --- NOTES ---
# ProxyCommand /bin/nc -X connect -x socks.proxy.lan:3128 %h %p # ProxyCommand /bin/nc -X connect -x socks.proxy.lan:3128 %h %p