Michael Shriver Senior Computer Specialist - College of the Environment

Miscellaneous OpenBSD Configurations

Mouse settings:

The Following configurations go in /etc/wsconsctl.conf:

Enable ‘Tap to click’

mouse.tp.tapping=1

Enable ‘Natural Scrolling’

mouse.param=133:-20
mouse.param=134:-20

(05/2023) Or

mouse.reverse_scrolling=1

Network configuration:

Desktop Configuration:

~/.xinitrc

# If you login from xdm, uncomment this to make error messages appear
# in the console window.
#
# tail -f "/home/shriver"/.xsession-errors > /dev/console &

export LC_CTYPE="en_US.UTF-8"
# export QT_QPA_PLATFORMTHEME=qt5ct
# export QT_SCALING_FACTOR=1

# xset m 20/10 4
redshift &
xscreensaver -no-splash &
exec xcompmgr &
hsetroot -solid "#000000" &

# Launch Desktop Terminals:
sh -c 'while true; do $HOME/.cargo/bin/alacritty --title DESKTOP_TERM -o "window.opacity=0.8" -o "window.startup_mode=Fullscreen" --class "DESKTOP1_TERM"; done' &
sh -c 'while true; do $HOME/.cargo/bin/alacritty --title DESKTOP_TERM -o "window.opacity=0.8" -o "window.startup_mode=Fullscreen" --class "DESKTOP2_TERM"; done' &
sh -c 'while true; do $HOME/.cargo/bin/alacritty --title DESKTOP_TERM -o "window.opacity=0.8" -o "window.startup_mode=Fullscreen" --class "DESKTOP3_TERM"; done' &
sh -c 'while true; do $HOME/.cargo/bin/alacritty --title DESKTOP_TERM -o "window.opacity=0.8" -o "window.startup_mode=Fullscreen" --class "DESKTOP4_TERM"; done' &

exec alacritty -g 47x11 tty-clock -c &
exec firefox &
exec cwm

~/.cwmrc

# Set default Xft(3) font
fontname "Classic Console:size=12:bold"

# Colors
color activeborder      '#e69e00'               # Set the color of the active border
color inactiveborder    '#664600'               # Set the color of the inactive border
color urgencyborder     '#ffb000'               # Set the color of the border of a window indicating urgency
color groupborder       '#b37b00'               # Set the color of the border while grouping a window
color ungroupborder     '#b37b00'               # Set the color of the border while ungrouping a window

color font              '#b37b00'               # Set menu font color
color selfont           '#000000'               # Set font color for selected menu item
color menubg            '#000000'               # Set menu background color
color menufg            '#b37b00'               # Set menu foreground color

# Turn on sticky-group mode
sticky yes

# Enable window Snapping
snapdist 10

# Any entry here is shown in the application menu
command "Terminal"        "alacritty"
command "Remote Desktop"  "remmina"
command "File Manager"    "xfe"
command "Firefox"         "firefox"
command "System Monitor"  "alacritty -e btop"
command "Editor"          "alacritty -e vi"
command "TexMaker"        "texmaker"

# Autogroup definitions
autogroup 2 "Mozilla Firefox"

# Destop Term Autogroups
autogroup 1 "DESKTOP1_TERM"
autogroup 2 "DESKTOP2_TERM"
autogroup 3 "DESKTOP3_TERM"
autogroup 4 "DESKTOP4_TERM"

# Ignore programs by that name by not drawing borders around them.
# ignore XMMS
# ignore xwi
# ignore xapm
# ignore xclock
ignore DESKTOP_TERM
ignore conky

# htile vtile percentage
#htile 50
#vtile 50

