Quick jump:  What's new

 
Go to:
 
Weblog: TamTam   
in RazmjenaVjestina
LjuboNudi

==Linux točka(link)==
kao prvo trebate imati: instaliran PCLinuxOS zatim dvije bežične kartice i to je to! Započinjemo sa linkom.
U PCLinuxu uđite u konsole(konzolu). Za povezivanje na stalno jednu vezu upišite iwconfig ra0 essid naziv. Za prebacivanje bežične kartice u Master mod upišite iwconfig ath0 mode Master.Za promjenu essida nastale link mreže napišite naredbu iwconfig ath0 essid naziv .Za promijenu nicknamea upišite iwconfig ath0 nickname naziv.Na kraju vam još samo preostaje prebaciti datoteku router.sh na vaše računalo.Za to ostavite svoj mail u komentarima i u roku od 24 sata će vam stići mail sa datotekom router.sh kada vam stigne ta datoteka spremite je u računalo (preporučam u tmp) zatim otvorite tu datoteku to se radi tako da se upiše naredba cd /tmp/ zatim kada ste otvorili tmp upišite ./router.sh.Napomene:Ako imate ralinkovu bežičnu karticu upišite ra0, a ako imate tp-linkovu bežičnu karticu upišite ath0.Na kraju naredba piše naziv umjesto toga upišite ime mreže na koju se želite spojiti ili koja će drugi ljudi hvatat kako bi se spojili ne internet.

==Hackiranje passworda na windowsima==
Start-Run-cmd
net user
net user korisničkoime *

Napišite lozinku dva puta i gotovo
*Napomena: odvojite lozinke enterom


original Sep 26 6:14am

permalink
G33koskopOct07

Program za listopad 2007.


@ Oct02_19:00-21:30
Izbor video izbora - pregled i izbor najboljih 15 minutnih video izbora (playlisti) sa različitih video servisa poput (YouTube, Google video, Daily motion...). Više o pravilima sudjelovanja na http://www.razmjenavjestina.org/[IzborVideoIzbora]

Playlist killed the Internet killed the video killed the radio star.


@ Oct09_19:00-21:00
Volim/Mrzim Google moderirana diskusija

Moderator: Klaudio Štefančić

_Monopoliste iz prošlosti bilo je lako mrziti. S njima u odnosu, mi smo bili ti koji su uvijek u prekršaju. Njihovi prekršaji, ako su i postojali, stvarali su dugogodišnje sudske trakavice za koje nitko ne zna da li su uopće ikad i završile.

U međuvremenu je došao Google. Sve nam je dao besplatno. Što god radili s njima mi nismo u prekršaju. Za sebe kažu da neće činiti zlo. Nama daju teleskop da pogledamo naš parkirani automobil iz svemira, a zauzvrat oni koriste mikroskop za ulazak u našu osobnost i intimu. Good deal? Hm.
_


@ Oct16_19:00-21:00
Geek čita

Čitamo neke super eseje i onda diskutiramo. Scary.


@ Oct23_19:00-21:00
Loose Change: Final Cut, dokumentarni (USA, 2007)

_Mediji kažu da mediji lažu. Prepoznati tajnu, urotu, zavjeru, red u neredu najomiljenija je igra geekova svih vrsta. Nakon što se medijski prostor potpuno predao geekovskm diskursu, igra je postala još zanimljivijom: tajna tajne. Tajna nekad tajne tajne. Tajna nekad tajne tajne nekad tajne tajne. Da, na g33koskpu ćemo u svom vremenu svijeta koje imamo dokumentirati sve pokušaje razotkrivanja tajnih tajni nekad tajnih, a danas još tajnijih.

1. u nizu: "Loose Change: Final Cut" ili razotkrivanje svih laži oko rušenja Blizanaca. Kontroverzno. Kontroverzan kontroverzni status.
_


@ Oct23_19:00-21:00
5. utorak: metaG33koskop, metaG33koskop (Hrvatska, 2007)

