Commit Diff


commit - /dev/null
commit + a2a1f203eea18237275075bd96c701e4dfbb75b5
blob - /dev/null
blob + db259145c72c10db9474c90c5985f24229cef914 (mode 644)
--- /dev/null
+++ LICENSE
@@ -0,0 +1,16 @@
+MIT License © 2025 Rafael M
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+DISCLAIMER: By using these dotfiles, you acknowledge that the author is not
+responsible for any damage, misconfiguration, data loss, or system malfunction
+that may occur. Use at your own risk.
blob - /dev/null
blob + ab166ba6accdbd78b923b86c66ababf119518349 (mode 644)
--- /dev/null
+++ README.md
@@ -0,0 +1,9 @@
+# Disclaimer
+
+These dotfiles are provided "as-is".  
+The author is **not responsible** for any damage, data loss, or system issues that may result from using them.  
+Use at your own risk.
+
+# Steps
+./pkg_mgmt.sh
+make home
blob - /dev/null
blob + af28334bec187ade9c82497be09bc7a52c367487 (mode 755)
--- /dev/null
+++ etc/hotplug/attach
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+DEVCLASS=$1
+DEVNAME=$2
+
+echo $DEVCLASS
+echo $DEVNAME
+
+if [ "$DEVCLASS" -eq 0 ] && [ "$DEVNAME" = "uvideo0" ]; then
+	env DISPLAY=:0.0 su sp -c "/home/sp/.local/bin/dmenumon.sh Dual"
+fi
+
+exit 0
+
blob - /dev/null
blob + d500e305ae8f2b036bd72b541b3de3a5fe1074a2 (mode 755)
--- /dev/null
+++ etc/hotplug/detach
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+DEVCLASS=$1
+DEVNAME=$2
+
+if [ "$DEVCLASS" -eq 0 ] && [ "$DEVNAME" = "uvideo0" ]; then
+	env DISPLAY=:0.0 su sp -c "/home/sp/.local/bin/dmenumon.sh DP"
+fi
+
+exit 0
+
blob - /dev/null
blob + 8024e04d6bad3c24c6c3825171a18ebbb276568b (mode 644)
--- /dev/null
+++ home/.Xdefaults
@@ -0,0 +1,79 @@
+! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $
+XTerm*metaSendsEscape:true
+
+!!! Colours
+*color0: rgb:2a/3b/4d
+*color1: rgb:c4/67/6c
+*color2: rgb:66/ff/66
+*color3: rgb:ff/ff/66
+*color4: rgb:15/f4/ee
+*color5: rgb:9c/6c/d3
+*color6: rgb:4b/8f/77
+*color7: rgb:9f/a2/a6
+*color8: rgb:55/79/9c
+*color9: rgb:c4/67/6c
+*color10: rgb:66/ff/66
+*color11: rgb:ff/ff/66
+*color12: rgb:15/f4/ee
+*color13: rgb:9c/6c/d3
+*color14: rgb:4b/8f/77
+*color15: rgb:ff/ff/ff
+*color16: rgb:ff/99/66 # Base 09
+*color17: rgb:bb/64/a9 # Base 0F
+*color18: rgb:3d/56/6f # Base 01
+*color19: rgb:4b/69/88 # Base 02
+*color20: rgb:7e/90/a3 # Base 04
+*color21: rgb:d6/d7/d9 # Base 06
+!
+!!!! Xterm
+!!!! XTerm*background: rgb:2a/3b/4d
+XTerm*background: black
+XTerm*foreground: rgb:9f/a2/a6
+XTerm*eightBitInput: false
+XTerm*loginShell: true
+XTerm*scrollBar: false
+XTerm*saveLines: 2000
+!XTerm*font: -misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1
+!XTerm*font: -misc-spleen-regular-r-normal--12-120-72-72-c-60-iso10646-1
+XTerm*internalBorder: 10
+XTerm*locale: true
+XTerm*pointerMode: 2
+XTerm*allowTitleOps: true
+XTerm*termName: xterm-256color
+!- Fonts
+XTerm*faceName: Spleen:size=16:antialias=false
+XTerm*faceSize: 8
+XTerm*faceSize1: 8
+XTerm*faceSize2: 12
+XTerm*faceSize3: 16
+XTerm*faceSize4: 24
+XTerm*faceSize5: 32
+XTerm*faceSize6: 64
+XTerm.VT100.font: -misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1
+XTerm.VT100.font1: -misc-spleen-medium-r-normal--8-80-72-72-c-50-iso10646-1
+XTerm.VT100.font2: -misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1
+XTerm.VT100.font3: -misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1
+XTerm.VT100.font4: -misc-spleen-medium-r-normal--24-240-72-72-c-120-iso10646-1
+XTerm.VT100.font5: -misc-spleen-medium-r-normal--32-320-72-72-c-160-iso10646-1
+XTerm.VT100.font6: -misc-spleen-medium-r-normal--64-640-72-72-c-320-iso10646-1
+!- Copy/paste
+XTerm*selectToClipboard: true
+XTerm*vt100.TiteInhibit: True
+XTerm*highlightSelection: true
+XTerm*trimSelection: true
+!
+
+!
+!!!! Xconsole
+XConsole*internalBorder: 5
+XConsole*scrollBar: false
+XConsole*faceName: xft:spleen:pixelsize=10
+!
+!!!! xLock
+XLock.nice: 19
+XLock.mode: blank
+XIdle.timeout: 600
+XLock.usefirst: yes
+XLock.grabmouse: on
+XLock.lockdelay: 10
+XLock.mousemotion: on
blob - /dev/null
blob + 2d844be22315c84449b676d6a46e6398616201b7 (mode 644)
--- /dev/null
+++ home/.config/dunst/dunstrc
@@ -0,0 +1,52 @@
+[global]
+    font = Monospace 7
+    markup = full
+    format = "<b>%s</b>\n%b"
+    alignment = left
+    show_age_threshold = 60
+    word_wrap = yes
+    ignore_newline = no
+    indicate_hidden = yes
+    separator_height = 1
+    padding = 4
+    horizontal_padding = 6
+    frame_color = "#cccccc"
+    separator_color = frame
+    sort = yes
+    idle_threshold = 120
+    monitor = 0
+    follow = mouse
+    sticky_history = no
+    history_length = 10
+    show_indicators = yes
+    transparency = 0
+    corner_radius = 6
+    icon_position = left
+    min_icon_size = 24
+    max_icon_size = 48
+    mouse_left_click = close_current
+    mouse_middle_click = do_action
+    mouse_right_click = close_all
+
+    frame_width = 2
+    origin = top-right 
+    offset = (5,2)
+    width = 300
+    height = (0,120)
+
+[urgency_low]
+    background = "#ffffff"
+    foreground = "#444444"
+    timeout = 4
+
+[urgency_normal]
+    background = "#eeeeee"
+    foreground = "#222222"
+    timeout = 8
+
+[urgency_critical]
+    background = "#ffdddd"
+    foreground = "#000000"
+    frame_color = "#ff0000"
+    timeout = 0
+
blob - /dev/null
blob + 95ec6ebae74422eb008d2587fa82804f78bfc085 (mode 755)
--- /dev/null
+++ home/.config/herbstluftwm/autostart
@@ -0,0 +1,221 @@
+#!/usr/bin/env bash
+
+# this is a simple config for herbstluftwm
+
+hc() {
+    herbstclient "$@"
+}
+
+hc emit_hook reload
+
+xsetroot -solid '#5A8E3A'
+
+# remove all existing keybindings
+hc keyunbind --all
+
+# keybindings
+# if you have a super key you will be much happier with Mod set to Mod4
+Mod=Mod1    # Use alt as the main modifier
+#Mod=Mod4   # Use the super key as the main modifier
+
+hc keybind $Mod-F4 close_and_remove
+hc keybind $Mod-Shift-q quit
+hc keybind $Mod-Shift-r reload
+hc keybind $Mod-Shift-c close
+hc keybind $Mod-Return spawn "${TERMINAL:-xterm}" # use your $TERMINAL with xterm as fallback
+
+# Rofi
+hc keybind $Mod-Shift-e spawn rofi -show drun
+hc keybind $Mod-Shift-w spawn rofi -show
+
+# basic movement in tiling and floating mode
+# focusing clients
+hc keybind $Mod-Left  focus left
+hc keybind $Mod-Down  focus down
+hc keybind $Mod-Up    focus up
+hc keybind $Mod-Right focus right
+hc keybind $Mod-h     focus left
+hc keybind $Mod-j     focus down
+hc keybind $Mod-k     focus up
+hc keybind $Mod-l     focus right
+
+# moving clients in tiling and floating mode
+hc keybind $Mod-Shift-Left  shift left
+hc keybind $Mod-Shift-Down  shift down
+hc keybind $Mod-Shift-Up    shift up
+hc keybind $Mod-Shift-Right shift right
+hc keybind $Mod-Shift-h     shift left
+hc keybind $Mod-Shift-j     shift down
+hc keybind $Mod-Shift-k     shift up
+hc keybind $Mod-Shift-l     shift right
+
+# splitting frames
+# create an empty frame at the specified direction
+hc keybind $Mod-u       split   bottom  0.5
+hc keybind $Mod-o       split   right   0.5
+# let the current frame explode into subframes
+#hc keybind $Mod-Control-space split explode
+
+# resizing frames and floating clients
+resizestep=0.02
+hc keybind $Mod-Control-h       resize left +$resizestep
+hc keybind $Mod-Control-j       resize down +$resizestep
+hc keybind $Mod-Control-k       resize up +$resizestep
+hc keybind $Mod-Control-l       resize right +$resizestep
+hc keybind $Mod-Control-Left    resize left +$resizestep
+hc keybind $Mod-Control-Down    resize down +$resizestep
+hc keybind $Mod-Control-Up      resize up +$resizestep
+hc keybind $Mod-Control-Right   resize right +$resizestep
+
+# lock screen
+hc keybind $Mod-Shift-l spawn slock
+
+# Monitors
+hc keybind $Mod-F7 spawn /home/sp/.local/bin/dmenumon.sh
+
+# tags
+tag_names=( {1..9} )
+tag_keys=( {1..9} 0 )
+
+hc rename default "${tag_names[0]}" || true
+for i in "${!tag_names[@]}" ; do
+    hc add "${tag_names[$i]}"
+    key="${tag_keys[$i]}"
+    if [ -n "$key" ] ; then
+        hc keybind "$Mod-$key" use_index "$i"
+        hc keybind "$Mod-Shift-$key" move_index "$i"
+    fi
+done
+
+# cycle through tags
+hc keybind $Mod-period use_index +1 --skip-visible
+hc keybind $Mod-comma  use_index -1 --skip-visible
+
+# layouting
+hc keybind $Mod-r remove
+hc keybind $Mod-s floating toggle
+hc keybind $Mod-f fullscreen toggle
+hc keybind $Mod-Control-Return pad 0 24 0 0
+hc keybind $Mod-Shift-f set_attr clients.focus.floating toggle
+hc keybind $Mod-Shift-d set_attr clients.focus.decorated toggle
+hc keybind $Mod-Shift-m set_attr clients.focus.minimized true
+hc keybind $Mod-Control-m jumpto last-minimized
+hc keybind $Mod-p pseudotile toggle
+# The following cycles through the available layouts within a frame, but skips
+# layouts, if the layout change wouldn't affect the actual window positions.
+# I.e. if there are two windows within a frame, the grid layout is skipped.
+hc keybind $Mod-space                                                           \
+   or , and . compare tags.focus.curframe_wcount = 2                   \
+   . cycle_layout +1 vertical horizontal max vertical grid    \
+   , cycle_layout +1
+
+# mouse
+hc mouseunbind --all
+hc mousebind $Mod-Button1 move
+hc mousebind $Mod-Button2 zoom
+hc mousebind $Mod-Button3 resize
+
+# focus
+hc keybind $Mod-BackSpace   cycle_monitor
+hc keybind $Mod-Tab         cycle_all +1
+hc keybind $Mod-Shift-Tab   cycle_all -1
+hc keybind $Mod-c cycle
+hc keybind $Mod-i jumpto urgent
+
+# theme
+hc attr theme.tiling.reset 1
+hc attr theme.floating.reset 1
+hc set frame_border_active_color '#222222cc'
+hc set frame_border_normal_color '#101010cc'
+hc set frame_bg_normal_color '#565656aa'
+hc set frame_bg_active_color '#345F0Caa'
+hc set frame_border_width 1
+hc set show_frame_decorations 'focused_if_multiple'
+hc set frame_bg_transparent on
+hc set frame_transparent_width 5
+hc set frame_gap 4
+
+hc attr theme.title_height 15
+hc attr theme.title_when always
+hc attr theme.title_font 'Dejavu Sans:pixelsize=12'  # example using Xft
+# hc attr theme.title_font '-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
+hc attr theme.title_depth 3  # space below the title's baseline
+hc attr theme.active.color '#345F0Cef'
+hc attr theme.title_color '#ffffff'
+hc attr theme.normal.color '#323232dd'
+hc attr theme.urgent.color '#7811A1dd'
+hc attr theme.tab_color '#1F1F1Fdd'
+hc attr theme.active.tab_color '#2B4F0Add'
+hc attr theme.active.tab_outer_color '#6C8257dd'
+hc attr theme.active.tab_title_color '#ababab'
+hc attr theme.normal.title_color '#898989'
+hc attr theme.inner_width 1
+hc attr theme.inner_color black
+hc attr theme.border_width 3
+hc attr theme.floating.border_width 4
+hc attr theme.floating.outer_width 1
+hc attr theme.floating.outer_color black
+hc attr theme.active.inner_color '#789161'
+hc attr theme.urgent.inner_color '#9A65B0'
+hc attr theme.normal.inner_color '#606060'
+# copy inner color to outer_color
+for state in active urgent normal ; do
+    hc substitute C theme.${state}.inner_color \
+        attr theme.${state}.outer_color C
+done
+hc attr theme.tiling.outer_width 1
+hc attr theme.background_color '#141414'
+
+hc set window_gap 0
+hc set frame_padding 0
+hc set smart_window_surroundings off
+hc set smart_frame_surroundings on
+hc set mouse_recenter_gap 0
+
+# rules
+hc unrule -F
+hc rule focus=on # normally focus new clients
+hc rule floatplacement=smart
+#hc rule focus=off # normally do not focus new clients
+# give focus to most common terminals
+#hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
+hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
+
+hc rule class=XTerm tag=1 # move all xterms to tag 3
+hc rule class=Chromium-browser tag=2
+hc rule class=firefox tag=2
+hc rule class=Mail tag=3
+hc rule class=Emacs instance=emacs tag=4
+
+hc rule fixedsize floating=on
+
+hc set tree_style '╾│ ├└╼─┐'
+
+# unlock, just to be sure
+hc unlock
+
+# do multi monitor setup here, e.g.:
+# hc set_monitors 1280x1024+0+0 1280x1024+1280+0
+# or simply:
+hc detect_monitors
+
+# find the panel
+pkill -f "$HOME/.config/herbstluftwm/panel.sh"
+
+panel=~/.config/herbstluftwm/panel.sh
+
+[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
+for monitor in $(hc list_monitors | cut -d: -f1) ; do
+    # start it on each monitor
+    "$panel" "$monitor" &
+done
+
+# Autolock
+#
+xidle -v -delay 1 -program "/usr/local/bin/slock" -timeout 10
+
+xautolock -exit
+
+xautolock -time 10 -notify 30 -notifier "notify-send -t 30000 'Locking in 30s...'" -locker slock
blob - /dev/null
blob + aed84da03e6dafbf7c049b937ed2892fec8727eb (mode 755)
--- /dev/null
+++ home/.config/herbstluftwm/panel.sh
@@ -0,0 +1,157 @@
+#!/usr/bin/env bash
+trap 'pkill -P $$ lemonbar; exit' INT TERM EXIT
+
+hc() { herbstclient "$@"; }
+
+monitor="${1:-0}"
+
+pulse=0
+
+# --- geometry ---
+read -r x y w h <<< "$(hc monitor_rect "$monitor")"
+
+# --- DPI-aware sizing ---
+base_dpi=96
+base_font=7
+
+dpi=$(xrdb -query 2>/dev/null | awk '/Xft.dpi/ {print int($2)}')
+[ -z "$dpi" ] && dpi=$base_dpi
+
+font_size=$(( dpi * base_font / base_dpi ))
+panel_height=$(( font_size * 2 ))
+
+font="NotoMono Nerd Font:size=$font_size"
+
+# --- colors ---
+bg="#1e1e2e"
+fg="#cdd6f4"
+warn="#f38ba8"
+
+# --- padding ---
+hc pad "$monitor" "$panel_height"
+
+# --- colors ---
+CLR_OK="#98c379"    # green   (NORMAL)
+CLR_NORMAL="#61afef" # blue    (INSERT)
+CLR_URGENT="#e06c75"   # red     (ERROR)
+CLR_EMPTY="#5c6370"    # gray    (COMMENT)
+
+CLR_BG_FOCUS="#2c323c"  # occupied tags
+
+# --- helpers ---
+icon() { printf "%s" "$1"; }
+
+# --- tag status ---
+tags() {
+    sep=" | "
+    first=true
+
+    herbstclient tag_status | while read -r status; do
+        for tag in $status; do
+            state="${tag:0:1}"
+            name="${tag:1}"
+
+            fg="$CLR_EMPTY"
+            pre=""
+            post=""
+
+	    case "$state" in
+                '#') # focused (Vim NORMAL)
+                    fg="$CLR_OK"
+                    pre="%{B$CLR_BG_FOCUS}%{+u}%{U$CLR_FOCUS}"
+                    post="%{B-}%{-u}"
+                    ;;
+                ':') # occupied (Vim INSERT)
+                    fg="$CLR_OCCUPIED"
+                    ;;
+                '!') # urgent (ERROR) – pulsing underline
+                    fg="$CLR_URGENT"
+                    if [ "$pulse" -eq 1 ]; then
+                        pre="%{+u}%{U$CLR_URGENT}"
+                        post="%{-u}"
+                    fi
+                    ;;
+                '.') # empty
+                    fg="$CLR_EMPTY"
+                    ;;
+            esac
+
+            [ "$first" = true ] && first=false || printf '%s' "$sep"
+            printf '%s%%{F%s}%s%%{F-}%s' "$pre" "$fg" "$name" "$post"
+
+        done
+        printf '\n'
+    done
+}
+
+
+title() {
+    t="$(hc attr clients.focus.title 2>/dev/null)" || return
+    printf ' %.60s' "$t"
+}
+
+battery() {
+    batt=$(apm -l 2>/dev/null)
+    charging=$(apm -a 2>/dev/null)
+
+    color="#efefef"
+    [ -z "$batt" ]      && color="#888888"
+    [ "$batt" -ge 99 ]  && batt="++"
+    [ "$batt" -ge 95 ]  && color="$CLR_OK"
+    [ "$batt" -le 60 ]  && color="#ffaf00"
+    [ "$batt" -le 15 ]  && color="$CLR_URGENT"
+    [ "$charging" = 1 ] && color="#80dfff"
+
+    printf '%%{F%s}bat: %s%%%%{F-}' "$color" "$batt"
+}
+
+clock() {
+    date "+%m-%d %H:%M"
+}
+
+temp() {
+    temp=$(sysctl -n hw.sensors.cpu0.temp0 | cut -d'.' -f1)
+    [ -z "$temp" ] && echo "%{F#888888}temp: N/A%{F-}" && return
+
+    color="#ff0000"; [ "$temp" -lt 70 ] && color=$CLR_URGENT; [ "$temp" -lt 50 ] && color=$CLR_OK
+
+    echo "%{F$color}temp: ${temp}°C%{F-}"
+}
+
+volume() {
+    mute="$(sndioctl -n output.mute 2>/dev/null)" || return
+    if [ "$mute" = 1 ]; then
+        # red + underline, then reset everything
+        printf '%%{F#ff5555}%%{+u}vol: -%%{-u}%%{F-}'
+        return
+    fi
+
+    level="$(sndioctl -n output.level 2>/dev/null)" || return
+    if [ "$level" = 1.000 ]; then
+	    printf 'vol: ++'
+	    return
+    fi
+
+    frac="${level#0.}"
+    frac="${frac}00"
+    vol="${frac%${frac#??}}"
+
+    printf 'vol: %s%%' "$vol"
+}
+
+# --- main loop ---
+while :; do
+    pulse=$((1 - pulse))
+    right="%{O10}$(volume)%{O10}$(temp)%{O10}$(battery)%{O10}$(clock)%{O10}"
+
+    printf "%%{l}%s |> %s%%{r}%s\n" \
+	    "$(tags)" \
+	    "$(title)" \
+	    "$right"
+
+    sleep 1 || break
+done | lemonbar-xft \
+    -g ${w}x${panel_height}+${x}+${y} \
+    -B "$bg" -F "$fg" \
+    -f "$font"
+
blob - /dev/null
blob + 3ccc6b96b418601657d9eba7c743d6c8c33e531b (mode 755)
--- /dev/null
+++ home/.config/herbstluftwm/panel.shtmp
@@ -0,0 +1,222 @@
+#!/usr/bin/env bash
+
+quote() {
+	local q="$(printf '%q ' "$@")"
+	printf '%s' "${q% }"
+}
+
+if [[ -f /usr/lib/bash/sleep ]]; then
+    # load and enable 'sleep' builtin (does not support unit suffixes: h, m, s!)
+    # requires pkg 'bash-builtins' on debian; included in 'bash' on arch.
+    enable -f /usr/lib/bash/sleep sleep
+fi
+
+hc_quoted="$(quote "${herbstclient_command[@]:-herbstclient}")"
+hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
+monitor=${1:-0}
+geometry=( $(hc monitor_rect "$monitor") )
+if [ -z "$geometry" ] ;then
+    echo "Invalid monitor $monitor"
+    exit 1
+fi
+# geometry has the format W H X Y
+x=${geometry[0]}
+y=${geometry[1]}
+panel_width=${geometry[2]}
+panel_height=28
+#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
+font="xft:monospace:size=12"
+# extract colors from hlwm and omit alpha-value
+bgcolor=$(hc get frame_border_normal_color|sed 's,^\(\#[0-9a-f]\{6\}\)[0-9a-f]\{2\}$,\1,')
+selbg=$(hc get window_border_active_color|sed 's,^\(\#[0-9a-f]\{6\}\)[0-9a-f]\{2\}$,\1,')
+selfg='#101010'
+
+####
+# Try to find textwidth binary.
+# In e.g. Ubuntu, this is named dzen2-textwidth.
+if which textwidth &> /dev/null ; then
+    textwidth="textwidth";
+elif which dzen2-textwidth &> /dev/null ; then
+    textwidth="dzen2-textwidth";
+elif which xftwidth &> /dev/null ; then # For guix
+    textwidth="xftwidth";
+else
+    echo "This script requires the textwidth tool of the dzen2 project."
+    exit 1
+fi
+####
+# true if we are using the svn version of dzen2
+# depending on version/distribution, this seems to have version strings like
+# "dzen-" or "dzen-x.x.x-svn"
+if dzen2 -v 2>&1 | head -n 1 | grep -q '^dzen-\([^,]*-svn\|\),'; then
+    dzen2_svn="true"
+else
+    dzen2_svn=""
+fi
+
+if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then
+    # mawk needs "-W interactive" to line-buffer stdout correctly
+    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504
+    uniq_linebuffered() {
+      awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
+    }
+else
+    # other awk versions (e.g. gawk) issue a warning with "-W interactive", so
+    # we don't want to use it there.
+    uniq_linebuffered() {
+      awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
+    }
+fi
+
+hc pad $monitor $panel_height
+
+{
+    ### Event generator ###
+    # based on different input data (mpc, date, hlwm hooks, ...) this generates events, formed like this:
+    #   <eventname>\t<data> [...]
+    # e.g.
+    #   date    ^fg(#efefef)18:33^fg(#909090), 2013-10-^fg(#efefef)29
+
+    #mpc idleloop player &
+    while true ; do
+        # output is checked once a second, but a "date" event is only
+        # generated if the output changed compared to the previous run.
+        printf 'date\t^fg(#efefef)%(%H:%M)T^fg(#909090), %(%Y-%m)T-^fg(#efefef)%(%d)T\n' 	
+
+	printf 'temp\t^fg(#efefef)T: %sC\n' "$(sysctl -n hw.sensors.cpu0.temp0 | awk '{print int($1)}')"
+
+        batt=$(apm -l 2>/dev/null)   # battery percentage
+        charging=$(apm -a 2>/dev/null) # Batt state: 1 = charging, 0 = discharging
+
+        color="#efefef"  # default white
+        [ -z "$batt" ] && color="#aaaaaa"
+        [ "$batt" -le 60 ] && color="#ffaf00"
+        [ "$batt" -le 15 ] && color="#ff4040"
+        [ "$charging" == 1 ] && color="#80dfff"
+
+        printf 'battery\t^fg(%s)B: %s%%^fg()\n' "$color" "$batt"
+        sleep 10 || break
+    done > >(uniq_linebuffered) &
+    childpid=$!
+    hc --idle
+    kill $childpid
+} 2> /dev/null | {
+    IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
+    visible=true
+    date=""
+    battery=""
+    windowtitle=""
+    temp=""
+    while true ; do
+
+        ### Output ###
+        # This part prints dzen data based on the _previous_ data handling run,
+        # and then waits for the next event to happen.
+
+        separator="^bg()^fg($selbg)|"
+        # draw tags
+        for i in "${tags[@]}" ; do
+            case ${i:0:1} in
+                '#')
+                    echo -n "^bg($selbg)^fg($selfg)"
+                    ;;
+                '+')
+                    echo -n "^bg(#9CA668)^fg(#141414)"
+                    ;;
+                ':')
+                    echo -n "^bg()^fg(#ffffff)"
+                    ;;
+                '!')
+                    echo -n "^bg(#FF0675)^fg(#141414)"
+                    ;;
+                *)
+                    echo -n "^bg()^fg(#ababab)"
+                    ;;
+            esac
+            if [ ! -z "$dzen2_svn" ] ; then
+                # clickable tags if using SVN dzen
+                echo -n "^ca(1,$hc_quoted focus_monitor \"$monitor\" && "
+                echo -n "$hc_quoted use \"${i:1}\") ${i:1} ^ca()"
+            else
+                # non-clickable tags if using older dzen
+                echo -n " ${i:1} "
+            fi
+        done
+        echo -n "$separator"
+        echo -n "^bg()^fg() ${windowtitle//^/^^}"
+        # small adjustments
+        right="$separator^bg() $temp $separator $battery $separator $date $separator"
+        right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g')
+        # get width of right aligned text.. and add some space..
+        width=$($textwidth "$font" "$right_text_only")
+        echo -n "^pa($(($panel_width - $width)))$right"
+        echo
+
+        ### Data handling ###
+        # This part handles the events generated in the event loop, and sets
+        # internal variables based on them. The event and its arguments are
+        # read into the array cmd, then action is taken depending on the event
+        # name.
+        # "Special" events (quit_panel/togglehidepanel/reload) are also handled
+        # here.
+
+        # wait for next event
+        IFS=$'\t' read -ra cmd || break
+        # find out event origin
+        case "${cmd[0]}" in
+            tag*)
+                #echo "resetting tags" >&2
+                IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)"
+                ;;
+            date)
+                #echo "resetting date" >&2
+                date="${cmd[@]:1}"
+                ;;
+            battery)
+                battery="${cmd[@]:1}"
+                ;;
+            temp)
+                temp="${cmd[@]:1}"
+                ;;
+            quit_panel)
+                exit
+                ;;
+            togglehidepanel)
+                currentmonidx=$(hc list_monitors | sed -n '/\[FOCUS\]$/s/:.*//p')
+                if [ "${cmd[1]}" -ne "$monitor" ] ; then
+                    continue
+                fi
+                if [ "${cmd[1]}" = "current" ] && [ "$currentmonidx" -ne "$monitor" ] ; then
+                    continue
+                fi
+                echo "^togglehide()"
+                if $visible ; then
+                    visible=false
+                    hc pad $monitor 0
+                else
+                    visible=true
+                    hc pad $monitor $panel_height
+                fi
+                ;;
+            reload)
+                exit
+                ;;
+            focus_changed|window_title_changed)
+                windowtitle="${cmd[@]:2}"
+                ;;
+            #player)
+            #    ;;
+        esac
+    done
+
+    ### dzen2 ###
+    # After the data is gathered and processed, the output of the previous block
+    # gets piped to dzen2.
+
+#} | dzen2 -w $panel_width -x $x -y $y -fn "$font" -h $panel_height \
+#    -e "button3=;button4=exec:$hc_quoted use_index -1;button5=exec:$hc_quoted use_index +1" \
+#    -ta l -bg "$bgcolor" -fg '#efefef' -fn 'lucidasanstypewriter-8'
+
+} | dzen2 -w $panel_width -x $x -y $y -h $panel_height \
+	    -fn "$font" \
+
blob - /dev/null
blob + 774208d1cb2bcf91de550e35ef9347195c8cd034 (mode 755)
--- /dev/null
+++ home/.config/herbstluftwm/restartpanels.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+installdir=/
+
+XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+defaultpanel="$XDG_CONFIG_HOME/herbstluftwm/panel.sh"
+
+[ -x "$defaultpanel" ] || defaultpanel="$installdir/etc/xdg/herbstluftwm/panel.sh"
+
+panelcmd="${1:-$defaultpanel}"
+
+herbstclient emit_hook quit_panel
+
+for i in $(herbstclient list_monitors | cut -d':' -f1) ; do
+    "$panelcmd" $i &
+done
blob - /dev/null
blob + a62a25ecec9d48d6867da2b5be8fa85fd1b939a9 (mode 644)
--- /dev/null
+++ home/.cwmrc
@@ -0,0 +1,226 @@
+# Autogroups for windows.
+autogroup	0				xconsole,XConsole
+autogroup	0				"termbar,termbar"
+
+## Print Keys --
+bind-key Print          "cwm_screenshot --now"
+bind-key 4-Print        "cwm_screenshot --area"
+bind-key C-Print        "cwm_screenshot --win"
+bind-key M-Print        "cwm_screenshot --in5"
+bind-key S-Print        "cwm_screenshot --in10"
+
+# Close current window
+bind-key 4-c	window-close
+bind-key 4-q	window-close
+bind-key M-F4	window-close
+
+# rofi
+bind-key M-space	"rofi -show run" 
+bind-key M-F2	"rofi -show drun" 
+
+# Hide current window
+bind-key 4-i	window-hide
+
+bind-key 4M-Return	window-maximize
+bind-key 4M-f		window-fullscreen
+bind-key 4M-Up		window-htile
+bind-key 4M-Left	window-vtile
+
+
+bind-key XF86AudioLowerVolume	"cwm_volume --dec"
+bind-key XF86AudioRaiseVolume	"cwm_volume --inc"
+bind-key XF86AudioMute		"cwm_volume --toggle"
+bind-key XF86AudioMicMute	"cwm_volume --toggle-mic"
+bind-key 4-F7		"/bin/ksh /home/sp/.local/bin/dmenumon.sh"	
+
+## Windows
+borderwidth					4
+color		activeborder			'#202060'
+color		font				'#000000'
+color		selfont				'#e9ffe9'
+color		inactiveborder			'rgb:33/33/33'
+color		menubg				'#494949'
+color		menufg				'#202060'
+## Set the color of the border while grouping a window.
+color 		groupborder 			"#52E25F"
+### Set the color of the inactive border.
+color 		inactiveborder 			"#434853"
+## Set menu background color.
+color menubg "#2F343F"
+### Set menu foreground color.
+color menufg "#5294E2"
+## Set the color of the border of a window indicating urgency.
+color urgencyborder "#E25261"
+## Set the color of the border while ungrouping a window.
+color ungroupborder "#DA52E2"
+
+## CWM Specific Functions --
+#
+# Launch window search menu.
+bind-key MC-w            menu-window
+# Launch hidden window search menu.
+#bind-key MC-w            menu-window-hidden
+# Launch application search menu.
+bind-key MC-a            menu-cmd
+# Launch group search menu.
+bind-key MC-g            menu-group
+# Launch “exec program” menu.
+bind-key MC-e            menu-exec
+# Launch “exec WindowManager” menu.
+bind-key MC-e            menu-exec-wm
+# Launch “ssh” menu.
+bind-key MC-s            menu-ssh
+
+# Toggle visibility of group n, where n is 1-9.
+bind-key 4M-1            group-toggle-1
+bind-key 4M-2            group-toggle-2
+bind-key 4M-3            group-toggle-3
+bind-key 4M-4            group-toggle-4
+bind-key 4M-5            group-toggle-5
+bind-key 4M-6            group-toggle-6
+bind-key 4M-7            group-toggle-7
+bind-key 4M-8            group-toggle-8
+bind-key 4M-9            group-toggle-9
+
+# Show only group n, where n is 1-9, hiding other groups.
+bind-key CM-1            group-only-1
+bind-key CM-2            group-only-2
+bind-key CM-3            group-only-3
+bind-key CM-4            group-only-4
+bind-key CM-5            group-only-5
+bind-key CM-6            group-only-6
+bind-key CM-7            group-only-7
+bind-key CM-8            group-only-8
+bind-key CM-9            group-only-9
+
+# Show only the previously active group.
+bind-key 4S-b            group-last
+
+# Close all windows in group n, where n is 1-9.
+bind-key 4C-1            group-close-1
+bind-key 4C-2            group-close-2
+bind-key 4C-3            group-close-3
+bind-key 4C-4            group-close-4
+bind-key 4C-5            group-close-5
+bind-key 4C-6            group-close-6
+bind-key 4C-7            group-close-7
+bind-key 4C-8            group-close-8
+bind-key 4C-9            group-close-9
+
+# Toggle visibility of all groups.
+bind-key 4S-a            group-toggle-all
+
+# Toggle group membership of current window.
+bind-key 4S-g            window-group
+
+# Hide current window from display and move to group n, where n is 1-9.
+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 4S-5            window-movetogroup-5
+bind-key 4S-6            window-movetogroup-6
+bind-key 4S-7            window-movetogroup-7
+bind-key 4S-8            window-movetogroup-8
+bind-key 4S-9            window-movetogroup-9
+
+# Forward/Reverse cycle through groups.
+bind-key MC-Right        group-cycle
+bind-key MC-Left         group-rcycle
+
+# Forward/Reverse cycle through windows.
+bind-key 4-Tab           window-cycle
+bind-key 4S-Tab          window-rcycle
+
+# Forward/Reverse cycle through windows in current group.
+bind-key M-Tab           window-cycle-ingroup
+bind-key MS-Tab          window-rcycle-ingroup
+
+# Close current window.
+bind-key 4-c             window-close
+bind-key 4-q             window-close
+bind-key M-F4            window-close
+
+# Hide current window.
+bind-key 4-i          window-hide
+
+# Freeze current window geometry.
+bind-key 4-t          window-freeze
+
+# Label current window.
+bind-key 4S-r          window-menu-label
+
+# Stick current window to all groups (same as assigning to nogroup).
+bind-key 4-o          window-stick
+
+# Full-screen current window (gap + border removed).
+bind-key 4-space      window-fullscreen
+
+# Maximize current window (gap + border honored).
+bind-key 4S-space     window-maximize
+
+# Vertically maximize current window (gap + border honored).
+bind-key MC-v          window-vmaximize
+
+# Horizontally maximize current window (gap + border honored).
+bind-key MC-h          window-hmaximize
+
+# Current window is placed at the top of the screen, maximized horizontally 
+# and resized to htile (default half) of the vertical screen space.
+# Other windows in its group share remaining screen space.
+bind-key MCS-h         window-htile
+
+# Current window is placed on the left of the screen, maximized vertically
+# and resized to vtile (default half) of the horizontal screen space.
+# Other windows in its group share remaining screen space.
+bind-key MCS-v         window-vtile
+
+# Move window moveamount pixels directionally.
+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
+
+# Move window 10 times moveamount pixels directionally.
+bind-key 4S-k         window-move-up-big
+bind-key 4S-j         window-move-down-big
+bind-key 4S-l         window-move-right-big
+bind-key 4S-h         window-move-left-big
+
+# Resize window moveamount pixels directionally.
+bind-key 4C-Up        window-resize-up
+bind-key 4C-Down      window-resize-down
+bind-key 4C-Right     window-resize-right
+bind-key 4C-Left      window-resize-left
+
+# Resize window 10 times moveamount pixels directionally.
+bind-key 4C-k         window-resize-up-big
+bind-key 4C-j         window-resize-down-big
+bind-key 4C-l         window-resize-right-big
+bind-key 4C-h         window-resize-left-big
+
+# Snap window to the screen edges.
+bind-key 4-Up        window-snap-up
+bind-key 4-Down      window-snap-down
+bind-key 4-Right     window-snap-right
+bind-key 4-Left      window-snap-left
+
+bind-key 4-k        window-snap-up-right
+bind-key 4-j        window-snap-down-left
+bind-key 4-l        window-snap-down-right
+bind-key 4-h        window-snap-up-left
+
+#
+# fontname					"spleen:pixelsize=14"
+# speen:pixelsize=14:bold
+gap						30 5 5 5
+#
+ignore						"xconsole"
+ignore						"termbar"
+#
+command		firefox				firefox
+command		xterm				xterm
+#
+moveamount					4
+snapdist					25
+sticky						yes
blob - /dev/null
blob + 2afade11d38dc243f0236d5a786f5302150fea35 (mode 644)
--- /dev/null
+++ home/.dillo/dillorc
@@ -0,0 +1,230 @@
+#=========================================================================
+# GEOMETRY AND INTERFACE
+#=========================================================================
+
+# Window geometry (width x height)
+geometry=1024x768
+
+# Panel size for toolbar
+panel_size=small
+
+# Show tooltip popups
+show_tooltip=YES
+
+# Show progress box
+show_progress_box=YES
+
+# Enable fullscreen mode with F11
+fullscreen_on=YES
+
+#=========================================================================
+# FONTS AND RENDERING
+#=========================================================================
+
+# Font sizes (in pixels)
+font_factor=1.2
+font_max_size=100
+font_min_size=6
+
+# Default fonts
+font_serif="serif"
+font_sans_serif="sans-serif"
+font_cursive="serif"
+font_fantasy="sans-serif"
+font_monospace="monospace"
+
+# Use system fonts
+use_oblique=YES
+
+#=========================================================================
+# COLORS AND APPEARANCE
+#=========================================================================
+
+# Background color
+bg_color=0xffffff
+
+# Text color
+text_color=0x000000
+
+# Link colors
+link_color=0x0000ff
+visited_link_color=0x800080
+
+# Selection colors
+selection_color=0x308cc6
+
+# UI colors
+ui_main_bg_color=0xd6d6c0
+ui_text_bg_color=0xffffff
+ui_selection_bg_color=0x308cc6
+
+# Contrast visited links
+contrast_visited_color=YES
+
+#=========================================================================
+# NETWORKING AND DOWNLOADS
+#=========================================================================
+
+# HTTP proxy (uncomment and configure if needed)
+# http_proxy=http://proxy.example.com:8080
+# http_proxyuser=username:password
+
+# User agent string (helps with compatibility)
+http_user_agent="Mozilla/5.0 (X11; OpenBSD amd64) Dillo/3.0.5"
+
+# Cookies policy: ACCEPT_ALL, ACCEPT_SESSION, or DENY
+cookie_policy=ACCEPT_SESSION
+
+# Maximum number of cookies
+cookies_max_amount=1200
+
+# Download directory
+save_dir=~/Downloads
+
+#=========================================================================
+# SECURITY AND PRIVACY
+#=========================================================================
+
+# Load images policy: YES, NO, or FROM_CACHE
+load_images=YES
+
+# Load stylesheets
+load_stylesheets=YES
+
+# Parse embedded CSS
+parse_embedded_css=YES
+
+# JavaScript support (Dillo has limited JS support)
+# Note: Dillo's JS support is very basic
+filter_auto_requests=YES
+
+# Send referrer header
+send_referer=YES
+
+#=========================================================================
+# NAVIGATION AND BEHAVIOR
+#=========================================================================
+
+# Start page (set to your preferred homepage)
+start_page="about:blank"
+
+# Search engine URL (use %s for search terms)
+search_url="https://duckduckgo.com/lite/?q=%s"
+
+# Home page
+home="https://duckduckgo.com/lite/"
+
+# Show back/forward/home buttons
+show_back=YES
+show_forward=YES
+show_home=YES
+
+# Show location bar
+show_url=YES
+
+# Show search button
+show_search=YES
+
+# Show help button
+show_help=NO
+
+# Show progress bar
+show_progress=YES
+
+# Show status bar
+show_statusbar=YES
+
+#=========================================================================
+# TABS AND WINDOWS
+#=========================================================================
+
+# Middle click to open link in new tab
+middle_click_opens_new_tab=YES
+
+# Right click to open context menu
+right_click_closes_tab=NO
+
+# Tab position
+tab_pos=top
+
+# Focus new tabs
+focus_new_tab=YES
+
+#=========================================================================
+# ADVANCED SETTINGS
+#=========================================================================
+
+# Buffered drawing (improves performance)
+buffered_drawing=2
+
+# Aggressive timeout for slow connections (seconds)
+conn_timeout=30
+
+# DNS timeout
+dns_timeout=30
+
+# Number of connections per server
+conn_max_conns=6
+
+# Show Alt text for images
+show_alt_text=YES
+
+# Penalty box for misbehaving servers (minutes)
+penalty_time=30
+
+# Viewport meta tag support
+adjust_min_width=YES
+
+# Zoom factor (1.0 = 100%)
+zoom_factor=1.0
+
+# Smooth scrolling
+smooth_scrolling=YES
+
+#=========================================================================
+# MIME TYPES AND EXTERNAL PROGRAMS
+#=========================================================================
+
+# These settings help integrate with OpenBSD system programs
+# PDF viewer
+pdf_viewer="xpdf %s"
+
+# Image viewer  
+image_viewer="feh %s"
+
+# Video player
+video_player="mpv %s"
+
+# Audio player
+audio_player="mpv %s"
+
+# Text editor
+text_editor="xterm -e vi %s"
+
+#=========================================================================
+# PERFORMANCE TWEAKS
+#=========================================================================
+
+# Image cache size (in bytes, 0 = unlimited)
+image_cache_size=5000000
+
+# Maximum image size to load (in bytes)
+image_max_size=40000000
+
+# Limit simultaneous connections
+limit_text_width=YES
+
+# Async DNS lookups
+async_dns=YES
+
+#=========================================================================
+# ACCESSIBILITY
+#=========================================================================
+
+# Force my colors (ignore webpage colors)
+force_my_colors=NO
+
+# Minimum font size enforcement
+enforce_min_font_size=NO
+
+# Focus follows new tab
blob - /dev/null
blob + 34a657f83eb9ce1847f1f75ebcec5d746443a886 (mode 755)
--- /dev/null
+++ home/.local/bin/dmenumon.sh
@@ -0,0 +1,104 @@
+#!/bin/ksh
+
+# -----------------------------
+# OpenBSD X11 display selector
+# -----------------------------
+
+export DISPLAY=:0
+export XAUTHORITY="${HOME}/.Xauthority"
+
+LOG="$HOME/.xrandr-monitor.log"
+
+log() {
+    print -- "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> "$LOG"
+}
+
+CHOICE="$1"
+
+if [[ -z "$CHOICE" ]]; then
+    CHOICE=$(printf '%s\n' "DP" "EXT" "Dual" | dmenu -p Monitor)
+fi
+
+log "Selected: $CHOICE"
+
+INTERNAL="eDP1"
+
+# Detect first connected external display
+get_external() {
+    xrandr | awk '
+        / connected/ &&
+        $1 !~ /^'"$INTERNAL"'$/ &&
+        $1 !~ /^VIRTUAL/ {
+            print $1; exit
+        }'
+}
+
+# Force re-probe (helps DP docks)
+reprobe() {
+    log "Reprobing outputs"
+    xrandr --auto >/dev/null 2>&1
+    sleep 0.5
+}
+
+# Wait up to ~5 seconds for external display
+wait_for_external() {
+    i=0
+    while [[ $i -lt 10 ]]; do
+        EXT=$(get_external)
+        [[ -n "$EXT" ]] && return 0
+        reprobe
+        sleep 0.3
+        i=$((i + 1))
+    done
+    return 1
+}
+
+case "$CHOICE" in
+    DP)
+        log "Internal display only"
+        EXT=$(get_external)
+        xrandr \
+            --output "$INTERNAL" --preferred --primary \
+            ${EXT:+--output "$EXT" --off}
+        ;;
+
+    EXT)
+        log "External display only"
+        if wait_for_external; then
+            log "Using external output: $EXT"
+            xrandr \
+                --output "$INTERNAL" --off \
+                --output "$EXT" --preferred --primary
+        else
+            log "ERROR: No external monitor detected"
+            exit 1
+        fi
+        ;;
+
+    Dual)
+        log "Dual display mode"
+        if wait_for_external; then
+            log "Using external output: $EXT"
+            xrandr \
+                --output "$EXT" --preferred --pos 0x0 \
+                --output "$INTERNAL" --preferred --pos 3840x0 --primary
+        else
+            log "ERROR: No external monitor detected"
+            exit 1
+        fi
+        ;;
+
+    *)
+        log "Invalid option"
+        exit 1
+        ;;
+esac
+
+if pgrep -x herbstluftwm >/dev/null; then
+	sleep 0.3
+	herbstclient detect_monitors >/dev/null 2>&1 || \
+	herbstclient reload >/dev/null 2>&1
+fi
+
+log "Done"
+
blob - /dev/null
blob + 46d0ae3991b1dc8d802dec166e71269c2495b716 (mode 644)
--- /dev/null
+++ home/.local/bin/tailscaled
@@ -0,0 +1,37 @@
+#!/bin/ksh
+#
+# $OpenBSD: tailscaled,v 0.1 $
+ 
+daemon="/usr/local/sbin/tailscaled --state=/var/db/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock"
+daemon_flags="--port 0 --tun tun0"
+ 
+rc_bg="YES"
+rc_reload="NO"
+ 
+. /etc/rc.d/rc.subr
+ 
+# these have to be placed below the above rc.subr sourcing so that they override
+# default value is: pexp="${daemon}${daemon_flags:+ ${daemon_flags}}"
+pexp="tailscaled"
+ 
+rc_start() {
+        # default value is: ${rcexec} "${daemon} ${daemon_flags} ${_bg}"
+        # ${_bg} gets replaced with '&' if rc_bg=YES
+ 
+        ${rcexec} "${daemon} ${daemon_flags} 2>&1 | logger -t tailscaled ${_bg}"
+}
+ 
+rc_stop() {
+        # default value is: pkill -xf "${pexp}"
+ 
+        ${rcexec} "${daemon} --cleanup ${daemon_args} 2>&1 | logger -t tailscaled"
+        pkill -xf "${pexp}"
+}
+ 
+rc_check() {
+        # default value is: pgrep -q -xf "${pexp}"
+ 
+        pgrep -q -x ${pexp}
+}
+ 
+rc_cmd $1
blob - /dev/null
blob + 8351ad08b366f1328146e4fc7f6aae247c5326e1 (mode 755)
--- /dev/null
+++ home/.local/bin/termbar
@@ -0,0 +1,129 @@
+#!/bin/ksh
+#
+# Some kind of status bar for XTerm
+# ./termbar
+# xterm -e "./termbar" &
+
+PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"
+
+# Restart it-self if it get a SIGHUP
+trap 'echo ""; exec $0' HUP
+
+# Reset the terminal on exit
+trap 'tput cnorm; exit 1' INT QUIT TERM
+
+# Get the number of columns
+_cols=$(tput columns)
+
+# Use the terminal colors
+_rset="\033[0m"  # Reset / Normal formatting
+_hide="\033[2m"  # Decrease intensity
+_hlty="\033[32m" # Green foreground
+_alrt="\033[31m" # Red foreground
+_warn="\033[33m" # Yellow foreground
+_actv="\033[34m" # Blue foreground
+_none="\033[35m" # Magenta foreground
+_norm="\033[39m" # Magenta foreground
+
+# (Nerd Fonts) icons and colors used in functions
+set -A _bat "${_norm}" "${_warn}" "${_alrt}" 
+set -A _snl "${_norm}" "${_warn}" "${_alrt}" "${_none}"
+set -A _pwr "${_actv}"
+set -A _net "eth" "wlan"
+set -A _nic "em0" "urtwn0"
+set -A _vol "q" "w" ":"
+
+# Functions that gather and print things
+function bat {
+	(( $(apm -a) == 1 )) && _status=${_pwr[0]} \
+		|| _status=${_bat[$(apm -b)]}
+	echo -n "bat: ${_status}$(apm -l)%${_norm}"
+}
+
+function cal {
+	[[ $(date "+%H") -ge 6 && $(date "+%H") -le 22 ]] \
+	  && echo -n "${_norm}" \
+	   || echo -n "${_warn}"
+	echo -n $(date '+%a. %Y/%m/%d %H:%M')${_norm}
+}
+
+function cpu {
+	echo -n "cpu: $(sysctl -n hw.sensors.cpu0.temp0 | cut -d '.' -f 1)°C"
+}
+
+function kbd {
+	#echo -n "  $(setxkbmap -query | awk '/^layout:/ { print $2 }')"
+	setxkbmap -query | awk '/^layout:/ { printf "%s  %s", "x", $2 }'
+}
+
+function net {
+	[[ -z "$(ifconfig ${_nic[0]} | grep 'status: no carrier')" ]] \
+		&& (echo -n ${_net[0]} ; return)
+	_signal=$( ifconfig ${_nic[1]} | awk '/ieee80211:/ { sub(/dBm/, "", $8); print $8 }')
+	# Decide index: 0 = norm, 1 = warm, 2 = alert
+	if [[ -z $_signal ]]; then
+		idx=3
+		_signal="󰲜   "
+	elif (( _signal >= -65 )); then
+		idx=0
+	elif (( _signal >= -75 )); then
+		idx=1
+	else
+		idx=2
+	fi
+	echo "net: ${_snl[$idx]}${_signal}${_norm}"
+}
+
+function vol {
+	_v=$(sndioctl -n output.level | awk '{ print int($0*100) '})
+	[[ $(sndioctl -n input.mute) -eq 1 ]] \
+		&& echo -n "${_norm}M${_norm}" \
+		|| echo -n "${_warn}${_norm}"
+	[[ $(sndioctl -n output.mute) -eq 1 ]] \
+		&& echo -n "" \
+		|| echo -n "${_vol[$(($_v*3/101))]}"
+	echo -n "$_v%"
+}
+
+function win {
+	_grp=$(xprop -root 32c '\t$0' _NET_CURRENT_DESKTOP | cut -f 2)
+	_wid=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)
+	[[ "$_wid" == "0x0" ]] && _win="" || \
+	_win=$(xprop -id $_wid '\t$0' _NET_WM_NAME | awk -F '"' '{ print $2 }')
+	printf "${_hide}[ $_grp ]${_rset} %s" "${_win}"
+}
+
+tput civis # Hide cursor
+
+#((_middle=$_cols/2 ))
+_col_data=260
+_col_time=296
+_connected_displays=$(xrandr --query | grep " connected" | wc -l)
+if [[ $_connected_displays -eq 1 ]]; then
+	_col_data=105
+	_col_time=137
+fi
+
+while true; do
+#	tput cup 0 100 
+	tput cup 0 $_col_data
+	printf "%-40.98s" "$(cpu) $(bat) $(vol) $(net)"
+
+	#_r=$(cal)
+	#((_pos=$_cols - ${#_r}))
+	# tput cup 0 265 
+	tput cup 0 $_col_time 
+	printf "%20.100s" "$(cal)"
+
+	for i in $(jot 15 1); do
+		tput cup 0 0
+		printf "%-100.100s" "$(win)"
+		sleep .3
+	done
+
+done
+
+tput cnorm # Show cursor
+
+#EOF
+
blob - /dev/null
blob + 4ca9eebff9d22b63195d64d5d42615a07d76f65f (mode 644)
Binary files /dev/null and home/.local/media/bsd-openbsd-wallpaper.jpg differ
blob - /dev/null
blob + 7dab7ea5407633498326525a77096ba660a4e432 (mode 644)
--- /dev/null
+++ home/.local/share/applications/mimeinfo.cache
@@ -0,0 +1 @@
+[MIME Cache]
blob - /dev/null
blob + f3112723ac3535651751c82347eac83197c9ab55 (mode 644)
--- /dev/null
+++ home/.local/share/applications/userapp-Thunderbird-3Z05L3.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+NoDisplay=true
+Exec=/usr/local/lib/thunderbird/thunderbird %u
+Name=Thunderbird
+Comment=Custom definition for Thunderbird
blob - /dev/null
blob + f3112723ac3535651751c82347eac83197c9ab55 (mode 644)
--- /dev/null
+++ home/.local/share/applications/userapp-Thunderbird-H6L6L3.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+NoDisplay=true
+Exec=/usr/local/lib/thunderbird/thunderbird %u
+Name=Thunderbird
+Comment=Custom definition for Thunderbird
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + ae94163e26d04c00f92cc436fb195d5bf41fffe5 (mode 644)
--- /dev/null
+++ home/.local/share/mime/application/x-extension-ics.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-extension-ics">
+  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
+  <comment>ics document</comment>
+  <glob pattern="*.ics"/>
+</mime-type>
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + c4aef31841924b7a470744fd9ab91fe39b0ce669 (mode 644)
--- /dev/null
+++ home/.local/share/mime/globs
@@ -0,0 +1,3 @@
+# This file was automatically generated by the
+# update-mime-database command. DO NOT EDIT!
+application/x-extension-ics:*.ics
blob - /dev/null
blob + 96cd84f7368790d8a4711ea7a676e399b169dead (mode 644)
--- /dev/null
+++ home/.local/share/mime/globs2
@@ -0,0 +1,3 @@
+# This file was automatically generated by the
+# update-mime-database command. DO NOT EDIT!
+50:application/x-extension-ics:*.ics
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + e004a3b1ca8ec4da2183f2bc208b8d8042172170 (mode 644)
Binary files /dev/null and home/.local/share/mime/magic differ
blob - /dev/null
blob + 5697d3ab4cf7ff612a7c594a3bc6f6922f9a3dee (mode 644)
Binary files /dev/null and home/.local/share/mime/mime.cache differ
blob - /dev/null
blob + 8c7a69ae97b2dedce5f6429e2863d640752185a8 (mode 644)
--- /dev/null
+++ home/.local/share/mime/packages/user-extension-ics.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-extension-ics">
+  <comment>ics document</comment>
+  <glob pattern="*.ics"/>
+ </mime-type>
+</mime-info>
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + 5d6849b482a134a9939a1fba523f3a42a19696b4 (mode 644)
Binary files /dev/null and home/.local/share/mime/treemagic differ
blob - /dev/null
blob + 31a897f34f5db172cc2d45cf7d0831927907e9e5 (mode 644)
--- /dev/null
+++ home/.local/share/mime/types
@@ -0,0 +1 @@
+application/x-extension-ics
blob - /dev/null
blob + 6b4950e3de2f6c99801a4f5e2ffa01669f358572 (mode 644)
--- /dev/null
+++ home/.local/share/mime/version
@@ -0,0 +1 @@
+2.4
blob - /dev/null
blob + 4a116abe5c5f4cfebed87a18c3d8645b4bd37d92 (mode 644)
--- /dev/null
+++ home/.local/share/ranger/bookmarks
@@ -0,0 +1 @@
+':/home/sp/.dotfiles
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (mode 644)
blob - /dev/null
blob + 03854a71e095c3dfe24da2ee0c38ecaec7fff1ef (mode 644)
--- /dev/null
+++ home/.local/share/recently-used.xbel
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xbel version="1.0"
+      xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
+      xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
+></xbel>
\ No newline at end of file
blob - /dev/null
blob + f6574c3436736b1a7518a29f7031ad9ce9358e08 (mode 644)
--- /dev/null
+++ home/.local/state/btop.log
@@ -0,0 +1,12 @@
+
+2026/03/15 (17:18:00) | ===> btop++ v.1.4.5
+2026/03/15 (17:18:00) | WARNING: failed to get battery
+
+2026/03/15 (21:31:31) | ===> btop++ v.1.4.5
+2026/03/15 (21:31:31) | WARNING: failed to get battery
+
+2026/03/15 (22:19:01) | ===> btop++ v.1.4.5
+2026/03/15 (22:19:01) | WARNING: failed to get battery
+
+2026/03/15 (22:20:06) | ===> btop++ v.1.4.5
+2026/03/15 (22:20:06) | WARNING: failed to get battery
blob - /dev/null
blob + 88e7659d74ec6177756837713ddf9def36d0acdb (mode 644)
--- /dev/null
+++ home/.profile
@@ -0,0 +1,37 @@
+# $OpenBSD: dot.profile,v 1.8 2022/08/10 07:40:37 tb Exp $
+#
+# sh/ksh initialization
+
+PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:$HOME/go/bin:$HOME/.luarocks/bin:$PATH
+export PATH HOME TERM
+export BROWSER=/usr/local/bin/tor-browser
+
+
+
+HISTFILE=~/.hist.$(tty | sed 's;.*/;;')
+HISTCONTROL=ignoredups
+HISTSIZE=10000
+HISTFILESIZE=andbeyond
+
+
+# Define the Dracula color palette in ANSI escape codes
+RESET="\033[0m"
+BOLD="\033[1m"
+CYAN="\033[38;5;81m"    # light cyan (Dracula)
+GREEN="\033[38;5;114m"  # light green (Dracula)
+PINK="\033[38;5;213m"   # light pink (Dracula)
+PURPLE="\033[38;5;141m" # light purple (Dracula)
+ORANGE="\033[38;5;214m" # light orange (Dracula)
+YELLOW="\033[38;5;190m" # light yellow (Dracula)
+RED="\033[38;5;196m"    # light red (Dracula)
+# Git Branch function for displaying git info
+#
+function git_branch {
+	branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
+	if [ $? -eq 0 ]; then
+		echo "(${branch})"
+	fi
+}
+# Set the PS1 variable with Dracula colors
+PS1="${GREEN}${BOLD}\u${RESET}@${CYAN}\h${RESET}:${PURPLE}\w${RESET}\$(git_branch)${YELLOW}\n$ ${RESET}"
+
blob - /dev/null
blob + 7913f9117309c4a82472f950356717a304c44cfa (mode 644)
--- /dev/null
+++ home/.xsession
@@ -0,0 +1,40 @@
+#!/bin/sh -x
+
+xrdb -merge $HOME/.Xresources
+xrdb -merge $HOME/.Xdefaults
+
+setxkbmap -layout us -variant altgr-intl
+
+export LANG=en_US.UTF-8
+export LC_CTYPE=en_US.UTF-8
+export XMODIFIERS=@im=uim
+export GTK_IM_MODULE="uim"
+export MOZ_USE_XINPUT2=1
+export MOZ_ACCELERATED=1
+export MOZ_WEBRENDER=1
+export GOT_AUTHOR='Rafael M <r@m7o.org>'
+
+
+export ENV=$HOME/.kshrc
+xsetroot -solid grey &
+
+## no bell
+xset b 0 0 0
+
+# DBus
+if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then
+	eval `dbus-launch --sh-syntax --exit-with-x11`
+fi
+
+# Termbar 
+# exec xterm -fs 12 -bg "black" -fg "grey" -name termbar -class termbar -T termbar -e ~/bin/termbar &
+#exec xterm -name termbar -class termbar -e /home/sp/.local/bin/termbar &
+
+# notifications
+dunst &
+
+# Wallpaper
+feh --bg-center /home/sp/.local/media/openbsd-blue.jpg &
+
+#cwm
+herbstluftwm
blob - /dev/null
blob + 3d6f7282c6551a980ce2bb2bf91fc8f684efe38d (mode 644)
Binary files /dev/null and home/.xsession.swp differ
blob - /dev/null
blob + c7ac2034027db11bb8641a99db6a820f49eac917 (mode 644)
--- /dev/null
+++ makefile
@@ -0,0 +1,14 @@
+DOTFILES_DIR := $(HOME)/.dotfiles
+
+.PHONY: home packages
+
+home:	
+	@echo ">> Stowing home dotfiles into $(HOME)"
+	cd $(DOTFILES_DIR) && stow --verbose \
+	--target=$$HOME \
+	--restow \
+	home
+
+packages:	
+	@echo ">> Packages"
+	cd $(DOTFILES_DIR) && sh pkg_mgmt.sh
blob - /dev/null
blob + 3ad7632f96c34a15c34e70f84a29a84a30bc1504 (mode 755)
--- /dev/null
+++ pkg_mgmt.sh
@@ -0,0 +1,116 @@
+#!/bin/ksh
+# OpenBSD Package Installer Script
+
+PACKAGES="
+stow
+vim
+htop
+btop
+dillo
+sqlite3
+neofetch
+dunst
+herbstluftwm
+lemonbar-xft
+spleen
+
+rofi
+ranger
+got
+age
+slock
+xautolock
+tree
+
+ungoogled-chromium
+firefox
+thunderbird
+chromium
+"
+
+log() {
+    logger -t pkg_mgmt -p user.notice "$1"
+}
+
+is_installed() {
+    pkg_info | grep -q "^$1-" 2>/dev/null
+}
+
+install_package() {
+    local package="$1"
+    
+    if is_installed "$package"; then
+        echo "[SKIP] $package (already installed)"
+        return 0
+    fi
+    
+    echo "[INSTALLING] $package"
+    
+    if doas pkg_add -I "$package" 2>&1 | tee /dev/stderr | log; then
+	    if is_installed "$package"; then
+		    echo "[SUCCESS] $package installed"
+		    log "Successfully installed: $package"
+		    return 0
+	    else
+		    echo "[FAILED] Failed to install $package"
+		    log "Failed to install: $package"
+		    return 1
+	    fi
+    else
+        echo "[FAILED] pkg_add command failed $package"
+        log "pkg_add failed to install: $package"
+        return 1
+    fi
+}
+
+main() {
+    echo "=== OpenBSD Package Installer ==="
+    echo "Starting installation..."
+    echo ""
+
+    log "Starting installation"
+
+    
+    local success=0
+    local failed=0
+    local skipped=0
+    
+    # Process each package
+    for package in $PACKAGES; do
+        # Skip empty lines
+        if [ -z "$package" ]; then
+            continue
+        fi
+        
+        if is_installed "$package"; then
+            skipped=$((skipped + 1))
+            echo "[SKIP] $package"
+        else
+            if install_package "$package"; then
+                success=$((success + 1))
+            else
+                failed=$((failed + 1))
+            fi
+        fi
+    done
+    
+    echo ""
+    echo "=== Installation Summary ==="
+    echo "Success: $success"
+    echo "Skipped: $skipped" 
+    echo "Failed: $failed"
+    
+    # Log final summary to syslog
+    log "Installation complete - Success: $success, Skipped: $skipped, Failed: $failed"
+
+    
+    if [ "$failed" -gt 0 ]; then
+        echo ""
+        echo "Check system logs for details: doas tail /var/log/messages"
+        exit 1
+    fi
+}
+
+# Run the installer
+main
+