Commit graph

93 commits

Author SHA1 Message Date
Skia
b36ba07d06 Release 2.1.0 2023-11-30 16:18:38 +01:00
Skia
5f2cd2b300 README: add a link to the Matrix room 2023-11-27 11:27:35 +01:00
Skia
aa3b47fbad get_current_*: don't use outdated cache is these functions
Fixes https://gitlab.com/hyask/swaysome/-/issues/18
Thanks a lot @mahieujeremy for reporting that and providing a fix so quickly!
2023-11-27 11:12:33 +01:00
Skia
9da99893c4 Improve documentation and default config 2023-11-17 17:56:17 +01:00
Skia
36c1ef68da Cargo: bump all dependencies 2023-11-17 17:55:48 +01:00
Skia
3ccf1d6eda Add WorkspaceGroup{Next,Prev}Output command 2023-11-16 15:20:54 +01:00
Skia
90ec4a2566 Rework everything to have a global SwaySome object with methods in it
This allows easily keeping state across the various function calls.
2023-11-14 09:44:36 +01:00
Skia
99a99648b1 simplify clap structures 2023-11-13 15:52:39 +01:00
Skia
6d8c19e8a7 cargo fmt 2023-11-13 15:42:25 +01:00
Skia
6d26286583 Improve socket discovery, handling, and logging
Implement the following logic:
* first try SWAYSOCK
* if failed, then try I3SOCK, the legacy one coming from i3
* if failed, then we abort with an error
2023-11-07 08:36:10 +02:00
Skia
cdd5a24dc6 Merge branch 'master' into 'master'
Added constant for maximum workspaces per group instead of hardcoded 10

Hello creators of swaysome.

I love this program, its quite nice, thank you for sharing it ^.^

However, I can't live with just 10 workspaces per group, I need more.

So, instead of having the base 10 hard-coded all around, I created a constant, which  I named `MAX_GROUP_WS` due to my super creative naming skills. This way, anyone could change the groups naming and the limit of workspaces with just modifying a simple constant.

Examples:
```
 MAX     Naming
  10 →   17,   27
 100 →  107,  207
1000 → 1007, 2007
  15 →   22,   37
```

On my local setup I use 100, so its easy to know which group I'm in, and I recommend others to either use 10 or 100. That said, nothing prevents you from using other bases, such as hexadecimal (16), or 69...

To keep backwards compatibility, and not break any setup, I kept the default as `10`.

If you like my change, feel free to merge it! 

See merge request hyask/swaysome!12
2023-06-06 08:41:39 +00:00
LluisE
91f697cb42 Feature MAX_GROUP_WS constant instead of hardcoded 10 2023-06-05 20:37:19 +02:00
Skia
c24d02e284 Merge branch 'master' into 'master'
Note about (un)bindcode or (un)bindsym and order numbering

Added a note about using either (un)bindcode or (un)bindsym and re-ordered numbering to use single digits instead of double digits in the README. 

See merge request hyask/swaysome!11
2023-05-02 08:37:40 +00:00
Andrei S
05ca3b8f4a Note about (un)bindcode or (un)bindsym and order numbering 2023-04-27 12:02:41 +00:00
Skia
9772931af9 get_output: always filter out inactive outputs 2023-03-09 23:50:02 +01:00
Skia
7b3de58cd9 README: improved description to include workspace groups 2023-03-03 17:50:21 +01:00
Skia
7daf8ffd77 Release 2.0.0 2023-03-03 17:13:46 +01:00
Nabos
bc8ac73ddb Adding Nabos to authors 2023-03-03 16:12:49 +01:00
Nabos
4e7eed7b99 Merge branch 'move_to_group' into 'master'
Added move-to-group

 

See merge request hyask/swaysome!10
2023-03-03 14:41:51 +00:00
Nabos
cf86c9bd22 Added move-to-group 2023-03-03 14:41:51 +00:00
Skia
2541b0aa2c README: add a mention about '$PATH' issues (#11) 2023-03-02 12:49:10 +01:00
Skia
faf309ce81 Output: set a default for 'active' instead of failing 2023-02-07 11:32:38 +01:00
Skia
13b9687c0a README: small form improvements 2023-02-07 11:16:37 +01:00
Nabos
dd22264536 Merge branch 'fix_group_index' into 'master'
Group index fix

Check group index lower limit 

See merge request hyask/swaysome!9
2023-01-17 14:50:02 +00:00
Nabos
0db1faa1c5 Check group index lower limit 2023-01-17 15:47:27 +01:00
Skia
1234264d75 Merge branch 'workspaces_groups' 2023-01-16 11:27:38 +01:00
Skia
e8fc73c5da Merge branch 'workspaces_groups' into 'master'
Workspaces groups

This feature brings a lot of new possibilities.

A workspace group is group of ten workspaces inside a decimal range (ex: from 10 to 19).
It introduces `relative` and `absolute` scopes.

For a move or a focus, if the target index is only one digit it will focus the wanted workspace relative to the current group focused.

But if the target index is above 9, it will directly focus the workspace inside the group if it is already opened, if not, it will open the group on the current screen.

Example 1: I'm focused on 21. If I do `swaysome focus 5` it's going to focus the workspace 25 on the same output than the other 20s.

Example 2: I'm focused on 21. If I do `swaysome focus 35` it's going to focus the workspace 35. If there is no 30s opened yet, it's going to open it on my current screen, but I already have 32 opened on another screen, so it's going to open the workspace 35 on it.


It also brings the `next-group` and `prev-group` features to switch focus from 21 to 31 or 21 to 11 for example.

There is the `focus-group` action that allows you to directly focus a specified group and so creating multiple workspace groups on one output (For example, 20s for work and 30s for private stuff).

There is one breaking behavior: I had to edit the `init` function to begin from 10 and not from 1.

So with `swaysome init 1`, a triple screen is now initialized like this: 11, 21, 31 instead of 1, 11, 21. 

See merge request hyask/swaysome!6
2023-01-16 10:26:23 +00:00
Skia
0566cf106e README: fix '{next,prev}-output' and add 'Breaking changes' section 2023-01-16 11:15:01 +01:00
Skia
5380131ee9 Fix 'move_container_to_next_or_prev_output' and 'current_output_index' 2023-01-16 11:11:03 +01:00
Skia
29a0afe619 Merge branch 'cli_parser_argument_types' into 'master'
Cli parser argument types

Just a little stronger typing on the CLI arguments 

See merge request hyask/swaysome!5
2023-01-13 16:09:43 +00:00
Skia
dfb6e79a3a Merge branch 'rearrange_workspaces' into 'master'
Rearrange workspaces

Based of the args parser rework, I added a feature to rearrange the missplaced workspaces.
It is useful when you unplug a screen, create a workspace then plug the screen back.
In this scenario, the screen won't move back to the correct screen when the screen is plugged back.
I don't know if there could be a way to fix this behavior instead of creating a feature to repair it each time.
Let me know what you think 

See merge request hyask/swaysome!4
2023-01-13 16:08:40 +00:00
Nabos
1c8ab4246a Fix minimum output index 2022-12-23 09:59:06 +01:00
Nabos
1334bde4bd Updated Readme 2022-12-23 09:25:13 +01:00
Nabos
a0dc360e37 Removed debug print 2022-12-23 09:10:58 +01:00
Skia
997f50c759 Merge branch 'Renner0E-master-patch-46524' into 'master'
readme: install option for arch

 

See merge request hyask/swaysome!8
2022-11-30 08:55:13 +00:00
Renner0E
b57fb3d7b2 readme: install option for arch 2022-11-29 17:00:32 +00:00
Skia
d700e562ce pkgbuild: set an obviously dummy version number
This is to show that it isn't used and need no bump upon new release.
Was discussed on https://gitlab.com/hyask/swaysome/-/merge_requests/7
2022-11-29 10:16:51 +01:00
Skia
25b92a7d26 Merge branch 'AUR' into 'master'
added PKGBUILD for AUR

This is my first merge request and PKGBUILD for the AUR. 

See merge request hyask/swaysome!7
2022-11-29 09:12:26 +00:00
renner0e
685c75d889 added PKGBUILD for AUR 2022-11-14 16:42:03 +01:00
Nabos
4620e8ab2c Fix focus to group when already existing group 2022-08-25 15:25:32 +02:00
Nabos
4ec989ed72 Fix focus to group when no existing workspace 2022-08-23 15:14:19 +02:00
Nabos
72c34cb5e5 Fix focus next/prev group 2022-08-17 14:14:48 +02:00
Nabos
b6f81aa7bb Finished workspace groups 2022-08-17 11:17:47 +02:00
Nabos
286760ade6 Added Groups 2022-08-11 17:36:34 +02:00
Nabos
dd848dfe04 Strongly typed workspace indexes and output indexes 2022-08-05 12:58:39 +02:00
Nabos
6fe7ca7bc3 Check for screen number 2022-08-05 12:56:00 +02:00
Skia
f6278fcef2 Merge branch 'cli_parser_rework' into 'master'
Reworked argument parsing

Using Clap struct parser for cleaner and safer argument parsing. 

See merge request hyask/swaysome!3
2022-08-03 22:18:28 +00:00
Nabos
b39b51ad58 Added a rearrange workspaces feature 2022-08-03 16:05:38 +02:00
Nabos
90e1e46fb2 Reworked argument parsing 2022-08-03 16:04:56 +02:00
Skia
d57d98697b Release 1.1.5 2022-05-23 01:22:42 +02:00