From 4a4721dbcc0e57ec8dfd490e9cc9bfc6357e4b72 Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Thu, 16 Dec 2021 09:32:48 -0500 Subject: [PATCH] add i3lock wrapper script for DPMS, fix config -> setup for lsp-null usage in nvim, and add vim fugitive --- home/.config/i3/config | 2 +- .../nvim/lua/plugins/config/lspinstall.lua | 2 +- home/.config/nvim/lua/plugins/init.lua | 2 ++ home/bin/i3lock | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 home/bin/i3lock diff --git a/home/.config/i3/config b/home/.config/i3/config index f32127f..90503f2 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -11,7 +11,7 @@ exec --no-startup-id nm-applet exec --no-startup-id blueman-applet # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 000000 --nofork +exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/bin/i3lock # background exec --no-startup-id ~/.fehbg diff --git a/home/.config/nvim/lua/plugins/config/lspinstall.lua b/home/.config/nvim/lua/plugins/config/lspinstall.lua index f0a4588..d72fa19 100644 --- a/home/.config/nvim/lua/plugins/config/lspinstall.lua +++ b/home/.config/nvim/lua/plugins/config/lspinstall.lua @@ -59,7 +59,7 @@ local on_attach = function(client, bufnr) null_ls.builtins.formatting.stylua, } - null_ls.config({sources = sources }) + null_ls.setup({sources = sources }) end local lspServers = { diff --git a/home/.config/nvim/lua/plugins/init.lua b/home/.config/nvim/lua/plugins/init.lua index 4f1a32a..38a36ae 100644 --- a/home/.config/nvim/lua/plugins/init.lua +++ b/home/.config/nvim/lua/plugins/init.lua @@ -27,6 +27,8 @@ require "paq" { "echasnovski/mini.nvim"; -- bunch of good small plugins: whitespace, buffer layout, commenting, surround, etc + "tpope/vim-fugitive"; -- __the__ git plugin + {"nvim-treesitter/nvim-treesitter", run=TSUpdate}; -- nice and quick syntax tree "lukas-reineke/indent-blankline.nvim"; -- pretty visualization of line indents diff --git a/home/bin/i3lock b/home/bin/i3lock new file mode 100644 index 0000000..ace327f --- /dev/null +++ b/home/bin/i3lock @@ -0,0 +1,17 @@ +#!/bin/bash +set -euo pipefail + +revert() { + # disable DPMS + xset dpms 0 0 0 0 +} + +# revert DPMS on script exit +trap revert EXIT + +# turn off screen after 5 seconds +xset +dpms dpms 5 5 5 + +i3lock --nofork -c 000000 + +revert