From f813ca6ada78047ddea7471cb9873f9198ea7e64 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Thu, 18 Jul 2024 23:37:55 +0200 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=90=9B=20Change=20settings=20to=20be?= =?UTF-8?q?=20loaded=20only=20once=20from=20disk=20(#165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the `get_or_init` function to `[Settings]` that will cache the result in memory once it reads the settings file from disk. --- client/src/component/entry.rs | 2 +- client/src/component/query_input.rs | 8 ++++---- client/src/main.rs | 8 ++++---- client/src/settings.rs | 6 ++++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/client/src/component/entry.rs b/client/src/component/entry.rs index 456e05f..6b8b0c4 100644 --- a/client/src/component/entry.rs +++ b/client/src/component/entry.rs @@ -41,7 +41,7 @@ impl iced::widget::container::StyleSheet for Style { type Style = iced::Theme; fn appearance(&self, _style: &Self::Style) -> iced::widget::container::Appearance { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); iced::widget::container::Appearance { background: None, diff --git a/client/src/component/query_input.rs b/client/src/component/query_input.rs index f8a1e6d..60f9ff7 100644 --- a/client/src/component/query_input.rs +++ b/client/src/component/query_input.rs @@ -49,22 +49,22 @@ impl iced::widget::text_input::StyleSheet for Style { } fn placeholder_color(&self, _style: &Self::Style) -> iced::Color { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); crate::settings::hexcolor(&color_settings.color.surface) } fn value_color(&self, _style: &Self::Style) -> iced::Color { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); crate::settings::hexcolor(&color_settings.color.text) } fn disabled_color(&self, _style: &Self::Style) -> iced::Color { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); crate::settings::hexcolor(&color_settings.color.surface) } fn selection_color(&self, _style: &Self::Style) -> iced::Color { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); crate::settings::hexcolor(&color_settings.color.surface) } } diff --git a/client/src/main.rs b/client/src/main.rs index b480263..1047234 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -529,7 +529,7 @@ impl iced::application::StyleSheet for SandboxStyle { type Style = iced::Theme; fn appearance(&self, _style: &Self::Style) -> iced::application::Appearance { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); iced::application::Appearance { background_color: iced::Color::TRANSPARENT, @@ -543,7 +543,7 @@ impl iced::widget::container::StyleSheet for ApplicationWrapperStyle { type Style = iced::Theme; fn appearance(&self, _style: &Self::Style) -> iced::widget::container::Appearance { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); iced::widget::container::Appearance { background: Some(iced::Background::Color(settings::hexcolor( &color_settings.color.background, @@ -561,7 +561,7 @@ impl iced::widget::scrollable::StyleSheet for ScrollableStyle { type Style = iced::Theme; fn active(&self, _style: &Self::Style) -> iced::widget::scrollable::Scrollbar { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); iced::widget::scrollable::Scrollbar { background: None, border_radius: iced::BorderRadius::from(0.), @@ -581,7 +581,7 @@ impl iced::widget::scrollable::StyleSheet for ScrollableStyle { _style: &Self::Style, _is_mouse_over_scrollbar: bool, ) -> iced::widget::scrollable::Scrollbar { - let color_settings = crate::settings::Settings::new(); + let color_settings = crate::settings::Settings::get_or_init(); iced::widget::scrollable::Scrollbar { background: None, border_radius: iced::BorderRadius::from(0.), diff --git a/client/src/settings.rs b/client/src/settings.rs index 4b27f1d..8dbe7d3 100644 --- a/client/src/settings.rs +++ b/client/src/settings.rs @@ -1,5 +1,6 @@ use hex_color::HexColor; use serde::Deserialize; +use std::sync::OnceLock; pub fn hexcolor(color: &str) -> iced::Color { let hex_col = HexColor::parse(color).unwrap_or_else(|_| { @@ -327,6 +328,11 @@ impl Settings { } config_result.unwrap() } + + pub fn get_or_init() -> &'static Self { + static SETTINGS: OnceLock = OnceLock::new(); + SETTINGS.get_or_init(Self::new) + } } impl std::convert::TryFrom for Settings { From 83a9860ef47cd7bc34c28081fa941745e9d24652 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Fri, 19 Jul 2024 09:26:44 +0200 Subject: [PATCH 2/7] update/flake (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **⬆️ Update `flake.lock`** - **🎨 Run treefmt with the updated inputs** --- .github/dependabot.yml | 5 +- .github/workflows/ci.yml | 34 ++++----- flake.lock | 36 ++++----- flake.nix | 161 ++++++++++++++++++++++++--------------- home-manager-module.nix | 64 +++++++++++----- 5 files changed, 182 insertions(+), 118 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cc3a13a..3f5fb0b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,13 +3,12 @@ updates: - package-ecosystem: "github-actions" directory: "/" commit-message: - prefix: ⬆️ + prefix: "⬆️ " schedule: interval: "monthly" - - package-ecosystem: "cargo" directory: "/" commit-message: - prefix: ⬆️ + prefix: "⬆️ " schedule: interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5277d7c..a5114f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,33 +1,31 @@ name: "ci" - on: workflow_dispatch: # allows manual triggering pull_request: - branches: [ main ] + branches: [main] paths-ignore: - '**.md' push: - branches: [ main ] + branches: [main] paths-ignore: - '**.md' merge_group: - jobs: flake-check: runs-on: ubuntu-latest environment: cachix steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Nix Flakes doesn't work on shallow clones - - uses: cachix/install-nix-action@V27 - with: - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - uses: cachix/cachix-action@v15 - with: - name: friedow - # If you chose API tokens for write access OR if you have a private cache - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - name: "flake check" - run: nix flake check -Lvv --no-update-lock-file + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Nix Flakes doesn't work on shallow clones + - uses: cachix/install-nix-action@V27 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: cachix/cachix-action@v15 + with: + name: friedow + # If you chose API tokens for write access OR if you have a private cache + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: "flake check" + run: nix flake check -Lvv --no-update-lock-file diff --git a/flake.lock b/flake.lock index 875bdf7..c00d73e 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1704819371, - "narHash": "sha256-oFUfPWrWGQTZaCM3byxwYwrMLwshDxVGOrMH5cVP/X8=", + "lastModified": 1721322122, + "narHash": "sha256-a0G1NvyXGzdwgu6e1HQpmK5R5yLsfxeBe07nNDyYd+g=", "owner": "ipetkov", "repo": "crane", - "rev": "5c234301a1277e4cc759c23a2a7a00a06ddd7111", + "rev": "8a68b987c476a33e90f203f0927614a75c3f47ea", "type": "github" }, "original": { @@ -25,11 +25,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1704809957, - "narHash": "sha256-Z8sBeoeeY2O+BNqh5C+4Z1h1F1wQ2mij7yPZ2GY397M=", + "lastModified": 1721135958, + "narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=", "owner": "nix-community", "repo": "home-manager", - "rev": "e13aa9e287b3365473e5897e3667ea80a899cdfb", + "rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "lastModified": 1719848872, + "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1704626572, - "narHash": "sha256-VwRTEKzK4wSSv64G+g3RLF3t6yBHrhR2VK3kZ5UWisU=", + "lastModified": 1721209527, + "narHash": "sha256-UvhjON7sx/ALhJJPMSoUSJ4pvMGvHqvjEOX/AA7AjjM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "24fe8bb4f552ad3926274d29e083b79d84707da6", + "rev": "5e73714b16ca222dcb2fc3ea2618fd7ba698da65", "type": "github" }, "original": { @@ -72,11 +72,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1719690277, + "narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e", "type": "github" }, "original": { @@ -99,11 +99,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1707300477, - "narHash": "sha256-qQF0fEkHlnxHcrKIMRzOETnRBksUK048MXkX0SOmxvA=", + "lastModified": 1721059077, + "narHash": "sha256-gCICMMX7VMSKKt99giDDtRLkHJ0cwSgBtDijJAqTlto=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ac599dab59a66304eb511af07b3883114f061b9d", + "rev": "0fb28f237f83295b4dd05e342f333b447c097398", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3c3cab3..f0e4447 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,7 @@ nixConfig = { extra-substituters = [ "https://friedow.cachix.org" ]; - extra-trusted-public-keys = - [ "friedow.cachix.org-1:JDEaYMqNgGu+bVPOca7Zu4Cp8QDMkvQpArKuwPKa29A=" ]; + extra-trusted-public-keys = [ "friedow.cachix.org-1:JDEaYMqNgGu+bVPOca7Zu4Cp8QDMkvQpArKuwPKa29A=" ]; }; inputs = { @@ -17,12 +16,24 @@ }; }; - outputs = { self, nixpkgs, crane, treefmt-nix, home-manager, ... }: + outputs = + { + self, + nixpkgs, + crane, + treefmt-nix, + home-manager, + ... + }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; - devInputs = with pkgs; [ rustc rustfmt cargo ]; + devInputs = with pkgs; [ + rustc + rustfmt + cargo + ]; nativeBuildInputs = with pkgs; [ makeWrapper @@ -42,24 +53,32 @@ craneLib = crane.lib.${system}; fontFilter = path: _type: builtins.match ".*ttf$" path != null; configFilter = path: _type: builtins.match ".*config.yml$" path != null; - assetOrCargo = path: type: - (configFilter path type) || (fontFilter path type) - || (craneLib.filterCargoSources path type); + assetOrCargo = + path: type: + (configFilter path type) || (fontFilter path type) || (craneLib.filterCargoSources path type); commonArgs = { src = pkgs.lib.cleanSourceWith { src = craneLib.path ./.; filter = assetOrCargo; }; - inherit pname version buildInputs nativeBuildInputs; + inherit + pname + version + buildInputs + nativeBuildInputs + ; }; cargoArtifacts = craneLib.buildDepsOnly commonArgs; - cargoClippy = craneLib.cargoClippy (commonArgs // { - inherit cargoArtifacts; - cargoClippyExtraArgs = "--all-targets --all-features"; - }); + cargoClippy = craneLib.cargoClippy ( + commonArgs + // { + inherit cargoArtifacts; + cargoClippyExtraArgs = "--all-targets --all-features"; + } + ); GIT_DATE = "${builtins.substring 0 4 self.lastModifiedDate}-${ - builtins.substring 4 2 self.lastModifiedDate - }-${builtins.substring 6 2 self.lastModifiedDate}"; + builtins.substring 4 2 self.lastModifiedDate + }-${builtins.substring 6 2 self.lastModifiedDate}"; GIT_REV = self.shortRev or "Not committed yet."; treefmt = (treefmt-nix.lib.evalModule pkgs ./formatter.nix).config.build; libPath = pkgs.lib.makeLibraryPath [ @@ -69,68 +88,86 @@ pkgs.libGL ]; - in { + in + { devShells.${system}.default = pkgs.mkShell { - inherit nativeBuildInputs buildInputs GIT_DATE GIT_REV; + inherit + nativeBuildInputs + buildInputs + GIT_DATE + GIT_REV + ; packages = devInputs ++ [ treefmt.wrapper ]; LD_LIBRARY_PATH = libPath; }; packages.${system} = { - default = craneLib.buildPackage (commonArgs // { - inherit cargoArtifacts nativeBuildInputs buildInputs pname GIT_REV - GIT_DATE; - postFixup = pkgs.lib.optional pkgs.stdenv.isLinux '' - rpath=$(patchelf --print-rpath $out/bin/${pname}) - patchelf --set-rpath "$rpath:${libPath}" $out/bin/${pname} - ''; + default = craneLib.buildPackage ( + commonArgs + // { + inherit + cargoArtifacts + nativeBuildInputs + buildInputs + pname + GIT_REV + GIT_DATE + ; + postFixup = pkgs.lib.optional pkgs.stdenv.isLinux '' + rpath=$(patchelf --print-rpath $out/bin/${pname}) + patchelf --set-rpath "$rpath:${libPath}" $out/bin/${pname} + ''; - meta = with pkgs.lib; { - description = "Your trusty omnibox search."; - homepage = "https://github.com/friedow/centerpiece"; - platforms = platforms.linux; - license = licenses.mit; - mainProgram = pname; - maintainers = [ "friedow" ]; - }; - }); - index-git-repositories = craneLib.buildPackage (commonArgs // rec { - inherit cargoArtifacts; - pname = "index-git-repositories"; - cargoExtraArgs = "-p ${pname}"; - meta.mainProgram = pname; - }); + meta = with pkgs.lib; { + description = "Your trusty omnibox search."; + homepage = "https://github.com/friedow/centerpiece"; + platforms = platforms.linux; + license = licenses.mit; + mainProgram = pname; + maintainers = [ "friedow" ]; + }; + } + ); + index-git-repositories = craneLib.buildPackage ( + commonArgs + // rec { + inherit cargoArtifacts; + pname = "index-git-repositories"; + cargoExtraArgs = "-p ${pname}"; + meta.mainProgram = pname; + } + ); }; checks.${system} = { - inherit (self.outputs.packages.${system}) - default index-git-repositories; + inherit (self.outputs.packages.${system}) default index-git-repositories; shell = self.outputs.devShells.${system}.default; treefmt = treefmt.check self; inherit cargoClippy; - hmModule = (nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - home-manager.nixosModules.home-manager - { - home-manager.users.alice = { - imports = [ self.outputs.hmModules."x86_64-linux".default ]; - programs.centerpiece = { - enable = true; - config.plugin.git_repositories.commands = [ [ "alacritty" ] ]; - services.index-git-repositories = { + hmModule = + (nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + home-manager.nixosModules.home-manager + { + home-manager.users.alice = { + imports = [ self.outputs.hmModules."x86_64-linux".default ]; + programs.centerpiece = { enable = true; - interval = "3hours"; + config.plugin.git_repositories.commands = [ [ "alacritty" ] ]; + services.index-git-repositories = { + enable = true; + interval = "3hours"; + }; }; + home.stateVersion = "23.11"; + }; + users.users.alice = { + isNormalUser = true; + uid = 1000; + home = "/home/alice"; }; - home.stateVersion = "23.11"; - }; - users.users.alice = { - isNormalUser = true; - uid = 1000; - home = "/home/alice"; - }; - } - ]; - }).config.system.build.vm; + } + ]; + }).config.system.build.vm; }; hmModules.${system}.default = import ./home-manager-module.nix { centerpiece = self.outputs.packages.${system}.default; diff --git a/home-manager-module.nix b/home-manager-module.nix index cd9bfbd..12c4d36 100644 --- a/home-manager-module.nix +++ b/home-manager-module.nix @@ -1,9 +1,15 @@ { index-git-repositories, centerpiece }: -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let cfg = config.programs.centerpiece; git-index-name = "index-git-repositories"; -in { +in +{ options.programs.centerpiece = { enable = lib.mkEnableOption (lib.mdDoc "Centerpiece"); @@ -77,8 +83,17 @@ in { }; commands = lib.mkOption { default = [ - [ "alacritty" "--command" "nvim" "$GIT_DIRECTORY" ] - [ "alacritty" "--working-directory" "$GIT_DIRECTORY" ] + [ + "alacritty" + "--command" + "nvim" + "$GIT_DIRECTORY" + ] + [ + "alacritty" + "--working-directory" + "$GIT_DIRECTORY" + ] ]; type = lib.types.listOf (lib.types.listOf lib.types.str); description = lib.mdDoc '' @@ -87,9 +102,23 @@ in { Use the $GIT_DIRECTORY_NAME variable to pass in the selected directory name. ''; example = [ - [ "code" "--new-window" "$GIT_DIRECTORY" ] - [ "alacritty" "--command" "lazygit" "--path" "$GIT_DIRECTORY" ] - [ "alacritty" "--working-directory" "$GIT_DIRECTORY" ] + [ + "code" + "--new-window" + "$GIT_DIRECTORY" + ] + [ + "alacritty" + "--command" + "lazygit" + "--path" + "$GIT_DIRECTORY" + ] + [ + "alacritty" + "--working-directory" + "$GIT_DIRECTORY" + ] ]; }; }; @@ -163,8 +192,7 @@ in { enable = lib.mkOption { default = true; type = lib.types.bool; - description = - lib.mdDoc "Enable / disable the git repositories indexer service."; + description = lib.mdDoc "Enable / disable the git repositories indexer service."; }; interval = lib.mkOption { default = "5min"; @@ -184,8 +212,7 @@ in { (lib.mkIf cfg.enable { home.packages = [ centerpiece ]; }) (lib.mkIf cfg.enable { - home.file.".config/centerpiece/config.yml".text = - lib.generators.toYAML { } cfg.config; + home.file.".config/centerpiece/config.yml".text = lib.generators.toYAML { } cfg.config; }) (lib.mkIf cfg.services.index-git-repositories.enable { @@ -198,18 +225,21 @@ in { }; Service = { - ExecStart = "${pkgs.writeShellScript - "${git-index-name}-service-ExecStart" '' - exec ${lib.getExe index-git-repositories} - ''}"; + ExecStart = "${pkgs.writeShellScript "${git-index-name}-service-ExecStart" '' + exec ${lib.getExe index-git-repositories} + ''}"; Type = "oneshot"; }; }; }; timers = { index-git-repositories-timer = { - Unit = { Description = "Activate the git repository indexer"; }; - Install = { WantedBy = [ "timers.target" ]; }; + Unit = { + Description = "Activate the git repository indexer"; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; Timer = { OnUnitActiveSec = cfg.services.index-git-repositories.interval; OnBootSec = "0min"; From faf3fa557a9144c1ca720d3118947a7acf485a1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:07:57 +0200 Subject: [PATCH 3/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20serde=20from=20?= =?UTF-8?q?1.0.203=20to=201.0.204=20(#168)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to 1.0.204.
Release notes

Sourced from serde's releases.

v1.0.204

  • Apply #[diagnostic::on_unimplemented] attribute on Rust 1.78+ to suggest adding serde derive or enabling a "serde" feature flag in dependencies (#2767, thanks @​weiznich)
Commits
  • 18dcae0 Release 1.0.204
  • 58c307f Alphabetize list of rustc-check-cfg
  • 8cc4809 Merge pull request #2769 from dtolnay/onunimpl
  • 1179158 Update ui test with diagnostic::on_unimplemented from PR 2767
  • 91aa40e Add ui test of unsatisfied serde trait bound
  • 595019e Cut test_suite from workspace members in old toolchain CI jobs
  • b0d7917 Pull in trybuild 'following types implement trait' fix
  • 8e6637a Merge pull request #2767 from weiznich/feature/diagnostic_on_unimplemented
  • 694fe05 Use the #[diagnostic::on_unimplemented] attribute when possible
  • f3dfd2a Suppress dead code warning in test of unit struct remote derive
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.203&new-version=1.0.204)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- client/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4dacec7..536cf9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2921,18 +2921,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", diff --git a/client/Cargo.toml b/client/Cargo.toml index ede1179..74b40ca 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -18,7 +18,7 @@ simple_logger = { version = "5.0.0", features = [ "timestamps", "stderr", ] } -serde = { version = "1.0.203", features = ["derive"] } +serde = { version = "1.0.204", features = ["derive"] } # settings serde_yaml = "0.9.34" From eddf0b2cda6c06c9feb34788891215e00681e8ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:20:54 +0200 Subject: [PATCH 4/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20serde=5Fjson=20?= =?UTF-8?q?from=201.0.119=20to=201.0.120=20(#167)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.119 to 1.0.120.
Release notes

