summary refs log tree commit diff stats
path: root/code/fm.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-11-27 10:49:48 +0100
committerhut <hut@lavabit.com>2009-11-27 10:49:48 +0100
commit9506fb8e79f2d04a1ab78039bacdbee7b22109b5 (patch)
tree3d5c682e9c5032a1c23be6a98c9d3d6e7c8224b5 /code/fm.py
parent5822dff7d91472bf2fc337c68f144e0ce1de09ae (diff)
downloadranger-9506fb8e79f2d04a1ab78039bacdbee7b22109b5.tar.gz
more VROOM
Diffstat (limited to 'code/fm.py')
-rw-r--r--code/fm.py65
1 files changed, 0 insertions, 65 deletions
diff --git a/code/fm.py b/code/fm.py
deleted file mode 100644
index 924f6efc..00000000
--- a/code/fm.py
+++ /dev/null
@@ -1,65 +0,0 @@
-import sys, os
-import ui, debug, file, directory, fstype
-
-class FM():
-	def __init__(self, environment):
-		self.env = environment
-
-	def feed(self, path, ui):
-		self.ui = ui
-		self.env.path = path
-		self.enter_dir(path)
-
-	def enter_dir(self, path):
-		# get the absolute path
-		path = os.path.normpath(os.path.join(self.env.path, path))
-
-		self.env.path = path
-		self.env.pwd = self.env.get_directory(path)
-
-		self.env.pwd.load_content()
-
-		# build the pathway, a tuple of directory objects which lie
-		# on the path to the current directory.
-		pathway = []
-		currentpath = '/'
-		for dir in path.split('/'):
-			currentpath = os.path.join(currentpath, dir)
-			debug.log(currentpath)
-			pathway.append(self.env.get_directory(currentpath))
-		self.env.pathway = tuple(pathway)
-
-		# set the current file.
-		if len(self.env.pwd) > 0:
-			self.env.cf = self.env.pwd[0]
-		else:
-			self.env.cf = None
-
-	def run(self):
-		while 1:
-			try:
-				self.ui.draw()
-			except KeyboardInterrupt:
-				self.interrupt()
-			except:
-				raise
-
-			try:
-				key = self.ui.get_next_key()
-				self.press(key)
-			except KeyboardInterrupt:
-				self.interrupt()
-
-	def press(self, key):
-		if (key == ord('q')):
-			raise SystemExit()
-		elif (key == ord('h')):
-			self.enter_dir('..')
-		elif (key == ord('l')):
-			self.enter_dir(self.env.cf.path)
-
-	def interrupt(self):
-		import time
-		self.buffer = ""
-		time.sleep(0.2)
-
8:51:44 +0200 fixed XSync handling and finished man page' href='/acidbong/suckless/dwm/commit/dwm.1?h=3.0&id=e6cbe9c11e88537d74eb094ba5844f71ee57f268'>e6cbe9c ^
e743836 ^
dc5c070 ^




901b3ed ^
1076f2b

901b3ed ^
0c3544d ^
72655f0 ^





901b3ed ^
72655f0 ^
3af6434 ^
72655f0 ^
3af6434 ^
72655f0 ^




3af6434 ^







72655f0 ^





3af6434 ^
72655f0 ^

7b5638f ^





1549faf ^


3af6434 ^

1549faf ^









ba59bc8 ^
1549faf ^
3af6434 ^

1549faf ^
0c3544d ^
0e5c819 ^












0c3544d ^

dc5c070 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110