commit dcb440281e1d44cd7c3a317a88b06902a2cb0abe
parent a4967805321cd9f14d2c2855d4f7622abb426ab2
Author: torter <koubbamohamedrayan@gmail.com>
Date: Sat, 21 Nov 2026 18:34:08 +0000
slate: xdm login, tint2 panel, dunst, xscreensaver lock, preferences menu and a log out dialog
Diffstat:
16 files changed, 174 insertions(+), 12 deletions(-)
diff --git a/desktop/slate/bin/slate b/desktop/slate/bin/slate
@@ -2,10 +2,10 @@
# slate: Window Maker with the dock apps and the NeXT look. startx slate, or pick it in a display manager.
# the first time, and when slate brings a new dock or menu, it puts its look, dock and menu in ~/GNUstep (what was
# there first goes to *.before); in between they are yours to change in WPrefs. SLATE_RESET=1 puts them back.
-# ~/GNUstep names no path, so one home runs it from /usr and from /usr/local: "slate autostart" and "slate web"
+# ~/GNUstep names no path, so one home runs it from /usr and from /usr/local: "slate autostart", "web" and "exit"
s=${SLATE_SHARE:-$(dirname "$(dirname "$(readlink -f "$0")")")/share/slate}
-v=2
-case $1 in autostart|web) f=$s/$1; shift; exec "$f" "$@";; esac
+v=3
+case $1 in autostart|web|exit) f=$s/$1; shift; exec "$f" "$@";; esac
g=$HOME/GNUstep
export XDG_CURRENT_DESKTOP=WindowMaker XDG_SESSION_DESKTOP=WindowMaker
if [ "$(cat "$g/.slate" 2>/dev/null)" != $v ] || [ -n "$SLATE_RESET" ]; then
diff --git a/desktop/slate/chamesle/etc/doas.d/slate.conf b/desktop/slate/chamesle/etc/doas.d/slate.conf
@@ -0,0 +1,2 @@
+permit nopass :wheel cmd poweroff
+permit nopass :wheel cmd reboot
diff --git a/desktop/slate/chamesle/etc/rc.d/slate-login b/desktop/slate/chamesle/etc/rc.d/slate-login
@@ -0,0 +1,6 @@
+#!/bin/sh
+# the login screen: boot-services = {...,slate-login} in /etc/init.conf
+. /etc/rc.subr
+procname=xdm
+svc_start() { xdm -config /usr/share/slate/xdm/xdm-config; }
+run "$1"
diff --git a/desktop/slate/install b/desktop/slate/install
@@ -7,7 +7,12 @@ s=$p/share/slate
mkdir -p "$p/bin" "$s"
install -m755 bin/slate "$p/bin/"
for f in WindowMaker WMState WMRootMenu WMWindowAttributes; do install -m644 "share/$f" "$s/"; done
-install -m755 share/autostart share/web "$s/"
+install -m755 share/autostart share/web share/exit "$s/"
+install -m644 share/tint2rc share/dunstrc "$s/"
+mkdir -p "$s/xdm"
+install -m644 share/xdm/Xresources share/xdm/Xservers "$s/xdm/"
+install -m755 share/xdm/Xsetup share/xdm/Xsession "$s/xdm/"
+sed "s|@SHARE@|${1:-/usr/local}/share/slate|g" share/xdm/xdm-config > "$s/xdm/xdm-config"
x=$DESTDIR/usr/share/xsessions
mkdir -p "$x"
printf '[Desktop Entry]\nName=Slate\nComment=Window Maker with the dock apps and the NeXT look\nExec=%s/bin/slate\nType=Application\n' "${1:-/usr/local}" > "$x/slate.desktop"
diff --git a/desktop/slate/share/WMRootMenu b/desktop/slate/share/WMRootMenu
@@ -10,11 +10,18 @@
WORKSPACE_MENU
),
(
+ "Preferences",
+ ("Look and Feel", EXEC, WPrefs),
+ ("Screens", EXEC, arandr),
+ ("Sound", EXEC, "pavucontrol || pavucontrol-qt || st -e alsamixer"),
+ ("Network", EXEC, "st -e nmtui"),
+ ("Screen Saver", EXEC, "xscreensaver-settings || xscreensaver-demo")
+ ),
+ (
"Appearance",
("Themes", OPEN_MENU, "-noext /usr/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle"),
("Styles", OPEN_MENU, "-noext /usr/share/WindowMaker/Styles $HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle"),
- ("Backgrounds", OPEN_MENU, "-noext /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t"),
- ("Preferences", EXEC, WPrefs)
+ ("Backgrounds", OPEN_MENU, "-noext /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t")
),
(
"Session",
@@ -22,8 +29,8 @@
("Show All", SHOW_ALL),
("Arrange Icons", ARRANGE_ICONS),
("Refresh", REFRESH),
- ("Lock", EXEC, "xscreensaver-command -lock || xlock"),
- ("Restart", RESTART),
- ("Log Out", SHORTCUT, "Mod4+Shift+Q", EXIT)
+ ("Lock", SHORTCUT, "Mod4+L", EXEC, "xscreensaver-command -lock"),
+ ("Restart Window Maker", RESTART),
+ ("Log Out...", SHORTCUT, "Mod4+Shift+Q", EXEC, "slate exit")
)
)
diff --git a/desktop/slate/share/WindowMaker b/desktop/slate/share/WindowMaker
@@ -5,7 +5,7 @@
NewStyle = next;
DisableClip = YES;
DisableDrawers = NO;
- IconPosition = blh;
+ IconPosition = tlh;
IconificationStyle = Zoom;
WorkspaceNameDisplayPosition = none;
MouseLeftButtonAction = SelectWindows;
diff --git a/desktop/slate/share/autostart b/desktop/slate/share/autostart
@@ -7,5 +7,8 @@ if ! pgrep -u "$(id -u)" -x pipewire >/dev/null; then
fi
fi
(sleep 2; command -v nm-applet >/dev/null && exec nm-applet) &
-command -v xscreensaver >/dev/null && xscreensaver -no-splash &
+s=$(dirname "$(readlink -f "$0")")
+command -v tint2 >/dev/null && tint2 -c "$s/tint2rc" &
+command -v dunst >/dev/null && dunst -config "$s/dunstrc" &
+command -v xscreensaver >/dev/null && xscreensaver --no-splash &
exit 0
diff --git a/desktop/slate/share/dunstrc b/desktop/slate/share/dunstrc
@@ -0,0 +1,30 @@
+[global]
+ font = Nimbus Sans 10
+ origin = top-left
+ offset = (8, 8)
+ width = 320
+ frame_width = 1
+ frame_color = "#000000"
+ separator_color = frame
+ padding = 8
+ horizontal_padding = 10
+ corner_radius = 0
+ format = "<b>%s</b>\n%b"
+ icon_position = left
+ max_icon_size = 32
+
+[urgency_low]
+ background = "#aaaaaa"
+ foreground = "#000000"
+ timeout = 5
+
+[urgency_normal]
+ background = "#aaaaaa"
+ foreground = "#000000"
+ timeout = 8
+
+[urgency_critical]
+ background = "#000000"
+ foreground = "#ffffff"
+ frame_color = "#ffffff"
+ timeout = 0
diff --git a/desktop/slate/share/exit b/desktop/slate/share/exit
@@ -0,0 +1,10 @@
+#!/bin/sh
+a=$(xmessage -center -title Slate -buttons "Log Out,Restart,Shut Down,Cancel" -default Cancel -print "
+ Log out of Slate, restart or shut down the computer?
+")
+power() { loginctl "$1" 2>/dev/null || doas -n "$1" || xmessage -center "$1 needs root: doas $1"; }
+case $a in
+"Log Out") pkill -TERM -u "$(id -u)" -x wmaker;;
+Restart) power reboot;;
+"Shut Down") power poweroff;;
+esac
diff --git a/desktop/slate/share/tint2rc b/desktop/slate/share/tint2rc
@@ -0,0 +1,52 @@
+# the panel: the windows of this workspace, along the bottom, out of the dock's way
+panel_items = T
+panel_position = bottom center horizontal
+panel_size = 100% 26
+panel_margin = 0 0
+panel_padding = 2 2 2
+panel_background_id = 1
+panel_layer = top
+wm_menu = 1
+strut_policy = follow_size
+panel_dock = 0
+autohide = 0
+
+rounded = 0
+border_width = 1
+border_sides = T
+border_color = #ffffff 100
+background_color = #aaaaaa 100
+
+rounded = 0
+border_width = 1
+border_sides = TBLR
+border_color = #555555 100
+background_color = #aaaaaa 100
+
+rounded = 0
+border_width = 1
+border_sides = TBLR
+border_color = #000000 100
+background_color = #000000 100
+
+taskbar_mode = single_desktop
+taskbar_padding = 0 0 2
+taskbar_background_id = 0
+taskbar_active_background_id = 0
+task_icon = 1
+task_text = 1
+task_centered = 0
+task_maximum_size = 220 22
+task_padding = 4 2 4
+task_font = Nimbus Sans 9
+task_font_color = #000000 100
+task_active_font_color = #ffffff 100
+task_iconified_font_color = #555555 100
+task_background_id = 2
+task_active_background_id = 3
+task_iconified_background_id = 2
+mouse_left = toggle_iconify
+mouse_middle = none
+mouse_right = close
+mouse_scroll_up = toggle
+mouse_scroll_down = iconify
diff --git a/desktop/slate/share/xdm/Xresources b/desktop/slate/share/xdm/Xresources
@@ -0,0 +1,23 @@
+! the login window: a grey panel on the slate background, as NeXT had it
+xlogin*greeting: CLIENTHOST
+xlogin*unsecureGreeting: CLIENTHOST
+xlogin*namePrompt: Name\040
+xlogin*passwdPrompt: Password\040
+xlogin*fail: That name and password do not match
+xlogin*background: #aaaaaa
+xlogin*foreground: #000000
+xlogin*greetColor: #000000
+xlogin*failColor: #800000
+xlogin*promptColor: #000000
+xlogin*inpColor: #ffffff
+xlogin*hiColor: #ffffff
+xlogin*shdColor: #555555
+xlogin*borderWidth: 1
+xlogin*frameWidth: 2
+xlogin*innerFramesWidth: 1
+xlogin*sepWidth: 1
+xlogin*useShape: false
+xlogin*face: Nimbus Sans-13
+xlogin*greetFace: Nimbus Sans-22:bold
+xlogin*promptFace: Nimbus Sans-13:bold
+xlogin*failFace: Nimbus Sans-13:bold
diff --git a/desktop/slate/share/xdm/Xservers b/desktop/slate/share/xdm/Xservers
@@ -0,0 +1 @@
+:0 local /usr/bin/X :0 vt7 -nolisten tcp
diff --git a/desktop/slate/share/xdm/Xsession b/desktop/slate/share/xdm/Xsession
@@ -0,0 +1,9 @@
+#!/bin/sh
+# xdm's session: the login shell's environment, then ~/.xsession if there is one, else slate.
+# a profile that sets its own XAUTHORITY would lose the cookie xdm just made, so that one stays
+x=$XAUTHORITY
+[ -f /etc/profile ] && . /etc/profile
+[ -f "$HOME/.profile" ] && . "$HOME/.profile"
+export XAUTHORITY="$x"
+[ -x "$HOME/.xsession" ] && exec "$HOME/.xsession"
+exec dbus-run-session slate
diff --git a/desktop/slate/share/xdm/Xsetup b/desktop/slate/share/xdm/Xsetup
@@ -0,0 +1,2 @@
+#!/bin/sh
+if command -v xsetroot >/dev/null; then xsetroot -solid "#505075" -cursor_name left_ptr; else wmsetbg -p '(solid, "#505075")'; fi
diff --git a/desktop/slate/share/xdm/xdm-config b/desktop/slate/share/xdm/xdm-config
@@ -0,0 +1,11 @@
+! the login screen of slate
+DisplayManager.servers: @SHARE@/xdm/Xservers
+DisplayManager.errorLogFile: /var/log/xdm.log
+DisplayManager.pidFile: /run/xdm.pid
+DisplayManager.authDir: /run
+DisplayManager.requestPort: 0
+DisplayManager*resources: @SHARE@/xdm/Xresources
+DisplayManager*setup: @SHARE@/xdm/Xsetup
+DisplayManager*session: @SHARE@/xdm/Xsession
+DisplayManager*authorize: true
+DisplayManager*terminateServer: true
diff --git a/tools/mkpkgs b/tools/mkpkgs
@@ -40,8 +40,9 @@ mkapk -n chamesle-base -v "$(date +%Y%m%d)-r${REL:-0}" -d "Winchester, the files
d=$tmp/slate
DESTDIR=$d "$here/desktop/slate/install" /usr
+cp -Rp "$here/desktop/slate/chamesle/." "$d/"
mkapk -n slate -v "$(date +%Y%m%d)-r${WMREL:-0}" -d "Window Maker with the dock apps and the NeXT look" \
- -D "windowmaker st xfe xsetroot font-urw-base35 font-misc-misc${DOCKAPPS:+ chamesle-dockapps}" "$d"
+ -D "windowmaker st xfe xsetroot xmessage xdm tint2 dunst xscreensaver arandr pavucontrol font-urw-base35 font-misc-misc${DOCKAPPS:+ chamesle-dockapps}" "$d"
if [ -n "$DOCKAPPS" ]; then
mkapk -n chamesle-dockapps -v "$(date +%Y%m%d)-r${WMREL:-0}" -d "wmclock, wmcpuload, wmmemload, wmnet, wmix, wmbattery and wmsystemtray" \
-D "libx11 libxext libxpm alsa-lib upower" "$DOCKAPPS"