From fd2d84b15eebc1da6540dfc33c66b203c67ec00d Mon Sep 17 00:00:00 2001 From: Matthew Ess Date: Fri, 17 Jan 2020 12:11:49 -0500 Subject: [PATCH] Vim and i3 changes --- home.nix | 13 +++++++++++-- i3.nix | 22 ++++++++++++---------- scripts/kbl.fish | 4 ++++ 3 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 scripts/kbl.fish diff --git a/home.nix b/home.nix index e72e5a6..24bfe26 100644 --- a/home.nix +++ b/home.nix @@ -30,13 +30,13 @@ in { jq tldr imagemagick - # command line applications - weechat # graphical applications alacritty atom enpass firefox + nheko + slack steam # graphical utilities clipmenu @@ -69,6 +69,7 @@ in { ''; ".config/fish/completions/systemctl.fish".source = ./scripts/systemctl.fish; + ".config/fish/functions/kbl.fish".source = ./scripts/kbl.fish; ".config/i3status/config".text = '' # i3status configuration file. # see "man i3status" for documentation. @@ -205,6 +206,8 @@ in { vim-colorschemes vim-nix lightline-vim + haskell-vim + LanguageClient-neovim ]; extraConfig = '' set cursorline "highlight current line @@ -235,6 +238,12 @@ in { autocmd vimenter * wincmd p "close if only nerdtree is left autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + + "language server stuff + let g:LanguageClient_rootMarkers = ['*.cabal', 'stack.yaml'] + let g:LanguageClient_serverCommands = { + \ 'haskell': ['ghcide', '--lsp'], + \ } ''; }; rofi = { diff --git a/i3.nix b/i3.nix index 4603bc5..784d85c 100644 --- a/i3.nix +++ b/i3.nix @@ -1,12 +1,6 @@ { lib, lockCmd, ... }: { enable = true; config = rec { - assigns = { - "1: web" = [{ class = "Firefox"; }]; - "2: devel" = [ { class = "Alacritty"; } { class = "Atom"; } ]; - "3: admin" = [{ class = "Enpass"; }]; - "4: other" = [{ class = ".*"; }]; - }; fonts = [ "Fira Code" "FontAwesome 12" ]; colors = { background = "#fff5e0"; @@ -97,16 +91,24 @@ "${modifier}+d" = "exec --no-startup-id rofi -show run"; "XF86AudioRaiseVolume" = "exec --no-startup-id amixer sset Master 5%+"; "XF86AudioLowerVolume" = "exec --no-startup-id amixer sset Master 5%-"; - "XF86MonBrightnessUp" = "exec light -A 20"; - "XF86MonBrightnessDown" = "exec light -U 20"; + "XF86MonBrightnessUp" = "exec --no-startup-id light -A 10"; + "XF86MonBrightnessDown" = "exec --no-startup-id light -U 10"; }; workspaceLayout = "tabbed"; + assigns = { + "1: web" = [{ class = "Firefox"; }]; + "2: devel" = [ { class = "Alacritty"; } { class = "Atom"; } ]; + "3: social" = [ { class = "(N|n)heko"; } { class = "Slack"; } ]; + "4: admin" = [{ class = "Enpass"; }]; + "5: other" = [{ class = ".*"; }]; + }; }; extraConfig = '' exec --no-startup-id firefox - exec --no-startup-id atom exec --no-startup-id alacritty - for_window [class="Firefox"] focus exec --no-startup-id Enpass + exec --no-startup-id slack + exec --no-startup-id nheko + for_window [class="Firefox"] focus ''; } diff --git a/scripts/kbl.fish b/scripts/kbl.fish new file mode 100644 index 0000000..aa968bb --- /dev/null +++ b/scripts/kbl.fish @@ -0,0 +1,4 @@ +function kbl -a level + test -z "$level"; and set -l level (cat /sys/class/leds/tpacpi\:\:kbd_backlight/brightness) + echo $level > /sys/class/leds/tpacpi\:\:kbd_backlight/brightness +end