hypr code fixes and such

This commit is contained in:
John Bowdre 2023-10-01 14:17:04 -05:00
parent 7481c9f9c7
commit 6d4bfdb7b3
7 changed files with 62 additions and 2 deletions

View file

@ -2,6 +2,7 @@
# Common GUI apps # Common GUI apps
imports = [ imports = [
./firefox.nix ./firefox.nix
./gtk.nix
./vscode.nix ./vscode.nix
]; ];

View file

@ -0,0 +1,9 @@
{ config, pkgs, inputs, ... }: {
gtk = {
enable = true;
};
services.xsettingsd = {
enable = true;
};
}

View file

@ -3,6 +3,10 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER
# Alt-Tab action
bind = ALT, Tab, cyclenext,
bind = ALT, Tab, bringactivetotop,
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive, bind = $mainMod, C, killactive,

View file

@ -2,14 +2,16 @@
imports = [ imports = [
./binds.nix ./binds.nix
# ./systemd-fixes.nix
./tty-init.nix
../wayland-wm ../wayland-wm
]; ];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemdIntegration = true; systemdIntegration = true;
xwayland.enable = true; # xwayland.enable = true;
recommendedEnvironment = true; # recommendedEnvironment = true;
extraConfig = '' extraConfig = ''
# This is an example Hyprland config file. # This is an example Hyprland config file.
# #

View file

@ -0,0 +1,30 @@
{ lib, config, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf (cfg.enable && cfg.systemdIntegration) {
# stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
systemd.user.targets.hyprland-session-shutdown = {
Unit = {
Description = "Shutdown running Hyprland session";
DefaultDependencies = "no";
StopWhenUnneeded = "true";
Conflicts = [
"graphical-session.target"
"graphical-session-pre.target"
"hyprland-session.target"
];
After = [
"graphical-session.target"
"graphical-session-pre.target"
"hyprland-session.target"
];
};
};
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
];
};
}

View file

@ -0,0 +1,9 @@
{
programs = {
fish.loginShellInit = ''
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
'';
};
}

View file

@ -22,6 +22,11 @@
networkmanager.enable = true; networkmanager.enable = true;
}; };
xdg.portal = {
enable = true;
wlr.enable = true;
};
system.stateVersion = "23.05"; system.stateVersion = "23.05";
} }