This commit is contained in:
Agnosto Dvonik 2022-10-01 18:16:21 -04:00
commit 71b5fe9977
20 changed files with 502 additions and 0 deletions

35
.Xdefaults Normal file
View File

@ -0,0 +1,35 @@
! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
XTerm.termName: xterm-256color
XTerm*loginShell:true
XTerm*font: xft:Anonymous Pro:size=12
XTerm*scrollBar:false
XTerm*utf8:true
XTerm*internalBorder: 12
XTerm.vt100.translations: #override \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
! hard contrast: *background: #1d2021
! soft contrast: *background: #32302f
*foreground: #ebdbb2
*background: #282828
*color0: #282828
*color1: #cc241d
*color2: #98971a
*color3: #d79921
*color4: #458588
*color5: #b16286
*color6: #689d6a
*color7: #a89984
*color8: #928374
*color9: #fb4934
*color10: #b8bb26
*color11: #fabd2f
*color12: #83a598
*color13: #d3869b
*color14: #8ec07c
*color15: #ebdbb2

11
.config/lemonbar/main Executable file
View File

@ -0,0 +1,11 @@
while true; do
me=$(echo "$USER@$(hostname)")
version=$(uname -rv)
date=$(date "+%Y-%m-%d %H:%M")
chkinet=$(ping -c 1 192.168.1.1 >/dev/null && echo "up" || echo "off")
used=$(vmstat | awk 'END {printf $3}' | tr -d "M")
batt=$(apm -l)
echo " $date%{r}$me $version $chkinet $used $batt"
sleep 1
done

41
.config/lemonbar/main.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# dvonik's main.sh for lemonbar
# public domain
#
mem() {
used="$(vmstat | awk 'END {printf $3}' | tr -d "M")"
all="$(( $(sysctl -n hw.physmem) / 1024 / 1024 ))"
echo "$used/$all"
}
net() {
ip="216.21.3.77"
ping -s 2 -c 1 "$ip" > "/dev/null" & pid=$! # ip for openbsd
wait "$pid"; status="$?"
case "$status" in
(0) echo "on"; ;;
(*) echo "off"; ;;
esac
}
battery() {
case "$(apm -b)" in
(0) stat="+!"; ;;
(1) stat="-!"; ;;
(2) stat="--"; ;;
(3) stat="++"; ;;
esac
echo "$(apm -l)% $stat"
}
bg=111314
fg=b7bbb7
main() {
echo "%{F#$fg} $(date "+%F %H:%M %Z") %{r}$(uname -r) [$(uname -v)] $(net) [$(battery)] $(mem) "
}
while true; do main; sleep 5; done

View File

@ -0,0 +1,9 @@
set font "Anonymous Pro 12"
set adjust-open "width"
set pages-per-row 1
set default-fg "#ebdbb2"
set default-bg "#282828"
set statusbar-fg "#ebdbb2"
set statusbar-bg "#282828"
set inputbar-fg "#ebdbb2"
set inputbar-bg "#282828"

51
.cwmrc Normal file
View File

@ -0,0 +1,51 @@
fontname "Anonymous Pro:size=12"
ignore bar
autogroup 0 bar
sticky yes
borderwidth 2
color font "#ebdbb2"
color selfont "#282828"
color menufg "#ebdbb2"
color menubg "#282828"
color activeborder "#ebdbb2"
color inactiveborder "#928374"
command lock slock
command Terminal xterm
command Browser firefox
command "School Browser" "firefox -P school"
command "Tor Browser" tor-browser
command Lock slock
command Logout "pkill cwm"
bind-key 4S-Return terminal
bind-key 4S-b firefox
bind-key 4S-t tor-browser
bind-key 4S-s "firefox -P school" # s for school/soy/suck/sad :(
bind-key 4S-Tab lock
bind-key MS-r restart
bind-key MS-q quit
bind-key CM-k window-cycle
bind-key CM-j window-rcycle
bind-key CM-w window-close
bind-key CM-m window-maximize
bind-key CM-f window-fullscreen
bind-key C-1 group-only-1
bind-key C-2 group-only-2
bind-key C-3 group-only-3
bind-key CM-1 window-movetogroup-1
bind-key CM-2 window-movetogroup-2
bind-key CM-3 window-movetogroup-3
bind-mouse 4-1 window-move
bind-mouse 4-2 window-lower
bind-mouse 4-3 window-resize

9
.exrc Normal file
View File

@ -0,0 +1,9 @@
set autoindent
set beautify
set extended
set iclower
set report=1
set ruler
set searchincr
set terse
set verbose

5
.gitconfig Normal file
View File

@ -0,0 +1,5 @@
[user]
name = Agnosto Dvonik
email = dvonik@rslp.org
[init]
defaultBranch = trunk

25
.mutt/muttrc Normal file
View File

@ -0,0 +1,25 @@
set from = "dvonik@rslp.org"
set realname = "Agnosto Dvonik"
set imap_user = "dvonik"
set folder = "imaps://mail.rslp.org:993"
set smtp_url = "smtp://dvonik@mail.rslp.org:587/"
set spoolfile = "+INBOX"
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates
set move = no
set imap_keepalive = 900
set pgp_use_gpg_agent = yes
set pgp_sign_as = 231E067D4E995977D82EAAF02E71AADAE25FA0EE
set pgp_timeout = 3600
set crypt_autosign = yes
set crypt_replyencrypt = yes
set status_format=""
color normal default default
color quoted green default
color status brightwhite black
source "/usr/local/share/examples/mutt/gpg.rc"
source "gpg -d ~/.mutt/passwd.gpg |"

35
.profile Normal file
View File

@ -0,0 +1,35 @@
# $OpenBSD: dot.profile,v 1.7 2020/01/24 02:09:51 okan Exp $
#
# sh/ksh initialization
# dvonik 20220412
#
case $TERM in
rxvt*|st*|xterm*) LANG="en_US.UTF-8"; ;;
vt*) LANG="C"; ;;
esac
CVSROOT="$HOME/cvs"
HISTFILE="$HOME/.history"
HISTSIZE=64
PATH=":$HOME/bin:$HOME/.local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:"
export PATH HOME LANG EDITOR CVSROOT HISTFILE HISTSIZE
[ -e "Downloads" ] && rm -rf "Downloads"
[ -e "Desktop" ] && rm -rf "Desktop"
alias mkdir="mkdir -p"
alias rm="rm -P"
fenc() {
openssl enc -aes-256-cbc -in $1 -out $2
}
denc() {
openssl enc -d -aes-256-cbc -in $1 -out $2
}
# done
fortune
biff y

16
.xsession Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
#
# dvonik's .xsession
# public domain
#
export GTK_THEME=Adwaita:dark
export LANG="en_US.UTF-8"
xidle -program "/usr/sbin/zzz" -timeout 600 &
picom --backend glx --xrender-sync-fence --glx-no-stencil --glx-no-rebind-pixmap --vsync -f -I 0.2 -O 0.2 -c &
xwallpaper --zoom "$HOME/share/pic/wall/lucabravo-A-fubu9QJxE-unsplash.jpg"
sct 3750 &
"$HOME/.config/lemonbar/main" | lemonbar-xft -g 1920x25 -B "#282828" -F "#ebdbb2" -f "Anonymous Pro:size=12" &
exec cwm

15
README Normal file
View File

@ -0,0 +1,15 @@
hello CVS rslp.org
dotfiles
--------
* apm
* cwm
* picom
* init
* lemonbar
* ufetch
* vi
* xenodm
* xterm
* xwallpaper
* zathura

27
bin/randfile Executable file
View File

@ -0,0 +1,27 @@
#!/bin/ksh
#
# dvonik's random file grabber
#
# in public domain
#
# randomise files
randomise() {
count=1
for i in $(find "$1" 2> "/dev/null"); do
arr[$count]="$i"
count="$(( count + 1 ))"
done
size="${#arr[@]}"
index="$(( RANDOM % size ))"
echo "${arr[$index]}"
}
[ ! -e "$1" ] && {
echo "$0: $1: no such file or directory" > "/dev/stderr"
exit 1
}
randomise "$1"

80
bin/ufetch Executable file
View File

@ -0,0 +1,80 @@
#!/bin/sh
#
# ufetch-openbsd - tiny system info for openbsd
## INFO
# user is already defined
host="$(hostname)"
os="$(uname -sr)"
kernel="$(uname -v)"
uptime="$(uptime | awk -F, '{sub(".*up ",x,$1);print $1}' | sed -e 's/^[ \t]*//')"
packages="$(ls -d /var/db/pkg/* | wc -l | sed -e 's/^[ \t]*//')"
shell="$(basename "${SHELL}")"
## UI DETECTION
parse_rcs() {
for f in "${@}"; do
wm="$(tail -n 1 "${f}" 2> /dev/null | cut -d ' ' -f 2)"
[ -n "${wm}" ] && echo "${wm}" && return
done
}
rcwm="$(parse_rcs "${HOME}/.xinitrc" "${HOME}/.xsession")"
ui='unknown'
uitype='UI'
if [ -n "${DE}" ]; then
ui="${DE}"
uitype='de'
elif [ -n "${WM}" ]; then
ui="${WM}"
uitype='wm'
elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then
ui="${XDG_CURRENT_DESKTOP}"
uitype='de'
elif [ -n "${DESKTOP_SESSION}" ]; then
ui="${DESKTOP_SESSION}"
uitype='de'
elif [ -n "${rcwm}" ]; then
ui="${rcwm}"
uitype='wm'
elif [ -n "${XDG_SESSION_TYPE}" ]; then
ui="${XDG_SESSION_TYPE}"
fi
ui="$(basename "${ui}")"
## DEFINE COLORS
# probably don't change these
if [ -x "$(command -v tput)" ]; then
bold="$(tput bold)"
black="$(tput setaf 0 0 0 2>/dev/null)"
red="$(tput setaf 1 0 0 2>/dev/null)"
green="$(tput setaf 2 0 0 2>/dev/null)"
yellow="$(tput setaf 3 0 0 2>/dev/null)"
blue="$(tput setaf 4 0 0 2>/dev/null)"
magenta="$(tput setaf 5 0 0 2>/dev/null)"
cyan="$(tput setaf 6 0 0 2>/dev/null)"
white="$(tput setaf 7 0 0 2>/dev/null)"
reset="$(tput sgr0)"
fi
# you can change these
c1="${reset}${bold}${white}" # second color
## OUTPUT
cat <<EOF
${c1} _____ ${USER}${c1}@${c1}${host}${reset}
${c1} \- -/ os ${reset}${os}${reset}
${c1} \_/ \ sys ${reset}${kernel}${reset}
${c1} | ${reset}O O${c1} | up ${reset}${uptime}${reset}
${c1} |_ ${reset}< ) 3${c1} ) pkg ${reset}${packages}${reset}
${c1} / \ / sh ${reset}${shell}${reset}
${c1} /-_____-\ ${uitype} ${reset}${ui}${reset}
EOF

