fix: hyprland

This commit is contained in:
2026-04-28 10:47:11 +02:00
parent 3608a5968c
commit f6f967f955
10 changed files with 232 additions and 214 deletions

View File

@@ -2,26 +2,28 @@
{
wayland.windowManager.hyprland = {
windowrule = [
"match:class ^(chrome-facebook.com__-Default)$, workspace 1"
"match:class ^(zen)$, workspace 2"
"match:class ^(zen-beta)$, workspace 2"
"match:class ^(com.github.IsmaelMartinez.teams_for_linux)$, workspace 2"
"match:class ^(FreeTube)$, workspace 2"
"match:class ^(brave-x.com__-Default)$, workspace 2"
"match:class ^(chrome-www.inoreader.com__all_articles-Default)$, workspace 2"
"match:class ^(chrome-mail.proton.me__u_0_inbox.com-Default)$, workspace 2"
"match:class ^(chrome-app.tuta.com__-Default)$, workspace 2"
];
settings = {
windowrule = [
"match:class ^(chrome-facebook.com__-Default)$, workspace 1"
"match:class ^(zen)$, workspace 2"
"match:class ^(zen-beta)$, workspace 2"
"match:class ^(com.github.IsmaelMartinez.teams_for_linux)$, workspace 2"
"match:class ^(FreeTube)$, workspace 2"
"match:class ^(brave-x.com__-Default)$, workspace 2"
"match:class ^(chrome-www.inoreader.com__all_articles-Default)$, workspace 2"
"match:class ^(chrome-mail.proton.me__u_0_inbox.com-Default)$, workspace 2"
"match:class ^(chrome-app.tuta.com__-Default)$, workspace 2"
];
bind = [
"$mainMod Control_L, b, exec, uwsm app -- $browser"
"$mainMod Control_L, b, focuswindow, class:^(zen)$"
"$mainMod Control_L, f, exec, uwsm app -- freetube"
"$mainMod Control_L, f, focuswindow, class:^(freetube)$"
"$mainMod Control_L, x, exec, uwsm app -- ~/.nix-profile/share/applications/x.desktop"
"$mainMod Control_L, x, focuswindow, class:^(chrome-x.com__-Default)$"
];
bind = [
"$mainMod Control_L, b, exec, uwsm app -- $browser"
"$mainMod Control_L, b, focuswindow, class:^(zen)$"
"$mainMod Control_L, f, exec, uwsm app -- freetube"
"$mainMod Control_L, f, focuswindow, class:^(freetube)$"
"$mainMod Control_L, x, exec, uwsm app -- ~/.nix-profile/share/applications/x.desktop"
"$mainMod Control_L, x, focuswindow, class:^(chrome-x.com__-Default)$"
];
};
extraConfig =
#hyprlang

View File

@@ -2,20 +2,24 @@
{
wayland.windowManager.hyprland = {
windowrule = [
# general rules
"match:class ^(signal)$, workspace 1"
"match:class ^(vesktop)$, workspace 1 silent"
];
settings = {
bind = [
"$mainMod Control_L, s, exec,[workspace 1] signal-desktop --password-store=\"kwallet6\""
"$mainMod Control_L, s, focuswindow, class:^(signal)$"
"$mainMod Control_L, s, focuswindow, title:^(signal)$"
"$mainMod Control_L, v, sendshortcut, ctrl, k, class:^(vesktop)$"
"$mainMod Control_L, v, exec, uwsm app -- vesktop"
"$mainMod Control_L, v, focuswindow, class:^(vesktop)$"
];
windowrule = [
# general rules
"match:class ^(signal)$, workspace 1"
"match:class ^(vesktop)$, workspace 1 silent"
];
bind = [
"$mainMod Control_L, s, exec,[workspace 1] signal-desktop --password-store=\"kwallet6\""
"$mainMod Control_L, s, focuswindow, class:^(signal)$"
"$mainMod Control_L, s, focuswindow, title:^(signal)$"
"$mainMod Control_L, v, sendshortcut, ctrl, k, class:^(vesktop)$"
"$mainMod Control_L, v, exec, uwsm app -- vesktop"
"$mainMod Control_L, v, focuswindow, class:^(vesktop)$"
];
};
extraConfig =
#hyprlang
''

View File

@@ -2,17 +2,19 @@
{
wayland.windowManager.hyprland = {
windowrule = [
"match:class ^(steam)$, workspace 3 silent"
"match:class ^(heroic)$, workspace 3"
"match:class ^(net.lutris.Lutris)$, workspace 3"
"match:class ^(rpcs3)$, workspace 3"
];
settings = {
windowrule = [
"match:class ^(steam)$, workspace 3 silent"
"match:class ^(heroic)$, workspace 3"
"match:class ^(net.lutris.Lutris)$, workspace 3"
"match:class ^(rpcs3)$, workspace 3"
];
bind = [
"$mainMod Control_L, g, exec, uwsm app -- steam"
"$mainMod Control_L, g, focuswindow, class:^(steam)$"
];
bind = [
"$mainMod Control_L, g, exec, uwsm app -- steam"
"$mainMod Control_L, g, focuswindow, class:^(steam)$"
];
};
extraConfig =
#hyprlang
''
@@ -37,5 +39,4 @@
}
'';
};
}

View File

@@ -2,27 +2,30 @@
{
wayland.windowManager.hyprland = {
windowrule = [
# general rules
"match:class ^(winboat)$, workspace 5"
"match:class ^(qemu)$, workspace 5"
"match:class ^(obsidian)$, workspace 6"
"match:class ^(gimp)$, workspace 8"
"match:class .*potify, workspace 9 silent"
"match:class ^(com.obsproject.Studio)$, workspace 10"
];
settings = {
bind = [
"$mainMod, M, exec, [float] waypaper"
"$mainMod, RETURN, exec, [workspace 4] $terminal"
"$mainMod CONTROL_L, RETURN, exec, $terminal"
"$mainMod, space , exec, $menu"
"$mainMod ALT_L, c, exec, openrgb -c $openrgb_color"
"$mainMod Control_L, n, exec, [workspace 6] uwsm app -- $notes"
"$mainMod Control_L, n, focuswindow, class:^(obsidian)$"
"$mainMod Control_L, m, exec, [workspace 9] uwsm app -- $music_player"
"$mainMod CONTROL_L L_SHIFT, B, exec, killall ashell && uwsm app -- ashell"
];
windowrule = [
# general rules
"match:class ^(winboat)$, workspace 5"
"match:class ^(qemu)$, workspace 5"
"match:class ^(obsidian)$, workspace 6"
"match:class ^(gimp)$, workspace 8"
"match:class .*potify, workspace 9 silent"
"match:class ^(com.obsproject.Studio)$, workspace 10"
];
bind = [
"$mainMod, M, exec, [float] waypaper"
"$mainMod, RETURN, exec, [workspace 4] $terminal"
"$mainMod CONTROL_L, RETURN, exec, $terminal"
"$mainMod, space , exec, $menu"
"$mainMod ALT_L, c, exec, openrgb -c $openrgb_color"
"$mainMod Control_L, n, exec, [workspace 6] uwsm app -- $notes"
"$mainMod Control_L, n, focuswindow, class:^(obsidian)$"
"$mainMod Control_L, m, exec, [workspace 9] uwsm app -- $music_player"
"$mainMod CONTROL_L L_SHIFT, B, exec, killall ashell && uwsm app -- ashell"
];
};
extraConfig =
#hyprlang

View File

@@ -7,7 +7,7 @@ let
uwsm_run = "${pkgs.uwsm}/bin/uwsm";
in
{
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland.settings = {
"exec-once" = [
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"

View File

@@ -4,7 +4,6 @@
...
}:
let
uwsm_run = "${pkgs.uwsm}/bin/uwsm";
exe = pkg: bin: if userConfig.isNixOS then "${pkg}/bin/${bin}" else "/usr/bin/${bin}";
jq = exe pkgs.jq "jq";
grim = exe pkgs.grim "grim";
@@ -26,80 +25,83 @@ in
#portalPackage = lib.mkIf (userConfig.isNixOS
#) inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
general = {
gaps_in = 4;
gaps_out = 6;
border_size = 4;
"col.active_border" = "$blue $sky";
"col.inactive_border" = "$overlay1";
resize_on_border = false;
allow_tearing = false;
layout = "scrolling";
settings = {
xwayland.enable = true;
general = {
gaps_in = 4;
gaps_out = 6;
border_size = 4;
"col.active_border" = "$blue $sky";
"col.inactive_border" = "$overlay1";
resize_on_border = false;
allow_tearing = false;
layout = "scrolling";
};
ecosystem = {
enforce_permissions = true;
};
permission = [
"^${pkgs.grim}$, screencopy, allow"
"^${pkgs.hyprlock}$, screencopy, allow"
"^${pkgs.xdg-desktop-portal-hyprland}$, screencopy, allow"
];
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
middle_click_paste = false;
};
xwayland = {
force_zero_scaling = 1;
};
quirks = {
prefer_hdr = 1;
};
windowrule = [
# smart gaps
"border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, match:float 0, match:workspace w[tv1]"
"border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]"
];
bindt = [
", PRINT, exec, ${pkgs.writeShellScript "screenshot-region" ''
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
${grim} -o "$MONITOR" - | ${satty} -f -
''}"
"$mainMod, PRINT, exec, ${pkgs.writeShellScript "screenshot-fullscreen" ''
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
mkdir -p "$(dirname "$target_path")"
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
${grim} -o "$MONITOR" "$target_path"
${wl_copy} < "$target_path"
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot fullscreen" "Saved and copied"
''}"
"alt_l, PRINT, exec, ${pkgs.writeShellScript "screenshot-window" ''
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
mkdir -p "$(dirname "$target_path")"
GEOMETRY=$(hyprctl activewindow -j | ${jq} -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
${grim} -g "$GEOMETRY" "$target_path"
${wl_copy} < "$target_path"
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot window" "Saved and copied"
''}"
", PAUSE, exec, ${playerctl} play-pause"
"$mainMod, PAUSE, exec, ${playerctl} play-pause --player spotify"
];
};
ecosystem = {
enforce_permissions = true;
};
permission = [
"^${pkgs.grim}$, screencopy, allow"
"^${pkgs.hyprlock}$, screencopy, allow"
"^${pkgs.xdg-desktop-portal-hyprland}$, screencopy, allow"
];
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
middle_click_paste = false;
};
xwayland = {
force_zero_scaling = 1;
};
quirks = {
prefer_hdr = 1;
};
windowrule = [
# smart gaps
"border_size 0, match:float 0, match:workspace w[tv1]"
"rounding 0, match:float 0, match:workspace w[tv1]"
"border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]"
];
bindt = [
", PRINT, exec, ${pkgs.writeShellScript "screenshot-region" ''
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
${grim} -o "$MONITOR" - | ${satty} -f -
''}"
"$mainMod, PRINT, exec, ${pkgs.writeShellScript "screenshot-fullscreen" ''
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
mkdir -p "$(dirname "$target_path")"
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
${grim} -o "$MONITOR" "$target_path"
${wl_copy} < "$target_path"
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot fullscreen" "Saved and copied"
''}"
"alt_l, PRINT, exec, ${pkgs.writeShellScript "screenshot-window" ''
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
mkdir -p "$(dirname "$target_path")"
GEOMETRY=$(hyprctl activewindow -j | ${jq} -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
${grim} -g "$GEOMETRY" "$target_path"
${wl_copy} < "$target_path"
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot window" "Saved and copied"
''}"
", PAUSE, exec, ${playerctl} play-pause"
"$mainMod, PAUSE, exec, ${playerctl} play-pause --player spotify"
];
};
}

