Awesome-like workspaces for Hyprland

Overview

Hyprsome

Hyprsome is a binary that interacts with Hyprland's Unix socket to make workspaces behave similarly to AwesomeWM in a multi-monitor setup.

If you're focused on a monitor and press SUPER+[1-9], you'll only switch to the workspaces that are bound to that monitor.

It is inspired by Swaysome, which does a similar thing for Sway.

Installation

cargo install hyprsome

Usage

Once the binary is installed, you can modify your ~/.config/hypr/hyprland.conf to accomodate it. Here is an example of a dual monitor setup:

monitor=DP-1,1920x1080@60,0x0,1.33
monitor=DP-1,transform,1
workspace=DP-1,1
monitor=HDMI-A-1,3440x1440@100,813x0,1
workspace=HDMI-A-1,11

Most noteworthy thing here is the 'workspace' keyword that I use to bind a default workspace for each monitor.

Then you can bind workspaces to your different monitors.

It is very important that you bind your workspaces in order.

Check the results of hyprctl monitors. Bind workspaces from 1 to 9 on your monitor that has 0 as an id.

Then just bind workspaces by prefixing numbers by the id of the monitor they're bound to.

Here, HDMI-A-1's id is 1, so I bind workspaces from 11 to 19 to it.

  wsbind=1,DP-1
  wsbind=2,DP-1
  wsbind=3,DP-1
  wsbind=4,DP-1
  wsbind=5,DP-1

  wsbind=11,HDMI-A-1
  wsbind=12,HDMI-A-1
  wsbind=13,HDMI-A-1
  wsbind=14,HDMI-A-1
  wsbind=15,HDMI-A-1

Then it's just a matter of making sure your regular workspace keybinds call hyprsome.

bind=SUPER,1,exec,hyprsome workspace 1
bind=SUPER,2,exec,hyprsome workspace 2
bind=SUPER,3,exec,hyprsome workspace 3
bind=SUPER,4,exec,hyprsome workspace 4
bind=SUPER,5,exec,hyprsome workspace 5

bind=SUPERSHIFT,1,exec,hyprsome move 1
bind=SUPERSHIFT,2,exec,hyprsome move 2
bind=SUPERSHIFT,3,exec,hyprsome move 3
bind=SUPERSHIFT,4,exec,hyprsome move 4
bind=SUPERSHIFT,5,exec,hyprsome move 5

Limitations

This is alpha software and my first program in Rust, bugs are bound to happen but nothing that will break your system.

Some features are most likely missing.

You can only have 9 workspaces per monitor as of now.

I haven't worked on supporting monitor hot-plug at all. It may work but it's unlikely.

You might also like...
rust awesome(资源). 💥
rust awesome(资源). 💥

Rust Boom 💥 Rust Boom 是一个仓主在学习使用 Rust 的时候,对 Rust 的一些难点的解决方法以及一些 Rust 开源的好玩的库、书籍、文章的整理,希望可以帮助更多的 Rust 初学者来翻过 Rust 这座大山。 TOC Rust Boom 💥 TOC Blasting

An awesome CLI tool for effectively learning Rust and more. Project winner of the RustFi 2022 hackathon
An awesome CLI tool for effectively learning Rust and more. Project winner of the RustFi 2022 hackathon

rlrn An awesome CLI tool for effectively learning Rust and more Table of Contents About The Project Built With Getting Started Prerequisites Installat

The awesome-app Command Line Interface

Rust CLI to create Awesome Applications with Rust. More info at awesomeapp.org Install cargo install awesome-app Create your first app: # Create you

 (Pre-Release Software) Secure, Encrypted, P2P chat written atop Warp, IPFS, LibP2P, Dioxus and many more awesome projects and protocols.
(Pre-Release Software) Secure, Encrypted, P2P chat written atop Warp, IPFS, LibP2P, Dioxus and many more awesome projects and protocols.

