Commit bab66a9d5943249be570de078c7c2eaef711056e
Exists in
master
Merge branch 'master' of github.com:lanrat/dotfiles
Showing 2 changed files Side-by-side Diff
conky/conkyrc
View file @
bab66a9
... | ... | @@ -144,7 +144,7 @@ |
144 | 144 | ${top_io name 3}$alignr${top_io io_read 3} ${top_io io_write 3} |
145 | 145 | |
146 | 146 | ${color grey}FILESYSTEMS ${hr 1}${color} |
147 | -${diskiograph 20} | |
147 | +${diskiograph} | |
148 | 148 | Root ${alignr}${fs_free /} / ${fs_size /} |
149 | 149 | ${fs_bar 4 /}${if_mounted /media/windows} |
150 | 150 | Windows ${alignr}${fs_free /media/windows} / ${fs_size /media/windows} |
scripts/pinhole.py
View file @
bab66a9
... | ... | @@ -21,12 +21,15 @@ |
21 | 21 | import signal |
22 | 22 | import os |
23 | 23 | |
24 | -running = True | |
24 | +#enable logging to file | |
25 | +#sys.stdout = open( 'pinhole.log', 'w' ) | |
25 | 26 | |
27 | + | |
26 | 28 | def log( s ): |
27 | 29 | print '%s:%s' % ( time.ctime(), s ) |
28 | 30 | sys.stdout.flush() |
29 | 31 | |
32 | + | |
30 | 33 | class PipeThread( Thread ): |
31 | 34 | pipes = [] |
32 | 35 | def __init__( self, source, sink ): |
... | ... | @@ -40,7 +43,7 @@ |
40 | 43 | log( '%s pipes active' % len( PipeThread.pipes )) |
41 | 44 | |
42 | 45 | def run( self ): |
43 | - while running: | |
46 | + while True: | |
44 | 47 | try: |
45 | 48 | data = self.source.recv( 1024 ) |
46 | 49 | if not data: break |
... | ... | @@ -52,6 +55,7 @@ |
52 | 55 | PipeThread.pipes.remove( self ) |
53 | 56 | log( '%s pipes active' % len( PipeThread.pipes )) |
54 | 57 | |
58 | + | |
55 | 59 | class Pinhole( Thread ): |
56 | 60 | def __init__( self, port, newhost, newport ): |
57 | 61 | Thread.__init__( self ) |
... | ... | @@ -63,7 +67,7 @@ |
63 | 67 | self.sock.listen(5) |
64 | 68 | |
65 | 69 | def run( self ): |
66 | - while running: | |
70 | + while True: | |
67 | 71 | newsock, address = self.sock.accept() |
68 | 72 | log( 'Creating new session for %s %s ' % address ) |
69 | 73 | fwd = socket( AF_INET, SOCK_STREAM ) |
70 | 74 | |
71 | 75 | |
... | ... | @@ -71,12 +75,9 @@ |
71 | 75 | PipeThread( newsock, fwd ).start() |
72 | 76 | PipeThread( fwd, newsock ).start() |
73 | 77 | |
74 | -if __name__ == '__main__': | |
75 | 78 | |
79 | +if __name__ == '__main__': | |
76 | 80 | print 'Starting Pinhole' |
77 | - | |
78 | - import sys | |
79 | - #sys.stdout = open( 'pinhole.log', 'w' ) | |
80 | 81 | |
81 | 82 | if len( sys.argv ) > 1: |
82 | 83 | port = newport = int( sys.argv[1] ) |