View File

@@ -2,40 +2,42 @@
{
wayland.windowManager.hyprland = {
input = {
kb_layout = "pl";
kb_variant = "";
kb_model = "";
kb_options = "caps:escape_shifted_capslock";
kb_rules = "";
follow_mouse = 1;
left_handed = false;
sensitivity = -0.5;
touchpad = {
natural_scroll = true;
settings = {
input = {
kb_layout = "pl";
kb_variant = "";
kb_model = "";
kb_options = "caps:escape_shifted_capslock";
kb_rules = "";
follow_mouse = 1;
left_handed = false;
sensitivity = -0.5;
touchpad = {
natural_scroll = true;
};
};
};
device = {
name = "msft0001:01-06cb:7f28-touchpad";
sensitivity = 0;
};
device = {
name = "msft0001:01-06cb:7f28-touchpad";
sensitivity = 0;
};
cursor = {
no_hardware_cursors = true;
inactive_timeout = 5;
warp_on_change_workspace = 1;
zoom_factor = 1.0;
hide_on_key_press = 1;
};
cursor = {
no_hardware_cursors = true;
inactive_timeout = 5;
warp_on_change_workspace = 1;
zoom_factor = 1.0;
hide_on_key_press = 1;
};
bindel = [
",XF86MonBrightnessDown, exec, hyprctl hyprsunset gamma -10"
",XF86MonBrightnessUp, exec, hyprctl hyprsunset gamma +10"
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && ~/.local/bin/wp-vol.sh && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && ~/.local/bin/wp-vol.sh && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
];
bindel = [
",XF86MonBrightnessDown, exec, hyprctl hyprsunset gamma -10"
",XF86MonBrightnessUp, exec, hyprctl hyprsunset gamma +10"
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && ~/.local/bin/wp-vol.sh && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && ~/.local/bin/wp-vol.sh && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
];
};
extraConfig =
#hyprlang

View File

@@ -2,7 +2,8 @@
...
}:
{
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland.settings = {
dwindle = {
preserve_split = true;
};

View File

@@ -4,51 +4,54 @@
}:
{
wayland.windowManager.hyprland = {
animations = {
enabled = userConfig.animations;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 7, default"
"border, 1, 3.39, easeOutQuint"
"windows, 1, 2.79, easeOutQuint"
"windowsIn, 1, 2.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1, linear, popin 87%"
"fadeIn, 1, 1.4, almostLinear"
"fadeOut, 1, 1.2, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 2, easeOutQuint"
"layersIn, 1, 2, easeOutQuint, fade"
"layersOut, 1, 1, linear, fade"
"fadeLayersIn, 1, 1.4, almostLinear"
"fadeLayersOut, 1, 1.1, almostLinear"
"workspaces, 1, 1.4, quick, slidevert"
"workspacesIn, 1, 0.5, quick, slidevert"
"workspacesOut, 1, 0.5, quick, slidevert"
];
};
settings = {
decoration = {
rounding = 1;
rounding_power = 2;
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 1;
render_power = 1;
color = "$overlay0";
animations = {
enabled = userConfig.animations;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 7, default"
"border, 1, 3.39, easeOutQuint"
"windows, 1, 2.79, easeOutQuint"
"windowsIn, 1, 2.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1, linear, popin 87%"
"fadeIn, 1, 1.4, almostLinear"
"fadeOut, 1, 1.2, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 2, easeOutQuint"
"layersIn, 1, 2, easeOutQuint, fade"
"layersOut, 1, 1, linear, fade"
"fadeLayersIn, 1, 1.4, almostLinear"
"fadeLayersOut, 1, 1.1, almostLinear"
"workspaces, 1, 1.4, quick, slidevert"
"workspacesIn, 1, 0.5, quick, slidevert"
"workspacesOut, 1, 0.5, quick, slidevert"
];
};
blur = {
enabled = true;
size = 1;
passes = 1;
vibrancy = 0.1696;
decoration = {
rounding = 1;
rounding_power = 2;
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 1;
render_power = 1;
color = "$overlay0";
};
blur = {
enabled = true;
size = 1;
passes = 1;
vibrancy = 0.1696;
};
};
};
};

View File

@@ -1,7 +1,7 @@
{ ... }:
{
wayland.windowManager.hyprland = {
wayland.windowManager.hyprland.settings = {
workspace = [
"1, monitor:DP-2"
"1, layout: dwindle"