Fix multiple deprecation warnings
This commit is contained in:
parent
8a5b519da4
commit
b307970373
11
init.lua
11
init.lua
|
@ -10,16 +10,7 @@ local capi,sn_callback = {client = client, tag = tag, awesome = awesome,
|
||||||
|
|
||||||
-------------------------------INIT------------------------------
|
-------------------------------INIT------------------------------
|
||||||
|
|
||||||
local signals,module,c_rules,tags_hash,settings,fallbacks,prop = {
|
local module,c_rules,tags_hash,settings,fallbacks,prop = {},{class={},instance={}},{},{tag={},client={}},{},awful.tag.getproperty
|
||||||
"exclusive" , "init" , "volatile" , "focus_new" , "instances" ,
|
|
||||||
"locked" , "class" , "instance" , "spawn" , "position" ,
|
|
||||||
"max_clients" , "exec_once" , "clone_on" , "onetimer" , "no_focus_stealing" ,
|
|
||||||
"force_screen", "fallback" , "no_focus_stealing_out" , "no_focus_stealing_in",
|
|
||||||
},{},{class={},instance={}},{},{tag={},client={}},{},awful.tag.getproperty
|
|
||||||
|
|
||||||
for _,sig in ipairs(signals) do
|
|
||||||
capi.tag.add_signal("property::"..sig)
|
|
||||||
end
|
|
||||||
|
|
||||||
----------------------TYRANNICAL LOGIC--------------------------
|
----------------------TYRANNICAL LOGIC--------------------------
|
||||||
|
|
||||||
|
|
29
shortcut.lua
29
shortcut.lua
|
@ -2,6 +2,7 @@ local capi = {root=root,client=client,tag=tag,mouse=mouse}
|
||||||
local ipairs = ipairs
|
local ipairs = ipairs
|
||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local aw_util = require( "awful.util" )
|
local aw_util = require( "awful.util" )
|
||||||
|
local aw_spawn = require( "awful.spawn" )
|
||||||
local aw_tag = require( "awful.tag" )
|
local aw_tag = require( "awful.tag" )
|
||||||
local aw_client = require( "awful.client" )
|
local aw_client = require( "awful.client" )
|
||||||
local aw_layout = require( "awful.layout" )
|
local aw_layout = require( "awful.layout" )
|
||||||
|
@ -9,26 +10,35 @@ local aw_key = require( "awful.key" )
|
||||||
local aw_prompt = require( "awful.prompt" )
|
local aw_prompt = require( "awful.prompt" )
|
||||||
local glib = require( "lgi" ).GLib
|
local glib = require( "lgi" ).GLib
|
||||||
|
|
||||||
|
local function get_current_screen()
|
||||||
|
if capi.client.focus and capi.client.focus.screen == capi.mouse.screen then
|
||||||
|
return capi.mouse.screen
|
||||||
|
elseif (not aw_tag.selected(capi.mouse.screen)) or (#aw_tag.selected(capi.mouse.screen):clients() == 0) or (not capi.client.focus) then
|
||||||
|
return capi.mouse.screen
|
||||||
|
end
|
||||||
|
return capi.client.focus.screen
|
||||||
|
end
|
||||||
|
|
||||||
-- Delete a tag as of 3.5.5, this have a few issue. Patches are on their way
|
-- Delete a tag as of 3.5.5, this have a few issue. Patches are on their way
|
||||||
local function delete_tag()
|
local function delete_tag()
|
||||||
aw_tag.delete(capi.client.focus and aw_tag.selected(capi.client.focus.screen) or aw_tag.selected(capi.mouse.screen) )
|
aw_tag.delete(aw_tag.selected(get_current_screen()) )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Create a new tag at the end of the list
|
-- Create a new tag at the end of the list
|
||||||
local function new_tag()
|
local function new_tag()
|
||||||
aw_tag.viewonly(aw_tag.add("NewTag",{screen= (capi.client.focus and capi.client.focus.screen or capi.mouse.screen) }))
|
aw_tag.viewonly(aw_tag.add("NewTag",{screen= get_current_screen() }))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function new_tag_with_focussed()
|
local function new_tag_with_focussed()
|
||||||
local c = capi.client.focus
|
local c = capi.client.focus
|
||||||
local t = aw_tag.add(c.class,{screen= (capi.client.focus and capi.client.focus.screen or capi.mouse.screen),layout=aw_layout.suit.tile })
|
local t = aw_tag.add(c.class,{screen= get_current_screen(),layout=aw_layout.suit.tile, volatile=true })
|
||||||
if c then c:tags(aw_util.table.join(c:tags(), {t})) end
|
if c then c:tags(aw_util.table.join(c:tags(), {t})) end
|
||||||
aw_tag.viewonly(t)
|
aw_tag.viewonly(t)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function move_to_new_tag()
|
local function move_to_new_tag()
|
||||||
local c = capi.client.focus
|
local c = capi.client.focus
|
||||||
local t = aw_tag.add(c.class,{screen= (capi.client.focus and capi.client.focus.screen or capi.mouse.screen) })
|
local t = aw_tag.add(c.class,{screen= get_current_screen() })
|
||||||
if c then
|
if c then
|
||||||
c:tags({t})
|
c:tags({t})
|
||||||
aw_tag.viewonly(t)
|
aw_tag.viewonly(t)
|
||||||
|
@ -60,15 +70,15 @@ local function rename_tag()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function term_in_current_tag()
|
local function term_in_current_tag()
|
||||||
aw_util.spawn(terminal,{intrusive=true,slave=true})
|
aw_spawn(terminal,{intrusive=true,slave=true})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function new_tag_with_term()
|
local function new_tag_with_term()
|
||||||
aw_util.spawn(terminal,{new_tag={volatile = true}})
|
aw_spawn(terminal,{new_tag={volatile = true}})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fork_tag()
|
local function fork_tag()
|
||||||
local s = capi.client.focus and capi.client.focus.screen or capi.mouse.screen
|
local s = get_current_screen()
|
||||||
local t = aw_tag.selected(s)
|
local t = aw_tag.selected(s)
|
||||||
if not t then return end
|
if not t then return end
|
||||||
local clients = t:clients()
|
local clients = t:clients()
|
||||||
|
@ -80,11 +90,12 @@ end
|
||||||
local function aero_tag()
|
local function aero_tag()
|
||||||
local c = capi.client.focus
|
local c = capi.client.focus
|
||||||
if not c then return end
|
if not c then return end
|
||||||
local c2 = aw_client.data.focus[2]
|
local c2 = aw_client.focus.history.list[2]
|
||||||
if (not c2) or c2 == c then return end
|
if (not c2) or c2 == c then return end
|
||||||
local t = aw_tag.add("Aero",{screen= c.screen ,layout=aw_layout.suit.tile,mwfact=0.5})
|
local t = aw_tag.add("Aero",{screen= c.screen ,layout=aw_layout.suit.tile,mwfact=0.5})
|
||||||
t:clients({c,c2})
|
t:clients({c,c2})
|
||||||
aw_tag.viewonly(t)
|
|
||||||
|
t:view_only()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_keys()
|
local function register_keys()
|
||||||
|
|
Loading…
Reference in New Issue