Sourced from serde_json's releases.

v1.0.120

  • Correctly specify required version of indexmap dependency (#1152, thanks @​cforycki)
Commits
  • bcedc3d Release 1.0.120
  • 962c0fb Merge pull request #1152 from cforycki/fix/index-map-minimal-version
  • 3480fed fix: indexmap minimal version with Map::shift_insert()
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.119&new-version=1.0.120)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- client/Cargo.toml | 2 +- services/index-git-repositories/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 536cf9e..9938321 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2961,9 +2961,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8eddb61f0697cc3989c5d64b452f5488e2b8a60fd7d5076a3045076ffef8cb0" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", diff --git a/client/Cargo.toml b/client/Cargo.toml index 74b40ca..66eede2 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -33,7 +33,7 @@ async-trait = "0.1.80" async-std = "1.12.0" # reading index files -serde_json = "1.0.119" +serde_json = "1.0.120" # clock plugin chrono = "0.4.38" diff --git a/services/index-git-repositories/Cargo.toml b/services/index-git-repositories/Cargo.toml index 7fe1164..d97bb25 100644 --- a/services/index-git-repositories/Cargo.toml +++ b/services/index-git-repositories/Cargo.toml @@ -12,6 +12,6 @@ simple_logger = { version = "5.0.0", features = [ "stderr", ] } -serde_json = "1.0.119" +serde_json = "1.0.120" rust_search = "2.0.0" anyhow = "1.0.86" From 8715e8b01a06c9686b9b36b7a9d0123a81ed7b11 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Sat, 20 Jul 2024 13:50:52 +0200 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20clippy=20warnings=20(#?= =?UTF-8?q?171)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/main.rs | 2 +- client/src/plugin/applications.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/main.rs b/client/src/main.rs index 1047234..2877959 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -399,7 +399,7 @@ impl Centerpiece { Some(active_entry_id) => self .plugins .iter() - .filter(|plugin| plugin.entries.len() > 0) + .filter(|plugin| !plugin.entries.is_empty()) .position(|plugin| { plugin .entries diff --git a/client/src/plugin/applications.rs b/client/src/plugin/applications.rs index 47ebf2a..7e9b772 100644 --- a/client/src/plugin/applications.rs +++ b/client/src/plugin/applications.rs @@ -11,7 +11,7 @@ fn to_entry( ) -> Option { let title = name(desktop_entry); - if !is_visible(&desktop_entry) { + if !is_visible(desktop_entry) { log::debug!(target: "applications", "Desktop entry with name '{}' will be hidden because of its properties.", title); return None; } @@ -98,7 +98,7 @@ fn is_visible(desktop_entry: &freedesktop_desktop_entry::DesktopEntry) -> bool { fn terminal_command(desktop_entry: &freedesktop_desktop_entry::DesktopEntry) -> Option { if !desktop_entry .categories()? - .split(";") + .split(';') .any(|category| category == "TerminalEmulator") { return None; From bd84d8f0fb413cd0b97f6a1ffc5d166a630c23c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:51:17 +0200 Subject: [PATCH 6/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20async-trait=20f?= =?UTF-8?q?rom=200.1.80=20to=200.1.81=20(#170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.80 to 0.1.81.
Release notes

Sourced from async-trait's releases.

0.1.81

  • Turn off unneeded features of syn dependency (#272, thanks @​klensy)
Commits
  • 383f65f Release 0.1.81
  • 4ec740e Merge pull request #273 from dtolnay/cloneimpls
  • b6c6063 Ignore trivially_copy_pass_by_ref pedantic clippy lint
  • 315fd90 Turn off syn/clone-impls feature
  • 94a3165 Merge pull request #272 from klensy/syn-f
  • 2fac940 syn: remove derive feature
  • 4a00d73 Work around dead code warning in test
  • dba15b5 Merge pull request #270 from dtolnay/objsafety
  • d28c95b Former where_clauses_object_safety lint is now hard error
  • 78a5922 Fill in ignore reasons in all #[ignore] attributes
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-trait&package-manager=cargo&previous-version=0.1.80&new-version=0.1.81)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- client/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9938321..173e1a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,9 +338,9 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", diff --git a/client/Cargo.toml b/client/Cargo.toml index 66eede2..6aa14e7 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -29,7 +29,7 @@ iced = { version = "0.10.0", features = ["svg"] } hex_color = "3" # plugins -async-trait = "0.1.80" +async-trait = "0.1.81" async-std = "1.12.0" # reading index files From 9b51c1235bf3b997192a0d4facbfb4e984056d84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:36:48 +0200 Subject: [PATCH 7/7] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20clap=20from=204?= =?UTF-8?q?.5.8=20to=204.5.9=20(#169)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [clap](https://github.com/clap-rs/clap) from 4.5.8 to 4.5.9.
Release notes

