This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.connect_signal("manage", function (c) | |
-- Enable sloppy focus | |
local sloppy_focus_last_coords = mouse.coords() | |
c:connect_signal("mouse::enter", function(c) | |
-- bnote("mouse::enter::focus", 2) | |
local coords = mouse.coords() | |
local last = sloppy_focus_last_coords | |
-- bnote("coords: " .. coords.x .. "/" .. coords.y ) | |
-- bnote("last : " .. last.x .. "/" .. last.y ) | |
if coords.x == last.x and coords.y == last.y then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Put a client relatively on the screen's workarea (sets floating state). | |
-- @param c A client. | |
-- @param x X position multipler (0.5 for center). | |
-- @param y Y position multiplier (0.5 for center). | |
-- @param width Width multiplier. | |
-- @param width Height multiplier. | |
local put_client = function(c, x, y, width, height) | |
local wa = capi.screen[c.screen].workarea | |
local geo = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ewmh = require("awful.ewmh") | |
client.disconnect_signal("request::activate", awful.ewmh.activate) | |
client.connect_signal("request::activate", function(c) | |
if not c:isvisible() then | |
-- Meant to handle opening a link from somewhere. | |
-- Causes Firefox to steal the focus on other events though! | |
-- Would need some magic flag being set via open-in-running-browser. | |
-- if c.class == "Firefox" and c.type == "normal" then | |
-- awful.client.jumpto(c) | |
-- -- awful.tag.viewonly(c:tags()[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Opacity handling. | |
local M = {} | |
M = { | |
opacity_unfocused_screen = 0.98, | |
opacity_unfocused_screen_last_client = 1, | |
} | |
local locked_opacity = {} | |
local capi = { | |
client = client, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
local gears = require("gears") | |
local _dbus = dbus; dbus = nil | |
local naughty = require("naughty") -- XXX: if loaded (with dbus available), notifications do not go to dunst/notify-osd anymore | |
dbus = _dbus | |
-- Debug function. Set focusstyle.debug to activate it. {{{2 | |
local gears = require("gears") | |
local bdebug_level = 10 -- display all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- django/django/contrib/admin/templates/admin/base_site.html 2014-05-15 01:20:54.977099539 +0200 | |
+++ virtualenv/src/autocomplete-light/autocomplete_light/templates/admin/base_site.html 2014-04-30 16:10:30.881101635 +0200 | |
@@ -1,10 +1,9 @@ | |
{% extends "admin/base.html" %} | |
-{% load i18n %} | |
+{% load admin_static %} | |
-{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %} | |
+{% block extrahead %} | |
+<script>window.jQuery || document.write('<script src="{% static 'jquery.js' %}">\x3C/script>')</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://pytest.org/dev/example/simple.html#making-test-result-information-available-in-fixtures | |
@pytest.mark.tryfirst | |
def pytest_runtest_makereport(item, call, __multicall__): | |
# execute all other hooks to obtain the report object | |
rep = __multicall__.execute() | |
# set an report attribute for each phase of a call, which can | |
# be "setup", "call", "teardown" | |
setattr(item, "rep_" + rep.when, rep) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"pk": 1, "model": "cities_light.country", "fields": {"code2": "AD", "code3": "AND", "name": "Andorra", "tld": "ad", "alternate_names": "Principality of Andorra,Andora", "continent": "EU", "geoname_id": 3041565, "name_ascii": "Andorra", "slug": "andorra"}}, {"pk": 2, "model": "cities_light.country", "fields": {"code2": "AE", "code3": "ARE", "name": "United Arab Emirates", "tld": "ae", "alternate_names": "Vereinigte Arabische Emirate,Emirados \u00c1rabes Unidos,Emiratos \u00c1rabes Unidos,Zjednoczone Emiraty Arabskie,UAE", "continent": "AS", "geoname_id": 290557, "name_ascii": "United Arab Emirates", "slug": "united-arab-emirates"}}, {"pk": 3, "model": "cities_light.country", "fields": {"code2": "AF", "code3": "AFG", "name": "Afghanistan", "tld": "af", "alternate_names": "Islamic Republic of Afghanistan,Afeganist\u00e3o,Afganistan", "continent": "AS", "geoname_id": 1149361, "name_ascii": "Afghanistan", "slug": "afghanistan"}}, {"pk": 4, "model": "cities_light.country", "fields": {"code2": "AG", "code3": "ATG" |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git c/old_test_project/fixtures/cities_light.json i/old_test_project/fixtures/cities_light.json | |
deleted file mode 100644 | |
index 4afa26c..0000000 | |
--- c/old_test_project/fixtures/cities_light.json | |
+++ /dev/null | |
@@ -1 +0,0 @@ | |
-[{"pk": 1, "model": "cities_light.country", "fields": {"code2": "AD", "code3": "AND", "name": "Andorra", "tld": "ad", "alternate_names": "Principality of Andorra,Andora", "continent": "EU", "geoname_id": 3041565, "name_ascii": "Andorra", "slug": "andorra"}}, {"pk": 2, "model": "cities_light.country", "fields": {"code2": "AE", "code3": "ARE", "name": "United Arab Emirates", "tld": "ae", "alternate_names": "Vereinigte Arabische Emirate,Emirados \u00c1rabes Unidos,Emiratos \u00c1rabes Unidos,Zjednoczone Emiraty Arabskie,UAE", "continent": "AS", "geoname_id": 290557, "name_ascii": "United Arab Emirates", "slug": "united-arab-emirates"}}, {"pk": 3, "model": "cities_light.country", "fields": {"code2": "AF", "code3": "AFG", "name": "Afghanistan", "tld": "af", "alternate_names": "Islamic Rep |