Naša omiljena slastičarnica/pizzeria "Napolitana" se zatvorila. Netko drugi ju je kupio. Preuredio. Nema više ni pizze ni kolača (kolači ionako nisu nikad valjali). Sad će biti neke pašte, kažu jeftine. Očajni nakon više od šest mjeseci nenalaženja naše nove izbe da li ćemo se jeftino prodati novoj predizajniranoj "Napolitani"? Više se ni ne zove "Napolitana". Hahahaha. Kao da je to u njihovoj moći.


original Sep 20 6:54am

permalink
BuD

BudNudi

BudTrazi

  •  

Moja pitanja:

[PageList(BuDPitanje(.+))]

#BuDPitanjEDebiaNBooTParticijiAKenjazA

#BuDPitanjeUbuntUCleanInstall

#BuDPitanjeXubuntuInstall

#BuDPitanjEBasHBojicE

#BuDPitanjePromjenaRezolucijeUXorgConfu

#BuDPitanjeUbuntuCoreutilsGentooPatch

#BuDPitanjeGrepColorHighlight

#BuDPitanjeMplayerIScreensaver

#BuDPitanjeKompajliranjeKernelaNaUbuntu

  •  

Moji odgovori:

MarcellMarsPitanjePromjenaTastatureUXima

  •  

BudNapomene

  •  

BudPodsjetnik

  •  

MojSajt

  •  

Svakodnevne dovitljivosti:

[PageList(BuDSvakodnevneDovitljivosti(.+))]

#BuDSvakodnevneDovitljivostiWifiAccessPointURuksaku

#BuDSvakodnevneDovitljivostiMrezneLediceUvijekIspredNosa

#BuDSvakodnevneDovitljivostiUsbPez

#BuDSvakodnevneDovitljivostiUsbMis

#BuDSvakodnevneDovitljivostiLaserSpotCam

#BuDSvakodnevneDovitljivostiLaptopCooler

#BuDSvakodnevneDovitljivostiHddSpeakerS

#BuDSvakodnevneDovitljivostiLinuxSekretarica

#BuDSvakodnevneDovitljivostiPlastičniStalakZaBajs

#BuDSvakodnevneDovitljivostiOdmagnetiziranjeMonitora

#BuDSvakodnevneDovitljivostiJeftinaPodlogaZaMiš

#BuDSvakodnevneDovitljivostiČiščenjeTipkovnice

#BuDSvakodnevneDovitljivostiPopravljanjeMrtvogPixela

#BuDSvakodnevneDovitljivostiČiščenjeCdMedija

#BuDSvakodnevneDovitljivostiFloppyNotes

#BuDSvakodnevneDovitljivostiPrijenosniUsbPunjač

#BuDSvakodnevneDovitljivostiTicTacLampica

#BuDSvakodnevneDovitljivostiPopravakDaljinca

#BuDSvakodnevneDovitljivostiG33kManžete

#BuDSvakodnevneDovitljivostiKlimaKućneIzrade

#BuDSvakodnevneDovitljivostiLampaOdCd-a

  •  

MojeFotke

  •  

kontakt: bud@ubuntu-hr.org

webovi:

http://bud.bljak.org

     http://gallery.bud.bljak.org


original Sep 6 5:31am

permalink
EventCalendar3

eventCalendar3

International Lisp Conference
1.4.2007.
Cambridge, UK
http://www.international-lisp-conference.org/2007/index
----
---------------------------------------
----
Konferencija "Web.Start"
17.-18.05.2007.
Novinarski Dom, Zagreb, Cro

http://webstart.ini.hr/
----
-----------------------------------------
----
3. Open Source Konferencija: "Bite-On Security!
19.20.05.2007., 10:00-18:00
Europski dom
Jurišićeva 2, Zagreb, Cro
Dvorana "Bruxelles"

http://otvorenikod.org/
----
------------------------------------------
----
YAXWE - Yet Another Xacktogether of West & East
...a hacker camp in ex-military base in pula (istria), adriatic coast, croatia, (? may 2007 ?)
! seli u IX mjesec !
http://yaxwe.org/
----
---------------------------------------
----

{Linux u Hrvata "Open Source"

(9.10.06.2006.) Zagrebacki Velesajam, Zg, Cro}
vidi: Bite On Security gore
---

----------------------------------------
----
trans{cultural/national}HackMeeting 2, 15.17.06.2007., .Oslo, Norway
http://www1.autistici.org/thk/doku.php
---