13
bin/ufetch.LICENSE Normal file
View File

@ -0,0 +1,13 @@
Copyright (c) 2018, 2019, 2020 Joe Schillinger <me@schil.li>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -0,0 +1,28 @@
! $OpenBSD: Xresources.in,v 1.3 2020/06/28 15:38:34 matthieu Exp $
!
! dvonik 20220412
!
! zakaria.org's fail message is the best, and i cannot possibly replace it
xlogin.Login.fail: ya dun goofed
xlogin.Login.greeting:
xlogin*borderWidth: 0
xlogin.Login.height: 200
xlogin.Login.width: 400
xlogin.Login.y: 320
xlogin.Login.frameWidth: 10
xlogin.Login.innerFramesWidth: 0
xlogin.Login.sepWidthz: 0
xlogin.Login.background: #282828
xlogin.Login.foreground: #ebdbb2
xlogin.Login.failColor: #cc231d
xlogin.Login.inpColor: #282828
xlogin.Login.promptColor: #ebdbb2
xlogin.Login.hiColor: #282828
xlogin.Login.shdColor: #282828
xlogin.Login.face: Anonymous Pro-12
xlogin.Login.failFace: Anonymous Pro-12
xlogin.Login.promptFace: Anonymous Pro-12

77
fsroot/etc/X11/xenodm/Xsession Executable file
View File

@ -0,0 +1,77 @@
#!/bin/sh
#
# $OpenBSD: Xsession.in,v 1.2 2022/07/01 20:42:06 naddy Exp $
prefix="/usr/X11R6"
exec_prefix="${prefix}"
# redirect errors to a file in user's home directory if we can
errfile="$HOME/.xsession-errors"
if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
then
exec > "$errfile" 2>&1
else
for errfile in "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ef="$( umask 077 && mktemp "$errfile.XXXXXX" 2> /dev/null)"
then
exec > "$ef" 2>&1
mv "$ef" "$errfile" 2> /dev/null
break
fi
done
fi
# if we have private ssh key(s), start ssh-agent and add the key(s)
id1=$HOME/.ssh/identity
id2=$HOME/.ssh/id_dsa
id3=$HOME/.ssh/id_rsa
id4=$HOME/.ssh/id_ecdsa
id5=$HOME/.ssh/id_ed25519
# if [ -z "$SSH_AGENT_PID" ];
# then
# if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 -o -f $id4 -o -f $id5 ];
# then
# eval `ssh-agent -s`
# ssh-add < /dev/null
# fi
# fi
#
# do_exit() {
# if [ "$SSH_AGENT_PID" ]; then
# ssh-add -D < /dev/null
# eval `ssh-agent -s -k`
# fi
# exit
# }
case $# in
1)
case $1 in
failsafe)
${exec_prefix}/bin/xterm -geometry 80x24-0-0
do_exit
;;
esac
esac
# The startup script is not intended to have arguments.
startup=$HOME/.xsession
resources=$HOME/.Xresources
if [ -s "$startup" ]; then
if [ -x "$startup" ]; then
"$startup"
else
/bin/sh "$startup"
fi
else
if [ -f "$resources" ]; then
/usr/X11R6/bin/xrdb -load "$resources"
fi
${exec_prefix}/bin/xterm &
${exec_prefix}/bin/fvwm
fi
do_exit

15
fsroot/etc/X11/xenodm/Xsetup_0 Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# $OpenBSD: Xsetup_0.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $
#
# dvonik 20220412
#
/usr/local/bin/sct 3750
/usr/X11R6/bin/xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1
/usr/X11R6/bin/xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2
/usr/X11R6/bin/xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5
/usr/X11R6/bin/xinput set-prop "/dev/wsmouse" "Device Accel Constant Deceleration" 0.5
/usr/X11R6/bin/xrandr --dpi 96
/usr/X11R6/bin/xsetroot -solid \#282828

3
fsroot/etc/apm/resume Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
sync

3
fsroot/etc/apm/suspend Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
pkill -USR1 xidle

4
fsroot/etc/rc.conf.local Normal file
View File

@ -0,0 +1,4 @@
apmd_flags=-Az 10
smtpd_flags=NO
sshd_flags=NO
xenodm_flags=