FreeBSD 6
Further to my previous post or probably more specifically the post before that I am sharing a little more about setting up twm.
I have been trying to find a way to share my config files here. The easiest way to this, so I thought, would be to copy the files to a removable media, this failed. So this morning I created a github repository and uploaded copies of the two files there.
So firstly there is the xinitrc file as below
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/local/etc/X11/xinit/.Xresources
sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /usr/local/etc/X11/xinit/xinitrc.d ] ; then
for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
twm &
#afterstep
#xclock -geometry 50x50-1+1 &
#xterm -geometry 40x25+494-0 &
exec xterm -geometry 40x25+0+0 -name login
The end section of this tells the X11 system to load twm as the window manager, the last line creates a special xterm window that, if exited will exit the X11 system too.
Following on from this is the system.twmrc file which is sets up the twm system.
#
# Default twm configuration file; needs to be kept small to conserve string
# space in systems whose compilers don't handle medium-sized strings.
#
# Sites should tailor this file, providing any extra title buttons, menus, etc.
# that may be appropriate for their environment. For example, if most of the
# users were accustomed to uwm, the defaults could be set up not to decorate
# any windows and to use meta-keys.
#
NoGrabServer
RestartPreviousState
DecorateTransients
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
#ClientBorderWidth
Color
{
BorderColor "slategrey"
DefaultBackground "rgb:2/a/9"
DefaultForeground "gray85"
TitleBackground "rgb:2/a/9"
TitleForeground "gray85"
MenuBackground "rgb:2/a/9"
MenuForeground "white"
MenuBorderColor "black"
MenuTitleBackground "gray70"
MenuTitleForeground "rgb:2/a/9"
IconBackground "rgb:2/a/9"
IconForeground "gray85"
IconBorderColor "gray85"
IconManagerBackground "rgb:2/a/9"
IconManagerForeground "gray85"
}
#
# Define some useful functions for motion-based actions.
#
MoveDelta 3
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }
#
# Set some useful bindings. Sort of uwm-ish, sort of simple-button-ish
#
Button1 = : root : f.menu "defops"
Button1 = m : window|icon : f.function "move-or-lower"
Button2 = m : window|icon : f.iconify
#Button3 = m : window|icon : f.function "move-or-raise"
Button3 = m : window|icon : f.quit "quit application"
Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower
Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify
Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify
#
# And a menus with the usual things
#
menu "defops"
{
"Twm" f.title
"Iconify" f.iconify
"Resize" f.resize
"Move" f.move
"Raise" f.raise
"Lower" f.lower
"" f.nop
"Focus" f.focus
"Unfocus" f.unfocus
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"" f.nop
"Nethack" f.exec "exec vulture-nethack &"
"Doom" f.exec "exec prboom &"
#"Xterm" f.exec "exec xterm &"
"LXTerminal" f.exec "exec lxterminal &"
"Thunar" f.exec "exec thunar &"
"XCalc" f.exec "exec xcalc &"
"" f.nop
"Kill" f.destroy
"Delete" f.delete
"" f.nop
"Restart" f.restart
"Exit" f.quit
}
IconManagers{
"Frame" "=100x50+100+100" 1
"XTerm" "=300x50+120+100" 2
It is fairly basic at the moment, but feel free to git clone from here.
I am sharing as they are more of a guide rather than something that should be just used.
#bsd, #config, #desktop, #settings, #configuration, #tool, #freebsd, #twm, #window, #icoms, #xinitrc, #system.twmrc
You can find me on Friendica at zleap@social.isurf.ca
Licenced under Attribution 4.0 International (CC BY 4.0)
Mastodon | Peertube | Join Mastodon |
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.