From 6a461712ba2cd8c54f0915f25e866f56e3984ac4 Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Sun, 1 Jan 2023 10:16:54 +0100 Subject: [PATCH] Update 2023-01-01 10:16 OpenBSD/amd64 --- .bin/_config | 4 ++-- .bin/dexec_browser | 5 +++-- .bin/website-add-image-to-gallery | 3 ++- .config/fontconfig/fonts.conf | 30 ++++++++++++++++++++++++++++++ .config/nsxiv/exec/key-handler | 20 ++++++++++++++++++-- .gitconfig | 1 + .gnupg/pinentry-dmenu.conf | 2 +- .kshrc | 9 +++++++++ .mutt/mailcap | 2 +- .notion/cfg_sp.lua | 2 +- .notion/look_codevoid.lua | 2 +- .notion/mod_float-sb.lua | 2 +- .notion/statusd_shellbar.lua | 5 +++-- 13 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 .config/fontconfig/fonts.conf diff --git a/.bin/_config b/.bin/_config index 6067d67..c3d3097 100644 --- a/.bin/_config +++ b/.bin/_config @@ -21,10 +21,10 @@ HTERM="st -f $HFONT" # # NOTION ORANGE -# DMENUOPTS="-fn '$DFONT' -nb #121212 -nf #707070 -sf #FFA600 -sb #121212 -i -f" +DMENUOPTS="-fn '$DFONT' -nb #121212 -nf #707070 -sf #FFA600 -sb #121212 -l 20 -i -f" # SPECTRWM GREY -DMENUOPTS="-fn '$DFONT' -nb #121212 -nf #707070 -sf #CCCCCC -sb #121212 -b -i -f" +# DMENUOPTS="-fn '$DFONT' -nb #121212 -nf #707070 -sf #CCCCCC -sb #121212 -l 20 -i -f" DMENU_CMD="dmenu $DMENUOPTS" DMENURUN_CMD="dmenu_run $DMENUOPTS" diff --git a/.bin/dexec_browser b/.bin/dexec_browser index 75755ed..83a6748 100755 --- a/.bin/dexec_browser +++ b/.bin/dexec_browser @@ -23,10 +23,11 @@ PICKLIST="paste_from_clipboard pick_from_history ----------------- $(cat "${HISTFILE}" \ + | sort -r \ | cut -b 23- \ - | sort -u \ | egrep -v ' |^[^a-zA-Z0-9]' \ - | fgrep '.') + | grep '\...'\ +) http://localhost" # show filtered history file diff --git a/.bin/website-add-image-to-gallery b/.bin/website-add-image-to-gallery index 11eabbb..fe724d3 100755 --- a/.bin/website-add-image-to-gallery +++ b/.bin/website-add-image-to-gallery @@ -43,7 +43,7 @@ fi [ -z "${_name}" ] \ && error_exit "Filename not set" -cd "${HOME}/website/site/photos" +cd "${HOME}/website/photos" gallerydir="$((echo NEW; find * -mindepth 0 -maxdepth 0 -type d; ) \ | fzf --prompt "Directory> " \ @@ -80,6 +80,7 @@ else convert "${_imgpath}" "${gallerydir}/${_name}.jpg" fi +jhead -q -autorot "${gallerydir}/${_name}.jpg" jpegoptim -w 12 --all-progressive --strip-all "$gallerydir/${_name}.jpg" echo -n "Add image description? [y/N]: " diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..f6869a0 --- /dev/null +++ b/.config/fontconfig/fonts.conf @@ -0,0 +1,30 @@ + + + + + + monospace + + Android Emoji + + + + + + + + + Symbola + + + + + + + Symbola + + Android Emoji + + + + diff --git a/.config/nsxiv/exec/key-handler b/.config/nsxiv/exec/key-handler index 11d60f7..0353677 100755 --- a/.config/nsxiv/exec/key-handler +++ b/.config/nsxiv/exec/key-handler @@ -86,11 +86,25 @@ help() { set -x } +keep() { + new="$(echo "$1" | sed 's,/2-,/1-,g')" + mv "$1" "$new" +} +remove_set() { + _dir="$(dirname ${file})" + set -x + mv "$_dir/1-"* . + rm -f "$_dir/2-"* + rm -rf "$_dir" + pkill nsxiv + set +x +} + while read file do case "$1" in - "Left") rotate_ccw "$file" ;; - "Right") rotate_cw "$file" ;; + "Left") jpegtran -rotate 270 -outfile "$file" "$file" ;; + "Right") jpegtran -rotate 90 -outfile "$file" "$file" ;; "c") copy_to_clipboard "$file" ;; "d") rm -f "$file" ;; "e") edit_image "$file" ;; @@ -98,6 +112,8 @@ do "i") show_details "$file" ;; "p") echo "$(readlink -f "$file")" ;; "s") save_image "$file" ;; + "q") remove_set "$file" ;; "x") texec "website-add-image-to-gallery \"$file\"" ;; + "k") keep "$file" ;; esac done diff --git a/.gitconfig b/.gitconfig index de3b0e6..d6b6f07 100644 --- a/.gitconfig +++ b/.gitconfig @@ -37,3 +37,4 @@ directory = /usr/src directory = /usr/ports directory = /usr/ports/mystuff + directory = /usr/xenocara diff --git a/.gnupg/pinentry-dmenu.conf b/.gnupg/pinentry-dmenu.conf index fb9e9be..ca37c36 100644 --- a/.gnupg/pinentry-dmenu.conf +++ b/.gnupg/pinentry-dmenu.conf @@ -2,7 +2,7 @@ asterisk= "*"; min_password_length = 24 prompt = "GnuPG" font = "FuraCodeNerdFont-13"; -bottom = true; +bottom = false; prompt_fg = "#FFFFFF"; prompt_bg = "#771818"; normal_fg = "#FFFFFF"; diff --git a/.kshrc b/.kshrc index 9b64c6e..0983f2b 100644 --- a/.kshrc +++ b/.kshrc @@ -137,6 +137,15 @@ alias vimrc="vim ~/.vim/vimrc" alias kludges="vim ~/.notion/cfg_kludges.lua" alias spectrwmrc="vim ~/.config/spectrwm/spectrwm.conf" alias dev-kernconf="doas vim /sys/arch/amd64/conf/GENERIC.MP" +alias bookmarks="vim ~/.browser_history" +bookmarks-clean() { + cat ~/.browser_history \ + | sort -k 3 \ + | uniq -f2 \ + | sort \ + > /tmp/browser_history \ + && mv /tmp/browser_history ~/.browser_history +} # vim-snippets alias snip_sh="vim ~/.vim/bundle/vim-snipmate/snippets/sh.snippets" diff --git a/.mutt/mailcap b/.mutt/mailcap index 3690cee..9070967 100644 --- a/.mutt/mailcap +++ b/.mutt/mailcap @@ -26,7 +26,7 @@ text/html; w3m -I %{charset} -T %t -cols "$COLUMNS" -s -no-graph -o display_link=1 -o display_link_number=1; copiousoutput; # documents -application/pdf; zathura %s; nametemplate=%s.pdf; +application/pdf; mupdf-gl %s; nametemplate=%s.pdf; application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice %s; application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice %s; application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice %s; diff --git a/.notion/cfg_sp.lua b/.notion/cfg_sp.lua index 69a4081..d927068 100644 --- a/.notion/cfg_sp.lua +++ b/.notion/cfg_sp.lua @@ -2,7 +2,7 @@ -- Ion mod_sp configuration file -- -mod_sp.set_size(1600, 800); +mod_sp.set_size(2400, 1200); defbindings("WScreen", { bdoc("Toggle scratchpad."), diff --git a/.notion/look_codevoid.lua b/.notion/look_codevoid.lua index 16ee870..f2d88b4 100644 --- a/.notion/look_codevoid.lua +++ b/.notion/look_codevoid.lua @@ -13,7 +13,7 @@ de.defstyle("*", { highlight_pixels = 1, shadow_pixels = 1, border_style = "elevated", - font = "-nil-profont-medium-r-normal---220-72-72-c-120-iso8859-1", + font = "xft:FuraCodeNerdFont:size=18", text_align = "center", }) diff --git a/.notion/mod_float-sb.lua b/.notion/mod_float-sb.lua index fc6d0fb..1aa1fe2 100644 --- a/.notion/mod_float-sb.lua +++ b/.notion/mod_float-sb.lua @@ -13,7 +13,7 @@ floatsb=floatsbscr:attach_new{ unnumbered=true, sizepolicy='southwest', template='%workspace_pager', - passive=true, + passive=false, level=2 } diff --git a/.notion/statusd_shellbar.lua b/.notion/statusd_shellbar.lua index a4e66a2..606caf9 100644 --- a/.notion/statusd_shellbar.lua +++ b/.notion/statusd_shellbar.lua @@ -7,6 +7,7 @@ function get_shell(cmd) handle:close() if not result then return "(" .. error .. ")" -- chance of interrupted system call + -- if not compiled with SA_RESTART signal end return result end @@ -14,8 +15,8 @@ end local timer = statusd.create_timer() local function update() - statusd.inform("shellbar", get_shell('/home/sdk/.notion/shellbar.sh')) - timer:set(5000, update) + statusd.inform("shellbar", get_shell('cbar -1')) + timer:set(1000, update) end update()