fix(hyprland): pinch to zoom
This commit is contained in:
parent
24ec763546
commit
5e5ba5a5da
2 changed files with 23 additions and 2 deletions
|
|
@ -60,8 +60,8 @@ animations {
|
|||
}
|
||||
|
||||
gestures {
|
||||
gesture = 2, pinchin, cursorZoom, 1.75
|
||||
gesture = 2, pinchout, cursorZoom, -1.75
|
||||
gesture = 2, pinchin, cursorZoom, 1.5, mult
|
||||
gesture = 2, pinchout, cursorZoom, 0.667, mult
|
||||
gesture = 3, horizontal, workspace
|
||||
gesture = 3, down, dispatcher, exec, ctl wallpaper lock && hyprlock
|
||||
}
|
||||
|
|
|
|||
21
config/nvim/after/ftplugin/typst.lua
Normal file
21
config/nvim/after/ftplugin/typst.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
vim.keymap.set('n', '<leader>t', function()
|
||||
if vim.fn.executable('sioyek') ~= 1 then
|
||||
return vim.notify('sioyek not found', vim.log.levels.ERROR)
|
||||
end
|
||||
if vim.fn.executable('hyprctl') ~= 1 then
|
||||
return vim.notify('hyprctl not found', vim.log.levels.ERROR)
|
||||
end
|
||||
local pdf = vim.fn.expand('%:p:r') .. '.pdf'
|
||||
local basename = vim.fn.fnamemodify(pdf, ':t')
|
||||
local ret = vim.system({ 'hyprctl', 'clients', '-j' }):wait()
|
||||
if ret.code == 0 then
|
||||
for _, c in ipairs(vim.json.decode(ret.stdout)) do
|
||||
if (c.class or ''):lower():find('sioyek')
|
||||
and (c.title or ''):find(basename, 1, true) then
|
||||
vim.system({ 'hyprctl', 'dispatch', 'closewindow', 'address:' .. c.address })
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.system({ 'sioyek', pdf })
|
||||
end, { buffer = true })
|
||||
Loading…
Add table
Add a link
Reference in a new issue