Modularize hyprland
This commit is contained in:
parent
a7072f8b52
commit
f1dcd9e194
2 changed files with 141 additions and 29 deletions
|
|
@ -6,6 +6,7 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./wayland.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
|
@ -54,35 +55,6 @@
|
|||
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
"$mod, f, exec, ${pkgs.firefox}/bin/firefox"
|
||||
"$mod, e, exec, ${pkgs.emacs}/bin/emacs"
|
||||
"$mod, s, exec, ${pkgs.stean}/bin/steam"
|
||||
];
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --type text --watch cliphist store"
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --type image --watch cliphist store"
|
||||
"eval $(gnome-keyring-daemon --start --components=secrets,ssh,gpg,pkcs11"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Enable home-manager and git
|
||||
|
|
|
|||
140
home-manager/wayland.nix
Normal file
140
home-manager/wayland.nix
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# Hyprland
|
||||
programs.kitty.enable = true;
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
settings = {
|
||||
"$terminal" = "kitty";
|
||||
"$mod" = "SUPER";
|
||||
|
||||
monitor = [
|
||||
"eDP-1,1920x1200,0x0,1"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 6;
|
||||
gaps_out = 2;
|
||||
border_size = 2;
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
input = {
|
||||
kb_layout = "fi";
|
||||
follow_mouse = true;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 15;
|
||||
active_opacity = 0.9;
|
||||
inactive_opacity = 0.8;
|
||||
fullscreen_opacity = 0.9;
|
||||
|
||||
blur = {
|
||||
xray = true;
|
||||
special = false;
|
||||
new_optimizations = true;
|
||||
size = 14;
|
||||
passes = 4;
|
||||
brightness = 1;
|
||||
noise = 0.01;
|
||||
contrast = 1;
|
||||
popups = true;
|
||||
popups_ignorealpha = 0.6;
|
||||
ignore_opacity = false;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
ignore_window = true;
|
||||
range = 20;
|
||||
offset = "0 2";
|
||||
render_power = 4;
|
||||
};
|
||||
|
||||
};
|
||||
cursor = {
|
||||
enable_hyprcursor = true;
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
smart_split = false;
|
||||
smart_resizing = false;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
|
||||
bind = [
|
||||
"$mod, t, exec, ${pkgs.kitty}/bin/kitty"
|
||||
|
||||
"$mod SHIFT, q, killactive"
|
||||
"$mod SHIFT, e, exit"
|
||||
"$mod SHIFT, l, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
|
||||
"$mod, f, exec, ${pkgs.firefox}/bin/firefox"
|
||||
"$mod, e, exec, ${pkgs.emacs}/bin/emacs"
|
||||
"$mod, s, exec, ${pkgs.stean}/bin/steam"
|
||||
];
|
||||
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --type text --watch cliphist store"
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --type image --watch cliphist store"
|
||||
"eval $(gnome-keyring-daemon --start --components=secrets,ssh,gpg,pkcs11"
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue