QuakeWorld.pl - Forum Forum Index QuakeWorld.pl - Forum
Forum dyskusyjne polskiej sceny QuakeWorld
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

qw starting script

 
Post new topic   Reply to topic    QuakeWorld.pl - Forum Forum Index -> Linux
View previous topic :: View next topic  
Author Message
Fausto
Biorę przyQUAD
Biorę przyQUAD


Joined: 23 Mar 2005
Posts: 907
Location: Warszawa

PostPosted: Sat Apr 09, 2011 8:22 pm    Post subject: qw starting script Reply with quote

Pragne podzielic sie takim oto skryptem. Glowne zalety to:

* odpalanie qw od razu przez qizmo (liste sobie tylko trzeba wyedytowac i skrot)
* automatyczny wybor urzadzenia w evdev (w moim wypadku dla myszy G9)
* zmiana rozdzialki (trzeba miec wylaczone GPU scaling w xorg.conf)

Jakby ktos mial sugestie jak go jeszcze rozbudowac, to mowcie.

Code:

fst@ryba1 ~ % cat /opt/Quakeworld/ezqrunner
#!/bin/bash
#
# QW client running script by Faustov

# configuration
ezquake="/opt/Quakeworld/ezquake-gl.glx";

# settings
export __GL_SYNC_TO_VBLANK=0

# prepare qizmo-server connection bind
echo "say .connect $2" > /opt/Quakeworld/qw/svr.cfg;

# qizmo aliases
qizmoaddr="";
case "$1" in
   d2 )   qizmoaddr="195.114.0.33:27666" ;;
   aster )   qizmoaddr="194.187.43.243:27666" ;;
   kubus )   qizmoaddr="217.153.59.106:27555" ;;
   csn )   qizmoaddr="193.10.65.193:30000" ;;
   * )     qizmoaddr="$1";;
esac;

# commandline options - easier to edit
if [[ -n $qizmoaddr ]] ; then
   opts="+connect $qizmoaddr";
else
   opts="";
fi

# find my mouse
in_evdevice=$(readlink -n /dev/input/by-id/*G9*-event-mouse | cut -d'/' -f2);
opts="+set in_evdevice /dev/input/$in_evdevice +set in_mouse 3 $opts"

# perform
cd /opt/Quakeworld/;
/usr/bin/xrandr -s 512x384 && echo setting resolution 512x384;
/usr/bin/xrandr -r 82 && echo setting refresh rate 82 Hz;
/usr/bin/nice -10 $ezquake $opts && echo launching: $ezquake $opts;
/usr/bin/xrandr -s 1440x900 && echo reverting to native resolution;


Trzeba sobie gdzies zbindowac "exec svr.cfg" - to nas laczy via qizmo dalej. Jak sie nie poda qizmo jako parametru, to polaczenie jest bezposrednie. No i caly skrypt mozna zaaliasowac, u mnie alias qw="/opt/Quakeworld/ezqrunner" w .zshrc (tudziez .bashrc)

przykladowo:
* qw aster quake.xs4all.nl <-- laczy do astera, wale f12 i mam polaczenie na ffa przez astera
albo
* qw quake.aster.pl <--- laczy prosto na pierwszego astera
_________________
These are my glasses.
There are many like them, but these ones are MINE.
My glasses are my best friends. They are my life.
I must master them as I must master my life.
My glasses without me are useless. Without my glasses, I am useless.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    QuakeWorld.pl - Forum Forum Index -> Linux All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group