Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Aug 30, 2024
1 parent be59478 commit 503a309
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 8 deletions.
14 changes: 8 additions & 6 deletions modules/home/programs/graphical/wms/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ in
config = mkIf cfg.enable {
home = {
packages = with pkgs; [
inputs.anyrun.packages.${pkgs.system}.anyrun
config.wayland.windowManager.hyprland.package

autotiling-rs
Expand Down Expand Up @@ -155,14 +154,16 @@ in
];

sessionVariables = {
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
GDK_BACKEND = "wayland,x11";
XDG_SESSION_TYPE = "wayland";
MOZ_ENABLE_WAYLAND = "1";
QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
MOZ_USE_XINPUT2 = "1";
SDL_VIDEODRIVER = "wayland";
WLR_DRM_NO_ATOMIC = "1";
XDG_SESSION_TYPE = "wayland";
_JAVA_AWT_WM_NONREPARENTING = "1";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
};
};

Expand Down Expand Up @@ -198,6 +199,7 @@ in

theme = {
gtk = enabled;
qt = enabled;
};

};
Expand Down
3 changes: 1 addition & 2 deletions modules/home/programs/graphical/wms/hyprland/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
};

env = [
"GDK_SCALE,2"
"WLR_DRM_NO_ATOMIC,1"
];

Expand Down Expand Up @@ -107,7 +106,7 @@

monitor = [
# name, resolution, position, scale
"eDP-1, highres, 0x0, 1"
"eDP-1, 1920x1080, 0x0, 1"
];

xwayland.force_zero_scaling = true;
Expand Down
4 changes: 4 additions & 0 deletions modules/home/theme/gtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ in

gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "nordic"; };
};
};

};
Expand Down
37 changes: 37 additions & 0 deletions modules/home/theme/qt/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
namespace,
...
}:
let
inherit (lib) mkDefault mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.theme.qt;
in
{
options.${namespace}.theme.qt = {
enable = mkBoolOpt false "Whether to customize qt and apply themes.";
};

config = mkIf (cfg.enable && pkgs.stdenv.isLinux) {
home = {
sessionVariables = {
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
DISABLE_QT5_COMPAT = "0";
};
};

qt = {
enable = true;
platformTheme = {
name = "qtct";
};
style = mkDefault { name = "qt6ct-style"; };
};
};
}
24 changes: 24 additions & 0 deletions modules/nixos/theme/gtk/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.theme.gtk;
in
{
options.${namespace}.theme.gtk = {
enable = mkBoolOpt false "Whether to customize GTK and apply themes.";
};

config = mkIf cfg.enable {
services = {
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
};
};
}
30 changes: 30 additions & 0 deletions modules/nixos/theme/qt/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
config,
lib,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.theme.qt;
in
{
options.${namespace}.theme.qt = {
enable = mkBoolOpt false "Whether to customize qt and apply themes.";
};

config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [ kdePackages.qtwayland ];
};

qt = {
enable = true;
platformTheme = "qt5ct";
style = "kvantum";
};
};
}
4 changes: 4 additions & 0 deletions systems/x86_64-linux/grovetender/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ in
time = enabled;
};

theme = {
qt = enabled;
gtk = enabled;
};
};

nix.settings = {
Expand Down

0 comments on commit 503a309

Please sign in to comment.