Sourced from clap's releases.

v4.5.9

[4.5.9] - 2024-07-09

Fixes

  • (error) When defining a custom help flag, be sure to suggest it like we do the built-in one
Changelog

Sourced from clap's changelog.

[4.5.9] - 2024-07-09

Fixes

  • (error) When defining a custom help flag, be sure to suggest it like we do the built-in one
Commits
  • 3a2fb25 Merge pull request #5547 from tesuji/fish-list
  • 1e3681b refactor: Pass list to __fish_seen_subcommand_from
  • b1a0508 refactor: Rewrite iterator for followup changes
  • 5cc44bb Merge pull request #5548 from tesuji/fish-escape-tab
  • 181b9e0 test: Ensure optional_value runs
  • 0724b7b chore: Remove tarpaulin support
  • 8024254 chore: Update deps to fix nightly
  • b16f987 style: Escaping tab as \t for more readability for fish
  • cf151fd Merge pull request #5542 from casey/exit-without-flushing
  • 5da658c Merge pull request #5541 from rustco/master
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.8&new-version=4.5.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- client/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 173e1a6..2a242e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -579,9 +579,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -589,9 +589,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.8" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", diff --git a/client/Cargo.toml b/client/Cargo.toml index 6aa14e7..6f531a0 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] # general anyhow = { version = "1.0.86", features = ["backtrace"] } -clap = { version = "4.5.8", features = ["derive", "env"] } +clap = { version = "4.5.9", features = ["derive", "env"] } log = { version = "0.4.22", features = ["kv_unstable_serde"] } simple_logger = { version = "5.0.0", features = [ "colors",