Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

zsh history substring search minor, luakit minor rc

  • Loading branch information...
commit 4c144073a5a1db45b1733735a9cc4eb718e7f8fe 1 parent 8e65e85
@milomouse authored
View
44 luakit/globals.lua
@@ -75,8 +75,8 @@ search_engines.default = search_engines.d
-- See http://webkitgtk.org/reference/webkitgtk-WebKitWebSettings.html
domain_props = {
["all"] = {
- ["enable-scripts"] = true,
- ["enable-plugins"] = false,
+ ["noscript.enable-scripts"] = true,
+ ["noscript.enable-plugins"] = false,
["enable-private-browsing"] = false,
--["user-stylesheet-uri"] = "file://" .. luakit.data_dir .. "/styles/everymouse.css",
},
@@ -93,18 +93,18 @@ domain_props = {
--["user-stylesheet-uri"] = "file://" .. luakit.data_dir .. "/styles/archmouse.css",
},
["pixlr.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["github.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["en.wikipedia.org"] = {
["enable-private-browsing"] = false,
},
["amazon.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["newegg.com"] = {
@@ -114,62 +114,62 @@ domain_props = {
["enable-private-browsing"] = false,
},
["ebay.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["shop.ebay.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["my.ebay.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["google.com"] = {
- ["enable-scripts"] = false,
+ ["noscript.enable_scripts"] = false,
["enable-private-browsing"] = true,
},
["syfy.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["video.syfy.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["photobucket.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["s60.photobucket.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["imgur.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["youtube.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["dailymotion.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["yahoo.com"] = {
- ["enable-scripts"] = false,
+ ["noscript.enable_scripts"] = false,
["enable-private-browsing"] = true,
},
["imdb.com"] = {
- ["enable-scripts"] = false,
+ ["noscript.enable_scripts"] = false,
},
["kickasstorrents.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
},
["last.fm"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["pandora.com"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
["nationstates.net"] = {
- ["enable-plugins"] = true,
+ ["noscript.enable_plugins"] = true,
["enable-private-browsing"] = false,
},
}
View
31 luakit/private-mode-rc.lua
@@ -5,6 +5,19 @@
-- start with: luakit -c $XDG_CONFIG_HOME/luakit/private-mode-rc.lua --
-----------------------------------------------------------------------
+-- Check for running instances (of the same version)
+unique.new("browser.luakit")
+if unique.is_running() then
+ if uris[1] then
+ for _, uri in ipairs(uris) do
+ unique.send_message("open " .. uri)
+ end
+ else
+ unique.send_message("winopen")
+ end
+ luakit.quit()
+end
+
-- Load library of useful functions for luakit
require "lousy"
@@ -83,6 +96,9 @@ require "go_input"
require "go_next_prev"
require "go_up"
+-- Add NoScript capability (updated)
+require "noscript"
+
-----------------------------
-- End user script loading --
-----------------------------
@@ -90,4 +106,19 @@ require "go_up"
-- no session handling.
window.new(uris)
+-------------------------------------------
+-- Open URIs from other luakit instances --
+-------------------------------------------
+
+unique.add_signal("message", function (msg, screen)
+ local cmd, arg = string.match(msg, "^(%S+)%s*(.*)")
+ local w = lousy.util.table.values(window.bywidget)[1]
+ if cmd == "open" then
+ w:new_tab(arg)
+ elseif cmd == "winopen" then
+ w = window.new((arg ~= "") and { arg } or {})
+ end
+ w.win:set_screen(screen)
+end)
+
-- vim: et:sw=4:ts=8:sts=4:tw=80
View
37 luakit/rc.lua
@@ -2,6 +2,19 @@
-- luakit configuration file, more information at http://luakit.org/ --
-----------------------------------------------------------------------
+-- Check for running instances (of the same version)
+unique.new("browser.luakit")
+if unique.is_running() then
+ if uris[1] then
+ for _, uri in ipairs(uris) do
+ unique.send_message("open " .. uri)
+ end
+ else
+ unique.send_message("winopen")
+ end
+ luakit.quit()
+end
+
-- Load library of useful functions for luakit
require "lousy"
@@ -75,9 +88,6 @@ download.default_dir = "/howl/down"
-- (depends on downloads)
require "follow"
--- Add command completion
-require "completion"
-
-- Add command history
require "cmdhist"
@@ -91,11 +101,17 @@ require "taborder"
require "history"
require "history_chrome"
+-- Add command completion
+require "completion"
+
require "follow_selected"
require "go_input"
require "go_next_prev"
require "go_up"
+-- Add NoScript capability (updated)
+require "noscript"
+
-----------------------------
-- End user script loading --
-----------------------------
@@ -111,4 +127,19 @@ else
window.new(uris)
end
+-------------------------------------------
+-- Open URIs from other luakit instances --
+-------------------------------------------
+
+unique.add_signal("message", function (msg, screen)
+ local cmd, arg = string.match(msg, "^(%S+)%s*(.*)")
+ local w = lousy.util.table.values(window.bywidget)[1]
+ if cmd == "open" then
+ w:new_tab(arg)
+ elseif cmd == "winopen" then
+ w = window.new((arg ~= "") and { arg } or {})
+ end
+ w.win:set_screen(screen)
+end)
+
-- vim: et:sw=4:ts=8:sts=4:tw=80
View
3  zsh/scripts/history-substring-search.zsh
@@ -52,6 +52,7 @@ HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i' # see "Globbing Flags" in zshexpn(1)
history-substring-search-begin() {
+ setopt nowarncreateglobal
# continue using the previous "$history_substring_search_result" by default,
# unless the current query was cleared or a new/different query was entered
if [[ -z $BUFFER || $BUFFER != $history_substring_search_result ]]; then
@@ -118,6 +119,7 @@ history-substring-search-end() {
}
history-substring-search-backward() {
+ setopt nowarncreateglobal
history-substring-search-begin
# check if the UP arrow was pressed to move cursor in multi-line buffer:
@@ -160,6 +162,7 @@ history-substring-search-backward() {
}
history-substring-search-forward() {
+ setopt nowarncreateglobal
history-substring-search-begin
# check if the DOWN arrow was pressed to move cursor in multi-line buffer:
Please sign in to comment.
Something went wrong with that request. Please try again.