Skip to content

Commit

Permalink
Added workspace group usage (WS > 10)
Browse files Browse the repository at this point in the history
  • Loading branch information
midn8hustlr committed Feb 23, 2024
1 parent c50562b commit c52e715
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 5 deletions.
85 changes: 80 additions & 5 deletions src/content/docs/en/i-i/02.usage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Usage
layout: /src/layouts/autonum.astro
lastUpdated: 2024-02-18
lastUpdated: 2024-02-23
---

# General
Expand All @@ -15,17 +15,17 @@ Press `Super` or `Super`+`Tab` to open.
- Right-click for a few options
- **Search**
- <u>Calculation</u>: Type something starting with a number
- <u>Commands</u>: They'll be detected and shown to you if you type in.
- <u>Commands</u>: They'll be detected and shown to you if you type in.
- Performs a headless execution by default
- If the command starts with sudo, it'll be launched in `foot` terminal.
- <u>Directory search</u>: Type a directory starting with `~` or `/`.
- <u>Directory search</u>: Type a directory starting with `~` or `/`.
- Subdirectories will be shown if the path is correct. Activating opens folder/file
- Hit enter directly on the entry to open the typed folder/file
- <u>Actions</u>: An actions starts with `>`. See the keybind cheatsheet for a list of actions
- <u>Apps</u> by default, of course!

# Bar controls
- Media:
- Media:
- Top-right corner
- Middle-click: play/pause media
- Right-click: next track
Expand All @@ -35,6 +35,81 @@ Press `Super` or `Super`+`Tab` to open.
- Launcher: Middle-click workspace widget
- Virtual keyboard: Right-click workspace widget

# Workspace Groups

## Introduction

By default the bar shows workspaces upto 10. However, many users find themselves needing more than the limit of 10 workspaces. Cluttered workspaces or rearranging windows becomes a hassle as the number of open applications increases.

