sopa0 / hyprsome Goto Github PK
View Code? Open in Web Editor NEWAwesome-like workspaces for Hyprland
License: Other
Awesome-like workspaces for Hyprland
License: Other
I have a two monitor setup, when I turn them off and back on again, sometimes hyprland workspace 4 will, for example, instead of taking me to workspace 4, it takes me to workspace 24. No fix unless restarting Hyprland (as far as I know).
Doesn't happen using the official hyprland workspace dispatcher.
running cargo install hyprsome
fails with the following:
Compiling hyprsome v0.1.11
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/hyprland_ipc/monitor.rs:14:31
|
14 | monitors.find(|m| m.id == id).unwrap()
| ---- ^^ expected `i128`, found `i16`
| |
| expected because this is `i128`
|
help: you can convert an `i16` to an `i128`
|
14 | monitors.find(|m| m.id == id.into()).unwrap()
| +++++++
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/main.rs:123:34
|
123 | .filter(|c| c.monitor == mon_id)
| --------- ^^^^^^ expected `i128`, found `i16`
| |
| expected because this is `i128`
|
help: you can convert an `i16` to an `i128`
|
123 | .filter(|c| c.monitor == mon_id.into())
| +++++++
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/main.rs:129:34
|
129 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `i16`, found `i128`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: i16) -> Monitor {
| ^^^^^^^^^ -------
help: you can convert an `i128` to an `i16` and panic if the converted value doesn't fit
|
129 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/main.rs:146:34
|
146 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `i16`, found `i128`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: i16) -> Monitor {
| ^^^^^^^^^ -------
help: you can convert an `i128` to an `i16` and panic if the converted value doesn't fit
|
146 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/main.rs:162:34
|
162 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `i16`, found `i128`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: i16) -> Monitor {
| ^^^^^^^^^ -------
help: you can convert an `i128` to an `i16` and panic if the converted value doesn't fit
|
162 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/main.rs:179:34
|
179 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `i16`, found `i128`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/palmerd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprsome-0.1.11/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: i16) -> Monitor {
| ^^^^^^^^^ -------
help: you can convert an `i128` to an `i16` and panic if the converted value doesn't fit
|
179 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
For more information about this error, try `rustc --explain E0308`.
error: could not compile `hyprsome` (bin "hyprsome") due to 6 previous errors
error: failed to compile `hyprsome v0.1.11`, intermediate artifacts can be found at `/tmp/cargo-installeyIPtT`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
I'm on arch.
I don't use rust but I'm assuming it's just some type errors, I'll see if I can fix and create a PR.
Not sure if something is wrong with my config or recent update to how workspace work in hyprland
i got error where every wsbind
was in my config
hyprctl clients -j | jq 'group_by(.monitor) | map({ monitor: .[0].monitor, workspaces: map({ workspace: .workspace.id, class: .class })})'
[
{
"monitor": 0,
"workspaces": [
{
"workspace": -1337,
"class": "Brave-browser"
}
]
},
{
"monitor": 1,
"workspaces": [
{
"workspace": -1338,
"class": "org.wezfurlong.wezterm"
},
{
"workspace": 11,
"class": "org.wezfurlong.wezterm"
}
]
}
]
workspace settings
$mainMod = SUPER
workspace=name:1,monitor:eDP-1,default:true
workspace=name:2,monitor:eDP-1
workspace=name:3,monitor:eDP-1
workspace=name:4,monitor:eDP-1
workspace=name:5,monitor:eDP-1
workspace=name:6,monitor:eDP-1
workspace=name:7,monitor:eDP-1
workspace=name:8,monitor:eDP-1
workspace=name:9,monitor:eDP-1
workspace=name:11,monitor:HDMI-A-1,default:true
workspace=name:12,monitor:HDMI-A-1
workspace=name:13,monitor:HDMI-A-1
workspace=name:14,monitor:HDMI-A-1
workspace=name:15,monitor:HDMI-A-1
workspace=name:16,monitor:HDMI-A-1
workspace=name:17,monitor:HDMI-A-1
workspace=name:18,monitor:HDMI-A-1
workspace=name:19,monitor:HDMI-A-1
# switch to workspace
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
# bind = ALT, TAB, focuscurrentorlast
# move window to workspce
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
when i switch window to another workspace / monitor its lost
lost in the sense it shows up in hyprctl clients but not in active workspace. or waybar
also as far as I remember workspace id used to match with workspace name.
Just putting it here cause. I don't really know whats happening.
Hi i just installed hyprsome and added this to my config:
workspace=1,monitor:DP-1
workspace=2,monitor:DP-1
workspace=3,monitor:DP-1
workspace=4,monitor:DP-1
workspace=5,monitor:DP-1
workspace=6,monitor:HDMI-A-1
workspace=7,monitor:HDMI-A-1
workspace=8,monitor:HDMI-A-1
workspace=9,monitor:HDMI-A-1
workspace=10,monitor:HDMI-A-1
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 = $SUPER, 6, exec, hyprsome workspace 6
bind = $SUPER, 7, exec, hyprsome workspace 7
bind = $SUPER, 8, exec, hyprsome workspace 8
bind = $SUPER, 9, exec, hyprsome workspace 9
bind = $SUPER, 0, exec, hyprsome workspace 10
When I save the file and press $SUPER+# it takes me to that workspace +10. For example pressing $SUPER+1 takes me to workspace 11 and $SUPER+0 takes me to 110(??). The only way I can get back workspace 1 is by opening a window and $mainMod+shift+1'ing it back to the first workspace.
When I install hyprsome, I get this error.
OS: Arch Linux x86_64
Kernel: 6.2.9-zen1-1-zen
DE: Hyprland
Terminal: WezTerm
CPU: AMD Ryzen 3 3200G (4) @ 3.600GHz
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
Memory: 4149MiB / 13909MiB
GPU Driver: amdgpu
cargo 1.64.0 (387270bc7 2022-09-16)
Error Message
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:14:57
|
14 | let monitor = monitors.into_iter().find(|m| m.id == id).unwrap();
| ^^ expected `i16`, found `u8`
error[E0277]: can't compare `i16` with `u8`
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:14:54
|
14 | let monitor = monitors.into_iter().find(|m| m.id == id).unwrap();
| ^^ no implementation for `i16 == u8`
|
= help: the trait `PartialEq<u8>` is not implemented for `i16`
= help: the following other types implement trait `PartialEq<Rhs>`:
<f32 as PartialEq<serde_json::Value>>
<f32 as PartialEq>
<f64 as PartialEq<serde_json::Value>>
<f64 as PartialEq>
<i128 as PartialEq>
<i16 as PartialEq<serde_json::Value>>
<i16 as PartialEq>
<i32 as PartialEq<serde_json::Value>>
and 18 others
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:126:34
|
126 | .filter(|c| c.monitor == mon_id)
| ^^^^^^ expected `i16`, found `u8`
error[E0277]: can't compare `i16` with `u8`
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:126:31
|
126 | .filter(|c| c.monitor == mon_id)
| ^^ no implementation for `i16 == u8`
|
= help: the trait `PartialEq<u8>` is not implemented for `i16`
= help: the following other types implement trait `PartialEq<Rhs>`:
<f32 as PartialEq<serde_json::Value>>
<f32 as PartialEq>
<f64 as PartialEq<serde_json::Value>>
<f64 as PartialEq>
<i128 as PartialEq>
<i16 as PartialEq<serde_json::Value>>
<i16 as PartialEq>
<i32 as PartialEq<serde_json::Value>>
and 18 others
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:132:34
|
132 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `u8`, found `i16`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: u8) -> Monitor {
| ^^^^^^^^^ ------
help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit
|
132 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:149:34
|
149 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `u8`, found `i16`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: u8) -> Monitor {
| ^^^^^^^^^ ------
help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit
|
149 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:167:34
|
167 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `u8`, found `i16`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: u8) -> Monitor {
| ^^^^^^^^^ ------
help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit
|
167 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
error[E0308]: mismatched types
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/main.rs:186:34
|
186 | let mon = monitor::get_by_id(aw.monitor);
| ------------------ ^^^^^^^^^^ expected `u8`, found `i16`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/tg/.cargo/registry/src/github.com-1ecc6299db9ec823/hyprsome-0.1.10/src/hyprland_ipc/monitor.rs:12:8
|
12 | pub fn get_by_id(id: u8) -> Monitor {
| ^^^^^^^^^ ------
help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit
|
186 | let mon = monitor::get_by_id(aw.monitor.try_into().unwrap());
| ++++++++++++++++++++
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `hyprsome` due to 8 previous errors
error: failed to compile `hyprsome v0.1.10`, intermediate artifacts can be found at `/tmp/cargo-installz82uiS`
None
Hi, I am unsure why, but this last update of Hyprland broke the functionality of your awesome tool. I am running the git version from the AUR.
Hyprland tries execing hypsome workspace xx but nothing happens. I am usnure where to find Hyprsome logs so please if someone could direct me Id gladly provide them.
For now I just downgraded to Hyprland 0.39.1-5 and it works great again.
Hyprsome is awesome ๐
In Hyprland there is an option to move a window to a workspace 'silently' movetoworkspacesilent
- i.e. without moving the focus to the target workspace.
I would like to request the same kind of option with Hyprsome's move command.
Hi,
Really loving hyprsome
but i would love to be able to move a window to the other monitor by doing hyprsome move 1
whilst currently on the other monitors workspace 1
When attempting to use hyprsome on hyprland-git, i get this error
thread 'main' panicked at /home/beyley/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyprland-0.3.1/src/data/regular.rs:25:19:
A error occured while parsing the output from the hypr socket: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Example:
โช hyprsome focus l
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SerdeError(Error("data did not match any variant of untagged enum Aux", line: 0, column: 0))', src/hyprland_ipc/client.rs:8:26
I'm using the hyprsome-git
aur package. Let me know if there is any additional data I can give that would be useful to debug this issue.
--
I initially used hyprsome focus l|r|u|d
instead of the movefocus
command of hyprland itself because the latter had some strange behavior paired with hyprsome. (I honestly don't even remember what it was). That issue now seems to be gone, and I can use movefocus
instead, so fixing this is perhaps not a huge priority. Other aspects of hyprsome
work just fine.
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.