Vim and i3 changes

work
Matthew Ess 2020-01-17 12:11:49 -05:00
parent 3d33d5fba8
commit fd2d84b15e
3 changed files with 27 additions and 12 deletions

View File

@ -30,13 +30,13 @@ in {
jq jq
tldr tldr
imagemagick imagemagick
# command line applications
weechat
# graphical applications # graphical applications
alacritty alacritty
atom atom
enpass enpass
firefox firefox
nheko
slack
steam steam
# graphical utilities # graphical utilities
clipmenu clipmenu
@ -69,6 +69,7 @@ in {
''; '';
".config/fish/completions/systemctl.fish".source = ".config/fish/completions/systemctl.fish".source =
./scripts/systemctl.fish; ./scripts/systemctl.fish;
".config/fish/functions/kbl.fish".source = ./scripts/kbl.fish;
".config/i3status/config".text = '' ".config/i3status/config".text = ''
# i3status configuration file. # i3status configuration file.
# see "man i3status" for documentation. # see "man i3status" for documentation.
@ -205,6 +206,8 @@ in {
vim-colorschemes vim-colorschemes
vim-nix vim-nix
lightline-vim lightline-vim
haskell-vim
LanguageClient-neovim
]; ];
extraConfig = '' extraConfig = ''
set cursorline "highlight current line set cursorline "highlight current line
@ -235,6 +238,12 @@ in {
autocmd vimenter * wincmd p autocmd vimenter * wincmd p
"close if only nerdtree is left "close if only nerdtree is left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 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 = { rofi = {

22
i3.nix
View File

@ -1,12 +1,6 @@
{ lib, lockCmd, ... }: { { lib, lockCmd, ... }: {
enable = true; enable = true;
config = rec { 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" ]; fonts = [ "Fira Code" "FontAwesome 12" ];
colors = { colors = {
background = "#fff5e0"; background = "#fff5e0";
@ -97,16 +91,24 @@
"${modifier}+d" = "exec --no-startup-id rofi -show run"; "${modifier}+d" = "exec --no-startup-id rofi -show run";
"XF86AudioRaiseVolume" = "exec --no-startup-id amixer sset Master 5%+"; "XF86AudioRaiseVolume" = "exec --no-startup-id amixer sset Master 5%+";
"XF86AudioLowerVolume" = "exec --no-startup-id amixer sset Master 5%-"; "XF86AudioLowerVolume" = "exec --no-startup-id amixer sset Master 5%-";
"XF86MonBrightnessUp" = "exec light -A 20"; "XF86MonBrightnessUp" = "exec --no-startup-id light -A 10";
"XF86MonBrightnessDown" = "exec light -U 20"; "XF86MonBrightnessDown" = "exec --no-startup-id light -U 10";
}; };
workspaceLayout = "tabbed"; 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 = '' extraConfig = ''
exec --no-startup-id firefox exec --no-startup-id firefox
exec --no-startup-id atom
exec --no-startup-id alacritty exec --no-startup-id alacritty
for_window [class="Firefox"] focus
exec --no-startup-id Enpass exec --no-startup-id Enpass
exec --no-startup-id slack
exec --no-startup-id nheko
for_window [class="Firefox"] focus
''; '';
} }

4
scripts/kbl.fish Normal file
View File

@ -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