Updated hyprland setup with basic wallpaper support
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
./alacritty.nix
|
||||
./firefox.nix
|
||||
./git.nix
|
||||
./hyprland.nix
|
||||
./hypr
|
||||
./mango.nix
|
||||
./nvf.nix
|
||||
./packages.nix
|
||||
@@ -14,6 +14,7 @@
|
||||
./ssh.nix
|
||||
./stylix.nix
|
||||
./vscode.nix
|
||||
./wallpaper.nix
|
||||
./xdg.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
9
modules/home/hypr/default.nix
Normal file
9
modules/home/hypr/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./keybinds.nix
|
||||
];
|
||||
}
|
||||
47
modules/home/hypr/hyprland.nix
Normal file
47
modules/home/hypr/hyprland.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
waybar
|
||||
hyprpolkitagent
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
settings = {
|
||||
monitor = [
|
||||
"eDP-1, 2256x1504@60, 0x0, 1"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
active_opacity = 0.95;
|
||||
inactive_opacity = 0.85;
|
||||
fullscreen_opacity = 1.0;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 3;
|
||||
new_optimizations = true;
|
||||
};
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user enable --now waybar.service"
|
||||
"systemctl --user enable --now hyprpolkitagent.service"
|
||||
"wpaperd -d"
|
||||
];
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
69
modules/home/hypr/keybinds.nix
Normal file
69
modules/home/hypr/keybinds.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec = "hyprctl dispatch submap global";
|
||||
submap = "global";
|
||||
|
||||
# MY STUFF
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"$mod, Q, killactive"
|
||||
"$mod, W, exec, alacritty"
|
||||
"$mod, S, exec, rofi -show drun -show-icons"
|
||||
|
||||
# Window Movement
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod SHIFT, left, movewindow, l"
|
||||
"$mod SHIFT, right, movewindow, r"
|
||||
"$mod SHIFT, up, movewindow, u"
|
||||
"$mod SHIFT, down, movewindow, d"
|
||||
"$mod CTRL, left, workspace, r-1"
|
||||
"$mod CTRL, right, workspace, r+1"
|
||||
"$mod CTRL SHIFT, left, movetoworkspace, r-1"
|
||||
"$mod CTRL SHIFT, right, movetoworkspace, r+1"
|
||||
|
||||
# Brightness keys
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set 10%+"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
|
||||
|
||||
# Media Control Keys
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
"ALT, XF86AudioMute, exec, pamixer --default-source -t"
|
||||
"ALT, XF86AudioRaiseVolume, exec, pamixer --default-source -i 5"
|
||||
"ALT, XF86AudioLowerVolume, exec, pamixer --default-source -d 5"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = i + 1;
|
||||
in
|
||||
[
|
||||
"$mod, code:1${toString i}, workspace, ${toString ws}"
|
||||
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
]
|
||||
) 9
|
||||
)
|
||||
);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod ALT, mouse:272, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
};
|
||||
}
|
||||
@@ -15,12 +15,14 @@
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
|
||||
# KDE
|
||||
kdePackages.kate
|
||||
|
||||
# CD Stuff
|
||||
picard
|
||||
heybrochecklog
|
||||
rsgain
|
||||
|
||||
rofi
|
||||
playerctl
|
||||
pamixer
|
||||
brightnessctl
|
||||
];
|
||||
}
|
||||
|
||||
25
modules/home/wallpaper.nix
Normal file
25
modules/home/wallpaper.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
wallpapers = config.xdg.userDirs.extraConfig.XDG_WALLPAPERS_DIR;
|
||||
in
|
||||
{
|
||||
home.file."${wallpapers}" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
services.wpaperd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default = {
|
||||
mode = "center";
|
||||
};
|
||||
any = {
|
||||
path = "${wallpapers}/lanterns_of_twilight.png";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,8 @@
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_DEV_DIR = "${config.home.homeDirectory}/Dev";
|
||||
XDG_WALLPAPERS_DIR = "${config.xdg.userDirs.pictures}/Wallpapers";
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user