improve regex detection for experimental mode
This commit is contained in:
parent
4bf522f5fc
commit
e85dcf3fb8
6
init.lua
6
init.lua
|
@ -87,7 +87,7 @@ local function new(args)
|
||||||
local c = client.focus
|
local c = client.focus
|
||||||
local pid = c and c.pid or -1
|
local pid = c and c.pid or -1
|
||||||
awful.spawn.easy_async("pstree -A -T " .. pid, function(out)
|
awful.spawn.easy_async("pstree -A -T " .. pid, function(out)
|
||||||
if string.find(out, "^[^%s].*%-tmux: client") then
|
if string.find(out, "[^.*\n]%-tmux: client") then
|
||||||
keygrabber.stop()
|
keygrabber.stop()
|
||||||
root.fake_input("key_release", mod_keysym)
|
root.fake_input("key_release", mod_keysym)
|
||||||
root.fake_input("key_press", "Control_L")
|
root.fake_input("key_press", "Control_L")
|
||||||
|
@ -118,8 +118,8 @@ local function new(args)
|
||||||
root.fake_input("key_press", mod_keysym)
|
root.fake_input("key_press", mod_keysym)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if string.find(out, "^[^%s].*%-n?vim$") or string.find(out, "^[^%s].*%-n?vim%-") or
|
if string.find(out, "[^.*\n]%-n?vim$") or string.find(out, "[^.*\n]%-n?vim%-") or
|
||||||
string.find(out, "^gvim") or string.find(out, "^gvim%-") then
|
string.find(out, "^gvim$") or string.find(out, "^gvim%-") then
|
||||||
keygrabber.stop()
|
keygrabber.stop()
|
||||||
root.fake_input("key_release", mod_keysym)
|
root.fake_input("key_release", mod_keysym)
|
||||||
root.fake_input("key_release", "Control_L")
|
root.fake_input("key_release", "Control_L")
|
||||||
|
|
Loading…
Reference in New Issue