Skip to content

raybbian/hyprtasking

Repository files navigation

Hyprtasking

Powerful workspace management plugin, packed with features.

Important

  • Supports Hyprland release v0.46.2-v0.49.0.
demo_small.mp4

Roadmap

  • Modular Layouts
    • Grid layout
    • Linear layout
    • Minimap layout
  • Mouse controls
    • Exit into workspace (hover, click)
    • Drag and drop windows
  • Keyboard controls
    • Switch workspaces with direction
    • Switch workspaces with absolute number
  • Multi-monitor support (tested)
  • Monitor scaling support (tested)
  • Animation support
  • Configurability
    • Overview exit behavior
    • Number of visible workspaces
    • Custom workspace layouts
    • Toggle behavior
    • Toggle keybind
  • Touch and gesture support
  • Overview layers

Installation

Hyprpm

hyprpm add https://github.com/raybbian/hyprtasking
hyprpm enable hyprtasking

Nix

Add hyprtasking to your flake inputs

# flake.nix
{
  inputs = {
    hyprland.url = "github:hyprwm/Hyprland/v0.49.0";

    hyprtasking = {
      url = "github:raybbian/hyprtasking";
      inputs.hyprland.follows = "hyprland";
    };
  };
  # ...
}

Include the plugin in the hyprland home manager options

# home.nix
{ inputs, ... }:
{
  wayland.windowManager.hyprland = {
    plugins = [
      inputs.hyprtasking.packages.${pkgs.system}.hyprtasking
    ];
  }
}

Manual

To build, have hyprland headers installed on the system and then:

meson setup build
cd build && meson compile

Then use hyprctl plugin load to load the absolute path to the .so file.

Usage

Opening Overview

  • Bind hyprtasking:toggle, all to a keybind to open/close the overlay on all monitors.
  • Bind hyprtasking:toggle, cursor to a keybind to open the overlay on one monitor and close on all monitors.
  • Swipe up/down on a touchpad device to open/close the overlay on one monitor.
  • See below for configuration options.

Interaction

  • Workspace Transitioning:
    • Open the overlay, then use right click to switch to a workspace
    • Use the directional dispatchers hyprtasking:move to switch to a workspace
  • Window management:
    • Left click to drag and drop windows around

Configuration

Example below:

bind = SUPER, tab, hyprtasking:toggle, cursor
bind = SUPER, space, hyprtasking:toggle, all
# NOTE: the lack of a comma after hyprtasking:toggle!
bind = , escape, hyprtasking:if_active, hyprtasking:toggle cursor


bind = SUPER, X, hyprtasking:killhovered

bind = SUPER, H, hyprtasking:move, left
bind = SUPER, J, hyprtasking:move, down
bind = SUPER, K, hyprtasking:move, up
bind = SUPER, L, hyprtasking:move, right

plugin {
    hyprtasking {
        layout = grid

        gap_size = 20
        bg_color = 0xff26233a
        border_size = 4
        exit_on_hovered = false

        gestures {
            enabled = true
            move_fingers = 3
            move_distance = 300
            open_fingers = 4
            open_distance = 300
            open_positive = true
        }

        grid {
            rows = 3
            cols = 3
            loop = false
            gaps_use_aspect_ratio = false
        }

        linear {
            height = 400
            scroll_speed = 1.0
            blur = false
        }
    }
}

Dispatchers

  • hyprtasking:if_active, ARG takes in a dispatch command (one that would be used after hyprctl dispatch ...) that will be dispatched only if the cursor overview is active.

    • Allows you to use e.g. escape to close the overview when it is active. See the example config for more info.
  • hyprtasking:if_not_active, ARG same as above, but if the overview is not active.

  • hyprtasking:toggle, ARG takes in 1 argument that is either cursor or all

    • if the argument is all, then
      • if all overviews are hidden, then all overviews will be shown
      • otherwise all overviews will be hidden
    • if the argument is cursor, then
      • if current monitor's overview is hidden, then it will be shown
      • otherwise all overviews will be hidden
  • hyprtasking:move, ARG takes in 1 argument that is one of up, down, left, right

    • when dispatched, hyprtasking will switch workspaces with a nice animation
  • hyprtasking:movewindow, ARG takes in 1 argument that is one of up, down, left, right

    • when dispatched, hyprtasking will 1. move the hovered window to the workspace in the given direction relative to the window, and 2. switch to that workspace.
  • hyprtasking:killhovered behaves similarly to the standard killactive dispatcher with focus on hover

    • when dispatched, hyprtasking will the currently hovered window, useful when the overview is active.
    • this dispatcher is designed to replace killactive, it will work even when the overview is not active.

Config Options

All options should are prefixed with plugin:hyprtasking:.

Option Type Description Default
layout Hyprlang::STRING The layout to use, either grid or linear grid
bg_color Hyprlang::INT The color of the background of the overlay 0x000000FF
gap_size Hyprlang::FLOAT The width in logical pixels of the gaps between workspaces 8.f
border_size Hyprlang::FLOAT The width in logical pixels of the borders around workspaces 4.f
exit_on_hovered Hyprlang::INT If true, hiding the workspace will exit to the hovered workspace instead of the active workspace. false
gestures:enabled Hyprlang::INT Whether or not to enable gestures true
gestures:move_fingers Hyprlang::INT The number of fingers to use for the "move" gesture 3
gestures:move_distance Hyprlang::FLOAT How large of a swipe on the touchpad corresponds to the width of a workspace 300.f
gestures:open_fingers Hyprlang::INT The number of fingers to use for the "open" gesture 4
gestures:open_distance Hyprlang::FLOAT How large of a swipe on the touchpad is needed for the "open" gesture 300.f
gestures:open_positive Hyprlang::INT true if swiping up should open the overlay, false otherwise true
grid:rows Hyprlang::INT The number of rows to display on the grid overlay 3
grid:cols Hyprlang::INT The number of columns to display on the grid overlay 3
grid:loop Hyprlang::INT When enabled, moving right at the far right of the grid will wrap around to the leftmost workspace, etc. false
grid:gaps_use_aspect_ratio Hyprlang::INT When enabled, vertical gaps will be scaled to match the monitor's aspect ratio false
linear:blur Hyprlang::INT Whether or not to blur the dimmed area false
linear:height Hyprlang::FLOAT The height of the linear overlay in logical pixels 300.f
linear:scroll_speed Hyprlang::FLOAT Scroll speed modifier. Set negative to flip direction 1.f

About

Powerful workspace management plugin, packed with features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published