hypr設定とhome-manager管理
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.fnott = {
|
||||
enable = true;
|
||||
|
||||
# (Home Manager module の仕様)
|
||||
# https://mipmip.github.io/home-manager-option-search/?query=services.fnott.settings
|
||||
settings = {
|
||||
main = {
|
||||
# --- 配置 / レイヤ ---
|
||||
anchor = "top-right";
|
||||
layer = "overlay"; # フルスクリーンでも出したい場合
|
||||
stacking-order = "bottom-up";
|
||||
|
||||
# --- 余白 ---
|
||||
edge-margin-vertical = 18;
|
||||
edge-margin-horizontal = 18;
|
||||
notification-margin = 10;
|
||||
|
||||
# --- サイズ ---
|
||||
# アイコンを大きめにして視認性を上げる(テキストは控えめに)
|
||||
min-width = 360;
|
||||
max-width = 520;
|
||||
max-height = 0; # 制限したいなら 600 など
|
||||
|
||||
# --- 見た目(モノトーン / シック)---
|
||||
# 背景は黒寄り・透明気味、枠線は薄いグレー、文字は白〜グレー
|
||||
background = "101012dd"; # RGBA 8桁 (rrggbbaa)
|
||||
border-color = "2a2a2fff";
|
||||
border-size = 1;
|
||||
border-radius = 12;
|
||||
|
||||
# パディング(カード感)
|
||||
padding-vertical = 16;
|
||||
padding-horizontal = 18;
|
||||
|
||||
# --- フォント(モダン寄りに)---
|
||||
title-font = "Inter SemiBold 11";
|
||||
summary-font = "Inter Medium 10";
|
||||
body-font = "Inter 10";
|
||||
|
||||
title-color = "f2f2f2ff";
|
||||
summary-color = "d6d6d6ff";
|
||||
body-color = "b8b8b8ff";
|
||||
|
||||
# --- アイコン優位 ---
|
||||
icon-theme = "Papirus-Dark"; # 未導入なら "hicolor" でもOK
|
||||
max-icon-size = 64; # デフォルト32 -> 強調
|
||||
icon = "dialog-information"; # フォールバック(任意)
|
||||
|
||||
dpi-aware = "auto";
|
||||
};
|
||||
|
||||
low = {
|
||||
timeout = 4;
|
||||
border-color = "232327ff";
|
||||
};
|
||||
|
||||
normal = {
|
||||
timeout = 7;
|
||||
border-color = "2a2a2fff";
|
||||
};
|
||||
|
||||
critical = {
|
||||
timeout = 0;
|
||||
border-color = "6a6a6fff";
|
||||
border-size = 2;
|
||||
background = "101012f2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
papirus-icon-theme
|
||||
];
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
general = lib.mkForce {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
decoration = lib.mkForce {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
|
||||
animations = lib.mkForce {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = {
|
||||
exec-once = [
|
||||
# "/usr/lib/polkit-kde-authentication-agent-1"
|
||||
# "dunst"
|
||||
"swww-daemon"
|
||||
# "copyq --start-server"
|
||||
# "wl-paste --type text --watch cliphist store"
|
||||
# "wl-paste --type image --watch cliphist store"
|
||||
"eww daemon"
|
||||
"eww open bar"
|
||||
"eww open roundedEdge"
|
||||
];
|
||||
exec = [
|
||||
"swww img /usr/share/wallpaper/arknights-02.jpg"
|
||||
"dconf write /org/gnome/desktop/interface/gtk-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/icon-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/document-font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/monospace-font-name 'Noto Sans Mono Medium 11'"
|
||||
];
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 7;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"animation windowsIn 0,title:^(.*wofi.*)$"
|
||||
"float,title:^(.*feh.*)$"
|
||||
"center,title:^(.*feh.*)$"
|
||||
"float,title:^(Picture.*)$"
|
||||
"pin,title:^(Picture.*)$"
|
||||
"immediate, class:^(Terraria)$"
|
||||
"idleinhibit fullscreen, class:^(steam_app.*)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:DP-2, default:true"
|
||||
"r[2-9], monitor:DP-2"
|
||||
"name:sub, monitor:DP-1, default:true"
|
||||
];
|
||||
|
||||
"$menu" = "uwsm app -- $(tofi-drun)";
|
||||
"$terminal" = "wezterm";
|
||||
"$lock" = "hyprlock";
|
||||
bindm = [
|
||||
# Window Movement & Resizing
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
bind =
|
||||
[
|
||||
# basic
|
||||
"SUPER, return, exec, $menu"
|
||||
"SUPER, E, exec, $terminal"
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER, L, exec, $lock"
|
||||
"SUPER_SHIFT, M, exec, loginctl terminate-user $USER"
|
||||
|
||||
# prsc
|
||||
", Print, exec, hyprshot -m window -m active --clipboard-only"
|
||||
|
||||
# Clipboard
|
||||
"SUPER, C, exec, copyq show"
|
||||
"SUPER, V, exec, clipman pick -t dmenu"
|
||||
|
||||
# Window navigation
|
||||
"SUPER, F, fullscreen,"
|
||||
"SUPER, Y, pin"
|
||||
"SUPER, I, togglefloating,"
|
||||
"SUPER, O, togglesplit," # dwindle
|
||||
"SUPER, P, pseudo," # dwindle
|
||||
|
||||
# Window focus
|
||||
"SUPER, mouse_down, cyclenext, next"
|
||||
"SUPER, mouse_up, cyclenext, prev"
|
||||
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
"SUPER_SHIFT, left, movewindow, l"
|
||||
"SUPER_SHIFT, right, movewindow, r"
|
||||
"SUPER_SHIFT, up, movewindow, u"
|
||||
"SUPER_SHIFT, down, movewindow, d"
|
||||
|
||||
# workspaces
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
|
||||
"SUPER_CTRL, left, workspace, m-1"
|
||||
"SUPER_CTRL, right, workspace, m+1"
|
||||
"SUPER_CTRL_SHIFT, left, workspace, r-1"
|
||||
"SUPER_CTRL_SHIFT, right, workspace, r+1"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = i + 1;
|
||||
in
|
||||
[
|
||||
"SUPER, code:1${toString i}, workspace, ${toString ws}"
|
||||
"SUPER SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
]
|
||||
) 9
|
||||
)
|
||||
);
|
||||
};
|
||||
plugins = [
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
eww
|
||||
];
|
||||
home.sessionVariables = {
|
||||
HYPRCURSOR_THEME = "rose-pine-hyprcursor";
|
||||
HYPRCURSOR_SIZE = "24";
|
||||
XCURSOR_SIZE = "24";
|
||||
GTK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
};
|
||||
services.fnott = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
anchor = "bottom-right";
|
||||
min-width = 400;
|
||||
|
||||
title-font = "Noto Sans Medium:size=12";
|
||||
title-color = "ffffffff";
|
||||
title-format = "<i>%a%A</i>";
|
||||
summary-font = "Noto Sans Regular:size=16";
|
||||
summary-color = "ffffffff";
|
||||
summary-format = "%s\n";
|
||||
body-font = "Noto Sans Regular:size=14";
|
||||
body-color = "ffffffff";
|
||||
body-format = "%b";
|
||||
background = "1a1a1aee";
|
||||
border-radius = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption recursiveUpdate types;
|
||||
|
||||
defaultInput = {
|
||||
kb_layout = "us";
|
||||
kb_variant = "";
|
||||
kb_model = "";
|
||||
kb_options = "";
|
||||
kb_rules = "";
|
||||
|
||||
follow_mouse = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
natural_scroll = true;
|
||||
sensitivity = 0.0;
|
||||
};
|
||||
|
||||
baseSettings = {
|
||||
exec-once = [
|
||||
# "/usr/lib/polkit-kde-authentication-agent-1"
|
||||
# "dunst"
|
||||
"swww-daemon"
|
||||
# "copyq --start-server"
|
||||
# "wl-paste --type text --watch cliphist store"
|
||||
# "wl-paste --type image --watch cliphist store"
|
||||
"eww daemon"
|
||||
"eww open bar"
|
||||
"eww open roundedEdge"
|
||||
];
|
||||
exec = [
|
||||
"swww img /usr/share/wallpaper/arknights-02.jpg"
|
||||
"dconf write /org/gnome/desktop/interface/gtk-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/icon-theme 'Adwaita Dark'"
|
||||
"dconf write /org/gnome/desktop/interface/document-font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/font-name 'Noto Sans Medium 11'"
|
||||
"dconf write /org/gnome/desktop/interface/monospace-font-name 'Noto Sans Mono Medium 11'"
|
||||
];
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
|
||||
input = defaultInput;
|
||||
|
||||
general = {
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"animation windowsIn 0,title:^(.*wofi.*)$"
|
||||
"float,title:^(.*feh.*)$"
|
||||
"center,title:^(.*feh.*)$"
|
||||
"float,title:^(Picture.*)$"
|
||||
"pin,title:^(Picture.*)$"
|
||||
"immediate, class:^(Terraria)$"
|
||||
"idleinhibit fullscreen, class:^(steam_app.*)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:DP-2, default:true"
|
||||
"r[2-9], monitor:DP-2"
|
||||
"name:sub, monitor:DP-1, default:true"
|
||||
];
|
||||
|
||||
"$menu" = "uwsm app -- $(tofi-drun)";
|
||||
"$terminal" = "wezterm";
|
||||
"$lock" = "hyprlock";
|
||||
bindm = [
|
||||
# Window Movement & Resizing
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
bind = [
|
||||
# basic
|
||||
"SUPER, return, exec, $menu"
|
||||
"SUPER, E, exec, $terminal"
|
||||
"SUPER, Q, killactive,"
|
||||
"SUPER, L, exec, $lock"
|
||||
"SUPER_SHIFT, M, exec, loginctl terminate-user $USER"
|
||||
|
||||
# prsc
|
||||
", Print, exec, hyprshot -m window -m active --clipboard-only"
|
||||
|
||||
# Clipboard
|
||||
"SUPER, C, exec, copyq show"
|
||||
"SUPER, V, exec, clipman pick -t dmenu"
|
||||
|
||||
# Window navigation
|
||||
"SUPER, F, fullscreen,"
|
||||
"SUPER, Y, pin"
|
||||
"SUPER, I, togglefloating,"
|
||||
"SUPER, O, togglesplit," # dwindle
|
||||
"SUPER, P, pseudo," # dwindle
|
||||
|
||||
# Window focus
|
||||
"SUPER, mouse_down, cyclenext, next"
|
||||
"SUPER, mouse_up, cyclenext, prev"
|
||||
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
"SUPER_SHIFT, left, movewindow, l"
|
||||
"SUPER_SHIFT, right, movewindow, r"
|
||||
"SUPER_SHIFT, up, movewindow, u"
|
||||
"SUPER_SHIFT, down, movewindow, d"
|
||||
|
||||
# workspaces
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
|
||||
"SUPER_CTRL, left, workspace, m-1"
|
||||
"SUPER_CTRL, right, workspace, m+1"
|
||||
"SUPER_CTRL_SHIFT, left, workspace, r-1"
|
||||
"SUPER_CTRL_SHIFT, right, workspace, r+1"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = i + 1;
|
||||
in
|
||||
[
|
||||
"SUPER, code:1${toString i}, workspace, ${toString ws}"
|
||||
"SUPER SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
]
|
||||
) 9
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
defaultStyle = {
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 7;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
styleSettings = recursiveUpdate defaultStyle config.hare.hyprland.style;
|
||||
inputSettings = recursiveUpdate defaultInput config.hare.hyprland.input;
|
||||
in
|
||||
{
|
||||
options.hare.hyprland.style = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Overlay of Hyprland style tweaks that will be merged on top of the base settings.";
|
||||
};
|
||||
|
||||
options.hare.hyprland.input = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Overrides for the Hyprland input block (e.g., sensitivity, accel profiles).";
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = recursiveUpdate (recursiveUpdate baseSettings styleSettings) {
|
||||
input = inputSettings;
|
||||
};
|
||||
plugins = [
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
eww
|
||||
];
|
||||
home.sessionVariables = {
|
||||
HYPRCURSOR_THEME = "rose-pine-hyprcursor";
|
||||
HYPRCURSOR_SIZE = "24";
|
||||
XCURSOR_SIZE = "24";
|
||||
GTK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ lib }:
|
||||
{
|
||||
general = lib.mkForce {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(6e848cee) rgba(eeeeffee) 90deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
decoration = lib.mkForce {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 2;
|
||||
noise = 0.01;
|
||||
contrast = 0.8;
|
||||
brightness = 0.5;
|
||||
vibrancy = 0.25;
|
||||
vibrancy_darkness = 0.1;
|
||||
};
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
dim_inactive = false;
|
||||
};
|
||||
|
||||
animations = lib.mkForce {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windowsIn, 1, 1, default, popin 90%"
|
||||
"windowsOut, 1, 100, default, popin 80%"
|
||||
"windowsMove, 1, 3, default"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 5, default, slidefade 10%"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user