fix: Hyprland | finally get host specific hyprland.conf files

This commit is contained in:
2026-04-23 10:53:02 +05:00
parent 84adedf5d1
commit c2b42728a3
5 changed files with 58 additions and 20 deletions

View File

@@ -0,0 +1,23 @@
# Host-specific Hyprland config: blueocean
# Sourced from ../hyprland.conf via ~/.config/hypr/host.conf symlink.
#################
### AUTOSTART ###
#################
exec-once = 1password & firefox & thunderbird & slack & zoom &
exec-once = waybar & mako & hypridle & swww-daemon &
exec-once = $terminal
exec-once = systemctl --user start hyprpolkitagent
####################
### WINDOW RULES ###
####################
windowrule = match:class ^(ghostty|kitty)$, workspace 1
windowrule = match:class firefox, workspace 2
windowrule = match:class Slack, workspace 3
windowrule = match:class thunderbird, workspace 5
windowrule = match:class 1password, workspace 9
windowrule = match:class zoom, workspace 10

View File

@@ -0,0 +1,21 @@
# Host-specific Hyprland config: rihla
# Sourced from ../hyprland.conf via ~/.config/hypr/host.conf symlink.
#################
### AUTOSTART ###
#################
exec-once = discord & 1password & firefox &
exec-once = waybar & mako & hypridle & swww-daemon &
exec-once = $terminal
exec-once = systemctl --user start hyprpolkitagent
####################
### WINDOW RULES ###
####################
windowrule = match:class ghostty, workspace 1
windowrule = match:class firefox, workspace 2
windowrule = match:class discord, workspace 3
windowrule = match:class 1password, workspace 9

View File

@@ -30,18 +30,13 @@ $fileManager = dolphin
$menu = wofi --show drun $menu = wofi --show drun
################# ##############################
### AUTOSTART ### ### HOST-SPECIFIC INCLUDES ###
################# ##############################
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Host-specific autostart + window rules.
# Or execute your favorite apps at launch like this: # Symlinked by home-manager to dotfiles/hypr/hosts/${hostSpec.hostName}.conf.
source = ~/.config/hypr/host.conf
exec-once = proton-mail & discord & 1password & firefox &
exec-once = thunderbird & slack & zoom &
exec-once = waybar & mako & hypridle & swww-daemon &
exec-once = $terminal
exec-once = systemctl --user start hyprpolkitagent
############################# #############################
### ENVIRONMENT VARIABLES ### ### ENVIRONMENT VARIABLES ###
@@ -139,14 +134,7 @@ animations {
# uncomment all if you wish to use that. # uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0 # workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0 # workspace = f[1], gapsout:0, gapsin:0
windowrule = match:class ghostty, workspace 1 # Host-specific windowrule match:class entries live in host.conf (sourced above).
windowrule = match:class firefox, workspace 2
windowrule = match:class discord, workspace 3
windowrule = match:class slack, workspace 3
windowrule = match:class Proton Mail, workspace 5
windowrule = match:class Thunderbird, workspace 5
windowrule = match:class 1password, workspace 9
windowrule = match:class Zoom Workplace, workspace 10
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle { dwindle {

View File

@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
hostSpec,
... ...
}: }:
{ {
@@ -9,6 +10,8 @@
file = { file = {
"${config.xdg.configHome}/hypr/hyprland.conf".source = "${config.xdg.configHome}/hypr/hyprland.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprland.conf"}"; config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprland.conf"}";
"${config.xdg.configHome}/hypr/host.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hosts/${hostSpec.hostName}.conf"}";
"${config.xdg.configHome}/hypr/hypridle.conf".source = "${config.xdg.configHome}/hypr/hypridle.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hypridle.conf"}"; config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hypridle.conf"}";
"${config.xdg.configHome}/hypr/hyprlock.conf".source = "${config.xdg.configHome}/hypr/hyprlock.conf".source =

View File

@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
hostSpec,
... ...
}: }:
{ {
@@ -9,6 +10,8 @@
file = { file = {
"${config.xdg.configHome}/hypr/hyprland.conf".source = "${config.xdg.configHome}/hypr/hyprland.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprland.conf"}"; config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hyprland.conf"}";
"${config.xdg.configHome}/hypr/host.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hosts/${hostSpec.hostName}.conf"}";
"${config.xdg.configHome}/hypr/hypridle.conf".source = "${config.xdg.configHome}/hypr/hypridle.conf".source =
config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hypridle.conf"}"; config.lib.file.mkOutOfStoreSymlink "${lib.custom.relativeToRoot "dotfiles/hypr/hypridle.conf"}";
"${config.xdg.configHome}/hypr/hyprlock.conf".source = "${config.xdg.configHome}/hypr/hyprlock.conf".source =
@@ -27,5 +30,5 @@
]; ];
}; };
services.awww.enable = true; services.swww.enable = true;
} }