--- GiveConsole.orig	Thu Oct 25 14:44:30 2018
+++ GiveConsole	Thu Feb  7 18:25:08 2019
@@ -3,9 +3,9 @@
 # $OpenBSD: GiveConsole,v 1.2 2018/07/11 19:20:40 matthieu Exp $
 #
-# By convention, both xconsole and xterm -C check that the
-# console is owned by the invoking user and is readable before attaching
-# the console output.  This way a random user can invoke xterm -C without
-# causing serious grief.
-#
+
+pkill feh
+pkill xclock
+pkill xmessage
+
 chown $USER /dev/console
 if [ -c /dev/drm0 ]; then
--- Xresources.orig	Sun Sep 17 07:44:42 2017
+++ Xresources	Thu Feb  7 19:14:38 2019
@@ -1,137 +1,70 @@
-! $OpenBSD: Xresources.in,v 1.1 2017/07/26 21:14:54 matthieu Exp $
+! ----------------------------------------------------------------------
+! Nord colorscheme
+! File: https://github.com/arcticicestudio/nord-xresources/blob/develop/src/nord
 !
-!
-!
-!
-!
 
+#define nord0 #2E3440
+#define nord1 #3B4252
+#define nord4 #D8DEE9
+#define nord11 #BF616A
 
+DisplayManager*terminateServer: true
 
+xroot.background: nord0
 
-xlogin*login.translations: #override \
-	Ctrl<Key>R: abort-display()\n\
-	<Key>F1: set-session-argument(failsafe) finish-field()\n\
-	<Key>Left: move-backward-character()\n\
-	<Key>Right: move-forward-character()\n\
-	<Key>Home: move-to-begining()\n\
-	<Key>End: move-to-end()\n\
-	Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\
-	<Key>KP_Enter: set-session-argument() finish-field()\n\
-	Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
-	<Key>Return: set-session-argument() finish-field()
+! ----------------------------------------------------------------------
+! XLogin
+!
 
-xlogin*greeting: CLIENTHOST
-xlogin*namePrompt: \040\040\040\040\040\040\040Login:
-xlogin*fail: Login incorrect or forbidden
+xlogin.Login.allowRootLogin: false
 
-#if WIDTH > 800
-xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1
-xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
-xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
-xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
-xlogin*greetFace:       DejaVu Sans Condensed-22:bold:italic:dpi=75
-xlogin*face:            DejaVu Sans Condensed-16:dpi=75
-xlogin*promptFace:      DejaVu Sans Condensed-16:bold:dpi=75
-xlogin*failFace:        DejaVu Sans Condensed-16:bold:dpi=75
-#else
-xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1
-xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
-xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
-xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1
-xlogin*greetFace:       DejaVu Sans Condensed-18:bold:italic:dpi=75
-xlogin*face:            DejaVu Sans Condensed-12:dpi=75
-xlogin*promptFace:      DejaVu Sans Condensed-12:bold:dpi=75
-xlogin*failFace:        DejaVu Sans Condensed-12:bold:dpi=75
-#endif
+xlogin.Login.echoPasswd:   false
+xlogin.Login.fail:         Authorization failed
+xlogin.Login.greeting:
+xlogin.Login.namePrompt:
+xlogin.Login.passwdPrompt:
 
-#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 */
+xlogin.Login.y:                340
+xlogin.Login.width:            480
+xlogin*borderWidth:            0
+xlogin.Login.frameWidth:       0
+xlogin.Login.innerFramesWidth: 0
+xlogin.Login.sepWidth:         0
 
-#ifndef bpp1
-xlogin*borderWidth: 1
-xlogin*frameWidth: 2
-xlogin*innerFramesWidth: 0
+xlogin.Login.background:  nord0
+xlogin.Login.foreground:  nord4
+xlogin.Login.failColor:   nord11
+xlogin.Login.greetColor:  nord0
+xlogin.Login.inpColor:    nord1
+xlogin.Login.promptColor: nord0
 
-xlogin.Login.sepWidth: 0
+xlogin.Login.face:       DejaVu Sans-16
+xlogin.Login.failFace:   DejaVu Sans-18:bold
+xlogin.Login.greetFace:  DejaVu Sans-0
+xlogin.Login.promptFace: DejaVu Sans-18
 
-! top/left border
-xlogin*hiColor: #667788
+! ----------------------------------------------------------------------
+! XClock
+!
 