--------------------------------------
----
Creative Commons Conference == ICommons Summit
Dubrovnik, Cro, 15.17.06.2007.
http://icommons.org/
---

-------------------------
----
Amiga Alpe Adria Show/Codex/0xAA
6.8.7.2007. Udine, Italy
http://0xaa.org/
People, Diversity, Creativity and Excellence
Topics: Code for fun, code for work, computing trends, melting pot of people, excellence...; Technology: Code, diversity, classic computing, emulation...
Humans: Developers, sceners, enthusiasts, resources for developers, new friends, old friends...
---

------------------------
----
eclecticTechCarnival (zhenski hackMeeting/razmjena)
11.15.07.2007; in Linz, Austria
http://eclectictechcarnival.org/
---

-------------------------------
----
Chaos Communication Camp 2007
cca 45oo hackers, g33ks, nerds, digital rebels, ...
8.12.08.2007., Berlin, Germany
http://events.ccc.de/camp/2007/Home
---

-----------------------------------
----
YAPC -- Yet Another Perl Conference
28.30.08.2007.
Vienna, Austria
http://vienna.yapceurope.org/ye2007/
---

----------------------------
----
YAXWE - Yet Another Xacktogether of West & East
...a hacker camp in ex-military base in pula (istria), adriatic coast, croatia,
 doSelio iz V.mjeseca
14.16.09.2007.
http://yaxwe.org/
---

-----------
----
Zagreb Radio Fest - Amateur Radio Fair

Packet Radio, digital modes, WiFi, equipment, antenas, podjela nagrada za kratkovalna i VHF/UHF (9A CW contest 2006, Hrvatski radioamaterski kup 2007) natjecanja, predavanja, okrugli stolovi, ...

8.9.2007. Dom Tehnike jezero Jarun, Zg, Cro

http://hamradio.hr/

http://rkz.hr/ZRF2007/zrf2007.html
----
------------------------
----
IBM {Linux} Forum
{19.-21.09}. Umag/Rovinj, Cro

http://www-05.ibm.com/hr/forum/agenda/

http://ibm.hr

http://www.ibm.com/hr/

http://www-5.ibm.com/hr/forum/

http://www-05.ibm.com/hr/forum2007/




 Hi Fi Show
(23.09.2006.) Zg, Cro

 ? 19.-21.10.2007 ?

Multimedia Hi Fi Show Croatia

The Movie Hotel, Zagreb, savska 141 ili sheraton ili WestIn (ex. Opera, Intercontinental Zagreb)




IBLOC, Linux Conference
27.28.09.2007., Portoroz, Slovenia
http://www.linux-konferenca.org/
http://www.ibloc.si/
---

-----------------------
----
Oracle Linux Day, u sklopu:
HrOUG Conference
16.20.10.2007.
Rovinj, Cro
http://www.hroug.hr
---

------------------------------------------------
----

{Kiblix, International Linux IT Festival/Linux Install Fest

(27. in 28. oktober 2006), Maribor Slovenia }
http://www.kibla.org/index.php?id=26
----
----------------------------------
----
Hrvatska Udruga Linux Korisnika na "Info Dani"ma
(07.-11.11.2006 )
Zagrebacki Velesajan, Zg, Cro
http://www.linux.hr/modules/news/
---

------------------------------------
----
CARNet Users Conference
19.21.11.2007. Rijeka, Cro
http://www.carnet.hr/CUC/
---

----------------------------
----
Sloboda Stvaralastvu
(22.27. sijecnja 2007.) Zg, Cro
http://www.slobodastvaralastvu.net/
---

-------------------------------------
----
GNU/Linux Install Fest
24.02.2007.
KSET, FER
Multimedijalni Institut, MaMa, razmjena vjestina, IEEE sekcija
http://www.kset.org/
----
--------------------------------------
----
{Vlasnistvo } moje tvoje nashe
(1.4.03.2007.), Rijeka, Cro
http://www.drugo-more.hr/wordpress/programi/tranzicija-na-periferiji/moje-tvoje-nase/moje-tvoje-nase-2007/program-moje-tvoje-nase/
----
------------------------
----
Linux Dan 5
(23.3.2007.)
Zagreb, Cro
http://www.housing.hr/
----
---------------------
----
Ubuntu-Hr Linux Conference
(31.3.2007, Zagreb, Cro).
http://ubuntu-hr.org/konferencija/
http://ubuntu-hr.org/
? 2008. Ljubljana, Slovenia ?
----
------------------------
----
AnarhoFeministicki Fest
13.15.04.2oo7.
http://anfemafest.tk/
---

