mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-26 21:58:10 +01:00
Merge pull request #30 from Ottatop/dev
Fix config crash when doing window stuff with no windows
This commit is contained in:
commit
eb962323ee
1 changed files with 11 additions and 10 deletions
|
@ -163,35 +163,36 @@ require("pinnacle").setup(function(pinnacle)
|
|||
tag.toggle("5")
|
||||
end)
|
||||
|
||||
-- I check for nil this way because I don't want stylua to take up like 80 lines on `if win ~= nil`
|
||||
input.keybind({ mod_key, "Alt" }, keys.KEY_1, function()
|
||||
window.get_focused():move_to_tag("1")
|
||||
local _ = window.get_focused() and window:get_focused():move_to_tag("1")
|
||||
end)
|
||||
input.keybind({ mod_key, "Alt" }, keys.KEY_2, function()
|
||||
window.get_focused():move_to_tag("2")
|
||||
local _ = window.get_focused() and window:get_focused():move_to_tag("2")
|
||||
end)
|
||||
input.keybind({ mod_key, "Alt" }, keys.KEY_3, function()
|
||||
window.get_focused():move_to_tag("3")
|
||||
local _ = window.get_focused() and window:get_focused():move_to_tag("3")
|
||||
end)
|
||||
input.keybind({ mod_key, "Alt" }, keys.KEY_4, function()
|
||||
window.get_focused():move_to_tag("4")
|
||||
local _ = window.get_focused() and window:get_focused():move_to_tag("4")
|
||||
end)
|
||||
input.keybind({ mod_key, "Alt" }, keys.KEY_5, function()
|
||||
window.get_focused():move_to_tag("5")
|
||||
local _ = window.get_focused() and window:get_focused():move_to_tag("5")
|
||||
end)
|
||||
|
||||
input.keybind({ mod_key, "Shift", "Alt" }, keys.KEY_1, function()
|
||||
window.get_focused():toggle_tag("1")
|
||||
local _ = window.get_focused() and window.get_focused():toggle_tag("1")
|
||||
end)
|
||||
input.keybind({ mod_key, "Shift", "Alt" }, keys.KEY_2, function()
|
||||
window.get_focused():toggle_tag("2")
|
||||
local _ = window.get_focused() and window.get_focused():toggle_tag("2")
|
||||
end)
|
||||
input.keybind({ mod_key, "Shift", "Alt" }, keys.KEY_3, function()
|
||||
window.get_focused():toggle_tag("3")
|
||||
local _ = window.get_focused() and window.get_focused():toggle_tag("3")
|
||||
end)
|
||||
input.keybind({ mod_key, "Shift", "Alt" }, keys.KEY_4, function()
|
||||
window.get_focused():toggle_tag("4")
|
||||
local _ = window.get_focused() and window.get_focused():toggle_tag("4")
|
||||
end)
|
||||
input.keybind({ mod_key, "Shift", "Alt" }, keys.KEY_5, function()
|
||||
window.get_focused():toggle_tag("5")
|
||||
local _ = window.get_focused() and window.get_focused():toggle_tag("5")
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue