meta(hyprland): Add hycov plugin

This cool plugin makes it possible to press "alt+tab" in order to switch
between all windows in Hyprland, particularly useful if a certain window
you want to focus is a few workspaces away from your current one.

It's also possible to swipe up with 4 fingers to show hycov, from which
you can then use 3 finger motions to switch between the shown windows.

Finally, it's possible to show hycov by simply hovering over the bottom
right part of the screen, similar to the "show desktop" functionality in
certain desktop environments and GNOME's hot corner feature.
This commit is contained in:
Donovan Glover 2024-03-29 14:46:11 -04:00
parent 682e95ef1c
commit 2caaa661d9
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 52 additions and 0 deletions

View File

@ -11,6 +11,14 @@ in
hyprlock
];
wayland.windowManager.hyprland = {
enable = true;
plugins = [
(pkgs.callPackage ../packages/hycov.nix { })
];
};
xdg.configFile."hypr/gaps.sh" = {
executable = true;
text = /* bash */ ''
@ -334,6 +342,21 @@ in
bind = $SUPER_SHIFT, 1, exec, hyprnome --previous --move
bind = $SUPER_SHIFT, 2, exec, hyprnome --move
bind = ALT, tab, hycov:toggleoverview
bind = ALT, h, hycov:movefocus,l
bind = ALT, l, hycov:movefocus,r
bind = ALT, k, hycov:movefocus,u
bind = ALT, j, hycov:movefocus,d
plugin {
hycov {
hotarea_pos = 2
enable_gesture = 1
enable_alt_release_exit = 1
alt_toggle_auto_next = 1
}
}
bind = CTRL, Alt_L, submap, passthrough
submap = passthrough
bind = CTRL, Alt_L, submap, reset

29
packages/hycov.nix Normal file
View File

@ -0,0 +1,29 @@
{
lib,
stdenv,
hyprland,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "hycov";
version = "0.1";
src = fetchFromGitHub {
owner = "Ayuei";
repo = "hycov";
rev = "db6ea8a24f0a58fa69f86db49d7c853754b1b8e1";
hash = "sha256-fSujEAViKqQusHyYe7Qg8QnLlyUNOf0/Jk1P70BmiyE=";
};
inherit (hyprland) nativeBuildInputs;
buildInputs = [ hyprland ] ++ hyprland.buildInputs;
meta = with lib; {
homepage = "https://github.com/Ayuei/hycov";
description = "Clients overview for hyprland plugin";
license = licenses.mit;
platforms = platforms.linux;
};
}