summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrIng2015-12-03 19:10:13 +0100
committerCyrIng2015-12-03 19:10:13 +0100
commit3c17a3bc6fc049016e1e36ccb600278ffa44ae34 (patch)
treee6ca2cdb188511b9d08428dfee185fafd1f1cf33
parent61a61cb4f054fa2b17672a3c6bcead5fef42c8eb (diff)
downloadaur-3c17a3bc6fc049016e1e36ccb600278ffa44ae34.tar.gz
Bug fix
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD10
-rw-r--r--Xresources7
-rwxr-xr-xXsession14
-rwxr-xr-xXsetup124
-rwxr-xr-xXstartup2
-rw-r--r--xdm-config2
-rwxr-xr-xxdm-xfreq-xdesktops12
-rw-r--r--xdm-xfreq.install2
-rwxr-xr-xxdm-xfreq.rc (renamed from config.sh)0
10 files changed, 106 insertions, 73 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b1b38863a64f..78d9128e4e34 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = xdm-xfreq
pkgdesc = A customized XDM for XFreq
- pkgver = 0.2
+ pkgver = 0.3
pkgrel = 1
url = http://github.com/cyring/xdm-xfreq
install = xdm-xfreq.install
@@ -15,13 +15,13 @@ pkgbase = xdm-xfreq
optdepends = xorg-xsetroot
optdepends = numlockx
backup = etc/xdm-xfreq/Xresources
- backup = etc/xdm-xfreq/config.sh
+ backup = etc/xdm-xfreq/xdm-xfreq.rc
source = xdm-config
source = Xsetup
source = Xstartup
source = Xresources
source = Xsession
- source = config.sh
+ source = xdm-xfreq.rc
source = xdm-xfreq-xdesktops
source = xdm-xfreq.service
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index d1005ae82760..6b0ef9b384f5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: CyrIng <xfreq[at]cyring[dot]fr>
# Contributor: CyrIng <xfreq[at]cyring[dot]fr>
pkgname=xdm-xfreq
-pkgver=0.2
+pkgver=0.3
pkgrel=1
pkgdesc="A customized XDM for XFreq"
arch=(any)
@@ -10,14 +10,14 @@ url="http://github.com/cyring/xdm-xfreq"
depends=('xorg-xdm' 'xorg-xclock' 'xorg-xmessage')
optdepends=('xfreq-git' 'scrot' 'imagemagick' 'xorg-xsetroot' 'numlockx')
backup=(etc/xdm-xfreq/Xresources
- etc/xdm-xfreq/config.sh)
+ etc/xdm-xfreq/xdm-xfreq.rc)
install=xdm-xfreq.install
source=(xdm-config
Xsetup
Xstartup
Xresources
Xsession
- config.sh
+ xdm-xfreq.rc
xdm-xfreq-xdesktops
xdm-xfreq.service)
md5sums=('SKIP'
@@ -31,8 +31,8 @@ md5sums=('SKIP'
package() {
mkdir -p ${pkgdir}/etc/xdm-xfreq
- cp Xresources config.sh ${pkgdir}/etc/xdm-xfreq
- chmod 0755 ${pkgdir}/etc/xdm-xfreq/config.sh
+ cp Xresources xdm-xfreq.rc ${pkgdir}/etc/xdm-xfreq
+ chmod 0755 ${pkgdir}/etc/xdm-xfreq/xdm-xfreq.rc
mkdir -p ${pkgdir}/etc/X11/xdm/xdm-xfreq
cp Xsession Xsetup Xstartup xdm-config ${pkgdir}/etc/X11/xdm/xdm-xfreq
chmod 0755 ${pkgdir}/etc/X11/xdm/xdm-xfreq/{Xsession,Xsetup,Xstartup}
diff --git a/Xresources b/Xresources
index e444cdf29e9b..8e0358fb2514 100644
--- a/Xresources
+++ b/Xresources
@@ -22,8 +22,13 @@ Xcursor.theme:whiteglass
!xlogin*width:560
!xlogin*height:192
-!xlogin.Login.namePrompt:Login:\040\040\040
+!xlogin.Login.namePrompt:Login:
+!xlogin.Login.passwdPrompt:Password:
+!xlogin.Login.allowNullPasswd:false
+!xlogin.Login.echoPasswd:false
+!xlogin.Login.echoPasswdChar:*
xlogin*fail:Access denied
+!xlogin.Login.failTimeout:10
xlogin*greetFont:-xos4-terminus-*-*-*-*-12-*-*-*-*-*-*-*
xlogin*greetFace:DejaVuSans-8
xlogin*face:Sans-9
diff --git a/Xsession b/Xsession
index b9fa99e193b0..e8b64fef1ad5 100755
--- a/Xsession
+++ b/Xsession
@@ -1,17 +1,17 @@
#!/bin/sh
-source /etc/xdm-xfreq/config.sh
+source /etc/xdm-xfreq/xdm-xfreq.rc
# provided by xlogin*login.translations:<Key>:set-session-argument()
case $# in
0)
session_argument="userhome"
- ;;
+;;
1)
session_argument=$1
- ;;
+;;
*)
session_argument="failsafe"
- ;;
+;;
esac
# redirect errors to a file in user's home directory if we can
@@ -53,11 +53,11 @@ userhome)
exec /bin/sh -l /etc/X11/xinit/xinitrc
fi
fi
- ;;
+;;
failsafe)
exec /usr/bin/xterm -name login
- ;;
+;;
*)
exec $session_argument
- ;;
+;;
esac
diff --git a/Xsetup b/Xsetup
index 85c0330a1402..383309fba26d 100755
--- a/Xsetup
+++ b/Xsetup
@@ -1,89 +1,115 @@
#!/bin/sh
source /etc/xdm-xfreq/config.sh
-if [ $XDM_XFREQ_KEYB_LED_PATH ]; then
-$XDM_XFREQ_KEYB_LED_PATH $XDM_XFREQ_KEYB_LED_ARGS
+if [[ -v XDM_XFREQ_KEYB_LED_PATH ]]; then
+ $XDM_XFREQ_KEYB_LED_PATH $XDM_XFREQ_KEYB_LED_ARGS
fi
-if [ $XDM_XFREQ_BG_COLOR_PATH ]; then
-$XDM_XFREQ_BG_COLOR_PATH $XDM_XFREQ_BG_COLOR_ARGS
+
+if [[ -v XDM_XFREQ_BG_COLOR_PATH ]]; then
+ $XDM_XFREQ_BG_COLOR_PATH $XDM_XFREQ_BG_COLOR_ARGS
fi
-if [ $XDM_XFREQ_BG_WALLPAPER_PATH ]; then
-$XDM_XFREQ_BG_WALLPAPER_PATH $XDM_XFREQ_BG_WALLPAPER_ARGS
+
+if [[ -v XDM_XFREQ_BG_WALLPAPER_PATH ]]; then
+ $XDM_XFREQ_BG_WALLPAPER_PATH $XDM_XFREQ_BG_WALLPAPER_ARGS
fi
-if [ $XDM_XFREQ_CLOCK_PATH ]; then
-$XDM_XFREQ_CLOCK_PATH $XDM_XFREQ_CLOCK_ARGS & echo $! > $XDM_XFREQ_CLOCK_PID
+
+if [[ -v XDM_XFREQ_CLOCK_PATH ]]; then
+ $XDM_XFREQ_CLOCK_PATH $XDM_XFREQ_CLOCK_ARGS & echo $! > $XDM_XFREQ_CLOCK_PID
fi
-LOOP=true
-( while [[ $LOOP && $XDM_XFREQ_BUTTONS_PATH ]]; do
+if [[ -v XDM_XFREQ_BUTTONS_PATH ]]; then
+ (
+ declare -i LOOP=1
+ while (( LOOP == 1 ))
+ do
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_MENU "";
- case "$?" in
- 143)
- unset LOOP
- ;;
+ declare -i RC=$?
+ case $RC in
99)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_SUBMENU ""
- case "$?" in
- 143)
- unset LOOP
- ;;
+ RC=$?
+ case $RC in
11)
- if [ $XDM_XFREQ_SCREENSHOT_PATH ]; then
+ if [[ -v XDM_XFREQ_SCREENSHOT_PATH ]]; then
$XDM_XFREQ_SCREENSHOT_PATH $XDM_XFREQ_SCREENSHOT_ARGS &
fi
- ;;
- esac
;;
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ ;;
11)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_PWROFF ""
- case "$?" in
- 143)
- unset LOOP
- ;;
+ RC=$?
+ case $RC in
11)
$XDM_XFREQ_POWEROFF_CMD
- ;;
- esac
;;
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ ;;
12)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_HALT ""
- case "$?" in
- 143)
- unset LOOP
- ;;
+ RC=$?
+ case $RC in
11)
$XDM_XFREQ_HALT_CMD
- ;;
- esac
;;
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ ;;
13)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_REBOOT ""
- case "$?" in
- 143)
- unset LOOP
- ;;
+ RC=$?
+ case $RC in
11)
$XDM_XFREQ_REBOOT_CMD
- ;;
- esac
;;
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ ;;
14)
$XDM_XFREQ_SLEEP_CMD
- ;;
+ ;;
15)
$XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_RESCUE ""
- case "$?" in
- 143)
- unset LOOP
- ;;
+ RC=$?
+ case $RC in
11)
$XDM_XFREQ_RESCUE_CMD
- ;;
- esac
;;
- esac;
-done ) & echo $! > $XDM_XFREQ_BUTTONS_PID
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ ;;
+ *)
+ if (( $RC > 128 )); then
+ LOOP=0
+ fi
+ ;;
+ esac
+ done
+ ) & echo $! > $XDM_XFREQ_BUTTONS_PID
+fi
-if [ $XDM_XFREQ_GUI_PATH ]; then
+if [[ -v XDM_XFREQ_GUI_PATH ]]; then
$XDM_XFREQ_GUI_PATH $XDM_XFREQ_GUI_ARGS & echo $! > $XDM_XFREQ_GUI_PID
fi
diff --git a/Xstartup b/Xstartup
index 32593332a40c..8204e773ae15 100755
--- a/Xstartup
+++ b/Xstartup
@@ -1,5 +1,5 @@
#!/bin/sh
-source /etc/xdm-xfreq/config.sh
+source /etc/xdm-xfreq/xdm-xfreq.rc
# kill all and clean-up.
if [ -r $XDM_XFREQ_GUI_PID ]; then
diff --git a/xdm-config b/xdm-config
index f82f3ac9d2dc..0d5a69a3e2b5 100644
--- a/xdm-config
+++ b/xdm-config
@@ -2,7 +2,7 @@ DisplayManager.authDir: /var/lib/xdm
DisplayManager.errorLogFile: /var/log/xdm.log
DisplayManager.pidFile: /var/run/xdm.pid
DisplayManager.keyFile: /etc/X11/xdm/xdm-keys
-DisplayManager.servers: /etc/X11/xdm/Xservers
+DisplayManager.servers: :0 local /usr/bin/X :0 vt1
DisplayManager.accessFile: /etc/X11/xdm/Xaccess
DisplayManager*resources: /etc/xdm-xfreq/Xresources
DisplayManager.willing: su nobody -s /bin/sh -c /etc/X11/xdm/Xwilling
diff --git a/xdm-xfreq-xdesktops b/xdm-xfreq-xdesktops
index 92fa9113d9f2..63fe4895890e 100755
--- a/xdm-xfreq-xdesktops
+++ b/xdm-xfreq-xdesktops
@@ -9,12 +9,14 @@ if [[ $# > 0 && $# <3 ]]; then
I=1
if [[ $X == $I ]]; then
- G="xlogin*greeting: [F1] (XSession)\\040\\040\\040"
+ G="xlogin*greeting: [F1] XSession*\\040\\040\\040"
else
G="xlogin*greeting: [F1] XSession\\040\\040\\040"
fi
echo "xlogin*login.translations: #override \\" > /var/run/xdm-xfreq-xdesktops
- echo " Ctrl<Key>R: restart-session()\n\\" >> /var/run/xdm-xfreq-xdesktops
+ echo " Ctrl<Key>R: abort-display()\n\\" >> /var/run/xdm-xfreq-xdesktops
+ echo " Ctrl<Key>\\: abort-session()\n\\" >> /var/run/xdm-xfreq-xdesktops
+ echo " Ctrl<Key>C: restart-session()\n\\" >> /var/run/xdm-xfreq-xdesktops
echo " <Key>F1: set-session-argument() finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
for D in $P/*.desktop
@@ -24,9 +26,9 @@ if [[ $# > 0 && $# <3 ]]; then
R=`grep -w "Exec" $D | cut -d "=" -f 2`
if [[ $X == $I ]]; then
A=$R
- G=$G"[F$I] ($N)\\040\\040\\040"
+ G=$G"[F$I] ${N}*\\040\\040\\040"
else
- G=$G"[F$I] $N\\040\\040\\040"
+ G=$G"[F$I] ${N}\\040\\040\\040"
fi
echo " <Key>F${I}: set-session-argument(${R}) finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
done
@@ -37,7 +39,7 @@ if [[ $# > 0 && $# <3 ]]; then
echo " <Key>Home: move-to-begining()\n\\" >> /var/run/xdm-xfreq-xdesktops
echo " <Key>End: move-to-end()\n\\" >> /var/run/xdm-xfreq-xdesktops
echo " Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
- echo " <Key>KP_Enter: set-session-argument() finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
+ echo " <Key>KP_Enter: set-session-argument($A) finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
echo " Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\\" >> /var/run/xdm-xfreq-xdesktops
echo " <Key>Return: set-session-argument($A) finish-field()" >> /var/run/xdm-xfreq-xdesktops
echo "" >> /var/run/xdm-xfreq-xdesktops
diff --git a/xdm-xfreq.install b/xdm-xfreq.install
index 9795406f9725..0037ef26ec02 100644
--- a/xdm-xfreq.install
+++ b/xdm-xfreq.install
@@ -5,7 +5,7 @@ To enable and start the Display Manager, execute:
systemctl start xdm-xfreq
The theme can be customized in the following files:
/etc/xdm-xfreq/Xresources
- /etc/xdm-xfreq/config.sh
+ /etc/xdm-xfreq/xdm-xfreq.rc
EOF
}
diff --git a/config.sh b/xdm-xfreq.rc
index b617e79dc590..b617e79dc590 100755
--- a/config.sh
+++ b/xdm-xfreq.rc