From cd50ec2c042bc3af2d00a8880daf302f6fd0c202 Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Thu, 9 Sep 2021 12:14:09 -0300 Subject: [PATCH] add runelite, few vim improvements --- flake.lock | 12 +++++------ hosts/thanatos/default.nix | 2 +- users/misterio/home/nvim.nix | 22 +++++++++---------- users/misterio/home/runescape.nix | 35 +++++++++++++++++++++++-------- users/misterio/home/sway.nix | 2 +- 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index f3a32c34..f3c65ff9 100644 --- a/flake.lock +++ b/flake.lock @@ -64,11 +64,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1630761588, - "narHash": "sha256-7GXckvZy7DGh2KIyfdArqwnyeSc5Owy1fumEDQyd8eY=", + "lastModified": 1631118067, + "narHash": "sha256-tEcFvm3a6ToeBGwHdjfB2mVQwa4LZCZTQYE2LnY3ycA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a51aa6523bd8ee985bc70987909eff235900197a", + "rev": "09cd65b33c5653d7d2954fef4b9f0e718c899743", "type": "github" }, "original": { @@ -80,11 +80,11 @@ }, "nur": { "locked": { - "lastModified": 1630853563, - "narHash": "sha256-kQicueXPV7PWBxeDkbQdmk0/DdMEVKGIddJso5s0a/A=", + "lastModified": 1631135611, + "narHash": "sha256-CMetFtVGXtdRbP7lzunQwluhbnUV3AhRTanVKqnSW/k=", "owner": "nix-community", "repo": "NUR", - "rev": "0075f252145578476566c2d59b994351d3361e8c", + "rev": "ddbecd29bb10308acd48ca3d41d73ae9e0dc80fd", "type": "github" }, "original": { diff --git a/hosts/thanatos/default.nix b/hosts/thanatos/default.nix index d066e80f..a0919270 100644 --- a/hosts/thanatos/default.nix +++ b/hosts/thanatos/default.nix @@ -131,7 +131,7 @@ remotePlay.openFirewall = true; }; dconf.enable = true; - droidcam.enable = true; + # droidcam.enable = true; kdeconnect.enable = true; }; diff --git a/users/misterio/home/nvim.nix b/users/misterio/home/nvim.nix index e738a250..e37fc460 100644 --- a/users/misterio/home/nvim.nix +++ b/users/misterio/home/nvim.nix @@ -61,10 +61,15 @@ in { config = '' let g:ale_completion_enabled = 1 let g:ale_linters = {"c": ["clang"], "rust": ["analyzer", "cargo"]} - let g:ale_fixers = {"rust": ["rustfmt"], "sql": ["pgformatter"], "nix": ["nixfmt"]} + let g:ale_fixers = {"rust": ["rustfmt"], "sql": ["pgformatter"], "nix": ["nixfmt"], "json": ["jq"]} let g:ale_rust_analyzer_config = {'checkOnSave': {'command': 'clippy', 'enable': v:true}} ''; } + auto-pairs + editorconfig-vim + nerdtree + vim-numbertoggle + # Language specific (syntax highlighting, etc) { plugin = rust-vim; config = "let g:rust_fold = 1"; @@ -77,11 +82,8 @@ in { let g:vimtex_compiler_latexmk = {'build_dir': 'build' } ''; } - auto-pairs dart-vim-plugin - editorconfig-vim mermaid - open-browser plantuml-syntax vim-markdown vim-nix @@ -90,6 +92,8 @@ in { vim-toml ]; extraConfig = '' + "Toggle nerdtree + nnoremap :NERDTreeToggle "Reload automatically set autoread au CursorHold,CursorHoldI * checktime @@ -121,16 +125,12 @@ in { "Conceal set conceallevel=2 - "Line numbers - augroup numbertoggle - autocmd! - autocmd BufEnter,FocusGained,InsertLeave * set relativenumber - autocmd BufLeave,FocusLost,InsertEnter * set number norelativenumber - augroup END - "Fix nvim size according to terminal "(https://github.com/neovim/neovim/issues/11330) autocmd VimEnter * silent exec "!kill -s SIGWINCH" getpid() + + "Line numbers + set number relativenumber ''; }; } diff --git a/users/misterio/home/runescape.nix b/users/misterio/home/runescape.nix index 1e811347..db55d46b 100644 --- a/users/misterio/home/runescape.nix +++ b/users/misterio/home/runescape.nix @@ -1,21 +1,38 @@ { pkgs, ... }: { - home.packages = with pkgs.nur.repos.kira-bruneau; [ runescape-launcher ]; + home.packages = with pkgs; [ + runelite + nur.repos.kira-bruneau.runescape-launcher + ]; home.persistence."/data/games/misterio".directories = [ "Jagex" ]; + # Override .desktop for changing OSRS cache dir + # TODO: better way other than retyping the entire file? + xdg.desktopEntries = { + RuneLite = { + categories = [ "Game" ]; + comment = "Open source Old School RuneScape client"; + exec = "env _JAVA_OPTIONS=-Duser.home=/home/misterio/Jagex/ gamemoderun runelite"; + genericName = "Oldschool RuneScape"; + icon = "runescape"; + name = "RuneLite"; + terminal = false; + type = "Application"; + }; + }; + # Override .desktop for adding gamemoderun # TODO: better way other than retyping the entire file? xdg.desktopEntries = { runescape-launcher = { - type = "Application"; - name = "RuneScape"; - genericName = "RuneScape"; - comment = "RuneScape - A Free MMORPG from Jagex Ltd."; - icon = "runescape"; - terminal = false; - exec = "gamemoderun runescape-launcher %u"; categories = [ "Game" ]; - mimeType = [ "xscheme-handler/rs-launch" "x-scheme-handler/rs-launchs" ]; + comment = "RuneScape - A Free MMORPG from Jagex Ltd."; + exec = "gamemoderun runescape-launcher %u"; + genericName = "RuneScape"; + icon = "runescape"; + name = "RuneScape"; + terminal = false; + type = "Application"; }; }; } diff --git a/users/misterio/home/sway.nix b/users/misterio/home/sway.nix index 794aa045..a3d4b290 100644 --- a/users/misterio/home/sway.nix +++ b/users/misterio/home/sway.nix @@ -71,7 +71,7 @@ in { } ]; floating.criteria = - [ { app_id = "zenity"; } { app_id = "AlacrittyFloating*"; } ]; + [ { app_id = "zenity"; } { app_id = "AlacrittyFloating*"; } { class = "net-runelite-launcher-Launcher"; } ]; colors = { focused = { border = "${colorscheme.base0C}";