----------------
----
Dani otvorenih racunarskih sustava / Konvencija Linux korisnika 2007
DORS/CLUC 2007
"Open Source at The Gates", 18-20.4.2007., Zagreb, Cro
http://www.open.hr/dc2007/program.php
----
-----------------------------------------------------
----
Operacija grad: Jedinstvo, otvaranje Privremenog ilegalnog centra za kulturu i mlade
Od 26. do 29. travnja 2007
http://jedinstvo.info
----
-----------------
----
_____________________
od__.__.__.2008
u ___________________
http://_._________.__
---

-----------------------------
----


original Sep 6 5:18am

permalink
NuclearDebatTraži

HASH(0x89d6fa0)


original Sep 5 1:42am

permalink
YaxweTemeDva

teme za yaxwe:
 

amiga--comunity, Demo Scene, new hw AmigaONE Dual G4, PegasosPPC G4, ACK SW ctrls 64-bit DualCore AmigaNG, Open Source spillOff, AmigaOS 4.0, MorphOS, AROS, ...howtoStart

gnu/linux--comunity, Project(GNU), Movement (Pokret), snimanje LiveCDdistri, multiBoot CleanInstalls, gnuFeminizam, cyberFeminizam, linux the only OSkernel with hamRadio supporthowtoStart, how to live of free sw,
linux education: self study vs. certification, Linux Conferences (Open Source & Free Software), hacking (not cracking !), g33k subcultura,...

hamRadio(radioAmaterizam)--comunity, BroadCastListening, ShortWaveListening, QRP (<5W transmisions), ARG, konstruktorstvo, packet radio, amateurradio licence: a legal frame for >100 mW WiFi, 3-3oMHz shortWave World @ your Morse radioTelegraph key-..-.-,
VHF(144-146MHz/2m), UHF(43o-44oMHz/7ocm), 1,2GHz(23cm), 2,4GHz, 5GHz, 10GHz, 24GHz,.........248 GHz use that band @ <=1oooW !
LowPowerDevice(<=10mW@433MHz), PersonalMobileRadio Device (<=500 mW@446MHz), CitizenBand (<=2W/10W@27MHz) is 4 phoneing, howtoStart (localClubCourse, exam, licence, personal rig, radio shack...)

subMarines(podmornice)--Tom Clancy, Red Storm Rising, Hunt For The Red october, simulators, models, books, pictures, web sites,

HiFi (audioPhilia)--headPhones (Grado, Stax electroStatic earSpeakers 380/5ooV, Sigma Design, Ergo, AKG,...), tube amps, ...

astronomy--basic Universe theorys, equipment (telescopes, )

open organize-ing/horizontal colaboration--tamTam"s, wiki-ies, mind mapping (freeMind, mindMap,...); howto-direct-ego-@-comunity-to-creativity, multidiciplinary community merge-ing,
cross linking in IRC, javaChats, 4ums, blogs, mailing lists,

amateur electronics--soldering(lemljenje), dicrete elements (resistors, capacitors, solenoids, diodes, tubes, transistors, integrated circuits, ...)

retro computing/hw recycling--Orao, Galaksija, Commodore-64, ZX Spectrum, Atari, classic computing, 8 bits Gold Age, demo scene, LuNiX NG (Linux 4 C-64 with TCP/IP & preemptive multitasking @ 1MHz in 50kB !)

gadgets--Psion Series 5/EpocOS/OpenPsion (preSymbian), Compaq IPAQ H37oo (OPIE/GnomePdaEnvironment)

photography--cameras, middleFormat, analogue b&w (chemical) & digital age,...

-open hardware (AmigaONE & PegasosPPC)

women & tehnology/linux--

advocacy--technology fobias,...

atlas of cyberspace

