hyprland: cleanup, fix xdg portal
This commit is contained in:
parent
5783c1136e
commit
0b78657f3b
2 changed files with 9 additions and 27 deletions
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.desktops.hyprland;
|
|
||||||
inherit (builtins) map genList toString;
|
inherit (builtins) map genList toString;
|
||||||
inherit (lib.meta) getExe getExe';
|
inherit (lib.meta) getExe getExe';
|
||||||
in {
|
in {
|
||||||
|
@ -49,10 +47,10 @@ in {
|
||||||
"$mainMod, V, togglespecialworkspace, audio"
|
"$mainMod, V, togglespecialworkspace, audio"
|
||||||
|
|
||||||
# Reload hyprland
|
# Reload hyprland
|
||||||
"$mainMod, R, exec, ${cfg.package}/bin/hyprctl reload"
|
"$mainMod, R, exec, ${getExe' pkgs.hyprland "hyprctl"} reload"
|
||||||
|
|
||||||
# Restart waybar
|
# Restart waybar
|
||||||
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar"
|
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${getExe pkgs.waybar}"
|
||||||
];
|
];
|
||||||
|
|
||||||
binde = [
|
binde = [
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.desktops.hyprland;
|
inherit (lib.modules) mkIf;
|
||||||
# inherit (inputs.hyprsplit.packages.${pkgs.system}) hyprsplit;
|
|
||||||
inherit (lib.modules) mkIf mkDefault;
|
|
||||||
inherit (lib.options) mkOption;
|
inherit (lib.options) mkOption;
|
||||||
inherit (lib.types) bool enum package;
|
inherit (lib.types) bool;
|
||||||
|
|
||||||
|
cfg = config.modules.desktops.hyprland;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./binds.nix
|
./binds.nix
|
||||||
|
@ -19,8 +19,6 @@ in {
|
||||||
./workspaces.nix
|
./workspaces.nix
|
||||||
inputs.hyprland.nixosModules.default
|
inputs.hyprland.nixosModules.default
|
||||||
];
|
];
|
||||||
# we disable the default hyprland module
|
|
||||||
# disabledModules = ["programs/hyprland.nix"];
|
|
||||||
|
|
||||||
options.modules.desktops.hyprland = {
|
options.modules.desktops.hyprland = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -30,19 +28,6 @@ in {
|
||||||
Whether to enable Hyprland wayland compositor.
|
Whether to enable Hyprland wayland compositor.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = package;
|
|
||||||
default = pkgs.hyprland;
|
|
||||||
description = ''
|
|
||||||
The Hyprland package to be used.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
portalPackage = mkOption {
|
|
||||||
type = package;
|
|
||||||
default = pkgs.xdg-desktop-portal-hyprland;
|
|
||||||
description = "The hyprland portal package";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -59,15 +44,14 @@ in {
|
||||||
# xdg Portal
|
# xdg Portal
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configPackages = mkDefault [
|
xdgOpenUsePortal = true;
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
|
||||||
];
|
|
||||||
extraPortals = [
|
extraPortals = [
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
common.default = ["gtk" "hyprland"];
|
common.default = ["*"];
|
||||||
|
hyprland.default = ["gtk" "hyprland"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue