Update 2023-04-10 13:00 OpenBSD/amd64
This commit is contained in:
parent
b6e06324bd
commit
7f7ab9652d
@ -1,15 +1,25 @@
|
||||
#!/bin/sh
|
||||
#!/bin/ksh
|
||||
|
||||
LIST=$(dmesg | grep "^uaudio.*configuration.*interface*" | sed 's/uaudio\(.\).*"\(.*\)".*/\1 - \2/g')
|
||||
DEV=$(sndioctl -n server.device)
|
||||
echo "Select sound device (current=$(( DEV - 1 ))):"
|
||||
[ ! -z $1 ] && sndioctl -q server.device=$1
|
||||
|
||||
echo "s - System Audio (PCI)"
|
||||
echo "$LIST"
|
||||
echo -n "=> "
|
||||
read -r
|
||||
DUMP=$(dmesg)
|
||||
_cur=$(sndioctl -n server.device)
|
||||
|
||||
case $REPLY in
|
||||
s) sndioctl -q server.device=0; ;;
|
||||
[0-9]) sndioctl -q server.device=$(( REPLY + 1 )); ;;
|
||||
esac
|
||||
examine() {
|
||||
_type=$(echo "$1" | cut -d" " -f3)
|
||||
_number=$(echo "$1" | cut -d" " -f1 | sed 's/[a-z]//g')
|
||||
_desc=$(echo "$DUMP" | grep -E "^$_type at.*" | tail -1 | cut -d'"' -f2)
|
||||
[ -z $_number ] && return
|
||||
|
||||
if [ $_cur -eq $_number ]
|
||||
then
|
||||
[ ! -z $_number ] && echo "> $_number: $_desc"
|
||||
else
|
||||
[ ! -z $_number ] && echo " $_number: $_desc"
|
||||
fi
|
||||
}
|
||||
|
||||
for i in 0 1 2 3 4 5 6
|
||||
do
|
||||
examine "$(echo "$DUMP" | grep -E "^audio$i\ at.*" | tail -1)"
|
||||
done
|
||||
|
3
.bin/sp
3
.bin/sp
@ -14,7 +14,8 @@ else
|
||||
if xwininfo -id $WID | fgrep -q IsUnMapped
|
||||
then
|
||||
# move window to current workspace
|
||||
wmctrl -i -r $WID -t $(xprop -root _NET_CURRENT_DESKTOP | cut -d'=' -f2)
|
||||
#wmctrl -i -r $WID -t $(xprop -root _NET_CURRENT_DESKTOP | cut -d'=' -f2)
|
||||
wmctrl -i -r $WID -t $(wmctrl -d | grep '*' | cut -d ' ' -f '1')
|
||||
# remove hidden flag
|
||||
wmctrl -i -r $WID -b remove,hidden
|
||||
# activate (give focus)
|
||||
|
1
.kshrc
1
.kshrc
@ -289,6 +289,7 @@ l() {
|
||||
}
|
||||
|
||||
# cam
|
||||
alias camformats="ffplay -f v4l2 -list_formats all -i /dev/video"
|
||||
alias cam="ffplay -loglevel quiet -f v4l2 -input_format mjpeg -video_size 640x480 -i /dev/video"
|
||||
setcam() {
|
||||
_dev=$1
|
||||
|
@ -21,21 +21,21 @@
|
||||
# Tests:
|
||||
# test -n "$DISPLAY" true when X is running
|
||||
|
||||
|
||||
# html
|
||||
text/html; ~/.mutt/scripts/call-browser.sh %s; test=test -n "$DISPLAY"; needsterminal;
|
||||
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; 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;
|
||||
application/vnd.oasis.opendocument.text; libreoffice %s;
|
||||
application/vnd.oasis.opendocument.spreadsheet; libreoffice %s;
|
||||
application/vnd.oasis.opendocument.presentation; libreoffice %s;
|
||||
application/pdf; ~/.mutt/scripts/call.sh mupdf-gl %s; nametemplate=%s.pdf;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
application/vnd.oasis.opendocument.text; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
application/vnd.oasis.opendocument.spreadsheet; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
application/vnd.oasis.opendocument.presentation; ~/.mutt/scripts/call.sh libreoffice %s;
|
||||
|
||||
# media
|
||||
image/*; nsxiv %s; needsterminal;
|
||||
image/*; ~/.mutt/scripts/call.sh nsxiv %s;
|
||||
video/*; mpv %s; needsterminal;
|
||||
audio/*; mpv %s; needsterminal;
|
||||
application/ogg; mpv %s; needsterminal;
|
||||
@ -49,4 +49,4 @@ application/ms-tnef; tnef -w %s
|
||||
|
||||
# fallback
|
||||
application/*; vim %s; needsterminal;
|
||||
#text/*; cat %s; copiousoutput;
|
||||
text/*; cat %s; copiousoutput;
|
||||
|
@ -207,10 +207,6 @@ alternative_order text/plain text/enriched text/html
|
||||
auto_view text/html text/enriched text/calendar
|
||||
|
||||
# Preview HTML
|
||||
macro pager "<pipe-message>cat - > /tmp/mutt.html && luakit /tmp/mutt.html<return>"
|
||||
|
||||
#macro pager "<pipe-message>~/.mutt/scripts/search-msgid.sh<enter>"
|
||||
|
||||
macro pager,attach "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>"
|
||||
|
||||
# Save Patch
|
||||
@ -290,6 +286,9 @@ bind pager,index ,S save-message
|
||||
# urlview
|
||||
macro pager \cb "<pipe-entry>'urlview'<enter>" 'Follow links with urlview'
|
||||
|
||||
# attachments
|
||||
bind attach <return> view-mailcap
|
||||
|
||||
# TOFU settings
|
||||
# macro pager T ":unset display_filter<enter><exit><display-message>:set display_filter='$my_tprot'<enter>" 'TOFU protection'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user