From 4d5c3ebd468fa17a02a9abb9814c04e18baef309 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 2 May 2011 00:01:50 +0200 Subject: little repo cleanup --- lib/oldwrappers/x11/xrandr.nim | 194 ----------------------------------------- 1 file changed, 194 deletions(-) delete mode 100755 lib/oldwrappers/x11/xrandr.nim (limited to 'lib/oldwrappers/x11/xrandr.nim') diff --git a/lib/oldwrappers/x11/xrandr.nim b/lib/oldwrappers/x11/xrandr.nim deleted file mode 100755 index ee6f1705b..000000000 --- a/lib/oldwrappers/x11/xrandr.nim +++ /dev/null @@ -1,194 +0,0 @@ -# -# $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ -# -# Copyright (C) 2000 Compaq Computer Corporation, Inc. -# Copyright (C) 2002 Hewlett-Packard Company, Inc. -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of Compaq not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. HP makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ -# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Author: Jim Gettys, HP Labs, HP. -# - -import - x, xlib - -const - libXrandr* = "libXrandr.so" - -# * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ -# * -# * Copyright (C) 2000, Compaq Computer Corporation, -# * Copyright (C) 2002, Hewlett Packard, Inc. -# * -# * Permission to use, copy, modify, distribute, and sell this software and its -# * documentation for any purpose is hereby granted without fee, provided that -# * the above copyright notice appear in all copies and that both that -# * copyright notice and this permission notice appear in supporting -# * documentation, and that the name of Compaq or HP not be used in advertising -# * or publicity pertaining to distribution of the software without specific, -# * written prior permission. HP makes no representations about the -# * suitability of this software for any purpose. It is provided "as is" -# * without express or implied warranty. -# * -# * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL -# * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP -# * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -# * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -# * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# * -# * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. -# * - -type - PRotation* = ptr TRotation - TRotation* = cushort - PSizeID* = ptr TSizeID - TSizeID* = cushort - PSubpixelOrder* = ptr TSubpixelOrder - TSubpixelOrder* = cushort - -const - RANDR_NAME* = "RANDR" - RANDR_MAJOR* = 1 - RANDR_MINOR* = 1 - RRNumberErrors* = 0 - RRNumberEvents* = 1 - constX_RRQueryVersion* = 0 # we skip 1 to make old clients fail pretty immediately - X_RROldGetScreenInfo* = 1 - X_RR1_0SetScreenConfig* = 2 # V1.0 apps share the same set screen config request id - constX_RRSetScreenConfig* = 2 - X_RROldScreenChangeSelectInput* = 3 # 3 used to be ScreenChangeSelectInput; deprecated - constX_RRSelectInput* = 4 - constX_RRGetScreenInfo* = 5 # used in XRRSelectInput - RRScreenChangeNotifyMask* = 1 shl 0 - RRScreenChangeNotify* = 0 # used in the rotation field; rotation and reflection in 0.1 proto. - RR_Rotate_0* = 1 - RR_Rotate_90* = 2 - RR_Rotate_180* = 4 - RR_Rotate_270* = 8 # new in 1.0 protocol, to allow reflection of screen - RR_Reflect_X* = 16 - RR_Reflect_Y* = 32 - RRSetConfigSuccess* = 0 - RRSetConfigInvalidConfigTime* = 1 - RRSetConfigInvalidTime* = 2 - RRSetConfigFailed* = 3 - -type - PXRRScreenSize* = ptr TXRRScreenSize - TXRRScreenSize*{.final.} = object # - # Events. - # - width*, height*: cint - mwidth*, mheight*: cint - - TXRRScreenChangeNotifyEvent*{.final.} = object # internal representation is private to the library - typ*: cint # event base - serial*: culong # # of last request processed by server - send_event*: TBool # true if this came from a SendEvent request - display*: PDisplay # Display the event was read from - window*: TWindow # window which selected for this event - root*: TWindow # Root window for changed screen - timestamp*: TTime # when the screen change occurred - config_timestamp*: TTime # when the last configuration change - size_index*: TSizeID - subpixel_order*: TSubpixelOrder - rotation*: TRotation - width*: cint - height*: cint - mwidth*: cint - mheight*: cint - - PXRRScreenConfiguration* = ptr TXRRScreenConfiguration - TXRRScreenConfiguration*{.final.} = object - -proc XRRQueryExtension*(dpy: PDisplay, event_basep, error_basep: Pcint): TBool{. - cdecl, dynlib: libXrandr, importc.} -proc XRRQueryVersion*(dpy: PDisplay, major_versionp: Pcint, - minor_versionp: Pcint): TStatus{.cdecl, dynlib: libXrandr, - importc.} -proc XRRGetScreenInfo*(dpy: PDisplay, draw: TDrawable): PXRRScreenConfiguration{. - cdecl, dynlib: libXrandr, importc.} -proc XRRFreeScreenConfigInfo*(config: PXRRScreenConfiguration){.cdecl, - dynlib: libXrandr, importc.} - # - # Note that screen configuration changes are only permitted if the client can - # prove it has up to date configuration information. We are trying to - # insist that it become possible for screens to change dynamically, so - # we want to ensure the client knows what it is talking about when requesting - # changes. - # -proc XRRSetScreenConfig*(dpy: PDisplay, config: PXRRScreenConfiguration, - draw: TDrawable, size_index: cint, rotation: TRotation, - timestamp: TTime): TStatus{.cdecl, dynlib: libXrandr, - importc.} - # added in v1.1, sorry for the lame name -proc XRRSetScreenConfigAndRate*(dpy: PDisplay, config: PXRRScreenConfiguration, - draw: TDrawable, size_index: cint, - rotation: TRotation, rate: cshort, - timestamp: TTime): TStatus{.cdecl, - dynlib: libXrandr, importc.} -proc XRRConfigRotations*(config: PXRRScreenConfiguration, - current_rotation: PRotation): TRotation{.cdecl, - dynlib: libXrandr, importc.} -proc XRRConfigTimes*(config: PXRRScreenConfiguration, config_timestamp: PTime): TTime{. - cdecl, dynlib: libXrandr, importc.} -proc XRRConfigSizes*(config: PXRRScreenConfiguration, nsizes: Pcint): PXRRScreenSize{. - cdecl, dynlib: libXrandr, importc.} -proc XRRConfigRates*(config: PXRRScreenConfiguration, sizeID: cint, - nrates: Pcint): ptr int16{.cdecl, dynlib: libXrandr, importc.} -proc XRRConfigCurrentConfiguration*(config: PXRRScreenConfiguration, - rotation: PRotation): TSizeID{.cdecl, - dynlib: libXrandr, importc.} -proc XRRConfigCurrentRate*(config: PXRRScreenConfiguration): cshort{.cdecl, - dynlib: libXrandr, importc.} -proc XRRRootToScreen*(dpy: PDisplay, root: TWindow): cint{.cdecl, - dynlib: libXrandr, importc.} - # - # returns the screen configuration for the specified screen; does a lazy - # evalution to delay getting the information, and caches the result. - # These routines should be used in preference to XRRGetScreenInfo - # to avoid unneeded round trips to the X server. These are new - # in protocol version 0.1. - # -proc XRRScreenConfig*(dpy: PDisplay, screen: cint): PXRRScreenConfiguration{. - cdecl, dynlib: libXrandr, importc.} -proc XRRConfig*(screen: PScreen): PXRRScreenConfiguration{.cdecl, - dynlib: libXrandr, importc.} -proc XRRSelectInput*(dpy: PDisplay, window: TWindow, mask: cint){.cdecl, - dynlib: libXrandr, importc.} - # - # the following are always safe to call, even if RandR is not implemented - # on a screen - # -proc XRRRotations*(dpy: PDisplay, screen: cint, current_rotation: PRotation): TRotation{. - cdecl, dynlib: libXrandr, importc.} -proc XRRSizes*(dpy: PDisplay, screen: cint, nsizes: Pcint): PXRRScreenSize{. - cdecl, dynlib: libXrandr, importc.} -proc XRRRates*(dpy: PDisplay, screen: cint, sizeID: cint, nrates: Pcint): ptr int16{. - cdecl, dynlib: libXrandr, importc.} -proc XRRTimes*(dpy: PDisplay, screen: cint, config_timestamp: PTime): TTime{. - cdecl, dynlib: libXrandr, importc.} - # - # intended to take RRScreenChangeNotify, or - # ConfigureNotify (on the root window) - # returns 1 if it is an event type it understands, 0 if not - # -proc XRRUpdateConfiguration*(event: PXEvent): cint{.cdecl, dynlib: libXrandr, - importc.} -# implementation -- cgit 1.4.1-2-gfad0 */ .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 */
#!/usr/bin/python
# coding=utf-8
#
# Ranger: Explore your forest of files from inside your terminal
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# ----------------------------------------------------------------------------
#
# An embedded shell script. It allows you to change the directory
# after you exit ranger by starting it with: source ranger ranger
"""":
if [ $1 ]; then
	$@ && cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
else
	echo "usage: source path/to/ranger.py path/to/ranger.py"
fi
return 1
"""

# Redefine the docstring, since the previous one was hijacked to
# embed a shellscript.
__doc__ = """Ranger - file browser for the unix terminal"""


# Importing the main method may fail if the ranger directory
# is neither in the same directory as this file, nor in one of
# pythons global import paths.
try:
	from ranger.__main__ import main

except ImportError:
	import sys
	if '-d' not in sys.argv and '--debug' not in sys.argv:
		print("Can't import the main module.")
		print("To run an uninstalled copy of ranger,")
		print("launch ranger.py in the top directory.")
	else:
		raise

else:
	main()