From c6f60c5d1b3762936c0356e3e2f833c3986c7436 Mon Sep 17 00:00:00 2001 From: Tslil Clingman Date: Sun, 22 May 2016 00:58:17 -0400 Subject: Using vms now instead of runas, colour tweaks --- ratdm | 14 +++++++++----- runas | 56 -------------------------------------------------------- 2 files changed, 9 insertions(+), 61 deletions(-) delete mode 100755 runas diff --git a/ratdm b/ratdm index a318355..bacbef5 100755 --- a/ratdm +++ b/ratdm @@ -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 "$@" diff --git a/runas b/runas deleted file mode 100755 index 9ebb527..0000000 --- a/runas +++ /dev/null @@ -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; -- cgit v1.2.3