From 2417190fa224dec06daaec7f9b132a5e89b74e23 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Sun, 7 Jul 2024 10:55:30 -0500 Subject: Netbsd setup --- Xresources | 13 +++++--- alpine-world | 71 -------------------------------------------- config/aerc/aerc.conf | 8 ++--- cwmrc | 7 ----- gnupg/gpg-agent.conf | 2 +- gnupg/gpg.conf | 0 kshrc | 14 +++------ profile | 22 ++++++++++---- vimrc | 12 +++++--- xdm/Xresources | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ xdm/Xsetup_0 | 5 ++++ xenodm/Xresources | 82 --------------------------------------------------- xenodm/Xsetup_0 | 19 ------------ xsession | 10 ++++--- 14 files changed, 136 insertions(+), 211 deletions(-) delete mode 100644 alpine-world mode change 100644 => 100755 gnupg/gpg-agent.conf mode change 100644 => 100755 gnupg/gpg.conf create mode 100644 xdm/Xresources create mode 100755 xdm/Xsetup_0 delete mode 100644 xenodm/Xresources delete mode 100755 xenodm/Xsetup_0 diff --git a/Xresources b/Xresources index 20cdfa8..f8f34b3 100644 --- a/Xresources +++ b/Xresources @@ -1,7 +1,12 @@ -Xcursor.theme: Adwaita -Xcursor.size: 34 +#Xcursor*theme: Adwaita +#Xcursor*size: 64 XTerm*faceSize: 14 +XTerm*selectToClipboard: true XTerm*faceName: Iosevka SS13 Extended:style=light:antialias=true:hinting=false -xterm*scrollBar: true -xterm*rightScrollbar: true +xterm*scrollBar: false +xterm*rightScrollbar: false XTerm.termName: xterm-256color +XTerm*Background: #FEFFFA +XTerm*Foreground: black +XTerm*HiBackColor: #FEFFFA + diff --git a/alpine-world b/alpine-world deleted file mode 100644 index 105df8a..0000000 --- a/alpine-world +++ /dev/null @@ -1,71 +0,0 @@ -adwaita-icon-theme -aerc -alpine-base -brightnessctl -busybox-mdev-openrc -chrony -consolefont-spleen -curl -cwm -dbus -doas -docs -dosfstools -e2fsprogs -eudev -fd -firefox -font-iosevka-aile -font-spleen -git -gnupg -go -gopls -grub-efi -gsettings-desktop-schemas -isync -iw -libinput -libinput-dev -libinput-libs -linux-firmware -linux-firmware-i915 -linux-firmware-intel -linux-firmware-mediatek -linux-firmware-other -linux-firmware-rtl_bt -linux-lts -loksh -luakit -make -mesa-dri-gallium -mesa-gles -opam -openssh -openssl -pamixer -pass -pulseaudio -qutebrowser -rcm -setxkbmap -shadow -tig -udev-init-scripts -udev-init-scripts-openrc -ugrep -unzip -vim -wpa_supplicant -xclock -xf86-input-evdev -xf86-input-libinput -xinit -xinput -xmodmap -xorg-server -xrdb -xsetroot -xterm -xz -zoxide diff --git a/config/aerc/aerc.conf b/config/aerc/aerc.conf index 26cfb7f..a594cf6 100644 --- a/config/aerc/aerc.conf +++ b/config/aerc/aerc.conf @@ -204,7 +204,7 @@ mouse-enabled=true # /usr/local/share/aerc/stylesets # /usr/share/aerc/stylesets # -#stylesets-dirs= +stylesets-dirs=/usr/pkg/share/aerc/stylesets # Uncomment to use box-drawing characters for vertical and horizontal borders. # @@ -445,7 +445,7 @@ parse-http-links=true # # Example (obviously, this requires that you write your main text/plain body # using the markdown syntax): -#text/html=pandoc -f markdown -t html --standalone +text/html=pandoc -f markdown -t html --standalone [filters] # @@ -480,7 +480,7 @@ text/calendar=calendar message/delivery-status=colorize message/rfc822=colorize #text/html=pandoc -f html -t plain -text/html=html +#text/html=w3m #application/octet-stream=zathura #text/*=bat -fP --file-name="$AERC_FILENAME" #application/x-sh=bat -fP -l sh @@ -543,7 +543,7 @@ text/html=html # /usr/local/share/aerc/templates # /usr/share/aerc/templates # -#template-dirs= +template-dirs=/usr/pkg/share/aerc/templates # The default template to be used for new messages. # diff --git a/cwmrc b/cwmrc index 5e882c2..f86b830 100644 --- a/cwmrc +++ b/cwmrc @@ -8,13 +8,6 @@ autogroup 0 xclock, xterm ignore xclock unbind-key all - -bind-key 0-XF86MonBrightnessUp "doas brightnessctl s +5%" -bind-key 0-XF86MonBrightnessDown "doas brightnessctl s 5%-" -bind-key 0-XF86AudioLowerVolume "pamixer -d 5" -bind-key 0-XF86AudioRaiseVolume "pamixer -i 5" -bind-key 0-XF86AudioMute "pamixer -t" - color menufg "#FFFFFF" #black color font "#000000" #black color menubg "#F5E094" #white diff --git a/gnupg/gpg-agent.conf b/gnupg/gpg-agent.conf old mode 100644 new mode 100755 index d4fce2c..231e0ac --- a/gnupg/gpg-agent.conf +++ b/gnupg/gpg-agent.conf @@ -1,4 +1,4 @@ default-cache-ttl 999999999 max-cache-ttl 999999999 allow-preset-passphrase -pinentry-program /usr/bin/pinentry +pinentry-program /usr/pkg/bin/pinentry diff --git a/gnupg/gpg.conf b/gnupg/gpg.conf old mode 100644 new mode 100755 diff --git a/kshrc b/kshrc index 77b535b..b013f1d 100644 --- a/kshrc +++ b/kshrc @@ -1,23 +1,17 @@ -export GPG_TTY=/dev/pts/0 #export HISTFILE="$HOME/.history" #alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" alias e="$EDITOR" +alias go=go122 alias g="git" alias grep="ugrep" alias tldr="NO_COLOR=1 tldr" -#alias sdf="sshpass -p $(pass sdf) ssh mccd@tty.sdf.org" +alias fd="NO_COLOR=1 fdfind" alias de='eval "$(direnv export bash)"' alias f-commit="fossil commit && fossil git export" alias jrnl='stitch -t :journal:' - -PS1='${PWD##*/} ' +alias bat='envstat -d acpibat0 | grep 'charge:' | awk "{print $6}"' set -o emacs -if [ -x "$(command -v opam)" ]; then - eval $(opam env) -fi - -echo "BAT: $(cat /sys/class/power_supply/BAT0/capacity)%" +PS1='${PWD##*/} ' eval "$(zoxide init posix --hook prompt)" - diff --git a/profile b/profile index 054a93b..f3c46fb 100644 --- a/profile +++ b/profile @@ -1,21 +1,31 @@ -PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/home/mccd/go +PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin + +PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin +PATH=${PATH}:/home/mccd/go/bin:/home/mccd/.local/bin +XCURSOR_PATH="/usr/pkg/share/icons" + export PATH HOME TERM +export LANG="en_US.UTF-8" +export XTERM_LOCALE=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export XDG_CONFIG_HOME=/home/mccd/.config export EDITOR="vim" export GDK_DPI_SCALE="1.5" export GDK_SCALE="1.5" export XCURSOR_SIZE="32" +export XCURSOR_PATH="/usr/pkg/share/icons" # So when you hover the desktop, it still uses Adwaita export XCURSOR_THEME="Adwaita" export PF_INFO="ascii title os editor shell wm" export PF_ALIGN="5" export PF_COLOR="0" export MOZ_ACCELERATED=1 -export GSETTINGS_SCHEMA_DIR=/usr/share/glib-2.0/schemas +export GSETTINGS_SCHEMA_DIR=/usr/pkg/share/glib-2.0/schemas -test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -export PATH=${PATH}:~/.local/bin -export XDG_DATA_DIRS=${XDG_DATA_DIRS}:~/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share + +#test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true +export XDG_DATA_DIRS=${XDG_DATA_DIRS}:~/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/pkg/share:/usr/local/share export ENV=$HOME/.kshrc export HISTSIZE=65535 export HISTFILE=$HOME/.history @@ -28,3 +38,5 @@ if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then exec startx fi +# opam configuration +test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true diff --git a/vimrc b/vimrc index fe2691e..52b0a06 100644 --- a/vimrc +++ b/vimrc @@ -10,16 +10,20 @@ set nobackup set autoindent set smartindent set cindent +set backspace=2 " Theme syntax on set background=light set rnu +set termguicolors colorscheme quiet set incsearch set matchpairs+=<:> -hi Normal ctermfg=black ctermbg=white +set t_Co=256 +hi Normal guifg=black guibg=#FEFFFA "hi Keyword ctermfg=black cterm=bold +set tgc hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white hi SpellCap term=reverse cterm=underline ctermfg=25 ctermbg=white hi SpellRare term=reverse cterm=underline ctermfg=30 ctermbg=white @@ -112,18 +116,18 @@ if exists('g:loaded_lsp') call LspAddServer([#{ \ name: 'golang', \ filetype: ['go', 'gomod', 'gowork', 'gohtml'], - \ path: '/usr/bin/gopls', + \ path: 'gopls', \ args: ['serve'], \ syncInit: v:true \ }]) end autocmd Filetype go set makeprg=go\ build -autocmd Filetype go autocmd BufWritePre :LspFormat +"autocmd Filetype go autocmd BufWritePre :LspFormat au BufRead,BufNewFile *.tmpl set filetype=gohtml autocmd Filetype gohtml setlocal tabstop=2 -autocmd Filetype gohtml setlocal formatprg=djlint\ --profile=golang\ --reformat\ - +" autocmd Filetype gohtml setlocal formatprg=djlint\ --profile=golang\ --reformat\ - " Nix if exists('g:loaded_lsp') diff --git a/xdm/Xresources b/xdm/Xresources new file mode 100644 index 0000000..aa8ffc8 --- /dev/null +++ b/xdm/Xresources @@ -0,0 +1,82 @@ +! $OpenBSD: Xresources.in,v 1.4 2022/11/07 17:12:06 matthieu Exp $ +! +! +! +! +! + + + + +xlogin*login.translations: #override \ + F1: set-session-argument(failsafe) finish-field()\n\ + Left: move-backward-character()\n\ + Right: move-forward-character()\n\ + Home: move-to-begining()\n\ + End: move-to-end()\n\ + CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ + KP_Enter: set-session-argument() finish-field()\n\ + CtrlReturn: set-session-argument(failsafe) finish-field()\n\ + Return: set-session-argument() finish-field() + +xlogin*greeting: +xlogin*namePrompt: Login: +xlogin*fail: Login incorrect + +#if WIDTH > 800 +xlogin*greetFace: Iosevka Aile-22:bold:italic:dpi=75 +xlogin*face: IosevkaAile-16:dpi=75 +xlogin*promptFace: IosevkaAile-16:bold:dpi=75 +xlogin*failFace: IosevkaAile-16:bold:dpi=75 +#else +xlogin*greetFace: Iosevka Aile-18:bold:italic:dpi=75 +xlogin*face: Iosevka Aile-12:dpi=75 +xlogin*promptFace: Iosevka Aile-12:bold:dpi=75 +xlogin*failFace: Iosevka Aile-12:bold:dpi=75 +#endif + +#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15)) +# if PLANES < 4 +# ifndef bpp1 +# define bpp1 +# endif +# else +# if PLANES > 4 +# if PLANES > 8 +# ifndef bpp15 +# define bpp15 +# endif +# else +# ifndef bpp8 +# define bpp8 +# endif bpp8 +# endif +# else +# ifndef bpp4 +# define bpp4 +# endif +# endif +# endif +#endif /* If manual override */ + +#ifndef bpp1 +xlogin*borderWidth: 0 +xlogin*frameWidth: 2 +xlogin.Login.height: 200 +xlogin.Login.width: 400 +xlogin.Login.y: 600 +xlogin.Login.frameWidth: 10 +xlogin.Login.innerFramesWidth: 0 +xlogin*innerFramesWidth: 20 +Xcursor.theme: Adwaita +Xcursor.size: 34 + +xlogin.Login.sepWidth: 0 + +xlogin.Login.background: #FFFFFF +xlogin.Login.foreground: #000000 +xlogin.Login.failColor: #b00035 +xlogin.Login.inpColor: #FFFFFF +xlogin.Login.promptColor: #000000 +xlogin.Login.hiColor: #FFFFFF +xlogin.Login.shdColor: #FFFFFF diff --git a/xdm/Xsetup_0 b/xdm/Xsetup_0 new file mode 100755 index 0000000..4b317dc --- /dev/null +++ b/xdm/Xsetup_0 @@ -0,0 +1,5 @@ +#!/bin/sh + +/usr/X11R7/bin/xsetroot -solid \#FFFFFF +/usr/X11R7/bin/setxkbmap -layout us -variant colemak +/usr/X11R7/bin/xset fp+ /usr/local/share/fonts diff --git a/xenodm/Xresources b/xenodm/Xresources deleted file mode 100644 index acec2cc..0000000 --- a/xenodm/Xresources +++ /dev/null @@ -1,82 +0,0 @@ -! $OpenBSD: Xresources.in,v 1.4 2022/11/07 17:12:06 matthieu Exp $ -! -! -! -! -! - - - - -xlogin*login.translations: #override \ - F1: set-session-argument(failsafe) finish-field()\n\ - Left: move-backward-character()\n\ - Right: move-forward-character()\n\ - Home: move-to-begining()\n\ - End: move-to-end()\n\ - CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ - KP_Enter: set-session-argument() finish-field()\n\ - CtrlReturn: set-session-argument(failsafe) finish-field()\n\ - Return: set-session-argument() finish-field() - -xlogin*greeting: -xlogin*namePrompt: Login: -xlogin*fail: Login incorrect - -#if WIDTH > 800 -xlogin*greetFace: IosevkaAile-22:bold:italic:dpi=75 -xlogin*face: IosevkaAile-16:dpi=75 -xlogin*promptFace: IosevkaAile-16:bold:dpi=75 -xlogin*failFace: IosevkaAile-16:bold:dpi=75 -#else -xlogin*greetFace: IosevkaAile-18:bold:italic:dpi=75 -xlogin*face: IosevkaAile-12:dpi=75 -xlogin*promptFace: IosevkaAile-12:bold:dpi=75 -xlogin*failFace: IosevkaAile-12:bold:dpi=75 -#endif - -#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15)) -# if PLANES < 4 -# ifndef bpp1 -# define bpp1 -# endif -# else -# if PLANES > 4 -# if PLANES > 8 -# ifndef bpp15 -# define bpp15 -# endif -# else -# ifndef bpp8 -# define bpp8 -# endif bpp8 -# endif -# else -# ifndef bpp4 -# define bpp4 -# endif -# endif -# endif -#endif /* If manual override */ - -#ifndef bpp1 -xlogin*borderWidth: 0 -xlogin*frameWidth: 2 -xlogin.Login.height: 200 -xlogin.Login.width: 400 -xlogin.Login.y: 600 -xlogin.Login.frameWidth: 10 -xlogin.Login.innerFramesWidth: 0 -xlogin*innerFramesWidth: 20 -Xcursor.theme: Adwaita -Xcursor.size: 34 - -xlogin.Login.sepWidth: 0 - -xlogin.Login.background: #FFFFFF -xlogin.Login.foreground: #000000 -xlogin.Login.failColor: #b00035 -xlogin.Login.inpColor: #FFFFFF -xlogin.Login.promptColor: #000000 -xlogin.Login.hiColor: #FFFFFF -xlogin.Login.shdColor: #FFFFFF diff --git a/xenodm/Xsetup_0 b/xenodm/Xsetup_0 deleted file mode 100755 index ca12044..0000000 --- a/xenodm/Xsetup_0 +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# $OpenBSD: Xsetup_0.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $ - -prefix="/usr/X11R6" -exec_prefix="${prefix}" - -${exec_prefix}/bin/xsetroot -solid \#FFFFFF - -/usr/X11R6/bin/xset fp+ /usr/local/share/fonts/iosevka - -# install package openbsd-backgrounds -# then uncomment: -# -# if test -x /usr/local/bin/openbsd-wallpaper -# then -# /usr/local/bin/openbsd-wallpaper -# fi - -# sxpm OpenBSD.xpm & diff --git a/xsession b/xsession index 4b101e4..fea1fbc 100755 --- a/xsession +++ b/xsession @@ -1,3 +1,4 @@ +. /home/mccd/.profile xrdb -load ~/.Xresources & xsetroot -solid '#EEEEEE' & xclock -digital -geometry +7+1400 -face "Iosevka Aile:pixelsize=18:style=Semibold Italic" -bg \#EEEEEE -fg \#444444 -strftime "%a %d %b %H:%M [Unix Machine]" & @@ -5,8 +6,9 @@ gsettings set org.gnome.desktop.interface document-font-name 'Iosevka Aile' & gsettings set org.gnome.desktop.interface font-name 'Iosevka Aile' & gsettings set org.gnome.desktop.interface cursor-size 32 & gsettings set org.gnome.desktop.interface cursor-theme Adwaita & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 & -setxkbmap -layout us -variant colemak -option "caps:capslock" & +#xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 & +#xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 & +#xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 & +xinput set-prop 6 271 0.3 & #Speed up cursor +setxkbmap -layout us -variant colemak & # -option "caps:capslock" & dbus-run-session cwm -- cgit v1.2.3