Mercurial > hg > config
changeset 4:81e89e519980
changed a bunch of stuff, evidently
author | k0s <k0scist@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 15:43:43 -0500 |
parents | a7188391b4ce |
children | 81619b59dd51 |
files | .emacs .fluxbox/init .fluxbox/keys python/smartopen.py |
diffstat | 4 files changed, 97 insertions(+), 225 deletions(-) [+] |
line wrap: on
line diff
--- a/.emacs Wed Oct 28 12:49:24 2009 -0400 +++ b/.emacs Sat Nov 21 15:43:43 2009 -0500 @@ -78,3 +78,8 @@ ;; (add-hook 'find-file-hook 'flymake-find-file-hook) (server-start) + +(fset 'break "import pdb; pdb.set_trace();\C-a\C-i") +(add-hook 'python-mode-hook + '(lambda () + (local-set-key [(meta ?p) (meta ?p)] 'break)))
--- a/.fluxbox/init Wed Oct 28 12:49:24 2009 -0400 +++ b/.fluxbox/init Sat Nov 21 15:43:43 2009 -0500 @@ -1,101 +1,102 @@ +session.screen0.slit.maxOver: false +session.screen0.slit.onTop: False +session.screen0.slit.direction: Vertical +session.screen0.slit.layer: Dock +session.screen0.slit.onhead: 0 +session.screen0.slit.alpha: 255 +session.screen0.slit.placement: RightBottom +session.screen0.slit.autoHide: false +session.screen0.iconbar.iconTextPadding: 10l +session.screen0.iconbar.wheelMode: Screen +session.screen0.iconbar.usePixmap: true +session.screen0.iconbar.alignment: Relative +session.screen0.iconbar.iconWidth: 70 +session.screen0.iconbar.deiconifyMode: Follow +session.screen0.iconbar.mode: {static groups} (workspace) +session.screen0.tabs.intitlebar: true +session.screen0.tabs.maxOver: false +session.screen0.tabs.usePixmap: false +session.screen0.toolbar.widthPercent: 44 +session.screen0.toolbar.onhead: 0 +session.screen0.toolbar.tools: workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock +session.screen0.toolbar.autoHide: false +session.screen0.toolbar.placement: BottomCenter +session.screen0.toolbar.alpha: 63 +session.screen0.toolbar.onTop: False +session.screen0.toolbar.maxOver: true +session.screen0.toolbar.height: 0 +session.screen0.toolbar.layer: Desktop +session.screen0.toolbar.visible: true +session.screen0.tab.height: 0 +session.screen0.tab.width: 0 +session.screen0.tab.placement: TopLeft +session.screen0.tab.alignment: Left +session.screen0.tab.rotatevertical: True +session.screen0.menu.alpha: 82 session.screen0.window.focus.alpha: 122 session.screen0.window.unfocus.alpha: 47 session.screen0.overlay.lineWidth: 1 session.screen0.overlay.lineStyle: LineSolid session.screen0.overlay.joinStyle: JoinMiter session.screen0.overlay.capStyle: CapNotLast -session.screen0.iconbar.deiconifyMode: Follow -session.screen0.iconbar.wheelMode: Screen -session.screen0.iconbar.iconWidth: 70 -session.screen0.iconbar.iconTextPadding: 10l -session.screen0.iconbar.alignment: Relative -session.screen0.iconbar.usePixmap: true -session.screen0.iconbar.mode: Workspace -session.screen0.tabs.intitlebar: true -session.screen0.tabs.maxOver: false session.screen0.titlebar.left: Stick session.screen0.titlebar.right: Minimize Maximize Close -session.screen0.tab.rotatevertical: True -session.screen0.tab.width: 0 -session.screen0.tab.alignment: Left -session.screen0.tab.placement: TopLeft -session.screen0.tab.height: 0 -session.screen0.menu.alpha: 82 -session.screen0.slit.alpha: 255 -session.screen0.slit.onhead: 0 -session.screen0.slit.onTop: False -session.screen0.slit.layer: Dock -session.screen0.slit.maxOver: false -session.screen0.slit.direction: Vertical -session.screen0.slit.placement: BottomRight -session.screen0.slit.autoHide: false -session.screen0.toolbar.layer: Desktop -session.screen0.toolbar.onTop: False -session.screen0.toolbar.visible: true -session.screen0.toolbar.alpha: 63 -session.screen0.toolbar.widthPercent: 44 -session.screen0.toolbar.placement: BottomCenter -session.screen0.toolbar.autoHide: false -session.screen0.toolbar.tools: workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock -session.screen0.toolbar.onhead: 0 -session.screen0.toolbar.maxOver: true -session.screen0.toolbar.height: 0 +session.screen0.menuMode: Delay +session.screen0.windowPlacement: RowSmartPlacement +session.screen0.followModel: Ignore +session.screen0.edgeSnapThreshold: 0 +session.screen0.allowRemoteActions: false +session.screen0.rootCommand: fbsetbg ~/image/wallpaper +session.screen0.menuDelay: 0 +session.screen0.strftimeFormat: %k:%M +session.screen0.clickRaises: true +session.screen0.workspacewarping: true +session.screen0.opaqueMove: false +session.screen0.windowScrollAction: +session.screen0.workspaceNames: one,two,three,four,five, session.screen0.focusNewWindows: true -session.screen0.focusModel: MouseFocus -session.screen0.fullMaximization: true -session.screen0.sloppywindowgrouping: true -session.screen0.defaultDeco: NORMAL -session.screen0.decorateTransient: true -session.screen0.antialias: true -session.screen0.imageDither: false -session.screen0.rowPlacementDirection: LeftToRight -session.screen0.desktopwheeling: true -session.screen0.windowPlacement: RowSmartPlacement -session.screen0.edgeSnapThreshold: 0 -session.screen0.rootCommand: fbsetbg ~/image/wallpaper -session.screen0.strftimeFormat: %k:%M -session.screen0.workspacewarping: true -session.screen0.windowScrollAction: session.screen0.colPlacementDirection: TopToBottom session.screen0.showwindowposition: true +session.screen0.focusModel: MouseFocus +session.screen0.windowMenu: session.screen0.tabFocusModel: ClickToTabFocus +session.screen0.fullMaximization: true +session.screen0.focusLastWindow: true session.screen0.userFollowModel: Follow +session.screen0.sloppywindowgrouping: true session.screen0.autoRaise: false +session.screen0.defaultDeco: NORMAL session.screen0.windowScrollReverse: false +session.screen0.decorateTransient: true session.screen0.reversewheeling: false +session.screen0.antialias: true session.screen0.workspaces: 5 +session.screen0.imageDither: false session.screen0.resizeMode: Bottom +session.screen0.rowPlacementDirection: LeftToRight session.screen0.menuDelayClose: 0 -session.screen0.menuMode: Delay -session.screen0.followModel: Ignore -session.screen0.allowRemoteActions: false -session.screen0.menuDelay: 0 -session.screen0.clickRaises: true -session.screen0.opaqueMove: false -session.screen0.workspaceNames: one,two,three,four,five, -session.screen0.windowMenu: -session.screen0.focusLastWindow: true +session.screen0.desktopwheeling: true +session.tabs: false +session.tabsAttachArea: Window +session.configVersion: 10 +session.colorsPerChannel: 4 session.tabPadding: 0 +session.appsFile: ~/.fluxbox/apps +session.focusTabMinWidth: 0 session.modKey: Mod1 +session.styleFile: ~/.fluxbox/styles/Black +session.slitlistFile: ~/.fluxbox/slitlist session.keyFile: ~/.fluxbox/keys +session.ignoreBorder: false +session.forcePseudoTransparency: true session.cacheLife: 5l -session.menuFile: ~/.fluxbox/menu -session.tabs: false -session.groupFile: ~/.fluxbox/groups -session.autoRaiseDelay: 250 -session.tabsAttachArea: Window -session.colorsPerChannel: 4 -session.focusTabMinWidth: 0 -session.slitlistFile: ~/.fluxbox/slitlist +session.styleOverlay: ~/.fluxbox/overlay +session.doubleClickInterval: 250 session.imageDither: True -session.forcePseudoTransparency: true -session.doubleClickInterval: 250 -session.cacheMax: 200l -session.useMod1: true +session.menuFile: ~/.fluxbox/menu session.opaqueMove: False -session.configVersion: 1 -session.appsFile: ~/.fluxbox/apps -session.styleFile: ~/.fluxbox/styles/Black -session.ignoreBorder: false -session.styleOverlay: ~/.fluxbox/overlay session.numLayers: 13 +session.cacheMax: 200l +session.groupFile: ~/.fluxbox/groups +session.useMod1: true +session.autoRaiseDelay: 250
--- a/.fluxbox/keys Wed Oct 28 12:49:24 2009 -0400 +++ b/.fluxbox/keys Sat Nov 21 15:43:43 2009 -0500 @@ -1,3 +1,18 @@ +!mouse actions added by fluxbox-update_configs +OnTitlebar Mouse2 :StartTabbing + +!mouse actions added by fluxbox-update_configs +OnTitlebar Double Mouse1 :Shade +OnTitlebar Mouse3 :WindowMenu + +!mouse actions added by fluxbox-update_configs +OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving} +OnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing BottomRight} + +!mouse actions added by fluxbox-update_configs +OnToolbar Mouse4 :NextWorkspace +OnToolbar Mouse5 :PrevWorkspace + !mouse actions added by fluxbox-update_configs OnDesktop Mouse1 :hideMenus OnDesktop Mouse2 :workspaceMenu @@ -39,3 +54,4 @@ Control Mod1 t :ExecCommand gnome-terminal # terminal Mod4 t :ToggleDecor +
--- a/python/smartopen.py Wed Oct 28 12:49:24 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -#!/usr/bin/python - -""" smart open the data passed in """ - -import urllib -import urllib2 -import sys -import os -import address - -class Location: - """ - generic class for locations - """ - - def __init__(self, baseurl=""): - self.baseurl = baseurl - - def url(self, query): - return self.baseurl + self.process(query) - - def process(self, query): - return query - - def test(self, query): - return True - - def open(self, query): - if not self.test(query): - return False - url = self.url(query) - os.system("firefox '%s'" % url) - return True - -class URL(Location): - """a straight URL""" - - def process(self, query): - if '://' in query: - return query - return 'http://' + query - - def test(self, query): - """try to open the url""" - - if ' ' in query or '\n' in query: - return False - - try: - site = urllib.urlopen(self.process(query)) - except IOError: - return False - return True - -class GoogleMap(Location): - """try to google-maps the address""" - - def __init__(self): - gmapsurl='http://maps.google.com/maps?f=q&hl=en&q=' - Location.__init__(self, gmapsurl) - - def process(self, query): - theaddress = address.normalizeaddress(query) - if not theaddress: - return theaddress - return urllib.quote_plus(theaddress) - - def test(self, query): - return bool(self.process(query)) - -class Revision(Location): - def __init__(self): - revision_url = 'http://trac.openplans.org/openplans/changeset/' - Location.__init__(self, revision_url) - - def process(self, query): - return query[1:] - - def test(self, query): - if query[0] != 'r': - return False - return query[1:].isdigit() - - - -class TracTicket(Location): - def __init__(self): - # url for # data - number_url = 'http://trac.openplans.org/openplans/ticket/' - Location.__init__(self, number_url) - - def process(self, query): - if query.startswith('#'): - return query[1:] - return query - - def test(self, query): - query = self.process(query) - if len(query.split()) != 1: - return False - return query.isdigit() - -class Wikipedia(Location): - """try to open the query in wikipedia""" - def __init__(self): - wikiurl = 'http://en.wikipedia.org/wiki/' - Location.__init__(self, wikiurl) - - def process(self, query): - return urllib.quote_plus('_'.join(query.split())) - - def test(self, query): - 'test to see if the article exists' - - # need a phony user agent so wikipedia won't know we're a bot - headers = {} - headers['User-Agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4' - - request = urllib2.Request(self.url(query), None, headers) - f = urllib2.urlopen(request).read() - - if 'Wikipedia does not have an article with this exact name' in f: - return False - return True - -class Google(Location): - def __init__(self): - googleurl = 'http://www.google.com/search?hl=en&q=' - Location.__init__(self, googleurl) - - def process(self, query): - return urllib.quote_plus(query) - -# get data to be operated on -data = ' '.join(sys.argv[1:]) -if not data: - data = sys.stdin.read() - -locations = [ URL, - GoogleMap, - Revision, - TracTicket, - Wikipedia, - Google - ] - -for loc in locations: - loc = loc() - if loc.open(data): - sys.exit(0)