gnuFeminism & cyberFeminism--how to pass the FLOSS knowledge and Project & Movement truth, without trying to date and throw sexist remarks to the woman next table, room, chatRoom,...

cyberspace in movies & art--Neuromancer, film perspective of a computer, network (Klaudijo @ V.G. :))
---

------
----

not in form of a lecture, workshop, hands-on lab, round table, presentations...rather free style open & horizontal comunication...


original Sep 1 1:53pm

permalink
DrGspot

DrGspotNudi

DrGspotTrazi

DrGspotLinkoviAlToTrebaSredit

DrGspotKnjigeCasopisi

DrGspotEventsCalendar

TrebaZaGentooPPCdemo

PosjecenostGore22%

RadioAmaterizam

AudioFilija

BackToRoots

RazmjenaPlanovi

SliKe

AmigaUserGroup

LinuxAdvocacy

OperacijaGrad

InformatickiKlubAlter

SalaMala

BlagiUvoduLinux

IvanovP120

FrameWorkZaIntro

MojPodsjetnik

MicroAmigaDemoParty

MyFinalFramework

PythonZaNokiu

ZeneLinux

TakoMiZao

EvoGamer

RazmjenaSlike

ZaFrontPage

HosteliRijeka

PodsjetnikRijeka

InstalaciJa

CuraPitala

OtisloUzCd-e

ZaG

zadnjiIrcLog

MuzejRacunala

ComunityMerge

EventsCalendar2

TransHackMeeting2

YaXwe

SmajLich

CyberFemManifest

YaxweTeme

AlterOs

HrLinuxMag

RazVacica17

ErrorNapad?

LeTakBilTen

ThkArhiva

Events14Educat4

AnnaIrcLogger

MiLi

NorveshkiHackMeet

ZashtoSempronSlow

AlterHw

PlayList

ProFit

PlaKatInstalFest

AtV

DyneArchs

EventCalendar3

KumuLativ

SevenOfNine

YaxweTemeDva



haj, kak da stavim slike no teatra da uopće skuže ljudi o čem se tu radi?? track

(ovo cemo otforkat u pitanja/odgovori kasnije)

slike stavish tako da udjesh u link npr. ImaGes

i onda koristechi sintaxu deklarirash npr:

nazivslike.jpg

posevjash i tamtam(wiki) razmjene ce ti otvorit requester za upload

nesto o sintaxi mozesh vidjet ovdje:

http://www.razmjenavjestina.org/[StandardiSuDobri]

kao i u "edit" prozoru:

Emphasis: italics; bold; 'bold italics'; mixed*bold* and italics; ---- horizontal rule.
Headings:

Title 1

;

Title 2

;

Title 3

;

Title 4

;

Title 5

.
Lists: space and one of * bullets; 1., a., A., i., I. numbered items; 1.#n start numbering at n; space alone indents.
Links: JoinCapitalizedWords; brackets and double quotes; url; url; url label.
Tables: || cell text |||| cell text spanning two columns ||; no trailing white space allowed after tables or titles.


Robi kaj briješ ti?

Aj sad kad si mi pobrisao cijeli sajt molil bi da mi kažeš što si to napravio pa da stvari mogu vratit nazad, tamo sam napisao neke važne stvari, koje su mi ponekad i trebale no kao što vidiš sad ih više nema. Dok koristiš tamtam malo pripazi kaj radiš, sorry kaj tebe optužujem, ali vidio sam da je zadnja izmjena na mom djelu napravaljena za vrijeme konferencije a tebe sam tamo vidio da nekaj čačkaš po sajtu.

