From 1f9db07f43fd0ec4e945782ad916931f7f7387cf Mon Sep 17 00:00:00 2001 From: Steffen Rademacker Date: Tue, 15 Jun 2021 13:21:42 +0200 Subject: [PATCH] Full screen --- hammerspoon/init.lua | 14 +++++++++++++- nvim/init.vim | 5 ++++- nvim/plugins.vim | 5 +++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/hammerspoon/init.lua b/hammerspoon/init.lua index 94a97e5..1f4d300 100644 --- a/hammerspoon/init.lua +++ b/hammerspoon/init.lua @@ -65,6 +65,18 @@ local function moveMouse() hs.mouse.absolutePosition(pt) end +local function fullSize() + local w = win.focusedWindow() + local f = w:frame() + local max = w:screen():frame() + + f.x = max.x + f.y = max.y + f.w = max.w + f.h = max.h + w:setFrame(f) +end + -- Window management -------------------- @@ -83,7 +95,7 @@ hotkey.bind(hyper, 'n', function() layout.apply(layoutSingle) end) hotkey.bind(hyper, 'p', function() layout.apply(layoutDouble) end) -- Moving window around / navigating windows -hotkey.bind(hyper, 'z', function() win.focusedWindow():toggleFullScreen(); moveMouse() end) +hotkey.bind(hyper, 'z', function() fullSize(); moveMouse() end) hotkey.bind(hyper, '[', function() win.focusedWindow():moveOneScreenNorth(); moveMouse() end) hotkey.bind(hyper, ']', function() win.focusedWindow():moveOneScreenSouth(); moveMouse() end) hotkey.bind(hyper, 'h', function() win.focusedWindow():focusWindowWest(); moveMouse() end) diff --git a/nvim/init.vim b/nvim/init.vim index a674bbd..0399627 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -7,7 +7,6 @@ Plug 'rktjmp/lush.nvim' Plug 'npxbr/gruvbox.nvim' " Plugins -Plug 'akinsho/nvim-bufferline.lua' Plug 'christoomey/vim-tmux-navigator' Plug 'easymotion/vim-easymotion' Plug 'editorconfig/editorconfig-vim' @@ -27,6 +26,10 @@ Plug 'wellle/targets.vim' Plug 'wellle/tmux-complete.vim' Plug 'wincent/terminus' +" Stuff to try out... +Plug 'akinsho/nvim-bufferline.lua' +Plug 'folke/which-key.nvim' + call plug#end() " load the default config and mappings diff --git a/nvim/plugins.vim b/nvim/plugins.vim index 52ba00b..41e90eb 100644 --- a/nvim/plugins.vim +++ b/nvim/plugins.vim @@ -23,6 +23,11 @@ require('bufferline').setup { } EOF +" which key +lua << EOF +require('which-key').setup {} +EOF + nnoremap , :BufferLinePick nnoremap ] :BufferLineCycleNext nnoremap [ :BufferLineCyclePrev