diff options
author | toni <matzeton@googlemail.com> | 2014-10-09 14:27:58 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2014-10-09 14:27:58 +0200 |
commit | 7b5978b6147e9897a467c70428e73390e8de07ca (patch) | |
tree | fe5d6240fed9b85ac1228096d54c1f817ccba356 /configs | |
parent | ebcc153211e95eb6c8ad008577095fcbd18f7a2e (diff) |
added sysmenu
Diffstat (limited to 'configs')
-rw-r--r-- | configs/sysmenu/projectM_partymode/config.inp | 21 | ||||
-rwxr-xr-x | configs/sysmenu/spawn_mp3blaster | 13 | ||||
-rwxr-xr-x | configs/sysmenu/sudoers | 30 | ||||
-rwxr-xr-x | configs/sysmenu/sysmenu.sh | 49 | ||||
-rwxr-xr-x | configs/sysmenu/xinitrc_partymode | 19 |
5 files changed, 132 insertions, 0 deletions
diff --git a/configs/sysmenu/projectM_partymode/config.inp b/configs/sysmenu/projectM_partymode/config.inp new file mode 100644 index 0000000..3379a1d --- /dev/null +++ b/configs/sysmenu/projectM_partymode/config.inp @@ -0,0 +1,21 @@ +# config.inp +# Configuration File for projectM + +Texture Size = 1024 # Size of internal rendering texture +Mesh X = 32 # Width of PerPixel Equation mesh +Mesh Y = 24 # Height of PerPixel Equation mesh +FPS = 55 # Frames Per Second +Fullscreen = false +Window Width = 512 # startup window width +Window Height = 512 # startup window height + +Smooth Transition Duration = 2 # in seconds +Preset Duration = 20 # in seconds +Easter Egg Parameter = 1 + +Hard Cut Sensitivity = 10 # Lower to make hard cuts more frequent +Aspect Correction = true # Custom Shape Aspect Correction + +Preset Path = /usr/share/projectM/presets # preset location +Title Font = /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf +Menu Font = /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf diff --git a/configs/sysmenu/spawn_mp3blaster b/configs/sysmenu/spawn_mp3blaster new file mode 100755 index 0000000..05a8b91 --- /dev/null +++ b/configs/sysmenu/spawn_mp3blaster @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ `id -u` -ne 0 ]; then + echo "$0: run with sudo $0" >&2 + exit 1 +fi +SD_USER="${SUDO_USER}" +if [ "x${SD_USER}" = "x" ]; then + echo "$0: run with sudo $0" >&2 + exit 2 +fi +export SD_USER +openvt -l -s -- su -l ${SD_USER} -s /usr/bin/padsp /usr/bin/mp3blaster diff --git a/configs/sysmenu/sudoers b/configs/sysmenu/sudoers new file mode 100755 index 0000000..21ca3c1 --- /dev/null +++ b/configs/sysmenu/sudoers @@ -0,0 +1,30 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL +menu ALL=(ALL) NOPASSWD:/sbin/reboot,/sbin/poweroff, /usr/sbin/s2ram --force +toni ALL=(ALL) NOPASSWD:/usr/sbin/vpnc /etc/vpnc/htwk.conf, /usr/sbin/s2ram --force, /usr/bin/killall -u root vpnc, /usr/sbin/android_adb.sh, /etc/init.d/sleepd start, /etc/init.d/sleepd stop +%guest ALL=(ALL) NOPASSWD:/usr/bin/startx, /etc/init.d/sleepd start, /etc/init.d/sleepd stop, /usr/bin/spawn_mp3blaster + +# Allow members of group sudo to execute any command +%sudo ALL=(ALL:ALL) ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/configs/sysmenu/sysmenu.sh b/configs/sysmenu/sysmenu.sh new file mode 100755 index 0000000..ae35e2d --- /dev/null +++ b/configs/sysmenu/sysmenu.sh @@ -0,0 +1,49 @@ +#!/bin/sh +set -e +trap - 2 + +USER=toni + +NOACTIVE=0 +while (`true`); do +if [ ${NOACTIVE} -eq 1 ]; then + while (`true`); do + echo -n "." + sleep 1 + done + break +fi +ANWSER=$(whiptail --nocancel --output-fd 3 --title "sysmenu" --clear --menu "SYSMENU" 15 30 8 "poweroff" "" "reboot" "" "startx" "" "suspend2ram" "" "partymode" "" "hide" "" 3>&1 1>&2 2>&3) + +case "${ANWSER}" in + reboot) + echo "reboot" + sudo /sbin/reboot + break;; + poweroff) + echo "poweroff" + sudo /sbin/poweroff + break;; + suspend2ram) + sudo /usr/sbin/s2ram --force + break;; + startx) + su -l ${USER} -s /bin/bash -c '/usr/bin/startx' + clear + ;; + partymode) + sudo -u guest -- /usr/bin/startx + clear + ;; + hide) + clear + echo -n "[SYSTEM OFFLINE] " >&2 + NOACTIVE=1 + ;; +esac + +unset ANSWER +done + +sleep 1 +exit 0 diff --git a/configs/sysmenu/xinitrc_partymode b/configs/sysmenu/xinitrc_partymode new file mode 100755 index 0000000..7d77bbd --- /dev/null +++ b/configs/sysmenu/xinitrc_partymode @@ -0,0 +1,19 @@ +#!/bin/sh + +xset -dpms +xset s noblank +matchbox-window-manager -use_titlebar no -use_desktop_mode plain -use_cursor no & +pulseaudio --fail=false --start & +projectM-pulseaudio & +sleep 2 +sudo /usr/bin/spawn_mp3blaster & +sleep 2 + +while (`true`); do + pidof mp3blaster >/dev/null + if [ $? -ne 0 ]; then + pulseaudio -k + exit 0 + fi + sleep 1 +done |