fix: hyprland config yet again

This commit is contained in:
2026-04-28 10:56:07 +02:00
parent f6f967f955
commit e5e1663234
4 changed files with 22 additions and 25 deletions

View File

@@ -4,7 +4,7 @@
... ...
}: }:
let let
uwsm_run = "${pkgs.uwsm}/bin/uwsm"; uwsm_run = "${pkgs.uwsm}/bin/uwsm app";
in in
{ {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {

View File

@@ -4,14 +4,7 @@
... ...
}: }:
let let
uwsm_run = "${pkgs.uwsm}/bin/uwsm"; uwsm_run = "${pkgs.uwsm}/bin/uwsm app";
exe = pkg: bin: if userConfig.isNixOS then "${pkg}/bin/${bin}" else "/usr/bin/${bin}";
jq = exe pkgs.jq "jq";
grim = exe pkgs.grim "grim";
satty = exe pkgs.satty "satty";
wl_copy = exe pkgs.wl-clipboard "wl-copy";
notify_send = exe pkgs.libnotify "notify-send";
playerctl = exe pkgs.playerctl "playerctl";
in in
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View File

@@ -11,6 +11,11 @@ let
wl_copy = exe pkgs.wl-clipboard "wl-copy"; wl_copy = exe pkgs.wl-clipboard "wl-copy";
notify_send = exe pkgs.libnotify "notify-send"; notify_send = exe pkgs.libnotify "notify-send";
playerctl = exe pkgs.playerctl "playerctl"; playerctl = exe pkgs.playerctl "playerctl";
xdg-desktop-portal-hyprland =
if userConfig.isNixOS then
"${pkgs.xdg-desktop-portal-hyprland}/libexec/xdg-desktop-portal-hyprland"
else
"/usr/lib/xdg-desktop-portal-hyprland";
in in
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
@@ -25,28 +30,16 @@ in
#portalPackage = lib.mkIf (userConfig.isNixOS #portalPackage = lib.mkIf (userConfig.isNixOS
#) inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; #) inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
settings = { 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 = { ecosystem = {
enforce_permissions = true; enforce_permissions = true;
}; };
permission = [ permission = [
"^${pkgs.grim}$, screencopy, allow" "^${pkgs.grim}/bin/grim$, screencopy, allow"
"^${pkgs.hyprlock}$, screencopy, allow" "^${pkgs.hyprlock}/bin/hyprlock$, screencopy, allow"
"^${pkgs.xdg-desktop-portal-hyprland}$, screencopy, allow" "^${xdg-desktop-portal-hyprland}$, screencopy, allow"
]; ];
misc = { misc = {
@@ -71,6 +64,16 @@ in
"rounding 0, match:float 0, match:workspace f[1]" "rounding 0, match:float 0, match:workspace f[1]"
]; ];
bind = [
"$mainMod, V, exec, cliphist list | hyprlauncher -m | cliphist decode | wl-copy"
"$mainMod ALT_L, V, exec, cliphist wipe && notify-send \"Clipboard\" \"Clipboard cleared!\""
"$mainMod L_SHIFT ctrl, l, exec, hyprlock"
"$mainMod L_SHIFT ctrl, r, exec, openrgb -c black && systemctl reboot"
"$mainMod L_SHIFT ctrl, p, exec, openrgb -c black && systemctl poweroff"
"$mainMod L_SHIFT ctrl, s, exec, openrgb -c black && pidof hyprlock || sleep 1 && systemctl sleep"
"$mainMod L_SHIFT ctrl, m, exec, uwsm stop"
];
bindt = [ bindt = [
", PRINT, exec, ${pkgs.writeShellScript "screenshot-region" '' ", PRINT, exec, ${pkgs.writeShellScript "screenshot-region" ''
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name') MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')

View File

@@ -57,6 +57,7 @@
binde = [ binde = [
"$mainMod alt, equal, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 1.1}')" "$mainMod alt, equal, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 1.1}')"
"$mainMod alt, minus, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 0.9}')" "$mainMod alt, minus, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 0.9}')"
"$mainMod alt, 0, exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod L_SHIFT, l, resizeactive, 10 0" "$mainMod L_SHIFT, l, resizeactive, 10 0"
"$mainMod L_SHIFT, h, resizeactive, -10 0" "$mainMod L_SHIFT, h, resizeactive, -10 0"
"$mainMod L_SHIFT, k, resizeactive, 0 -10" "$mainMod L_SHIFT, k, resizeactive, 0 -10"