Commit Graph

16 Commits

Author SHA1 Message Date
Alexis Rouillard 12725f4418
Merge pull request #2220 from sigboe/warp-on-scroll-toggle
sway/workspaces: setting to not warp to window when scrolling
2023-07-04 22:42:53 +02:00
Lasse Luttermann 08e18387c9 Add output port of workspace to template 2023-06-27 13:41:42 +02:00
sigboe a67e692d4a sway: warp-on-scroll toggle 2023-06-07 15:49:11 +02:00
Louis DeLosSantos 8b512e7b22 sway,feat: allow alphabetical sort
for users who do not utilize any form of "workspace prev/next" commands,
it can be very handle to sort the workspaces alphabetically.

this commit adds a new "alphabetical_sort" to the `sway/workspaces`
module which allows the module to alway sort workspaces alphabetically.

this docs are updated to warn the user of the implications involved.

Signed-off-by: Louis DeLosSantos <louis.delos@gmail.com>
2023-01-02 17:03:28 -05:00
Johannes Wienke 4a85ec0f59 fix: match sway workspace order with sway one
Ensure that sway workspaces are always displayed in the same order as
used internally by sway. The previous sorting code always sorted
unnumbered workspaces lexicographically. This isn't the order used by
sway internally. Therefore, commands such as "workspace next" might have
jumped arbitrarily in waybar.

This commit reworks the sorting code such that the internal order is
always obeyed. Additionally, numbered persistent workspaces are inserted
at their natural position at the front of the workspace list while
unnumbered ones are appended. This should match the expectations of
workspace ordering known from sway's behavior.

The changes make the configuration property "numeric-first" unnecessary
as this will always be the case now. There's also no reasonable way
around this behavior now. Otherwise, persistent workspaces would jump
around in the visual representation as soon as they become known to
sway.

Fixes #802
2022-01-07 10:26:27 +01:00
Genesis 7eb2a6b709
Add a configuration entry to disable auto_back_and_forth on Sway workspaces 2021-02-02 21:58:26 +01:00
Pedro Côrte-Real 0aa8c03bea Add missing * in man page 2020-08-13 20:11:55 +01:00
Pedro Côrte-Real 29fa74f621 Add IDs to sway workspace buttons for CSS styling
In case you want to style a specific workspace add IDs to the workspace
buttons. Styling is done by matching button#sway-workspace-${name}.
2020-08-13 11:36:19 +01:00
Pedro Côrte-Real 8f10c9056c Add option for no workspace switch on click
In sway/workspaces, just like disable-scroll turns on/off the ability to
change workspaces by scrolling the mouse add disable-click that turns
on/off the ability to change workspaces by clicking.
2020-08-12 11:38:48 +01:00
Michael Rodler 6fe764540c sway/workspaces: sort by the "num" property provided by sway, configurable whether numeric workspace names come first
Sway provides the workspace "num" property which is an integer number of
the workspace, i.e., workspace "3" -> 3 and also "3dev" -> "3". This
commit uses this property to sort the workspaces, which makes sense when
persistent workspaces or all-output is specified. This commit also adds
a new configuration option, whether the numeric workspaces come in front
or after workspaces that have non-numeric name.
2020-05-05 09:15:20 +02:00
Michael Rodler c602d38c8e sway/workspaces added current_output CSS class to buttons.
All workspace buttons that are visible on the same output as the current waybar can be styled with the `current_output` css class.

This is really only useful in combination with the `"all-outputs":
true`. Then the workspaces that are on the current output can be styled
differently than the workspace on other outputs, while all are visible
in the waybar.
2020-05-04 16:16:09 +02:00
Alex d1c4897f31 feat: update man 2020-04-12 18:38:51 +02:00
Alex 27fbea2b5a refactor(workspaces): default value unstripped, fix man 2020-04-06 12:42:29 +02:00
Alex bb2c16386b feat: format-icon for persistent workspaces 2020-04-04 21:13:25 +02:00
Birger Schacht 2646390e28 Fix typo: persistant -> persistent 2019-08-31 19:57:44 +02:00
Michael Aquilina c19a63e85e
Add waybar-sway-workspaces(5) 2019-08-26 18:08:59 +01:00