mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-25 10:32:19 +00:00
hypr code fixes and such
This commit is contained in:
parent
7481c9f9c7
commit
6d4bfdb7b3
7 changed files with 62 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
# Common GUI apps
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./gtk.nix
|
||||
./vscode.nix
|
||||
];
|
||||
|
||||
|
|
9
home/features/desktop/gtk.nix
Normal file
9
home/features/desktop/gtk.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, inputs, ... }: {
|
||||
gtk = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.xsettingsd = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -3,6 +3,10 @@
|
|||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# Alt-Tab action
|
||||
bind = ALT, Tab, cyclenext,
|
||||
bind = ALT, Tab, bringactivetotop,
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, kitty
|
||||
bind = $mainMod, C, killactive,
|
||||
|
|
|
@ -2,14 +2,16 @@
|
|||
|
||||
imports = [
|
||||
./binds.nix
|
||||
# ./systemd-fixes.nix
|
||||
./tty-init.nix
|
||||
../wayland-wm
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
xwayland.enable = true;
|
||||
recommendedEnvironment = true;
|
||||
# xwayland.enable = true;
|
||||
# recommendedEnvironment = true;
|
||||
extraConfig = ''
|
||||
# This is an example Hyprland config file.
|
||||
#
|
||||
|
|
30
home/features/desktop/hyprland/systemd-fixes.nix
Normal file
30
home/features/desktop/hyprland/systemd-fixes.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
9
home/features/desktop/hyprland/tty-init.nix
Normal file
9
home/features/desktop/hyprland/tty-init.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs = {
|
||||
fish.loginShellInit = ''
|
||||
if test (tty) = "/dev/tty1"
|
||||
exec Hyprland &> /dev/null
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -22,6 +22,11 @@
|
|||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue