hyprcursor package

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-06-29 21:57:11 +02:00
parent 368f3a25fd
commit 6b9190b8e1

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }: {config, pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }:
let let
animation-speed = "5"; animation-speed = "5";
transparency = builtins.toString rice.transparency; transparency = builtins.toString rice.transparency;
@@ -49,19 +49,22 @@ let
in in
lib.mkIf (user != "tv") lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = (with pkgs; [
# hyprland itself is a system package # hyprland itself is a system package
hyprland-protocols hyprland-protocols
hyprlock hyprlock
hypridle hypridle
hyprcursor
grim grim
slurp slurp
] ++ (with pkgs-unstable; [ # ]) ++ (with pkgs-unstable; [
]) ++ (with inputs; [
hyprswitch.packages.x86_64-linux.default
]); ]);
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
@@ -143,6 +146,8 @@ lib.mkIf (user != "tv")
"GBM_BACKEND,nvidia-drm" "GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
"HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}"
"HYPRCURSOR_SIZE,${toString config.gtk.cursorTheme.size}"
] else []; ] else [];
input = { input = {
@@ -251,6 +256,7 @@ lib.mkIf (user != "tv")
"mako" "mako"
"ibus engine xkb:de::deu" "ibus engine xkb:de::deu"
"libinput-gestures" "libinput-gestures"
# "hyprswitch --daemon"
]; ];
windowrulev2 = [ windowrulev2 = [
@@ -373,6 +379,7 @@ lib.mkIf (user != "tv")
# "SUPER, TAB, overview:toggle" # "SUPER, TAB, overview:toggle"
# "SUPER, TAB, hyprexpo:expo, toggle" # "SUPER, TAB, hyprexpo:expo, toggle"
"ALT, TAB, focuscurrentorlast" "ALT, TAB, focuscurrentorlast"
# "SUPER, TAB, exec, hyprswitch --daemon"
"SUPER, Q, killactive" "SUPER, Q, killactive"
"SUPER, W, exec, waybar_mode set '󰈹 '" "SUPER, W, exec, waybar_mode set '󰈹 '"
"SUPER, W, submap, browserSM " "SUPER, W, submap, browserSM "
@@ -385,6 +392,8 @@ lib.mkIf (user != "tv")
# "SUPER, Z, " # "SUPER, Z, "
"SUPER, U, exec, thunderbird " "SUPER, U, exec, thunderbird "
"SUPER, I, exec, kitty -e fish -c 'hx ~/nix-dots/ && fish'" "SUPER, I, exec, kitty -e fish -c 'hx ~/nix-dots/ && fish'"
"SUPER SHIFT, I, exec, kitty -e fish -c 'nh home switch || read'"
"SUPER CTRL, I, exec, kitty -e fish -c 'nh os switch || read'"
"SUPER, O, exec, obsidian " "SUPER, O, exec, obsidian "
"SUPER, P, pin " "SUPER, P, pin "
# "SUPER, Ü," # "SUPER, Ü,"
@@ -482,6 +491,9 @@ lib.mkIf (user != "tv")
bindl = [ bindl = [
# ",switch:on:Lid Switch, exec, hyprlock &" # ",switch:on:Lid Switch, exec, hyprlock &"
]; ];
binde = [
# "SUPER, TAB, exec, hyprswitch --daemon --do-initial-execute"
];
}; };
@@ -818,6 +830,56 @@ lib.mkIf (user != "tv")
showEmptyWorkspace = false showEmptyWorkspace = false
} }
} }
# allows repeated switching with same keypress that starts the submap
binde = SUPER, TAB, exec, hyprswitch --daemon --do-initial-execute
bind = SUPER, TAB, submap, switch
bind = SUPER, TAB, exec, waybar_mode set "sw"
# allows repeated switching with same keypress that starts the submap
binde = SUPER SHIFT, TAB, exec, hyprswitch --daemon --do-initial-execute -r
bind = SUPER SHIFT, TAB, submap, switch
bind = SUPER, TAB, exec, waybar_mode set "swr"
submap = switch
# allow repeated window switching in submap (same keys as repeating while starting)
binde = SUPER, TAB, exec, hyprswitch --daemon
binde = SUPER SHIFT, TAB, exec, hyprswitch --daemon -r
# switch to specific window offset
bind = , 1, exec, hyprswitch --daemon --offset=1
bind = , 2, exec, hyprswitch --daemon --offset=2
bind = , 3, exec, hyprswitch --daemon --offset=3
bind = , 4, exec, hyprswitch --daemon --offset=4
bind = , 5, exec, hyprswitch --daemon --offset=5
bind = , 6, exec, hyprswitch --daemon --offset=6
bind = , 7, exec, hyprswitch --daemon --offset=7
bind = , 8, exec, hyprswitch --daemon --offset=8
bind = , 8, exec, hyprswitch --daemon --offset=8
bind = , 9, exec, hyprswitch --daemon --offset=9
bind = SUPER $reverse, 1, exec, hyprswitch --daemon --offset=1 -r
bind = SUPER $reverse, 2, exec, hyprswitch --daemon --offset=2 -r
bind = SUPER $reverse, 3, exec, hyprswitch --daemon --offset=3 -r
bind = SUPER $reverse, 4, exec, hyprswitch --daemon --offset=4 -r
bind = SUPER $reverse, 5, exec, hyprswitch --daemon --offset=5 -r
bind = SUPER $reverse, 6, exec, hyprswitch --daemon --offset=6 -r
bind = SUPER $reverse, 7, exec, hyprswitch --daemon --offset=7 -r
bind = SUPER $reverse, 8, exec, hyprswitch --daemon --offset=8 -r
bind = SUPER $reverse, 9, exec, hyprswitch --daemon --offset=9 -r
bind = SUPER $reverse, 5, exec, hyprswitch --daemon --offset=5 -r
# exit submap and stop hyprswitch
bindrt = SUPER, SUPER_L, exec, hyprswitch --stop-daemon
bindrt = SUPER, SUPER_L, submap, reset
bindrt = SUPER, SUPER_L, exec, waybar_mode unset
# if it somehow doesn't close on releasing $switch_release, escape can kill
bindr = ,escape, exec, pkill hyprswitch
bindr = ,escape, submap, reset
submap = reset
''; '';
}; };