diff options
| author | Tslil Clingman <tslil.clingman@gmail.com> | 2016-05-22 00:58:17 -0400 |
|---|---|---|
| committer | Tslil Clingman <tslil.clingman@gmail.com> | 2016-05-22 00:58:17 -0400 |
| commit | c6f60c5d1b3762936c0356e3e2f833c3986c7436 (patch) | |
| tree | 1ab41a1c667d9257c402645a15a296da832654a6 | |
| parent | 9ada1cffc8a3aff64c9cfe2ec42ad4b3c02bc9cd (diff) | |
Using vms now instead of runas, colour tweaks
| -rwxr-xr-x | ratdm | 14 | ||||
| -rwxr-xr-x | runas | 56 |
2 files changed, 9 insertions, 61 deletions
@@ -1,13 +1,17 @@ #!/usr/bin/env sh -font="DejaVu Sans Mono:size=13" -#"-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" +font="DejaVu Sans Mono:size=20" +nb='grey10' +nf='grey' +sb=grey +sf='black' + screen=$(ratpoison -c sdump | tr ',' '\n' | grep '1$') width=$(echo $screen | cut -d ' ' -f 4) height=$(echo $screen | cut -d ' ' -f 5) s=$(echo $screen | cut -d ' ' -f 1) -w=$width #$(($width/2)) -x=0 #$(($width/4)) +w=$(($width/2)) +x=$(($width/4)) y=$(($height/3)) -dmenu -p "Select >" -l 16 -s $s -x $x -y $y -w $w -sb '#AAA' -sf black -nb '#000' -fn "$font" -i -p foo "$@" +dmenu -p "Select >" -l 16 -m $s -x $x -y $y -w $w -sb $sb -sf $sf -nb $nb -nf $nf -fn "$font" -i "$@" @@ -1,56 +0,0 @@ -#!/usr/bin/env sh - -# Simple script to run graphical programme as a separate user - -mkmkshrc () { - cat >$1 <<'EOF' -export LANGUAGE="en_ZA:en_GB:en" -export LOCALE="en_ZA.UTF-8" -export PATH=$PATH:. -export HISTFILE=$HOME/.histfile -export HISTSIZE=8192 -umask 033 -set -o emacs -set -o utf8-mode -PS1='${ local e=$?; local r=""; (( $e )) && r="<$e>"; - local p=$(echo ${PWD:-?} | sed "s#$HOME#~#;s#.*/\(.*\)/\(.*\)#\1/\2#"); - local d=$(date +%H.%M.%S); - echo -n "USERNAME:[$p]($d)$r> "; - return $e }' -PS4='[$EPOCHREALTIME]' -stty -ixon -alias rm='rm -i' -alias ls='ls --group-directories-first -vhF --color=always' -alias mg='/usr/bin/mg -n' -EOF -} - -mkhandler() { - cat >$1 <<'EOF' -#!/usr/bin/env sh -cd /home/USERNAME -export DISPLAY=:0.0 -# Graphical programme code after this line -EOF -} - -if [ "$1" == "-n" ]; then - echo Creating skeleton files for new user $2 ... - rm /tmp/skel -rf > /dev/null - mkdir /tmp/skel - mkmkshrc /tmp/skel/.mkshrc - mkhandler /tmp/skel/$2 - sed -i "s/USERNAME/$2/" /tmp/skel/.mkshrc /tmp/skel/$2 - chmod 700 /tmp/skel/$2 - $EDITOR /tmp/skel/$2 - sudo useradd -m -G audio,subject -s /usr/bin/mksh -k /tmp/skel $2 - sudo passwd -l $2 -else - cd $HOME - printf '\033k'"$1"'\033\\' - xhost +local: - usr=$1 - shift - sudo -u $usr -s /home/$usr/$usr $* - xhost -local: -fi; |
