1
0
mirror of https://github.com/Andrey0189/nixos-config-reborn.git synced 2025-09-15 10:06:00 +03:00

hyprland config rework

This commit is contained in:
andrey_varnavskiy
2024-12-14 05:34:41 +05:00
parent ef7e1b3dc7
commit fc213e7440
2 changed files with 97 additions and 33 deletions

View File

@@ -1,4 +1,21 @@
{
{ pkgs, ... }:
let
gamemode = pkgs.writeShellScriptBin "gamemode" ''
#!/bin/sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword decoration:rounding 0"
exit
fi
hyprctl reload
'';
in {
wayland.windowManager.hyprland.settings = {
bind = [
"$mainMod SHIFT, Return, exec, $terminal"
@@ -15,6 +32,7 @@
"$mainMod SHIFT, B, exec, pkill -SIGUSR1 waybar"
"$mainMod, L, exec, loginctl lock-session"
"$mainMod, P, exec, hyprpicker -an"
"$mainMod, G, exec, ${gamemode}/bin/gamemode"
", Print, exec, grimblast --notify --freeze copysave area"
# Moving focus