Nije mi stvarno bistro shto se dogodilo...
Naravno da ti je jasno da ti ne bi pobrisao cijeli sajt.
Jedna stvar koju sam primjetio, je da na dosta mjesta po sajtu ima josh tragova onog "deFacera" koji nam brishe po tamTam-u (tipa: "zajeb", "ti issa" is sl.

Jedina josh druga mogucnost bi bila da je netko od novih razmjenjivacha neshto zeznuo, ali za cut-nut cijeli branch, cudno mi je...

    • dGs

original Sep 1 1:48pm

permalink
EmacsWorkTimeCounter

(setq *work-time-start* 8)
(setq *work-time-end* 16)

;(setq *work-day-dow-table* [nil (9 . (17 30)) (9 . (17 30)) (9 . (17 30)) (9 . (17 30)) (9 . (14 30)) nil])

(defun wt-dow-update-start-end nil
  (let ((beg-end (aref *work-day-dow-table* (nth 6 (decode-time (current-time))))))
    (if beg-end (setq *work-time-start* (car beg-end) *work-time-end* (cdr beg-end))
      (setq *work-time-start* 0 *work-time-end* 0))))

(setq *work-time-statuslen* 16)

(defmacro def-extract-if-list (name fun &optional ret)
  `(defun ,name (val)
     (if (listp val) (,fun val)
       ,(if ret ret 'val))))

(def-extract-if-list wt-hour first)
(def-extract-if-list wt-minutes second 0)

(defun work-time-update nil
  (when *work-day-dow-table* (wt-dow-update-start-end))
  (let* ((now (current-time))
	 (today (let ((dcd-now (decode-time now)))
		  `(,(nth 3 dcd-now) ,(nth 4 dcd-now) ,(nth 5 dcd-now))))
	 (start-time (apply #'encode-time (append (list 0 (wt-minutes *work-time-start*) (wt-hour *work-time-start*)) today)))
	 (end-time (apply #'encode-time (append (list 0 (wt-minutes *work-time-end*) (wt-hour *work-time-end*)) today))))
    (labels ((status-string-format (perc)
				   (cond ((< perc 0) ":(")
					 ((> perc 1) ":))")
					 (t (let* ((filled (round (* perc *work-time-statuslen*)))
						   (empty (- *work-time-statuslen* filled)))
					      (concat "[ (make-string filled ?#) (make-string empty ?\ ) ]")))))
	     (elapsed-percentage (from to now) (/ (float (- now from))(- to from)))
	     (total-sec (time) (+ (* 65536 (car time)) (cadr time))))
      (setq wt-status-string
	    (status-string-format
	     (elapsed-percentage (total-sec start-time) (total-sec end-time) (total-sec now)))))))

(push #'work-time-update display-time-hook)

;

(defun wt-status-displayed nil
  (member 'wt-status-string global-mode-string))

(defun wt-add-status nil
  (setq global-mode-string (append global-mode-string '(wt-status-string))))

(defun wt-remove-status nil
  (setq global-mode-string (remove 'wt-status-string global-mode-string)))

(defun work-time-status-toggle nil
  (interactive)
  (funcall (if (wt-status-displayed) #'wt-remove-status #'wt-add-status)))

;

(setq wt-status-string (work-time-update))


original Aug 30 4:20am

permalink
MarcellMarsCodeGamepadX

GamepadX

at the moment i try to get account at savannah.gnu.org with this project:
*"topot" is python scripting environment to allow classic input devices, gamepads/joysticks and midi/osc gears to mimic each other... to use mouse/keyboard as midi/osc controlers and vice versa...

visualisations of the parameters in charge is an extra layer.

the code written till now is at wiki page:
http://www.razmjenavjestina.org/[MarcellMars]/[MarcellMarsCodeGamepadX]

it allows user to use gamepad as mouse, keyboard or any other system call written in XAction class.. also there is a draft class which allows user to use MIDI controller as a regular mouse...*

GamepadX is a little python script which prepares gamepad (in my case Logitech Cordless Rumble Pad) to act as mouse, arrows, backspace, delete, enter, escape... whatever u put in methods of class XAction ;)

if you are looking for the "real app" for making your joystick the new mouse in X try http://qjoypad.sourceforge.net/... unfortunately i didn't test it but it seems quite matured :*

at the moment the configuration is in konf list where the first member of the list is pseudo-modifier, second is axe or button of the gamepad, third the number of ax or button and finally forth is the name of the method of class Kontroler which will be called after particular axe or button is pressed. modifiers should be used to bring extra functionality for axis or buttons and therefore should be placed before other (non-modifiers) functionalities in the conf list... when modifier is pressed the particular axe or button when pressed gets different job than when pressed without the modifier.. as easy as that ;)

the future plans are to make "while 1:" separated thread + make python OSC/MIDI server (open sound control) which will call then methods of XAction so it will be possible to use MIDI gears to cheat X server ;)

UPDATE: the proof of concept regarding MIDI is in the code.. and at the moment MIDI controllers 72 and 73 are mouse axis and notes 49, 50 and 51 are left/middle/right click of the mouse... it is easy to catch any other midi event and make it do whatever is in XAction class... if testing just be sure that your MIDI controller is connected to GetMIDI midi device... i recommend qjackctl for doing that

the other thing is to make this also controller of rvwm fork of evilwm. rvwm are python bindings of evilwm controllable from interactive python sessions (separated thread)...

whatever...

it depends on pyJSW responsible for communication to gamepad and
pyseq responsible for communication to X server.

from pyrobot import *
import JSW,sys,time
from pyseq import *


class GetMIDI(PySeq):
    def __init__(self):
        PySeq.__init__(self,'GetMIDI')
        self.iport = self.createInPort('')

    def startGetMIDI(self):
        self.mt=MidiThread(self)
        self.mt.start()

    def callback(self, ev):
        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 48 \
and ev.getData().velocity > 0:
            K.leftClick(1, 'midi00')
        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 48 \
and ev.getData().velocity == 0:
            K.leftClick(0, 'midi00')

        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 49 \
and ev.getData().velocity > 0:
            K.middleClick(1, 'midi01')
        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 49 \
and ev.getData().velocity == 0:
            K.middleClick(0, 'midi01')

        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 50 \
and ev.getData().velocity > 0:
            K.rightClick(1, 'midi02')
        if ev.type =
^ SND_SEQ_EVENT_NOTEON and ev.getData().note
= 50 \
and ev.getData().velocity == 0:
            K.rightClick(0, 'midi02')

        if ev.type =
^ SND_SEQ_EVENT_CONTROLLER and ev.getData().param
= 73:
            K.mouseX = (ev.getData().value + 1)*(1024/128)
            K.moveMouse()
        if ev.type 
^^ SND_SEQ_EVENT_CONTROLLER and ev.getData().param
 72:
            K.mouseY = (ev.getData().value + 1)*(1024/128)
            K.moveMouse()

        return 1

class XAction:
    def __init__(self):
        self.R = PyRobot()
        self.dev = "/dev/input/js0"
        self.cal = "/tmp/.joystick"
        self.jsd = JSW.Joystick(self.dev,self.cal)
        self.ax = self.jsd.getAxisCoeff
        self.bt = self.jsd.getButtonState
        self.mouseX = 0
        self.mouseY = 0
        self.states = {}
        for i in range(self.jsd.axisCount):
            self.states['ax'+str(i)] = 0
        for i in range(self.jsd.buttonCount):
            self.states['bt'+str(i)] = 0
        self.states['ax4b'] = 0
        self.states['ax5b'] = 0
        for i in range(3):
            self.states['midi0'+str(i)] = 0

    def getMouseCoord(self):
        self.R.grabAll()
        ev = self.R.getEvent()
        dat = ev.getData()
        self.mouseX, self.mouseY = dat.x, dat.y
        self.R.releaseAll()

    def setMouseX(self, x, state):
        step = self.getMouseStep(x)
        if x > 0:
            self.mouseX += step + 1
            if self.mouseX > 1024: self.mouseX = 1024
        elif x < 0:
            self.mouseX += step - 1
            if self.mouseX < 0: self.mouseX = 0

    def setMouseY(self, y, state):
        step = self.getMouseStep(y)
        if y > 0:
            self.mouseY -= step + 1
            if self.mouseY > 768: self.mouseY = 768
        elif y < 0:
            self.mouseY -= step - 1
            if self.mouseY < 0: self.mouseY = 0

    def getMouseStep(self, s):
        return int(((round(s,2)*100)**3)/20000)

    def moveMouse(self):
        self.R.sendMotionEvent(self.mouseX, self.mouseY)

    def leftClick(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendButtonEvent(1,1)
            self.states[state] = 1
        elif click =
^ 0 and self.states[state]
= 1:
            self.R.sendButtonEvent(1,0)
            self.states[state] = 0

    def rightClick(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendButtonEvent(3,1)
            self.states[state] = 1
        elif click =
^ 0 and self.states[state]
= 1:
            self.R.sendButtonEvent(3,0)
            self.states[state] = 0

    def middleClick(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendButtonEvent(2,1)
            self.states[state] = 1
        elif click =
^ 0 and self.states[state]
= 1:
            self.R.sendButtonEvent(2,0)
            self.states[state] = 0

    def arrowUpDownAx(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendKeyEvent(98,1)
            self.states[state] = 1
        elif click =
^ -1 and self.states[state+'b']
= 0:
            self.R.sendKeyEvent(104,1)
            self.states[state+'b'] = 1
        elif click 
^^ 0 and self.states[state]
 1:
            self.R.sendKeyEvent(98,0)
            self.states[state] = 0
        elif click =
^ 0 and self.states[state+'b']
= 1:
            self.R.sendKeyEvent(104,0)
            self.states[state+'b'] = 0

    def arrowLeftRightAx(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendKeyEvent(102,1)
            self.states[state] = 1
        elif click =
^ -1 and self.states[state+'b']
= 0:
            self.R.sendKeyEvent(100,1)
            self.states[state+'b'] = 1
        elif click 
^^ 0 and self.states[state]
 1:
            self.R.sendKeyEvent(102,0)
            self.states[state] = 0
        elif click =
^ 0 and self.states[state+'b']
= 1:
            self.R.sendKeyEvent(100,0)
            self.states[state+'b'] = 0

    def backspaceDeleteAx(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendKeyEvent(107,1)
            self.states[state] = 1
        elif click =
^ -1 and self.states[state+'b']
= 0:
            self.R.sendKeyEvent(22,1)
            self.states[state+'b'] = 1
        elif click 
^^ 0 and self.states[state]
 1:
            self.R.sendKeyEvent(107,0)
            self.states[state] = 0
        elif click =
^ 0 and self.states[state+'b']
= 1:
            self.R.sendKeyEvent(22,0)
            self.states[state+'b'] = 0

    def enterEscapeAx(self, click, state):
        if click 
^^ 1 and self.states[state]
 0:
            self.R.sendKeyEvent(9,1)
            self.states[state] = 1
        elif click =
^ -1 and self.states[state+'b']
= 0:
            self.R.sendKeyEvent(36,1)
            self.states[state+'b'] = 1
        elif click 
^^ 0 and self.states[state]
 1:
            self.R.sendKeyEvent(9,0)
            self.states[state] = 0
        elif click =
^ 0 and self.states[state+'b']
= 1:
            self.R.sendKeyEvent(36,0)
            self.states[state+'b'] = 0

Midi = GetMIDI()
Midi.startGetMIDI()

K = XAction()
K.getMouseCoord()
nomo_state = 0

konf = [        [[['bt',7]], 'ax', 4, 'backspaceDeleteAx'],
                [[['bt',7]], 'ax', 5, 'enterEscapeAx'],
                [[], 'ax', 2, 'setMouseX'],
                [[], 'ax', 3, 'setMouseY'],
                [[], 'bt', 4, 'leftClick'],
                [[], 'bt', 6, 'rightClick'],
                [[], 'bt', 5, 'middleClick'],
                [[], 'ax', 5, 'arrowUpDownAx'],
                [[], 'ax', 4, 'arrowLeftRightAx']
                ]

try:
    while 1:
        for i in konf:
            if getattr(K,i[1])(i[2]) != 0:
                keep = True

        if K.jsd.update() or keep == True:
            keep = False
            K.moveMouse()
            for i,iobj in enumerate(konf):
                for j in iobj[0]:
                    if getattr(K, j[0])(j[1]) == 1:
                        nomo_state += 1

                if nomo_state == len(konf[i][0]):
                        nomo_state = 0
                        getattr(K, konf[i][3]) \
(getattr(K, konf[i][1])(konf[i][2]),konf[i][1]+str(konf[i][2]))
                else:
                    nomo_state = 0

        sys.stdout.flush()
        time.sleep(0.02)

except KeyboardInterrupt:
    print
    sys.exit()


original Aug 26 7:30am

permalink
MarcellMars
permalink
Weblog Navigation
Loading...
Weblog Archives
  • Loading...