Update 2024-12-25 21:13 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-12-25 21:13:51 +01:00
parent 2357c34813
commit 7eb3f826fb
8 changed files with 74 additions and 27 deletions

40
.bin/g Normal file
View File

@ -0,0 +1,40 @@
#!/bin/sh
# check if there's .git dir in a parent dir
isgit() {
_path="$PWD"
while [ -n "$_path" ]
do
if [ -d "$_path/.git" ]
then
return 0
fi
_path="${_path%/*}"
done
return 1
}
if ! isgit
then echo "no git repository"
return
fi
_log=$(git --no-pager log \
--abbrev-commit \
--pretty=format:'%h | %an: %s' \
...origin/HEAD)
_stat=$(git --no-pager status \
--short)
if [ -n "$_log" ]
then echo "$_log"
else _branch=$(git --no-pager branch --no-color --show-current)
echo "git log: no change in $_branch"
fi
if [ -n "$_stat" ]
then echo "git status:"
echo "$_stat"
else echo "git status: clean"
fi

View File

@ -49,10 +49,9 @@ then
echo
echo " other commands:"
echo " ledit - edit this script"
echo " ldev - switch to dev environment"
echo " ltest - switch to test environment"
echo " ltemp - switch to temp environment"
echo " lsdk - switch to sdk environment"
echo " ldev - switch to dev environment (c0dev0id/luakit)"
echo " ltest - switch to test environment (luakit/luakit)"
echo " ltemp - switch to temp environment (luakit/luakit)"
echo
fi
@ -84,7 +83,7 @@ fi
if [ "$_action" == "reset" ]
then
if [ "$_env" == "sdk" ]
if [ "$_env" == "dev" ]
then
cd /tmp
rm -rf "$_dir"
@ -107,7 +106,7 @@ fi
if [ "$_action" == "update" ]
then
set -xe
if [ "$_env" == "sdk" ]
if [ "$_env" == "dev" ]
then
git fetch --all
git checkout develop

View File

@ -54,6 +54,10 @@ add "set -A complete_man_1 -- " "$S1 $S5 $S8"
ARGS="add flush jump load monitor next pause play prev repeat restart show status stop toggle"
add "set -A complete_amused_1 -- " "$ARGS"
add "set -A complete_l_1 -- " "make remake test debug pr update reset diff update-port"
add "set -A complete_upload_1 -- " "rm rml ls last ren renl fixl sh ksh txt log gz tgz"
#
# GOT
#

View File

@ -6,7 +6,7 @@ then
fi
mkdir -p "$HOME/ytdl/$1/"
ksh-update-completions &
update-ksh-completions &
cd "$HOME/ytdl/$1/"
yt-dlp --cookies-from-browser chromium "$2"

View File

@ -55,20 +55,20 @@ local binds = require "binds"
-- Settings (the commented ones do not [yet] work)
local settings = require "settings"
-- local settings_chrome = require "settings_chrome"
local settings_chrome = require "settings_chrome"
settings.window.home_page = "luakit://newtab"
settings.window.scroll_step = 20
settings.window.zoom_step = 0.2
settings.webview.zoom_level = 100
settings.window.close_with_last_tab = true
-- search engines
settings.window.search_engines.ddg = "https://duckduckgo.com/?q=%s"
settings.window.search_engines.g = "https://google.com/?q=%s"
settings.window.search_engines.mg = "https://metager.org/?q=%s"
settings.window.search_engines.gh = "https://github.com/search?q=%s"
settings.window.search_engines.default = settings.window.search_engines.ddg
-- settings.window.home_page = "luakit://newtab"
-- settings.window.scroll_step = 20
-- settings.window.zoom_step = 0.2
-- settings.webview.zoom_level = 125
-- settings.window.close_with_last_tab = true
--
-- -- search engines
-- settings.window.search_engines.ddg = "https://duckduckgo.com/?q=%s"
-- settings.window.search_engines.g = "https://google.com/?q=%s"
-- settings.window.search_engines.mg = "https://metager.org/?q=%s"
-- settings.window.search_engines.gh = "https://github.com/search?q=%s"
-- settings.window.search_engines.default = settings.window.search_engines.ddg
----------------------------------
-- Optional user script loading --

8
.kshrc
View File

@ -131,7 +131,7 @@ gitstatus() {
_path="$PWD"
while [ -n "$_path" ]
do [ -d "$_path/.git" ] \
&& echo "($(git branch --no-color --show-current))" \
&& echo "($(git --no-pager branch --no-color --show-current))" \
&& break
_path="${_path%/*}"
done
@ -178,7 +178,10 @@ alias tlog="t log +LOG"
alias tuta="tut -u 'sh@bsd.network uugrn@chaos.social'"
# servers
alias x="ssh -t sdk@home.codevoid.de 'tmux -u new-session -d -s main; tmux -u new-session -t main \; set-option destroy-unattached'"
alias x="ssh -t sdk@home.codevoid.de \
'tmux -u new-session -d -s main; \
tmux -u new-session -t main \; \
set-option destroy-unattached'"
alias inssh="ssh -o HostKeyAlgorithms=+ssh-rsa \
-o KexAlgorithms=+diffie-hellman-group1-sha1 \
@ -193,7 +196,6 @@ alias pkgreadme="cd /usr/local/share/doc/pkg-readmes; ls"
# other
alias portroach="portroach-cli -m codevoid"
alias ugrep="\ugrep -nI --exclude=tags --exclude=.tags --exclude='cscope.*'"
alias joplin="firefox https://app.joplincloud.com &"
########################################################################
# AMUSED

File diff suppressed because one or more lines are too long

View File

@ -133,7 +133,7 @@ let g:is_posix = 1 " $( ) is fine
" THEME TWEAKS
highlight CursorLine ctermbg=238
highlight ColorColumn ctermbg=none ctermfg=9
highlight ColorColumn ctermbg=233
highlight CursorLineNr ctermbg=none ctermfg=208 cterm=none
highlight LineNr ctermbg=0
highlight SpecialKey ctermbg=232 ctermfg=245