mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-25 18:42: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
|
# Common GUI apps
|
||||||
imports = [
|
imports = [
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
|
./gtk.nix
|
||||||
./vscode.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
|
# 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,
|
||||||
|
|
|
@ -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.
|
||||||
#
|
#
|
||||||
|
|
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;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue