diff options
author | CyrIng | 2015-12-01 02:22:31 +0100 |
---|---|---|
committer | CyrIng | 2015-12-01 02:22:31 +0100 |
commit | e03b22f226f5f7153dc9e501369e8a4e2de7ef9e (patch) | |
tree | e811b37c4fc732c8d78975a3877315237198c4f2 | |
download | aur-e03b22f226f5f7153dc9e501369e8a4e2de7ef9e.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | Xresources | 81 | ||||
-rwxr-xr-x | Xsession | 63 | ||||
-rwxr-xr-x | Xsetup | 79 | ||||
-rwxr-xr-x | Xstartup | 21 | ||||
-rwxr-xr-x | config.sh | 55 | ||||
-rw-r--r-- | xdm-config | 21 | ||||
-rw-r--r-- | xdm-xfreq.install | 14 | ||||
-rw-r--r-- | xdm-xfreq.service | 9 |
10 files changed, 404 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5d105b21e49d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = xdm-xfreq + pkgdesc = A customized XDM for XFreq + pkgver = 0.1 + pkgrel = 1 + url = http://github.com/cyring/xdm-xfreq + install = xdm-xfreq.install + arch = any + license = GPL + depends = xorg-xdm + depends = xorg-xclock + depends = xorg-xmessage + depends = xfreq-git + optdepends = scrot + optdepends = imagemagick + optdepends = xorg-xsetroot + optdepends = numlockx + backup = etc/xdm-xfreq/Xresources + backup = etc/xdm-xfreq/config.sh + source = xdm-config + source = Xsetup + source = Xstartup + source = Xresources + source = Xsession + source = config.sh + source = xdm-xfreq.service + md5sums = SKIP + +pkgname = xdm-xfreq + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7fbf6bd75119 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: CyrIng <xfreq[at]cyring[dot]fr> +# Contributor: CyrIng <xfreq[at]cyring[dot]fr> +pkgname=xdm-xfreq +pkgver=0.1 +pkgrel=1 +pkgdesc="A customized XDM for XFreq" +arch=(any) +license=('GPL') +url="http://github.com/cyring/xdm-xfreq" +depends=('xorg-xdm' 'xorg-xclock' 'xorg-xmessage' 'xfreq-git') +optdepends=('scrot' 'imagemagick' 'xorg-xsetroot' 'numlockx') +backup=(etc/xdm-xfreq/Xresources + etc/xdm-xfreq/config.sh) +install=xdm-xfreq.install +source=(xdm-config + Xsetup + Xstartup + Xresources + Xsession + config.sh + xdm-xfreq.service) +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 + 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} + install -Dm0644 ${srcdir}/xdm-xfreq.service ${pkgdir}/usr/lib/systemd/system/xdm-xfreq.service +} diff --git a/Xresources b/Xresources new file mode 100644 index 000000000000..1cf01656b0de --- /dev/null +++ b/Xresources @@ -0,0 +1,81 @@ +*Foreground:#cc4c00 +*Background:#2a0308 + +!Xcursor.theme:whiteglass +!Xcursor.theme:left_ptr + +xlogin*width:560 +!xlogin*height:192 +xlogin*login.translations: #override \ + Ctrl<Key>R: restart-session()\n\ + <Key>F1: set-session-argument(failsafe) finish-field()\n\ + <Key>F2: set-session-argument(twm) finish-field()\n\ + <Key>F3: set-session-argument(mwm) finish-field()\n\ + <Key>F4: set-session-argument(awesome) finish-field()\n\ + <Key>F5: set-session-argument(dwm) finish-field()\n\ + <Key>F6: set-session-argument(startkde) finish-field()\n\ + <Key>Delete: delete-character()\n\ + <Key>Left: move-backward-character()\n\ + <Key>Right: move-forward-character()\n\ + <Key>Home: move-to-begining()\n\ + <Key>End: move-to-end()\n\ + Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\ + <Key>KP_Enter: set-session-argument() finish-field()\n\ + Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\ + <Key>Return: set-session-argument() finish-field()\n\ + +!xlogin*greeting: CLIENTHOST +xlogin*greeting:[F1] FailSafe\040\040\040[F2] Twm\040\040\040[F3] Mwm\040\040\040[F4] Awesome\040\040\040[F5] Dwm\040\040\040[F6] Plasma +!xlogin.Login.namePrompt:Login:\040\040\040 +xlogin*fail:Access denied +xlogin*greetFont:-xos4-terminus-*-*-*-*-12-*-*-*-*-*-*-* +xlogin*greetFace:Nasalization-8 +xlogin*font:-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-* +xlogin*face:Sans-9 +xlogin*promptFont:-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-* +xlogin.Login.promptFace:Nasalisation-9 +xlogin*failFont:-*-arial-*-i-*-*-*-*-*-*-*-*-*-* +xlogin.Login.failFace:Nasalization-9:bold:italic +xlogin*sepWidth:1 +xlogin*borderWidth:1 +xlogin*frameWidth:1 +xlogin*innerFramesWidth:2 +xlogin*shdColor:#404040 +xlogin*hiColor:#737373 +xlogin*background:#2a0308 +xlogin*foreground:white +xlogin*greetColor:#cc4c00 +xlogin*failColor:yellow +!xlogin*logoFileName:/usr/share/xdm/pixmaps/xorg.xpm +xlogin*useShape:true +xlogin*logoPadding:0 + +!Xmessage*geometry:2304x32+0-0 +Xmessage*message.scrollVertical:never +Xmessage*message.scrollHorizontal:never +Xmessage*borderWidth:0 +Xmessage*Text.borderWidth:0 +Xmessage*Command.highlightThickness:1 +Xmessage*Command.internalWidth:12 +Xmessage*Command.internalHeight:4 +Xmessage*Command.shapeStyle:rectangle +Xmessage*font:-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-* +Xmessage*Text.face:Nasalization-9 + +!XClock*geometry:256x32-0-0 +XClock*analog:false +XClock*strftime:%a %e %b\040\040\040%H:%M:%S +XClock*update:1 +XClock*borderWidth:0 +!XClock*Command.internalHeight:8 +!XClock.width:64 +XClock*face:Alien Encounters + +!Chooser*geometry:256x128+0+0 +Chooser*allowShellResize:false +Chooser*viewport.forceBars:false +Chooser*label.font:-xos4-terminus-medium-*-*-*-14-*-*-*-*-*-*-* +Chooser*label.face:Nasalization-9 +Chooser*label.label:XDMCP Host Menu from CLIENTHOST +Chooser*list.face:Nasalization-9 +Chooser*Command.Face:Nasalization-9 diff --git a/Xsession b/Xsession new file mode 100755 index 000000000000..b9fa99e193b0 --- /dev/null +++ b/Xsession @@ -0,0 +1,63 @@ +#!/bin/sh +source /etc/xdm-xfreq/config.sh + +# 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 + +errfile=$XSESSION_ERR_PATH +if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ) +then + exec > "$errfile" 2>&1 +else + + mktemp=/usr/bin/mktemp + for errfile in "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" + do + if ef="$( umask 077 && $mktemp "$errfile.XXXXXX" 2> /dev/null)" + then + exec > "$ef" 2>&1 + mv "$ef" "$errfile" 2> /dev/null + break + fi + done +fi + +case $session_argument in +userhome) + # The startup script is not intended to have arguments. + startup=$HOME/.xsession + resources=$HOME/.Xresources + xinitrc=$HOME/.xinitrc + + if [ -s "$startup" ]; then + exec /bin/sh -ls -c "$startup" + else + if [ -r "$resources" ]; then + /usr/bin/xrdb -load "$resources" + fi + if [ -r "$xinitrc" ]; then + exec /bin/sh -ls -c "$xinitrc" + else + 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 new file mode 100755 index 000000000000..508186c7fef2 --- /dev/null +++ b/Xsetup @@ -0,0 +1,79 @@ +#!/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 +fi +if [ $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 +fi +if [ $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 + $XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_MENU ""; + case "$?" in + 143) + unset LOOP + ;; + 99) + $XDM_XFREQ_SCREENSHOT_PATH $XDM_XFREQ_SCREENSHOT_ARGS & + ;; + 11) + $XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_PWROFF "" + case "$?" in + 143) + unset LOOP + ;; + 11) + $XDM_XFREQ_POWEROFF_CMD + ;; + esac + ;; + 12) + $XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_HALT "" + case "$?" in + 143) + unset LOOP + ;; + 11) + $XDM_XFREQ_HALT_CMD + ;; + esac + ;; + 13) + $XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_REBOOT "" + case "$?" in + 143) + unset LOOP + ;; + 11) + $XDM_XFREQ_REBOOT_CMD + ;; + esac + ;; + 14) + $XDM_XFREQ_SLEEP_CMD + ;; + 15) + $XDM_XFREQ_BUTTONS_PATH $XDM_XFREQ_BUTTONS_ARGS $XDM_XFREQ_BUTTONS_RESCUE "" + case "$?" in + 143) + unset LOOP + ;; + 11) + $XDM_XFREQ_RESCUE_CMD + ;; + esac + ;; + esac; +done ) & echo $! > $XDM_XFREQ_BUTTONS_PID + +if [ $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 new file mode 100755 index 000000000000..32593332a40c --- /dev/null +++ b/Xstartup @@ -0,0 +1,21 @@ +#!/bin/sh +source /etc/xdm-xfreq/config.sh + +# kill all and clean-up. +if [ -r $XDM_XFREQ_GUI_PID ]; then + kill `cat $XDM_XFREQ_GUI_PID` > /dev/null 2>&1 + rm $XDM_XFREQ_GUI_PID +fi +if [ -r $XDM_XFREQ_BUTTONS_PID ]; then +# kill `$XDM_XFREQ_BUTTONS_PID` > /dev/null 2>&1 + killall $XDM_XFREQ_BUTTONS_PATH + rm $XDM_XFREQ_BUTTONS_PID +fi +if [ -r $XDM_XFREQ_CLOCK_PID ]; then + kill `cat $XDM_XFREQ_CLOCK_PID` > /dev/null 2>&1 + rm $XDM_XFREQ_CLOCK_PID +fi + +chown $USER /dev/console +exec /usr/bin/sessreg -a -w "/var/log/wtmp" -u "/run/utmp" \ + -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER diff --git a/config.sh b/config.sh new file mode 100755 index 000000000000..a7c4c176a91e --- /dev/null +++ b/config.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +# Keyboard NumLock ON +# XDM_XFREQ_KEYB_LED_PATH=numlockx +# XDM_XFREQ_KEYB_LED_ARGS="" + +# Background color +XDM_XFREQ_BG_COLOR_PATH=xsetroot +XDM_XFREQ_BG_COLOR_ARGS="-solid darkred" + +# Background picture +# XDM_XFREQ_BG_WALLPAPER_PATH=display +# XDM_XFREQ_BG_WALLPAPER_ARGS="-backdrop -window root /etc/xdm-xfreq/wallpaper.jpg" + +# Clock settings +XDM_XFREQ_CLOCK_PATH=xclock +XDM_XFREQ_CLOCK_ARGS="-geometry 256x32-0-0 -twentyfour" +XDM_XFREQ_CLOCK_PID="/var/run/xdm-xfreq-clock.pid" + +# Buttons settings +XDM_XFREQ_BUTTONS_PATH=xmessage +XDM_XFREQ_BUTTONS_ARGS="-geometry 2304x32+0-0" +XDM_XFREQ_BUTTONS_PID="/var/run/xdm-xfreq-buttons.pid" +XDM_XFREQ_BUTTONS_MENU="-buttons \:\):99,PowerOff:11,Halt:12,Reboot:13,Sleep:14,Rescue:15" +XDM_XFREQ_BUTTONS_PWROFF="-buttons PowerOff?:11,Cancel?:12 -default Cancel? -timeout 6" +XDM_XFREQ_BUTTONS_HALT="-buttons Halt?:11,Cancel?:12 -default Cancel? -timeout 6" +XDM_XFREQ_BUTTONS_REBOOT="-buttons Reboot?:11,Cancel?:12 -default Cancel? -timeout 6" +XDM_XFREQ_BUTTONS_RESCUE="-buttons Rescue?:11,Cancel?:12 -default Cancel? -timeout 6" + +# Screenshot +XDM_XFREQ_SCREENSHOT_PATH=scrot +XDM_XFREQ_SCREENSHOT_ARGS="-d 6 /tmp/%Y%m%d-%H%M%S-\$wx\$h.png" + +# XFreq +XDM_XFREQ_GUI_PATH=xfreq-gui +XDM_XFREQ_GUI_ARGS="-D 0 -f 0x994c00 -l 1 -w 1 -n 1 -N 1 -I 0x1000 -U 0x21 -g 0:0x0+540-48,1:0x0-24+16,2:0x0+24+16,3:0x0+540+16,4:0x0+24-48,5:0x0-24-48" +XDM_XFREQ_GUI_PID=/var/run/xdm-xfreq-gui.pid + +# PowerOff +XDM_XFREQ_POWEROFF_CMD="systemctl poweroff" + +# Halt +XDM_XFREQ_HALT_CMD="systemctl halt" + +# Reboot +XDM_XFREQ_REBOOT_CMD="systemctl reboot" + +# Suspend to sleep +XDM_XFREQ_SLEEP_CMD="systemctl suspend" + +# Rescue level +XDM_XFREQ_RESCUE_CMD="systemctl rescue" + +# Users settings +XSESSION_ERR_PATH="$HOME/.xsession-errors" diff --git a/xdm-config b/xdm-config new file mode 100644 index 000000000000..2faaf035a192 --- /dev/null +++ b/xdm-config @@ -0,0 +1,21 @@ +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: :0 local /usr/bin/X :0 vt11 +DisplayManager.accessFile: /etc/X11/xdm/Xaccess +DisplayManager*resources: /etc/xdm-xfreq/Xresources +DisplayManager.willing: su nobody -s /bin/sh -c /etc/X11/xdm/Xwilling +DisplayManager*authorize: true + +DisplayManager._0.setup: /etc/X11/xdm/xdm-xfreq/Xsetup +DisplayManager._0.startup: /etc/X11/xdm/xdm-xfreq/Xstartup +DisplayManager._0.reset: /etc/X11/xdm/TakeConsole + +DisplayManager*chooser: /usr/lib/X11/xdm/chooser +DisplayManager*session: /etc/X11/xdm/xdm-xfreq/Xsession +DisplayManager*reset: /etc/X11/xdm/Xreset + +DisplayManager*authComplain: true +DisplayManager*loginmoveInterval: 10 +DisplayManager.requestPort: 0 diff --git a/xdm-xfreq.install b/xdm-xfreq.install new file mode 100644 index 000000000000..9795406f9725 --- /dev/null +++ b/xdm-xfreq.install @@ -0,0 +1,14 @@ +post_install() { +cat << EOF +To enable and start the Display Manager, execute: + systemctl enable xdm-xfreq + systemctl start xdm-xfreq +The theme can be customized in the following files: + /etc/xdm-xfreq/Xresources + /etc/xdm-xfreq/config.sh +EOF +} + +post_upgrade() { + post_install $1 +} diff --git a/xdm-xfreq.service b/xdm-xfreq.service new file mode 100644 index 000000000000..c0cb3981dfb1 --- /dev/null +++ b/xdm-xfreq.service @@ -0,0 +1,9 @@ +[Unit] +Description=X-Window Display Manager +After=systemd-user-sessions.service + +[Service] +ExecStart=/usr/bin/xdm -nodaemon -config /etc/X11/xdm/xdm-xfreq/xdm-config + +[Install] +Alias=display-manager.service |