Auto-commit: 2026-01-05 19:52:54
This commit is contained in:
20
home/desktop/hyprland/rules/default.nix
Normal file
20
home/desktop/hyprland/rules/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
b = builtins;
|
||||
|
||||
module_files =
|
||||
b.readDir ./. |>
|
||||
lib.filterAttrs (name: type:
|
||||
( (lib.strings.hasSuffix ".nix" name
|
||||
&& name != "default.nix"
|
||||
&& type == "regular" )
|
||||
|| ( type == "directory"
|
||||
&& b.pathExists ./${name}/default.nix))
|
||||
) |>
|
||||
b.attrNames |>
|
||||
b.map (f: ./${f});
|
||||
in
|
||||
{
|
||||
imports = module_files;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
105
home/desktop/hyprland/rules/windows.nix
Normal file
105
home/desktop/hyprland/rules/windows.nix
Normal file
@@ -0,0 +1,105 @@
|
||||
{ lib, nixosConfig, ... }:
|
||||
let
|
||||
cfg = nixosConfig.my.desktop;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
|
||||
settings = {
|
||||
"$games" = "^(steam_app_.*|gamescope|starrail.exe|.*\.exe)$";
|
||||
"$launch_on_second_monitor" = "^(vesktop|spotify)$";
|
||||
"$utility_workspace" = 10;
|
||||
|
||||
windowrule = [
|
||||
|
||||
# Windows to launch silently on secondary monitor
|
||||
|
||||
"match:class $launch_on_second_monitor, workspace $altscreenworkspace silent"
|
||||
"match:class steam, match:title Steam, workspace 4 silent, tile on"
|
||||
|
||||
# Launch Steam Friends List as floating window on workspace 4
|
||||
|
||||
"match:class steam, match:title (Friends List), workspace 4 silent, tile on"
|
||||
|
||||
"match:class $games, content game"
|
||||
"match:class $games, tag +game"
|
||||
"match:class $games, workspace 3"
|
||||
|
||||
# Disable VRR for Where Winds meet
|
||||
"match:class (steam_app_3564740), no_vrr on"
|
||||
|
||||
# Game Stuff
|
||||
"match:class (starrail\.exe), render_unfocused on"
|
||||
|
||||
# Utilities to silently launch on the last workspace
|
||||
"match:class (com.github.wwmm.easyeffects), workspace $utility_workspace silent"
|
||||
"match:class (org.openrgb.OpenRGB), workspace $utility_workspace silent"
|
||||
"match:class (com.core447.StreamController), match:title StreamController, workspace $utility_workspace silent"
|
||||
"match:class (opendeck), workspace $utility_workspace silent"
|
||||
"match:class (Artemis.UI.Linux), match:title (Artemis 2.0), workspace $utility_workspace silent"
|
||||
|
||||
# Focus popups in the center
|
||||
# Floating
|
||||
"match:title ^(Open File)(.*)$, center on"
|
||||
"match:title ^(Open File)(.*)$, float on"
|
||||
"match:title ^(Select a File)(.*)$, center on"
|
||||
"match:title ^(Select folder)(.*)$, float on"
|
||||
"match:title ^(Select folder)(.*)$, center on"
|
||||
"match:title ^(Select a File)(.*)$, float on"
|
||||
"match:title ^(Choose wallpaper)(.*)$, center on"
|
||||
"match:title ^(Choose wallpaper)(.*)$, float on"
|
||||
"match:title ^(Choose wallpaper)(.*)$, size 60% 65%"
|
||||
"match:title ^(Open Folder)(.*)$, center on"
|
||||
"match:title ^(Open Folder)(.*)$, float on"
|
||||
"match:title ^(Save As)(.*)$, center on"
|
||||
"match:title ^(Save As)(.*)$, float on"
|
||||
"match:title ^(Enter name of file to save to)(.*)$, center on"
|
||||
"match:title ^(Enter name of file to save to)(.*)$, float on"
|
||||
"match:title ^(Library)(.*)$, center on"
|
||||
"match:title ^(Library)(.*)$, float on"
|
||||
"match:title ^(File Upload)(.*)$, center on"
|
||||
"match:title ^(File Upload)(.*)$, float on"
|
||||
"match:title ^(.*)(wants to save)$, center on"
|
||||
"match:title ^(.*)(wants to save)$, float on"
|
||||
"match:title ^(.*)(wants to open)$, center on"
|
||||
"match:title ^(.*)(wants to open)$, float on"
|
||||
"match:class ^(blueberry\.py)$, float on"
|
||||
"match:class ^(guifetch)$, float on"
|
||||
"match:class ^(pwvucontrol)$, float on"
|
||||
"match:class ^(pwvucontrol)$, size 45%"
|
||||
"match:class ^(pwvucontrol)$, center on"
|
||||
"match:class ^(com.saivert.pwvucontrol)$, float on"
|
||||
"match:class ^(com.saivert.pwvucontrol)$, size 45%"
|
||||
"match:class ^(com.saivert.pwvucontrol)$, center on"
|
||||
"match:class .*plasmawindowed.*, float on"
|
||||
"match:class kcm_.*, float on"
|
||||
"match:class .*bluedevilwizard, float on"
|
||||
"match:title .*Welcome, float on"
|
||||
"match:title .*Shell conflicts.*, float on"
|
||||
"match:class org.freedesktop.impl.portal.desktop.kde, float on"
|
||||
"match:class org.freedesktop.impl.portal.desktop.kde, size 60% 65%"
|
||||
"match:class ^(Zotero)$, float on"
|
||||
"match:class ^(Zotero)$, size 45%"
|
||||
|
||||
# stupid dolphin copy
|
||||
"match:title ^(Copying — Dolphin)$, move 40 80"
|
||||
|
||||
# Picture-in-Picture
|
||||
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on"
|
||||
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, keep_aspect_ratio on"
|
||||
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, move 73% 72%"
|
||||
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, size 25%"
|
||||
"match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, pin on"
|
||||
|
||||
# --- Tearing ---
|
||||
"match:class $games, immediate on"
|
||||
|
||||
# No shadow for tiled windows (matches windows that are not floating).
|
||||
"match:float 0, no_shadow on"
|
||||
|
||||
# Prevent Idle while fullscreen
|
||||
"match:class (.*), idle_inhibit fullscreen"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
37
home/desktop/hyprland/rules/workspaces.nix
Normal file
37
home/desktop/hyprland/rules/workspaces.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ lib, nixosConfig, ... }:
|
||||
let
|
||||
cfg = nixosConfig.my.desktop;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
|
||||
settings = {
|
||||
"$altscreenworkspace" = "11";
|
||||
"$mainmonitor" = "GIGA-BYTE TECHNOLOGY CO. LTD. AORUS FO32U2 24210B000546";
|
||||
|
||||
workspace = [
|
||||
"1, monitor:desc:$mainmonitor, default:true"
|
||||
"2, monitor:desc:$mainmonitor"
|
||||
"3, monitor:desc:$mainmonitor"
|
||||
"4, monitor:desc:$mainmonitor"
|
||||
"5, monitor:desc:$mainmonitor"
|
||||
"6, monitor:desc:$mainmonitor"
|
||||
"7, monitor:desc:$mainmonitor"
|
||||
"8, monitor:desc:$mainmonitor"
|
||||
"9, monitor:desc:$mainmonitor"
|
||||
"10, monitor:desc:$mainmonitor"
|
||||
|
||||
"$altscreenworkspace, monitor:desc:Samsung Electric Company LF32TU87 HNTT700129, default:true"
|
||||
"$altscreenworkspace, layoutopt:orientation:bottom"
|
||||
|
||||
"21, monitor:desc:Technical Concepts Ltd Beyond TV 0x00010000, default:true"
|
||||
|
||||
# ######## Workspace rules ########
|
||||
"special:special, gapsout:30"
|
||||
];
|
||||
|
||||
# Launchers need to be FAST
|
||||
layerrule = [ "match:namespace gtk4-layer-shell, no_anim on" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user