-
Notifications
You must be signed in to change notification settings - Fork 28
/
ginit.vim
69 lines (57 loc) · 1.6 KB
/
ginit.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
lua << EOF
-- NOTE: GUI Options
-------------
-- Nvim-qt --
-------------
if vim.g.GuiLoaded then
local font_name = "JetBrainsMono Nerd Font"
local font_size = 11
local not_transparent = false
local function toggle_transparency()
not_transparent = not not_transparent
if not_transparent then
vim.cmd("GuiWindowOpacity " .. (0.9))
else
vim.cmd("GuiWindowOpacity " .. (1.0))
end
end
vim.keymap.set("n", "<F10>", toggle_transparency, { silent = true })
local function toggle_fullscreen()
if vim.g.GuiWindowFullScreen == 0 then
vim.cmd("call GuiWindowFullScreen(" .. 1 .. ")")
else
vim.cmd("call GuiWindowFullScreen(" .. 0 .. ")")
end
end
vim.keymap.set("n", "<F11>", toggle_fullscreen, { silent = true })
vim.cmd [[
GuiTabline 0
GuiPopupmenu 0
]]
vim.cmd("GuiFont! " .. font_name .. ":h" .. font_size)
end
-------------
-- Neovide --
-------------
if vim.g.neovide then
vim.opt.guifont = "JetBrainsMono Nerd Font:h11"
vim.g.remember_window_size = true
vim.g.remember_window_position = true
local function toggle_transparency()
if vim.g.neovide_transparency == 1.0 then
vim.cmd "let g:neovide_transparency=0.8"
else
vim.cmd "let g:neovide_transparency=1.0"
end
end
local function toggle_fullscreen()
if vim.g.neovide_fullscreen == false then
vim.cmd "let g:neovide_fullscreen=v:true"
else
vim.cmd "let g:neovide_fullscreen=v:false"
end
end
vim.keymap.set("n", "<F11>", toggle_fullscreen, { silent = true })
vim.keymap.set("n", "<F10>", toggle_transparency, { silent = true })
end
EOF