Uplink Privacy First, Modular, P2P messaging client built atop Warp. Uplink is written in pure Rust with a UI in Dioxus (which is also written in Rust

Little example projects for learning Rust and building awesome cli tools! ⭐️

rust-cli-examples Examples of clean and well-tested command line utilities, written in Rust. 🦀 👍 What is this repo? This repo is a collection of man

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models
Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models

Striving to create a great Application with full functions of learning languages by ChatGPT, TTS, STT and other awesome AI models, supports talking, speaking assessment, memorizing words with contexts, Listening test, so on.

Little exercises for learning Rust and building awesome cli tools! ⭐️

rust-cli-exercises Little exercises for learning Rust and building awesome cli tools! ⭐️ What's Here This repo is a collection of many extremely small

Super-lightweight Immediate-mode Embedded GUI framework, based on the awesome embedded-graphics library. Written in Rust.

Kolibri - A GUI framework made to be as lightweight as its namesake What is Kolibri? Kolibri is an embedded Immediate Mode GUI mini-framework very str

Rust awesome(资源). 💥
Rust awesome(资源). 💥

Rust Boom 💥 Rust Boom 是一个仓主在学习使用 Rust 的时候,对 Rust 的一些难点的解决方法以及一些 Rust 开源的好玩的库、书籍、文章的整理,希望可以帮助更多的 Rust 初学者来翻过 Rust 这座大山。 TOC Rust Boom 💥 TOC Blasting

Comments
  • Focusing workspace goes to different monitor

    Focusing workspace goes to different monitor

    Hi,

    Here's my current config:

    monitor=,preferred,auto,1
    monitor=DP-2, 1920x1080, 0x0, 1
    workspace=DP-2, 11
    monitor=eDP-1, 2560x1600, 1920x0, 1
    workspace=eDP-1,1
    monitor=HDMI-A-1, 1920x1080, 4480x0, 1
    workspace=HDMI-A-1, 21
    
    # workspaces, needs https://github.com/sopa0/hyprsome
    
    wsbind=1,eDP-1
    wsbind=2,eDP-1
    wsbind=3,eDP-1
    wsbind=4,eDP-1
    wsbind=5,eDP-1
    
    
    wsbind=11,DP-2
    wsbind=12,DP-2
    wsbind=13,DP-2
    wsbind=14,DP-2
    wsbind=15,DP-2
    
    
    wsbind=21,HDMI-A-1
    wsbind=22,HDMI-A-1
    wsbind=23,HDMI-A-1
    wsbind=24,HDMI-A-1
    wsbind=25,HDMI-A-1
    

    Keybinds:

    # Switch workspaces with mainMod + [0-9]
    bind = $mainMod, 1, exec, hyprsome workspace 1
    bind = $mainMod, 2, exec, hyprsome workspace 2
    bind = $mainMod, 3, exec, hyprsome workspace 3
    bind = $mainMod, 4, exec, hyprsome workspace 4
    bind = $mainMod, 5, exec, hyprsome workspace 5
    bind = $mainMod, 6, exec, hyprsome workspace 6
    bind = $mainMod, 7, exec, hyprsome workspace 7
    bind = $mainMod, 8, exec, hyprsome workspace 8
    bind = $mainMod, 9, exec, hyprsome workspace 9
    
    # Move active window to a workspace with mainMod + SHIFT + [0-9]
    bind = $mainMod SHIFT, 1, exec, hyprsome move 1
    bind = $mainMod SHIFT, 2, exec, hyprsome move 2
    bind = $mainMod SHIFT, 3, exec, hyprsome move 3
    bind = $mainMod SHIFT, 4, exec, hyprsome move 4
    bind = $mainMod SHIFT, 5, exec, hyprsome move 5
    bind = $mainMod SHIFT, 6, exec, hyprsome move 6
    bind = $mainMod SHIFT, 7, exec, hyprsome move 7
    bind = $mainMod SHIFT, 8, exec, hyprsome move 8
    bind = $mainMod SHIFT, 9, exec, hyprsome move 9
    

    I'm under the impression that with your binary and this config, I should be able to switch to workspace 12 on monitor 2 (DP-2), by pressing SUPER+2 when I'm focused on workspace 11 on monitor 2.

    However, when I try to do this, it focuses monitor 1 instead. If I then press it again with workspace 2 on monitor 1 focused, it will go to workspace 12 on monitor 2 (when it should really be doing nothing, because I'm already focusing on the correct workspace). When I repeatedly press SUPER+2, it will cycle through every second workspace on each monitor.

    I'm guessing this is not at all how this is intended to work. Is something wrong with my config?

    I'm migrating from bspwm, where every monitor had its own set of independant workspaces. Let me know if this is not possible with your binary.

    opened by zjeffer 1
  • Hyprsome works fine via command-line, but fails when used as a keybinding

    Hyprsome works fine via command-line, but fails when used as a keybinding

    If I run hyprsome workspace 2 in a terminal, the workspace switches, as expected.
    However, using the same command in a Hyprland keybinding does nothing at all.

    Here's my relevant hyprland.conf keybindings

    # Workspaces
    bind = $Strong, 1, exec, hyprsome workspace 1
    bind = $Strong, 2, exec, hyprsome workspace 2
    bind = $Strong, 3, exec, hyprsome workspace 3
    bind = $Strong, 4, exec, hyprsome workspace 4
    bind = $Strong, 5, exec, hyprsome workspace 5
    bind = $Strong, 6, exec, hyprsome workspace 6
    bind = $Strong, 7, exec, hyprsome workspace 7
    bind = $Strong, 8, exec, hyprsome workspace 8
    bind = $Strong, 9, exec, hyprsome workspace 9
    
    # Move window to a workspace
    bind = $Strong SHIFT, 1, exec, hyprsome move 1
    bind = $Strong SHIFT, 2, exec, hyprsome move 2
    bind = $Strong SHIFT, 3, exec, hyprsome move 3
    bind = $Strong SHIFT, 4, exec, hyprsome move 4
    bind = $Strong SHIFT, 5, exec, hyprsome move 5
    bind = $Strong SHIFT, 6, exec, hyprsome move 6
    bind = $Strong SHIFT, 7, exec, hyprsome move 7
    bind = $Strong SHIFT, 8, exec, hyprsome move 8
    bind = $Strong SHIFT, 9, exec, hyprsome move 9
    

    Something interesting of note, when I login to a tty, and use the command dbus-launch Hyprland, the keybindings do work as expected, with no issues at all. I tried adding said command to my hyprland.desktop file, but it unfortunately didn't work.

    I use SDDM as a display manager, sugar-light as my theme.
    Fedora Workstation 37

    opened by cwillsey06 2
Owner
null
A visual studio code's workspaces organizer written in Rust

ruscode A visual studio code's workspaces organizer written in Rust Supports Linux, and Windows. What is a workspaces organizer? After months of or ev

晧暐 8 Dec 15, 2022
A cli util to apply themes to hyprland

Hyprtheme works with themes installed at ~/.config/hypr/themes additional themes can be installed from hyprland-community/theme-repo theme.toml this f

Hyprland Community 4 Jan 15, 2023
Alpha Hyprland/Hyprpaper/Hypr configuration file parser

Hyprland/Hyprpaper/Hypr configuration file parser [maintainer=@yavko]

Hyprland Community 4 Feb 22, 2023
An unofficial rust wrapper for hyprland's IPC [maintainer=@yavko]

Hyprland-rs An unofficial rust wrapper for Hyprland's IPC Disclaimer If something doesn't work, doesn't matter what, make sure you are on the latest c

Hyprland Community 68 Apr 26, 2023
KDE activities for hyprland [maintainer=@yavko]

Hypract [WIP] KDE activities for Hyprland using Hyprland-rs Usage This cli tool replaces your workspace change commands so keep that in mind use switc

Hyprland Community 5 Jul 9, 2023
Automatically dim windows in Hyprland when switching between them.

hyprdim hyprdim is a daemon that automatically dims windows in Hyprland when switching between them. Features Easily see which window has focus, even

Donovan Glover 3 Aug 13, 2023
Create, reorder, group, and focus workspaces easily in i3. Fully configurable with enhanced polybar modules.

Create, reorder, group, and focus workspaces fast and easily in i3. Features Focus Mode: Eliminate Distractions Enable Focus Mode: Use groups and focu

i3-wsman 15 Sep 2, 2023
Curated list of awesome projects and resources related to Rust and computer security

Awesome Rust Security Curated list of awesome projects and resources related to Rust and computer security Table of Contents Tools Web and Cloud Secur

Alan 131 Jan 1, 2023
Zash - A Zuper Awesome Shell

Zash - A Zuper Awesome Shell Welcome to zash, its activily being developed and is not near a stable release. Installation Arch: yay -S zash Paru seem

Robiot 27 May 22, 2022
An awesome language and its compiler.

Calocom Project Build Build with cargo-make Just run cargo make in the root directory of the project. Or, if you want to build it in release mode, run

Aoyang Yu 31 Sep 16, 2022