-! bottom/right border
-xlogin*shdColor: #667788
+xclock*background:       nord0
+xclock*foreground:       nord4
+xclock*borderWidth:      0
+xclock*font:             -*-terminus-bold-*-*-*-16-*-*-*-*-*-iso8859-15
+xclock.Clock.analog:     false
+xclock.Clock.chime:      false
+xclock.Clock.render:     false
+xclock.Clock.twentyfour: true
+xclock.Clock.update:     10
 
-! 'Welcome to..' text color
-xlogin*greetColor: #fef886
-#if defined(bpp4) || defined(bpp8) || defined(bpp15)
-! flood fill
-xlogin*background: #798a99
-xlogin*inpColor: #99aab9
-#endif
-xlogin*failColor: #aa0000
+! ----------------------------------------------------------------------
+! XMessage
+!
 
-! 'Login:' and 'Password:'
-*Foreground: #eeeeff
-
-! border/shadow
-*Background: #000000
-#else
-xlogin*borderWidth: 3
-xlogin*frameWidth: 5
-xlogin*innerFramesWidth: 1
-xlogin*shdColor: white
-xlogin*hiColor: white
-xlogin*greetColor: white
-xlogin*background: black
-xlogin*failColor: white
-xlogin*promptColor: white
-*Foreground: white
-*Background: black
-#endif
-#ifdef bpp1
-xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_1bpp.xpm
-#endif
-#ifdef bpp4
-xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_4bpp.xpm
-#endif
-#ifdef bpp8
-xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_8bpp.xpm
-#endif
-#ifdef bpp15
-xlogin*logoFileName: /etc/X11/xenodm/pixmaps/OpenBSD_15bpp.xpm
-#endif
-
-xlogin*useShape: true
-xlogin*logoPadding: 10
-
-! uncomment to disable logins
-! xlogin.Login.allowRootLogin:	false
-
-XConsole*background:	black
-XConsole*foreground:	white
-XConsole*borderWidth:	2
-XConsole*borderColor:   grey
-XConsole.text.geometry:	480x130
-XConsole.verbose:	true
-XConsole*iconic:	true
-XConsole*font:		fixed
+xmessage*background: nord0
+xmessage*foreground: nord4
+xmessage*borderWidth: 0
+xmessage*font: -*-terminus-bold-*-*-*-16-*-*-*-*-*-iso8859-15
+xmessage*message.scrollHorizontal: Never
+xmessage*message.scrollVertical: Never
+xmessage*timeout: 0
--- Xsetup_0.orig	Thu Oct 25 14:44:30 2018
+++ Xsetup_0	Thu Feb  7 19:20:50 2019
@@ -2,5 +2,41 @@
 # $OpenBSD: Xsetup_0,v 1.5 2018/07/17 11:52:12 matthieu Exp $
 
-xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
+xrandr --output default --dpi 96
 
-# sxpm OpenBSD.xpm &
+# requires pkg_add terminus-font
+xset fp+ /usr/local/share/fonts/terminus
+
+# set background color
+BG_COLOR=$(xrdb -query | awk '/xroot.background/ { print $2 }')
+xsetroot -solid $BG_COLOR
+
+# show BluePuffy
+/usr/local/bin/feh -B $BG_COLOR -g 192x192+584+144 -. \
+  -Z /etc/X11/xenodm/pixmaps/BluePuffy.png &
+
+# show the Sleep / Restart / Shutdown bar
+# in case of sleep, pop xmessage again after waking up
+(
+while true; do
+  xmessage -geometry +540-32 \
+    -buttons "[ Sleep ]":20,"[ Restart ]":21,"[ Shutdown ]":22 ""
+  ACTION=$?
+  echo "Xmessage said: $ACTION"
+  if   [ $ACTION -eq 20 ]; then /usr/sbin/zzz;
+  elif [ $ACTION -eq 21 ]; then
+    xsetroot -cursor_name watch
+    /sbin/shutdown -r now
+  elif [ $ACTION -eq 22 ]; then
+    xsetroot -cursor_name watch
+    /sbin/shutdown -p now
+  else echo "Something bad happened to Xmessage.";
+  fi
+  # stop looping if xclock died (hopefully killed by GiveConsole)
+  if [ -z "$(pgrep -U root xclock)" ]; then break; fi
+done
+) &
+
+OS_NAME=$(uname -n)
+OS_INFO=$(uname -smr)
+xclock -geometry -0+0 \
+  -strftime "$OS_NAME ($OS_INFO) | %a. %d %b. %Y  %H:%M " &
