This repository has been archived on 2022-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
dot-files/.vnc/xstartup
Collin Doering bc065dda7a Numerous changes and a restructure of .xinitrc to allow .vnc/xstartup to piggy back off of it
and offer a window manager selection dialog for remote/nested sessions

.vnc/xstartup:
  * runs pekwm and a xdialog to choose a wm; then runs "$HOME/.xinitrc wm-name remote" where
    wm-name is a lower-case window manager name (corresponding to a exectuable in $PATH)
  * see TODO at the head of the document for things to be completed
  * ISSUE: xmonad is a binary executable so there is no way to pass it a special configuration
    for a single monitor setup (for a remote session). Instead there should be a single-head
    xmonad compiled to run on remote sessions; the question is how?
.xinitrc:
  * massively restructured and now has a slightly different usage (see head of document)
  * still supports being run without command-line parameters and by slim (passed one cl parameter
    being the window manager (again in lower case and corresponding to a executable in $PATH)
.xmonad/xmonad.hs:
  * added a new manage hook for opennx
  * added a new floating manage hook doMaxFloat (thanks to OODavo) which can float windows
    that request a size smaller then the area their widgets span

Signed-off-by: Collin Doering <rekahsoft@gmail.com>
2015-01-14 05:12:42 -05:00

68 lines
2.4 KiB
Bash
Executable File

#!/bin/sh
# (C) Copyright Collin Doering @!@YEAR@!@
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# File: .vnc/xstartup
# Author: Collin J. Doering <rekahsoft@gmail.com>
# Date: Jul 12, 2012
# Description: Acts as a window-manager selector for vnc/freenx sessions
# TODO: - use retval in the case that Xdialog fails to display some message/log
# - remove use of retval for window close and cancel button as they're disabled
# - support a nicer way to add wm's to the radiolist
# - a custom pekwm config so that there are no clicky menus and such
# Set desktop default size
xrandr --output default --mode 640x480
# Start pekwm and keep its pid
pekwm &
PEKWM_PID=$!
# Offer a Xdialog session selector
Xdialog --title "Session Selection" \
--no-cancel \
--no-close \
--radiolist "Choose a session to run:" 25 112 5 \
"XMonad" "a dynamically tiling X11 window manager" off \
"OpenBox" "a highly configurable, next generation WM with extensive standards support" off \
"PekWM" "a window manager that once up on a time was based on the aewm++ window manager" off \
"Awesome" "a highly configurable, next generation framework window manager for X" off \
"StumpWM" "a tiling, keyboard driven X11 Window Manager written entirely in Common Lisp" ON 2>/tmp/wmlist.tmp.$$
# Retain the return value of Xdialog and its choices saved in /tmp/wmlist.tmp.pid where pid is the pid of this shell
retval=$?
choice=`cat /tmp/wmlist.tmp.$$ | tr '[A-Z]' '[a-z]'`
# Remove the temporary file containing Xdialogs choices
rm -f /tmp/wmlist.tmp.$$
# Stop pekwm
kill $PEKWM_PID
# Run a session depending on the return value and choice from Xdialog
case $retval in
0)
exec $HOME/.xinitrc $choice remote
;;
# 1)
# echo "Cancel pressed."
# ;;
# 255)
# echo "Box closed."
# ;;
esac