From 007b85d2d3bc600ea011c6a97468dccaf6f4c8fc Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Mon, 16 Sep 2024 16:45:05 -0700 Subject: [PATCH] Update from joey@joey-laptop: Init basic plasma-manager config --- nix/flake.lock | 24 ++++++++++ nix/flake.nix | 31 +++++++++---- nix/home-manager/joey.nix | 3 ++ nix/home-manager/plasma-manager.nix | 72 +++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 8 deletions(-) create mode 100644 nix/home-manager/plasma-manager.nix diff --git a/nix/flake.lock b/nix/flake.lock index 5d539e96..da533233 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -556,6 +556,29 @@ "type": "github" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726509788, + "narHash": "sha256-PmCmO8NDKzwHrTp9Ox/rcLiCYivqIpZlnLk8wZRjv2I=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "5a0c70a007837e2db01e0bb68971792e8653d32c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", @@ -564,6 +587,7 @@ "nixos-conf-editor": "nixos-conf-editor", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", + "plasma-manager": "plasma-manager", "stylix": "stylix" } }, diff --git a/nix/flake.nix b/nix/flake.nix index 06f6ed24..0c73c0c9 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -3,15 +3,28 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - hyprland.url = "github:hyprwm/Hyprland"; - hyprland.inputs.nixpkgs.follows = "nixpkgs-unstable"; - home-manager.url = "github:nix-community/home-manager/release-24.05"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + hyprland = { + url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + home-manager = { + url = "github:nix-community/home-manager/release-24.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nix-flatpak.url = "github:gmodena/nix-flatpak"; - stylix.url = "github:danth/stylix"; - stylix.inputs.nixpkgs.follows = "nixpkgs"; - nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor"; - nixos-conf-editor.inputs.nixpkgs.follows = "nixpkgs"; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-conf-editor = { + url = "github:snowfallorg/nixos-conf-editor"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; }; outputs = inputs@{ nixpkgs, @@ -20,6 +33,7 @@ home-manager, nix-flatpak, stylix, + plasma-manager, ... }: let @@ -47,6 +61,7 @@ modules = [ ./home-manager/joey.nix inputs.stylix.homeManagerModules.stylix + inputs.plasma-manager.homeManagerModules.plasma-manager ]; }; }; diff --git a/nix/home-manager/joey.nix b/nix/home-manager/joey.nix index 2be90fc4..9f1c34d3 100644 --- a/nix/home-manager/joey.nix +++ b/nix/home-manager/joey.nix @@ -17,6 +17,9 @@ ]; # Programs + ## Plasma-manager + imports = [ ./plasma-manager.nix ]; + ## Stylix stylix = { enable = true; diff --git a/nix/home-manager/plasma-manager.nix b/nix/home-manager/plasma-manager.nix new file mode 100644 index 00000000..0136dbd9 --- /dev/null +++ b/nix/home-manager/plasma-manager.nix @@ -0,0 +1,72 @@ +{ pkgs, ... }: +{ + programs.plasma = { + enable = true; + shortcuts = { + "kwin"."Show Desktop" = "Meta+D"; + "kwin"."Switch One Desktop Down" = "Meta+Ctrl+Down"; + "kwin"."Switch One Desktop Up" = "Meta+Ctrl+Up"; + "kwin"."Switch One Desktop to the Left" = "Meta+Ctrl+Left"; + "kwin"."Switch One Desktop to the Right" = "Meta+Ctrl+Right"; + "kwin"."Switch Window Down" = "Meta+Alt+Down"; + "kwin"."Switch Window Left" = "Meta+Alt+Left"; + "kwin"."Switch Window Right" = "Meta+Alt+Right"; + "kwin"."Switch Window Up" = "Meta+Alt+Up"; + "kwin"."Walk Through Windows" = "Alt+Tab"; + "kwin"."Walk Through Windows (Reverse)" = "Alt+Shift+Tab"; + "kwin"."Walk Through Windows of Current Application" = "Alt+`"; + "kwin"."Walk Through Windows of Current Application (Reverse)" = "Alt+~"; + "kwin"."Window Close" = "Alt+F4"; + "kwin"."Window Fullscreen" = "Meta+F"; + "kwin"."Window Maximize" = "Meta+PgUp"; + "kwin"."Window Minimize" = "Meta+PgDown"; + "kwin"."Window One Desktop Down" = "Meta+Ctrl+Shift+Down"; + "kwin"."Window One Desktop Up" = "Meta+Ctrl+Shift+Up"; + "kwin"."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left"; + "kwin"."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right"; + "kwin"."Window Operations Menu" = "Alt+F3"; + "kwin"."Window Quick Tile Bottom" = "Meta+Down"; + "kwin"."Window Quick Tile Left" = "Meta+Left"; + "kwin"."Window Quick Tile Right" = "Meta+Right"; + "kwin"."Window Quick Tile Top" = "Meta+Up"; + "kwin"."view_actual_size" = "Meta+0"; + "kwin"."view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"]; + "kwin"."view_zoom_out" = "Meta+-"; + "org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down"; + "org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down"; + "org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down"; + "org_kde_powerdevil"."Hibernate" = "Hibernate"; + "org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up"; + "org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up"; + "org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up"; + "org_kde_powerdevil"."PowerDown" = "Power Down"; + "org_kde_powerdevil"."PowerOff" = "Power Off"; + "org_kde_powerdevil"."Sleep" = "Sleep"; + "org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off"; + "org_kde_powerdevil"."Turn Off Screen" = [ ]; + }; + configFile = { + "kcminputrc"."Libinput/1739/30382/DLL0704:01 06CB:76AE Mouse"."NaturalScroll" = true; + "kded5rc"."Module-device_automounter"."autoload" = false; + "kwinrulesrc"."1"."Description" = "Start Kitty fullscreen"; + "kwinrulesrc"."1"."desktops" = "8174df23-1d2f-4d61-aef3-9b44ed596ed4"; + "kwinrulesrc"."1"."desktopsrule" = 3; + "kwinrulesrc"."1"."fullscreenrule" = 3; + "kwinrulesrc"."1"."wmclass" = "kitty"; + "kwinrulesrc"."1"."wmclassmatch" = 1; + "kwinrulesrc"."2"."Description" = "Start Zen Browser fullscreen"; + "kwinrulesrc"."2"."desktops" = "ff42d652-e597-4e3c-9eb7-0cb2f5124dfe"; + "kwinrulesrc"."2"."desktopsrule" = 3; + "kwinrulesrc"."2"."fullscreen" = true; + "kwinrulesrc"."2"."fullscreenrule" = 3; + "kwinrulesrc"."2"."title" = "Zen Browser"; + "kwinrulesrc"."2"."wmclass" = "zen-alpha"; + "kwinrulesrc"."2"."wmclassmatch" = 1; + "kwinrulesrc"."3"."Description" = "Start Vesktop fullscreen"; + "kwinrulesrc"."3"."desktopsrule" = 3; + "kwinrulesrc"."3"."fullscreenrule" = 3; + "kwinrulesrc"."3"."wmclass" = "vesktop"; + "kwinrulesrc"."3"."wmclassmatch" = 1; + }; + }; +}