Workspace Grouping introduces a flexible system that allows for an unlimited number of workspaces (within Hyprland's limit), organized into groups for streamlined navigation and management.

## Key Features

- **Scalable Workspaces**: Go beyond the 10-workspace limit without cluttering workspace bar or overview widget. Create as many workspaces as needed without compromising organization.
- **Workspace Groups**: Workspaces are automatically divided into groups of 10 (e.g., 1-10, 11-20, 21-30). The active workspace determines the visible group in the bar.
- **Focused Navigation**: The workspace bar dynamically updates to reflect the currently active group. A single dot '•' decoration highlights the active workspace within the group for clarity.
- **Enhanced Overview**: The overview widget (`SUPER`) mirrors the workspace-grouping concept, only the workspaces in active groups are shown.
- **Keybind Support**: Hyprland keybinds adapt seamlessly to this feature.
- Pressing `Super` + `3` moves you to workspace 3 if your current workspace is 1-10, or workspace 13 if your current workspace is 11-20.

## Benefits

- **Multitasking Mastery**: Effortlessly switch between different tasks or projects by dedicating workspace groups to specific contexts.
- **Decluttered Environment**: Maintain a clean and organized desktop experience, even with a high number of workspaces.
- **Multi-Monitor Power**: Create monitor-specific workspace groups for an [awesome-wm](https://awesomewm.org/) inspired workflow.
- E.g. 1-10 in monitor-1, 11-20 in monitor-2, 21-30 in monitors-3, and so on.

## Navigation & Workspace Management

- **Navigating / moving workspaces within a group**: Standard Hyprland keybinds apply.
- `Super` + `2` navigates to workspace 2 if the current workspace is within 1-10 (group 1).
- `Super` + `2` navigates to workspace 12 if the current workspace is within 11-20 (group 2).
- `Super` + `Alt` + `3` silently moves the focused window to workspace 3 if the current workspace is within 1-10 (group 1).
- `Super` + `Alt` + `3` silently moves the focused window to workspace 13 if the current workspace is within 11-20 (group 2).
- **Navigating between groups**:
- Spawn a new workspace in the next group by navigating beyond the last workspace of the current group. E.g., Press `Super` + `0` to move to workspace 10, and then press `Control` + `Super` + `Right` to move to the next workspace, i.e. 11 in the next group.
- Alternatively, you can scroll with the cursor over workspace bar to quickly navigate to the next group.
- Consider adding following Hyprland keybinds for direct group jumps.
```ini title="keybinds.conf"
bind = SUPER ALT, Z, workspace, r-10
bind = SUPER ALT, X, workspace, r+10
```
- The overview widget also provides versatile window and workspace management. View all windows and workspaces within a group using `SUPER`, drag-and-drop windows between workspaces in that group, access additional options by right-clicking on any window.
:::tip
If you wish to modify the keybinds or include [more features](https://wiki.hyprland.org/Configuring/Dispatchers/) for workspace navigation, use `${HOME}/.config/ags/scripts/hyprland/workspace_action.sh` script, instead of `hyprctl dispatch`. This will determine the current workspace group using the active workspace ID and dispatch to the proper workspace.
:::

## Multi-Monitor Considerations

Consider these strategies for effective multi-monitor management:
- Allot group 1 (workspaces 1-10) to primary monitor while group 2 (workspaces 11-20) to secondary monitor.
- On startup, manually move the starting workspace on the secondary monitor into the second group (e.g., workspace 11) using `Super` + `0`, then `Control` + `Super` + `Right`.
- In effect, this will also create separate overview widget per monitor.
- Use [workspace binding](https://wiki.hyprland.org/Configuring/Workspace-Rules/#rules) to always place specific workspaces on specific monitors. Get all your monitor names using `hyprctl monitors | grep Monitor`.
```ini title="hyprland.conf"
# Bind workspaces 1-10 (group 1) to primary monitor
workspace = 1, monitor:eDP-1, default:true
workspace = 2, monitor:eDP-1, default:true
workspace = 3, monitor:eDP-1, default:true
workspace = 4, monitor:eDP-1, default:true
workspace = 5, monitor:eDP-1, default:true
...

# Bind workspaces 11-20 (group 2) to secondary monitor
workspace = 11, monitor:HDMI-A-1, default:true
workspace = 12, monitor:HDMI-A-1, default:true
workspace = 13, monitor:HDMI-A-1, default:true
workspace = 14, monitor:HDMI-A-1, default:true
workspace = 15, monitor:HDMI-A-1, default:true
...
```
- Focus on two workspaces at a time on each monitor and move/swap windows across monitor/groups (using `Super` + `Left/Right/Up/Down` or `Super` + `Shift` + `Left/Right/Up/Down`) as needed.

:::note
Workspace groups is not natively supported in Hyprland, AGS or any status bar programs like Waybar/Polybar. This setup tries to achieve this by simple tinkering wth Hyprland dispatcher and few custom AGS modules. If you feel certain elements would benefit from further refinement, feel free to open a discussion or submit a PR.
:::


# Configure Hyprland
To configure Hyprland, edit the config files of Hyprland which locate under `~/.config/hypr/`.

Expand Down Expand Up @@ -79,7 +154,7 @@ Reference: <https://github.com/end-4/dots-hyprland/issues/228>

## How to set city for weather widget?
- By default, it's detected by `curl ipinfo.io`.
- You can set the value with the env var `$AGS_WEATHER_CITY`.
- You can set the value with the env var `$AGS_WEATHER_CITY`.

For example, if you're in Toronto, you can add the following to `~/.config/hypr/env.conf`:
```ini
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/vi/i-i/02.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: Sử dụng
layout: /src/layouts/autonum.astro
lastUpdated: 2024-02-18
---
:::caution[l10n-notify]
Bản dịch này đã cũ và cần được cập nhật. Bản gốc (tiếng Anh) được sửa lần cuối vào: 2024-02-23
:::

# Chung
- Ấn `Super`+`/` để xem danh sách phím tắt
Expand Down
3 changes: 3 additions & 0 deletions src/content/docs/zh-cn/i-i/02.usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title: 使用方法
layout: /src/layouts/autonum.astro
lastUpdated: 2024-02-18
---
:::caution[l10n-notify]
此页面的翻译已过时。其英语原文的最新版本的时间是:2024-02-23
:::

# 一般
-`Super`+`/` 来显示按键绑定速查表
Expand Down

0 comments on commit c52e715

Please sign in to comment.