# Key bindings
unbind-key all
bind-key Print      "scrot"
bind-key M-Print    "scrot --select"
#bind-key 4-Return   "st"
bind-key 4-Return   "alacritty"
bind-key 4-space    menu-exec
bind-key 4M-space   menu-cmd
bind-key 4S-e       quit
bind-key 4S-r       restart
bind-key C4-equal   window-vmaximize
bind-key C4S-equal  window-hmaximize
bind-key 4-equal    window-vtile
bind-key 4S-equal   window-htile
bind-key 4-h        window-hide
bind-key M-Down     window-lower
bind-key M-Up       window-raise
bind-key M-Tab      window-cycle
bind-key MS-Tab     window-rcycle
bind-key 4-x        window-close
bind-key 4-f        window-fullscreen
bind-key 4-s        window-stick
bind-key 4-m        window-maximize
bind-key 4-Up       window-move-up-big
bind-key 4-Down     window-move-down-big
bind-key 4-Right    window-move-right-big
bind-key 4-Left     window-move-left-big
bind-key 4S-Up      window-move-up
bind-key 4S-Down    window-move-down
bind-key 4S-Right   window-move-right
bind-key 4S-Left    window-move-left
bind-key C4-Up      window-resize-up-big
bind-key C4-Down    window-resize-down-big
bind-key C4-Right   window-resize-right-big
bind-key C4-Left    window-resize-left-big
bind-key C4S-Up     window-resize-up
bind-key C4S-Down   window-resize-down
bind-key C4S-Right  window-resize-right
bind-key C4S-Left   window-resize-left
bind-key 4-period   menu-ssh
bind-key 4-l        "xscreensaver-command -lock"
bind-key 4-1        group-only-1
bind-key 4-2        group-only-2
bind-key 4-3        group-only-3
bind-key 4-4        group-only-4
bind-key 4S-1       window-movetogroup-1
bind-key 4S-2       window-movetogroup-2
bind-key 4S-3       window-movetogroup-3
bind-key 4S-4       window-movetogroup-4
bind-key CM-Right   group-cycle
bind-key CM-Left    group-rcycle
unbind-key 4-o
unbind-key CM-equal
unbind-key CMS-equal

# Mouse bindings
bind-mouse M-2      window-lower
bind-mouse 4-3      window-resize
bind-mouse 4-1      window-move

Inverse Color Configuration

/sys/dev/rasops/rasops.c

/* ANSI colormap (R,G,B) */
/* Solarized Light Color Scheme */

#define NORMAL_BLACK    0x073642
#define NORMAL_RED      0xdc322f
#define NORMAL_GREEN    0x859900
#define NORMAL_BROWN    0xb58900
#define NORMAL_BLUE     0x268bd2
#define NORMAL_MAGENTA  0xd33682
#define NORMAL_CYAN     0x2aa198
#define NORMAL_WHITE    0xeee8d5

#define HILITE_BLACK    0x002b36
#define HILITE_RED      0xcb4b16
#define HILITE_GREEN    0x586e75
#define HILITE_BROWN    0x657b83
#define HILITE_BLUE     0x839496
#define HILITE_MAGENTA  0x6c71c4
#define HILITE_CYAN     0x93a1a1
#define HILITE_WHITE    0xfdf6e3 

/sys/dev/wscons/wsdisplayvar.h change this section:

/*
 * Default to white on black except on Sun hardware, where we default
 * to black on white to match the firmware console.
 */
#ifndef WS_DEFAULT_FG
#if defined(__sparc64__)
#define WS_DEFAULT_FG WSCOL_BLACK
#else
#define WS_DEFAULT_FG WSCOL_WHITE
#endif
#endif
#ifndef WS_DEFAULT_BG
#if defined(__sparc64__)
#define WS_DEFAULT_BG WSCOL_WHITE
#else
#define WS_DEFAULT_BG WSCOL_BLACK
#endif
#endif

to this:

/*
 * Default to black on white
 */
#ifndef WS_DEFAULT_FG
#define WS_DEFAULT_FG WSCOL_BLACK
#endif
#ifndef WS_DEFAULT_BG
#define WS_DEFAULT_BG WSCOL_WHITE
#endif

Rebuild the Kernel

cd /sys/arch/$(machine)/conf
cp GENERIC CUSTOM
config CUSTOM
cd ../compile/CUSTOM
make
make install

/etc/gettytab

default:\
        :np:im=\033[2J\033[H\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200: