diff --git a/] b/] new file mode 100644 index 0000000..167448c --- /dev/null +++ b/] @@ -0,0 +1,33 @@ +{ ... }: +{ + home.file.".config/hypr/pyprland.toml".text = '' + [pyprland] + plugins = [ + "scratchpads" + ] + + [scratchpads.termy] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-y --title 'Scratchpad(y)'" + class = "$TERMINAL-dropterm-y" + size = "70% 70%" + + [scratchpads.termu] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-u --title 'Scratchpad(u)'" + class = "$TERMINAL-dropterm-u" + size = "80% 80%" + + [scratchpads.termi] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-i --title 'Scratchpad(i)'" + class = "$TERMINAL-dropterm-i" + size = "50% 50%" + + [scratchpads.volume] + animation = "fromTop" + command = "pavucontrol --class floating" + class = "org.pulseaudio.pavucontrol" + size = "75% 60%" + ''; +} diff --git a/flake.nix b/flake.nix index ef35c23..e528699 100644 --- a/flake.nix +++ b/flake.nix @@ -48,92 +48,97 @@ }; }; - outputs = { - self, - nixpkgs, - home-manager, - ... - } @ inputs: - let - inherit (self) outputs; - systems = [ - "x86_64-linux" - ]; - forAllSystems = nixpkgs.lib.genAttrs systems; - specialArgs = { inherit inputs outputs; }; - in { - packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - overlays = import ./overlays {inherit inputs;}; - nixosModules = import ./modules/nixos; - homeManagerModules = import ./modules/home-manager; + outputs = + { self + , nixpkgs + , home-manager + , ... + } @ inputs: + let + inherit (self) outputs; + systems = [ + "x86_64-linux" + ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + specialArgs = { inherit inputs outputs; }; + in + { + packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + overlays = import ./overlays { inherit inputs; }; + nixosModules = import ./modules/nixos; + homeManagerModules = import ./modules/home-manager; - # System level configs - nixosConfigurations = { - nixdev = nixpkgs.lib.nixosSystem { - inherit specialArgs; - modules = [ - ./hosts/nixdev - home-manager.nixosModules.home-manager{ - home-manager.extraSpecialArgs = specialArgs; - } - ]; - }; - fileserver = nixpkgs.lib.nixosSystem { - inherit specialArgs; - modules = [ - ./hosts/fileserver - home-manager.nixosModules.home-manager{ - home-manager.extraSpecialArgs = specialArgs; - } - ]; - }; - bootstrap = nixpkgs.lib.nixosSystem { - inherit specialArgs; - modules = [ - ./hosts/bootstrap - ]; - }; - sparky = nixpkgs.lib.nixosSystem { - inherit specialArgs; - modules = [ - ./hosts/sparky - home-manager.nixosModules.home-manager{ - home-manager.extraSpecialArgs = specialArgs; - } - ]; - }; - semita = nixpkgs.lib.nixosSystem { - inherit specialArgs; - modules = [ - ./hosts/semita - home-manager.nixosModules.home-manager{ - home-manager.extraSpecialArgs = specialArgs; - } - ]; + # System level configs + nixosConfigurations = { + nixdev = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/nixdev + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = specialArgs; + } + ]; + }; + fileserver = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/fileserver + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = specialArgs; + } + ]; + }; + bootstrap = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/bootstrap + ]; + }; + sparky = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/sparky + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = specialArgs; + } + ]; + }; + semita = nixpkgs.lib.nixosSystem { + inherit specialArgs; + modules = [ + ./hosts/semita + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = specialArgs; + } + ]; + }; }; + + # # Standalone home-manager configuration entrypoint + # # Available through 'home-manager --flake .#your-username@your-hostname' + # homeConfigurations = { + # # FIXME replace with your username@hostname + # "sam@nixdev" = home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + # extraSpecialArgs = {inherit inputs outputs ;}; + # modules = [ + # # > Our main home-manager configuration file < + # ./home/nixdev.nix + # ]; + # }; + # "admin@fileserver" = home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance + # extraSpecialArgs = {inherit inputs outputs ;}; + # modules = [ + # # > Our main home-manager configuration file < + # ./home/nixdev.nix + # ]; + # }; + # }; }; - -# # Standalone home-manager configuration entrypoint -# # Available through 'home-manager --flake .#your-username@your-hostname' -# homeConfigurations = { -# # FIXME replace with your username@hostname -# "sam@nixdev" = home-manager.lib.homeManagerConfiguration { -# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance -# extraSpecialArgs = {inherit inputs outputs ;}; -# modules = [ -# # > Our main home-manager configuration file < -# ./home/nixdev.nix -# ]; -# }; -# "admin@fileserver" = home-manager.lib.homeManagerConfiguration { -# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance -# extraSpecialArgs = {inherit inputs outputs ;}; -# modules = [ -# # > Our main home-manager configuration file < -# ./home/nixdev.nix -# ]; -# }; -# }; - }; } diff --git a/home/common/optional/desktop/hyprland/default.nix b/home/common/optional/desktop/hyprland/default.nix index 524fd37..563323c 100644 --- a/home/common/optional/desktop/hyprland/default.nix +++ b/home/common/optional/desktop/hyprland/default.nix @@ -7,6 +7,7 @@ imports = [ ../common ../wayland + ./pyprland.nix ]; wayland.windowManager.hyprland = { enable = true; @@ -108,7 +109,7 @@ sensitivity = -0.5 } - + windowrulev2 = float, class:floating $mainMod = SUPER @@ -119,6 +120,10 @@ bind = $mainMod, V, togglefloating, bind = $mainMod, R, exec, $menu + bind = $mainMod, y, exec, pypr toggle termy + bind = $mainMod, u, exec, pypr toggle termu + bind = $mainMod, i, exec, pypr toggle termi + bind = $mainMod, h, movefocus, l bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u @@ -155,7 +160,7 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow - exec-once=swww-wallpaper-changer + exec-once=swww-wallpaper-changer & pypr ''; }; } diff --git a/home/common/optional/desktop/hyprland/pyprland.nix b/home/common/optional/desktop/hyprland/pyprland.nix new file mode 100644 index 0000000..2094dba --- /dev/null +++ b/home/common/optional/desktop/hyprland/pyprland.nix @@ -0,0 +1,33 @@ +{ ... }: +{ + home.file.".config/hypr/pyprland.toml".text = '' + [pyprland] + plugins = [ + "scratchpads" + ] + + [scratchpads.termy] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-y --title 'Scratchpad(y)'" + class = "$TERMINAL-dropterm-y" + size = "80% 80%" + + [scratchpads.termu] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-u --title 'Scratchpad(u)'" + class = "$TERMINAL-dropterm-u" + size = "80% 80%" + + [scratchpads.termi] + animation = "fromTop" + command = "$TERMINAL --class $TERMINAL-dropterm-i --title 'Scratchpad(i)'" + class = "$TERMINAL-dropterm-i" + size = "80% 80%" + + [scratchpads.volume] + animation = "fromTop" + command = "pavucontrol --class floating" + class = "org.pulseaudio.pavucontrol" + size = "75% 60%" + ''; +} diff --git a/home/common/optional/desktop/wayland/default.nix b/home/common/optional/desktop/wayland/default.nix index c7e1bc7..196bc79 100644 --- a/home/common/optional/desktop/wayland/default.nix +++ b/home/common/optional/desktop/wayland/default.nix @@ -9,5 +9,6 @@ home.packages = [ pkgs.wofi pkgs.wl-clipboard + pkgs.pyprland ]; } diff --git a/home/common/optional/desktop/wayland/waybar.nix b/home/common/optional/desktop/wayland/waybar.nix index d32118e..9c92604 100644 --- a/home/common/optional/desktop/wayland/waybar.nix +++ b/home/common/optional/desktop/wayland/waybar.nix @@ -130,7 +130,7 @@ "portable" = ""; "default" = [ "" "" "" ]; }; - "on-click" = "pavucontrol"; + "on-click" = "pypr toggle volume"; }; };