
Yeah, the '-bd <colour>' flag is how you set a border colour in xclock. It should work in other apps as well. Just use `appName --help` to see if it has it.jurrie wrote:Yay, got it to work now, exactly the way I wanted it n_n (except the border around xclock.. any way to get rid of it?)
Waii (2560x1024, 568k png)

I made a session-choser with xdialog, a gtk+1.x version of dialog. So you should first install this to use my script:mikegpitt wrote:Is there anyway to include a sessions dropdown in xdm? I currently use KDM and use it to switch between desktop environments often.
Code: Select all
emerge xdialogCode: Select all
#!/bin/bash
## Set the File that stores the last Session
LastSession="/etc/X11/xdm/scripts/last_session"
## Get the last Session if present, otherwise try to get default Session from /etc/rc.conf
[ -f $LastSession ] && source $LastSession
if [ -n "${XSESSION}" ]; then
DialogSessions=" ${XSESSION} $(echo "Last_(${XSESSION})") on"
else
[ -f /etc/rc.conf ] && source /etc/rc.conf
if [ -n "${XSESSION}" ]; then
DialogSessions=" ${XSESSION} $(echo "Last_(${XSESSION})") on"
fi
fi
## Get all available Session from /etc/X11/Sessions
for file in $(ls /etc/X11/Sessions/)
do
DialogSessions="${DialogSessions} $file $file off"
done
## The Dialog itself
ChosenSession=$(/usr/bin/Xdialog --stdout --no-tags --radiolist "Select a Session:" 0 0 0 \
$(echo "${DialogSessions}"))
## Write chosen Session to File
if [ -n "${ChosenSession}" ]; then
echo "XSESSION="${ChosenSession}"" > $LastSession
fi
Code: Select all
#!/bin/sh
# xmessage returns the number of the button plus 100 (so 101 for the first 102 for second ...)
/usr/X11R6/bin/xmessage -geometry +0-0 -buttons halt,reboot,Session "$@" "" ""
case "$?" in
101)
/sbin/halt
;;
102)
/sbin/reboot
;;
103)
/etc/X11/xdm/scripts/session_chooser
exec "$0"
;;
esac
Code: Select all
/etc/X11/xdm/scripts/buttons &
Code: Select all
(...)
# If $XSESSION is "", source first /etc/conf.d/basic, and then /etc/rc.conf
if [ -z "${XSESSION}" ]
then
[ -f /etc/conf.d/basic ] && source /etc/conf.d/basic
[ -f /etc/rc.conf ] && source /etc/rc.conf
## This is the line you've got to add
[ -f /etc/X11/xdm/scripts/last_session ] && source /etc/X11/xdm/scripts/
last_session
fi
(...)
Code: Select all
! Buttons Configuration
Xmessage*message.scrollVertical: auto
Xmessage*message.scrollHorizontal: never
Xmessage*Command.highlightThickness: 2
Xmessage*Command.internalWidth: 8
Xmessage*Command.internalHeight: 8
Xmessage*Command.shapeStyle: rectangle
Xmessage*Command.font: -*-bitstream vera sans-bold-r-*--20-*-*-*-*-*-iso10646-1
Code: Select all
/bin/killall xmessageCode: Select all
/usr/X11R6/bin/xsetroot -cursor_name left_ptrCode: Select all
:0 local /usr/X11R6/bin/X -nolisten tcp -br

Code: Select all
/usr/X11R6/bin/xwininfo -root -children | /bin/grep ' 0x' | /bin/cut -d' ' -f6 | /usr/bin/xargs -n1 /usr/X11R6/bin/xkill -id

This hasn't been answered yet, has it? I useNME wrote:can i get rid of the black borders around the term though?
Code: Select all
*Foreground: black