diff --git a/configuration.nix b/configuration.nix index 7b9d316..398b410 100644 --- a/configuration.nix +++ b/configuration.nix @@ -110,6 +110,7 @@ "https://ezkea.cachix.org" "https://hyprland.cachix.org" "https://nix-community.cachix.org" + "https://walker.cachix.org" ]; trusted-public-keys = [ @@ -118,6 +119,7 @@ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "walker.cachix.org-1:fG8q+uAaMqhsMxWjwvk0IMb4mFPFLqHjuvfwQxE4oJM=" ]; }; diff --git a/flake.in.nix b/flake.in.nix index b325e1b..20f5c7f 100644 --- a/flake.in.nix +++ b/flake.in.nix @@ -74,9 +74,8 @@ nix-flatpak = flake "github:gmodena/nix-flatpak?ref=v0.4.1"; nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs"; nixd = flake "github:nix-community/nixd" // unstable "nixpkgs"; - xdg-desktop-portal-hyprland = - flake "github:hyprwm/xdg-desktop-portal-hyprland" - // unstable "nixpkgs"; + walker = flake "github:abenz1267/walker" // unstable "nixpkgs"; + xdg-desktop-portal-hyprland = flake "github:hyprwm/xdg-desktop-portal-hyprland" // unstable "nixpkgs"; # Server flakes conduwuit = flake "github:Myned/conduwuit" // unstable "nixpkgs"; diff --git a/flake.nix b/flake.nix index 52b0aaf..d75375f 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,10 @@ flake = false; url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/virtio-win.iso"; }; + walker = { + inputs.nixpkgs.follows = "nixpkgs-unstable"; + url = "github:abenz1267/walker"; + }; xdg-desktop-portal-hyprland = { inputs.nixpkgs.follows = "nixpkgs-unstable"; url = "github:hyprwm/xdg-desktop-portal-hyprland"; diff --git a/options/custom/desktops/hyprland/binds.nix b/options/custom/desktops/hyprland/binds.nix index 981eb8d..dbd9dd7 100644 --- a/options/custom/desktops/hyprland/binds.nix +++ b/options/custom/desktops/hyprland/binds.nix @@ -30,8 +30,8 @@ with lib; let swayosd-client = "${pkgs.swayosd}/bin/swayosd-client"; systemctl = "${pkgs.systemd}/bin/systemctl"; virt-manager = "${config.programs.virt-manager.package}/bin/virt-manager"; + walker = "${config.home-manager.users.${config.custom.username}.programs.walker.package}/bin/walker"; waydroid = "${pkgs.waydroid}/bin/waydroid"; - wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi"; cfg = config.custom.desktops.hyprland.binds; in { diff --git a/options/custom/programs/default.nix b/options/custom/programs/default.nix index 64a2ea4..c9fcaa5 100644 --- a/options/custom/programs/default.nix +++ b/options/custom/programs/default.nix @@ -71,6 +71,7 @@ with lib; { #// thunderbird.enable = true; tio.enable = true; vscode.enable = true; + walker.enable = true; waybar.enable = true; wireshark.enable = true; wofi.enable = true; diff --git a/options/custom/programs/walker/default.nix b/options/custom/programs/walker/default.nix new file mode 100644 index 0000000..925fff6 --- /dev/null +++ b/options/custom/programs/walker/default.nix @@ -0,0 +1,66 @@ +{ + config, + lib, + inputs, + pkgs, + ... +}: +with lib; let + cfg = config.custom.programs.walker; +in { + options.custom.programs.walker.enable = mkOption {default = false;}; + + config.home-manager.users.${config.custom.username} = mkIf cfg.enable { + imports = [inputs.walker.homeManagerModules.default]; + + # https://github.com/abenz1267/walker + # https://github.com/abenz1267/walker?tab=readme-ov-file#building-from-source + # https://github.com/abenz1267/walker/blob/master/nix/hm-module.nix + programs.walker = { + enable = true; + package = pkgs.walker; + + #!! Service must be restarted for changes to take effect + #?? systemctl --user restart walker.service + runAsService = true; + + # https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json + config = { + activation_mode.labels = ""; # Chord indicators + search.placeholder = ""; + + builtins = { + applications = { + actions = false; # Desktop file actions + prioritize_new = false; + show_sub_when_single = false; # Subtext with one module + }; + }; + }; + + # https://github.com/abenz1267/walker/wiki/Theming + theme = { + style = builtins.readFile ./style.css; + + # https://github.com/abenz1267/walker/blob/master/internal/config/themes/bare.json + layout.ui.window.box = rec { + height = 500 / config.custom.scale; + width = 1000 / config.custom.scale; + + scroll.list = { + min_height = height; + max_height = height; + max_width = width; + min_width = width; + + # Icon resolution + item.icon = { + icon_size = "largest"; # 128px + pixel_size = 32; + }; + }; + }; + }; + }; + }; +} diff --git a/options/custom/programs/walker/style.css b/options/custom/programs/walker/style.css new file mode 100644 index 0000000..020dc16 --- /dev/null +++ b/options/custom/programs/walker/style.css @@ -0,0 +1,53 @@ +/*** +/* !! Inherits system GTK theme +https://github.com/abenz1267/walker/blob/master/internal/config/themes/bare.css +https://docs.gtk.org/gtk4/css-properties.html +***/ + +/* Transparent background overlay */ +#window { + background: none; +} + +/* Visible window overlay */ +#box { + background: #002b36; + border: 2px #073642 solid; + border-radius: 25px; + font: larger sans-serif; + padding: 4px; +} + +/* Input box */ +#search entry { + border-radius: 25px; + padding: 4px; +} + +/* Input box icons */ +#search entry image { + opacity: 0; +} + +/* List */ +#list { + background: none; +} + +/* List entry */ +#list child { + border-radius: 25px; + margin: 4px 0; + padding: 8px; +} + +/* List entry icon */ +#list child #icon { + margin-right: 8px; +} + +/* List entry subtext */ +#list child #sub { + font-size: x-small; + opacity: 0.5; +} diff --git a/options/custom/scripts/default.nix b/options/custom/scripts/default.nix index 2b2b675..f726943 100644 --- a/options/custom/scripts/default.nix +++ b/options/custom/scripts/default.nix @@ -9,6 +9,7 @@ with lib; let git = config.home-manager.users.${config.custom.username}.programs.git.package; hyprland = config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage; + walker = config.home-manager.users.${config.custom.username}.programs.walker.package; wofi = config.home-manager.users.${config.custom.username}.programs.wofi.package; in { config.home-manager.users.${config.custom.username}.home.file = let diff --git a/options/custom/settings/packages.nix b/options/custom/settings/packages.nix index 47f46a4..c82526d 100644 --- a/options/custom/settings/packages.nix +++ b/options/custom/settings/packages.nix @@ -25,6 +25,7 @@ in { fd fzf jq + libqalculate # qalc lm_sensors # sensors nix-output-monitor # nom nix-tree