Initial commit
This commit is contained in:
commit
6912c81d81
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# My VNC setup
|
||||||
|
|
||||||
|
Runs [DWM](https://dwm.suckless.org).
|
6
dwm_status
Executable file
6
dwm_status
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DESKTOPNAME=$(perl -e '$ARGV[0] =~ m/([a-zA-Z0-9]+)(_([a-zA-Z0-9]+))?/; print "$1"' $VNCDESKTOP)
|
||||||
|
sts=$(date +"%a %D %I:%M%p")
|
||||||
|
ipa=$(hostname -I | cut -f1 -d" ")
|
||||||
|
xsetroot -name " $sts [$DESKTOPNAME:$ipa]"
|
25
xstartup
Executable file
25
xstartup
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
xrdb $HOME/.Xresources
|
||||||
|
xsetroot -solid grey
|
||||||
|
|
||||||
|
# I call vncserver with the -name argument. The name is of format
|
||||||
|
# <DestopName>_<COLOR>. E.g.: Tenor_007722. I send the color to a patched DWM,
|
||||||
|
# which sets the selection color to the one in VNC name.
|
||||||
|
# The dwm_status command below also recognizes this name format, and displays
|
||||||
|
# only the desktop name part in the status
|
||||||
|
COLOR=$(perl -e '$ARGV[0] =~ m/([a-zA-Z0-9]+)(_([a-zA-Z0-9]+))?/; print "$3"' $VNCDESKTOP)
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
# If we don't explicitly kill the dwm_status thread, it keeps running even
|
||||||
|
# after vncserver -kill kills the VNC. So if the display dies, exit xstartup
|
||||||
|
if xhost > /dev/null 2>&1 ; then
|
||||||
|
/home/mahesh/bin/dwm_status
|
||||||
|
sleep 10
|
||||||
|
else
|
||||||
|
echo Display for ${VNCDESKTOP} on ${DISPLAY} died. Exiting...
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done &
|
||||||
|
|
||||||
|
/home/mahesh/apps/bin/dwm "#${COLOR}"
|
Loading…
Reference in New Issue
Block a user