Changed: Folder Structure Hyprland
This commit is contained in:
parent
fcdb035f7a
commit
dc91632284
@ -1,275 +1,13 @@
|
||||
{ inputs, pkgs, ...}:
|
||||
let
|
||||
package = pkgs.hyprland;
|
||||
super = "SUPER";
|
||||
terminal = "kitty";
|
||||
fileManager = "thunar";
|
||||
menu = "~/.config/rofi/launchers/type-3/launcher.sh";
|
||||
power = "~/.config/rofi/powermenu/type-6/powermenu.sh";
|
||||
in
|
||||
{
|
||||
{ pkgs, ...}: {
|
||||
imports = [
|
||||
./kitty.nix # Terminal
|
||||
../waybar # Status Bar
|
||||
./hypridle.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
./waybar # Status Bar
|
||||
../rofi # App Launcher
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
slurp
|
||||
wl-clipboard
|
||||
mako
|
||||
|
||||
webcord
|
||||
obsidian
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ./wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Grey-Darkest";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 12;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.hyprland-sessionn.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
|
||||
xwayland = { enable = true; };
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
enableXdgAutostart = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
#inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_WEBRENDER,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland"
|
||||
"XCURSOR_SIZE,24"
|
||||
"EDITOR,nvim"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"DP-1, 1920x1080@60, 1920x0, 1"
|
||||
"HDMI-A-2, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 300;
|
||||
|
||||
accel_profile = "flat";
|
||||
follow_mouse = 1;
|
||||
mouse_refocus = false;
|
||||
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
|
||||
|
||||
numlock_by_default = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gaps_in = 5;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
|
||||
/*col = {
|
||||
active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
inactive_border = "rgba(595959aa)";
|
||||
};*/
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
gestures = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = "off";
|
||||
};
|
||||
|
||||
misc = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device = {
|
||||
name = "epic-mouse-v1";
|
||||
sensitivity = -0.5;
|
||||
};
|
||||
|
||||
windowrulev2 = "suppressevent maximize, class:.*";
|
||||
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
"hyprpaper &"
|
||||
"firefox"
|
||||
];
|
||||
|
||||
# Keybindings
|
||||
bind = [
|
||||
|
||||
"${super}, Q, exec, ${terminal}"
|
||||
"${super}, C, killactive, "
|
||||
"${super}, M, exit, "
|
||||
"${super}, E, exec, ${fileManager}"
|
||||
"${super}, V, togglefloating, "
|
||||
"${super}, R, exec, ${menu}"
|
||||
"${super}, S, exec, ${power}"
|
||||
"${super}, P, pseudo, " # dwindle
|
||||
"${super}, J, togglesplit, "# dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"${super}, left, movefocus, l"
|
||||
"${super}, right, movefocus, r"
|
||||
"${super}, up, movefocus, u"
|
||||
"${super}, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"${super}, 1, workspace, 1"
|
||||
"${super}, 2, workspace, 2"
|
||||
"${super}, 3, workspace, 3"
|
||||
"${super}, 4, workspace, 4"
|
||||
"${super}, 5, workspace, 5"
|
||||
"${super}, 6, workspace, 6"
|
||||
"${super}, 7, workspace, 7"
|
||||
"${super}, 8, workspace, 8"
|
||||
"${super}, 9, workspace, 9"
|
||||
"${super}, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"${super} SHIFT, 1, movetoworkspace, 1"
|
||||
"${super} SHIFT, 2, movetoworkspace, 2"
|
||||
"${super} SHIFT, 3, movetoworkspace, 3"
|
||||
"${super} SHIFT, 4, movetoworkspace, 4"
|
||||
"${super} SHIFT, 5, movetoworkspace, 5"
|
||||
"${super} SHIFT, 6, movetoworkspace, 6"
|
||||
"${super} SHIFT, 7, movetoworkspace, 7"
|
||||
"${super} SHIFT, 8, movetoworkspace, 8"
|
||||
"${super} SHIFT, 9, movetoworkspace, 9"
|
||||
"${super} SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
#"${super}, S, togglespecialworkspace, magic"
|
||||
"${super} SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"${super}, mouse_down, workspace, e+1"
|
||||
"${super}, mouse_up, workspace, e-1"
|
||||
|
||||
# Screenshot
|
||||
''${super}, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
];
|
||||
|
||||
bindl = [
|
||||
#", XF86AudioMute, exec, amixer set Master toggle
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# Multi Media Control
|
||||
", XF86AudioRaiseVolume, exec, vol --up"
|
||||
", XF86AudioLowerVolume, exec, vol --down"
|
||||
", XF86MonBrightnessUp, exec, bri --up"
|
||||
", XF86MonBrightnessDown, exec, bri --down"
|
||||
", XF86Search, exec, ${menu}"
|
||||
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"${super}, mouse:272, movewindow"
|
||||
"${super}, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${package}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# hyprland configs, based on https://github.com/notwidow/hyprland
|
||||
/*xdg.configFile = {
|
||||
"hypr/mako" = {
|
||||
source = ../conf/mako;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/scripts" = {
|
||||
source = ../conf/scripts;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/waybar" = {
|
||||
source = ../conf/waybar;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/wlogout" = {
|
||||
source = ../conf/wlogout;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
# music player - mpd
|
||||
"mpd" = {
|
||||
source = ../conf/mpd;
|
||||
recursive = true;
|
||||
};
|
||||
};*/
|
||||
|
||||
# You might want to set environment variables for Wayland
|
||||
wayland.displayProtocols = [ "wayland" "x11" ];
|
||||
}
|
||||
|
12
home/hyprland/hypridle.nix
Normal file
12
home/hyprland/hypridle.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hypridle
|
||||
];
|
||||
|
||||
# Hypridle configuration
|
||||
services.hypridle.enable = true;
|
||||
|
||||
}
|
234
home/hyprland/hyprland.nix
Normal file
234
home/hyprland/hyprland.nix
Normal file
@ -0,0 +1,234 @@
|
||||
{ inputs, pkgs, ...}:
|
||||
let
|
||||
package = pkgs.hyprland;
|
||||
super = "SUPER";
|
||||
terminal = "kitty";
|
||||
fileManager = "thunar";
|
||||
menu = "~/.config/rofi/launchers/type-3/launcher.sh";
|
||||
power = "~/.config/rofi/powermenu/type-6/powermenu.sh";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprland
|
||||
slurp
|
||||
wl-clipboard
|
||||
mako
|
||||
];
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Grey-Darkest";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 12;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.targets.hyprland-sessionn.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
|
||||
xwayland = { enable = true; };
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
enableXdgAutostart = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
#inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_WEBRENDER,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland"
|
||||
"XCURSOR_SIZE,24"
|
||||
"EDITOR,nvim"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"DP-1, 1920x1080@60, 1920x0, 1"
|
||||
"HDMI-A-2, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 300;
|
||||
|
||||
accel_profile = "flat";
|
||||
follow_mouse = 1;
|
||||
mouse_refocus = false;
|
||||
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
|
||||
|
||||
numlock_by_default = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gaps_in = 5;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
|
||||
/*col = {
|
||||
active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
inactive_border = "rgba(595959aa)";
|
||||
};*/
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
gestures = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = "off";
|
||||
};
|
||||
|
||||
misc = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device = {
|
||||
name = "epic-mouse-v1";
|
||||
sensitivity = -0.5;
|
||||
};
|
||||
|
||||
windowrulev2 = "suppressevent maximize, class:.*";
|
||||
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
"hyprpaper &"
|
||||
"firefox"
|
||||
];
|
||||
|
||||
# Keybindings
|
||||
bind = [
|
||||
|
||||
"${super}, Q, exec, ${terminal}"
|
||||
"${super}, C, killactive, "
|
||||
"${super}, M, exit, "
|
||||
"${super}, E, exec, ${fileManager}"
|
||||
"${super}, V, togglefloating, "
|
||||
"${super}, R, exec, ${menu}"
|
||||
"${super}, S, exec, ${power}"
|
||||
"${super}, P, pseudo, " # dwindle
|
||||
"${super}, J, togglesplit, "# dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"${super}, left, movefocus, l"
|
||||
"${super}, right, movefocus, r"
|
||||
"${super}, up, movefocus, u"
|
||||
"${super}, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"${super}, 1, workspace, 1"
|
||||
"${super}, 2, workspace, 2"
|
||||
"${super}, 3, workspace, 3"
|
||||
"${super}, 4, workspace, 4"
|
||||
"${super}, 5, workspace, 5"
|
||||
"${super}, 6, workspace, 6"
|
||||
"${super}, 7, workspace, 7"
|
||||
"${super}, 8, workspace, 8"
|
||||
"${super}, 9, workspace, 9"
|
||||
"${super}, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"${super} SHIFT, 1, movetoworkspace, 1"
|
||||
"${super} SHIFT, 2, movetoworkspace, 2"
|
||||
"${super} SHIFT, 3, movetoworkspace, 3"
|
||||
"${super} SHIFT, 4, movetoworkspace, 4"
|
||||
"${super} SHIFT, 5, movetoworkspace, 5"
|
||||
"${super} SHIFT, 6, movetoworkspace, 6"
|
||||
"${super} SHIFT, 7, movetoworkspace, 7"
|
||||
"${super} SHIFT, 8, movetoworkspace, 8"
|
||||
"${super} SHIFT, 9, movetoworkspace, 9"
|
||||
"${super} SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
#"${super}, S, togglespecialworkspace, magic"
|
||||
"${super} SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"${super}, mouse_down, workspace, e+1"
|
||||
"${super}, mouse_up, workspace, e-1"
|
||||
|
||||
# Screenshot
|
||||
''${super}, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
];
|
||||
|
||||
bindl = [
|
||||
#", XF86AudioMute, exec, amixer set Master toggle
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# Multi Media Control
|
||||
", XF86AudioRaiseVolume, exec, vol --up"
|
||||
", XF86AudioLowerVolume, exec, vol --down"
|
||||
", XF86MonBrightnessUp, exec, bri --up"
|
||||
", XF86MonBrightnessDown, exec, bri --down"
|
||||
", XF86Search, exec, ${menu}"
|
||||
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"${super}, mouse:272, movewindow"
|
||||
"${super}, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${package}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
}
|
12
home/hyprland/hyprlock.nix
Normal file
12
home/hyprland/hyprlock.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hyprlock
|
||||
];
|
||||
|
||||
# Hyprlock configuration
|
||||
services.hyprlock.enable = true;
|
||||
|
||||
}
|
23
home/hyprland/hyprpaper.nix
Normal file
23
home/hyprland/hyprpaper.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprpaper
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ./wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Hyprpaper configuration
|
||||
services.hyprpaper.enable = true;
|
||||
services.hyprpaper.settings = {
|
||||
wallpaper = "Pictures/Wallpapers/girl.png";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user