hyprexpo 1

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-04-11 14:59:16 +02:00
parent 111b46f442
commit b070616b6b
4 changed files with 321 additions and 75 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, pkgs-unstable, host, nvidia, rice, lib, ... }:
{ config, pkgs, pkgs-unstable, inputs, host, nvidia, rice, lib, ... }:
let
animation-speed = "2";
transparency = rice.transparency;
@@ -90,13 +90,14 @@ in
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland.enable = true;
systemd.enable = true;
# plugins = [];
plugins = let plugins = inputs.hyprland-plugins.packages.${pkgs.system}; in with plugins; [
hyprexpo
];
settings = {
# source = /home/nx2/.config/hypr/hyprland-nosync.conf;
monitor =
if host == "NxXPS" then [
"${monitors.xps.main.name}, ${monitors.xps.main.resolution}, ${monitors.xps.main.position}, ${monitors.xps.main.scale}"
@@ -112,10 +113,10 @@ in
d1 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
d2 = if host == "NxXPS" then monitors.xps.second.name else monitors.north.left.name;
d3 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.right.name;
compact = ",gapsin:0,gapsout:0,rounding:0,bordersize:0";
compact = ",gapsin:0, gapsout:0, rounding:0, bordersize:0";
in
[
"${d1}, 11"
"${d1}, 11, default:true"
"${d1}, 12"
"${d1}, 13"
"${d1}, 14"
@@ -124,9 +125,9 @@ in
"${d1}, 17"
"${d1}, 18"
"${d1}, 19"
"${d1}, 10${compact}"
"${d1}, 100${compact}"
"${d2}, 21${compact}"
"${d1}, 10 ${compact}"
"${d1}, 100 ${compact}"
"${d2}, 21 ${compact}"
"${d2}, 22"
"${d2}, 23"
"${d2}, 24"
@@ -136,7 +137,7 @@ in
"${d2}, 28"
"${d2}, 29"
"${d2}, 20"
"${d3}, 31"
"${d3}, 31, default:true"
"${d3}, 32"
"${d3}, 33"
"${d3}, 34"
@@ -145,12 +146,12 @@ in
"${d3}, 37"
"${d3}, 38"
"${d3}, 39"
"${d3}, 30"
"${d3}, 30 ${compact}"
];
"device:logitech-wireless-mouse-mx-master-1" = {
sensitivity = -0.2;
};
# "device:logitech-wireless-mouse-mx-master-1" = {
# sensitivity = -0.2;
# };
env = if nvidia.enable == true then [
@@ -216,11 +217,11 @@ in
# bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o
# bezier = "myBezier, 0.83, 0, 0.17, 1"; # io
bezier = "myBezier, 0.33, 1, 0.68, 1";
animation = [
animation = let direction = if host == "NxXPS" then "slide" else "slidevert"; in [
"windows, 1, ${animation-speed}, myBezier, slide"
"border, 1, ${animation-speed}, myBezier"
"fade, 1, ${animation-speed}, myBezier"
"workspaces, 1, ${animation-speed}, myBezier, slide"
"workspaces, 1, ${animation-speed}, myBezier, ${direction}"
];
};
@@ -382,6 +383,7 @@ in
## ROW 2:
#bind = SUPER, TAB, hycov:toggleoverview
"SUPER, TAB, hyprexpo:expo, toggle"
"ALT, TAB, focuscurrentorlast"
"SUPER, Q, killactive"
"SUPER, W, exec, waybar_mode set '󰈹 '"
@@ -407,7 +409,6 @@ in
"SUPER, A, execr, waybar_mode set ' 󰹑 '"
"SUPER, A, submap, scrL"
"SUPER, S, exec, spotify"
# "SUPER, D, exec, discord "
"SUPER, D, exec, vesktop"
"SUPER, F, fullscreen"
"SUPER, G, exec, xrandr --verbose --output 'DP-1' --primary && lutris"
@@ -495,6 +496,21 @@ in
bindl = [
# ",switch:on:Lid Switch, exec, hyprlock &"
];
# plugin = {
# hyprexpo = {
# columns = 1;
# gap_size = gap-size;
# bg_col = "rgb(ff1111)";
# workspace_method = "center current"; # [center/first] [workspace] e.g. first 1 or center m+1
# enable_gesture = true; # laptop touchpad, 4 fingers
# gesture_distance = "300"; # how far is the "max"
# gesture_positive = true; # positive = swipe down. Negative = swipe up.
# };
# };
};
@@ -787,6 +803,22 @@ in
bind = , Escape, execr, waybar_mode unset
bind = , Escape, submap, reset
submap = reset
plugin {
hyprexpo {
columns = 3
gap_size = ${builtins.toString gap-size}
bg_col = rgb(${rice.color.background})
workspace_method = [10] # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true # laptop touchpad, 4 fingers
gesture_distance = 300 # how far is the "max"
gesture_positive = true # positive = swipe down. Negative = swipe up.
}
}
'';
};