summary refs log tree commit diff stats
path: root/lib
Commit message (Expand)AuthorAgeFilesLines
* macros.customPragmaNode: walk brackets on brackets (#21040)Emery Hemingway2022-12-081-5/+3
* build the documentation of official packages (#20986)ringabout2022-12-0612-5675/+0
* stdlib organization & documentation improvements (#20971)metagn2022-12-0623-12/+32
* Remove deprecated posix.CLONE_STOPPED (#21012)Juan Carlos2022-12-051-1/+1
* unpublic `arrayWith` and rename it to `nimArrayWith` (#21006)ringabout2022-12-041-1/+1
* Update prelude example (#21005)Michal Maršálek2022-12-031-1/+1
* minor cleanup; correct the module name (#21001)ringabout2022-12-021-2/+2
* [unittest] remove unnecessay export for testing (#20868)ringabout2022-12-011-2/+0
* tyInt tyUint fit target int bit width (#20829)Bung2022-12-0113-244/+247
* Add HPPA and sparc64 architectures (#20934)Federico Ceratto2022-12-011-0/+2
* move `smtp` to nimble packages (#20953)ringabout2022-11-301-361/+0
* Move command line parameter code (#20946)IgorDeepakM2022-11-303-272/+318
* dom: remove X* = ref XObj [backport] (#20910)metagn2022-11-291-76/+37
* fix #20969 - making vcc work again with cpp backend (#20970)rockcavera2022-11-291-2/+2
* move `asyncftpclient` to nimble packages (#20952)ringabout2022-11-281-524/+0
* Improve jsformdata (#20929)Juan Carlos2022-11-281-6/+10
* Support IBM Z architecture (#20943)Federico Ceratto2022-11-281-1/+3
* Fix several memory leaks in the Postgres wrapper. (#20940)jfilby2022-11-271-11/+18
* fixes documentation regression (#20925)ringabout2022-11-261-2/+2
* fixes #20873; rework vcc with arc/orc (#20913)ringabout2022-11-251-21/+49
* fixes broken importc for vcc [backport] (#20909)ringabout2022-11-241-2/+2
* An unnamed break in a block now gives an `UnnamedBreak` warning (#20901)ringabout2022-11-242-11/+13
* alloc uses atomic operations only when necessary (#20899)ringabout2022-11-231-5/+17
* move `system/atomics` out of system; `std/atomics` should be preferred (#20875)ringabout2022-11-226-17/+22
* fixes #20026; marks system procs which can raise defects (#20864)ringabout2022-11-221-15/+18
* correct Ptr field name for RTL_CONDITION_VARIABLE? (#20896)metagn2022-11-221-1/+1
* echo: only lock when threading is enabled (#20890)Tanguy2022-11-211-1/+2
* fixes strict effects (#20885)ringabout2022-11-211-1/+1
* channel send() condition variable lock ordering (#20879)Ico Doornekamp2022-11-211-1/+1
* fix #20835 (#20872)rockcavera2022-11-181-2/+21
* remove useless defines (#20867)ringabout2022-11-171-4/+0
* fixes a severe bug of testament (#20832)ringabout2022-11-171-0/+1
* rename `std/threads` to `std/typedthreads` (#20850)ringabout2022-11-163-4/+4
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-1619-41/+41
* Allow users to set log flushing rules (#20817)Matt Haggard2022-11-141-17/+35
* fix a few "broken link" warnings (#20837)Andrey Makarov2022-11-142-2/+2
* [minor] documentation improvement (#20825)ringabout2022-11-121-4/+4
* support `UncheckedArray[T]` in repr_v2.nim (#20816)Derek 呆2022-11-111-1/+4
* [sugar] handle HiddenDeref in capture, error at CT if unsupported nnk (#20680)Vindaar2022-11-101-3/+13
* fixes #13781; fixes #14901; add acyclic pragmas to FlowVar (#20804)ringabout2022-11-101-2/+2
* remove name field for ARC (#20797)ringabout2022-11-092-2/+4
* Use same defaults as JS for fetch options (#20783)Jake Leahy2022-11-091-3/+3
* clean up `system/arc` (#20792)ringabout2022-11-091-37/+0
* implements display based subtype checking (6.4x faster without threads; 2.8x ...ringabout2022-11-082-16/+5
* fixes nightlies regression; patches for freebsd (#20786)ringabout2022-11-081-0/+12
* fixes #20694; the `exit` function now takes `cint` type (#20775)ringabout2022-11-071-8/+7
* Export trace member of exception type to allow custom stack trace entries (#2...Ico Doornekamp2022-11-071-2/+2
* fixes pre-existing `quit` documentation regression [backport] (#20763)ringabout2022-11-061-3/+3
* add effectsOf to map in the std/sets module (#20760)ringabout2022-11-051-1/+4
* ref #20694; quit value gets saturated to ranges (#20753)ringabout2022-11-0516-64/+95
/* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
from ranger.actions import Actions
from ranger.container import Bookmarks
from ranger import __version__

USAGE = '''%s [options] [path/filename]'''
CTRL_C = 3

class FM(Actions):
	def __init__(self, ui = None, bookmarks = None):
		Actions.__init__(self)
		self.ui = ui
		self.apps = self.settings.apps.CustomApplications()

		if bookmarks is None:
			self.bookmarks = Bookmarks()
			self.bookmarks.load()

		else:
			self.bookmarks = bookmarks
		self.bookmarks.enter_dir_function = self.enter_dir

		from ranger.shared import FileManagerAware
		FileManagerAware.fm = self

	def loop(self):
		if self.ui is None:
			from ranger.gui.defaultui import DefaultUI
			self.ui = DefaultUI()
			self.ui.initialize()

		self.env.enter_dir(self.env.path)

		gc_tick = 0

		while True:
			try:
				self.bookmarks.reload_if_outdated()
				self.ui.draw()
				self.ui.finalize()

				key = self.ui.get_next_key()
				self.ui.handle_key(key)

				gc_tick += 1
				if gc_tick > 10:
					gc_tick = 0
					self.env.garbage_collect()

			except KeyboardInterrupt:
				self.ui.handle_key(CTRL_C)