Commit Graph

222 Commits

Author SHA1 Message Date
khaneliman c9e1899594
refactor: deprecate instead of remove persistent_workspaces 2023-09-05 16:02:45 -05:00
khaneliman 4a6c1269fb
refactor!: sway persistent workspaces config name rename 2023-09-05 16:02:21 -05:00
zjeffer 28635c1f6d Fixed sway IPC compile warnings 2023-07-30 11:43:34 +02:00
dmitry 05efdb74f0 format 2023-07-20 22:57:33 +03:00
dmitry d3bcff31e5 add high-priority-named optiion 2023-07-20 22:56:15 +03:00
Alex 3e1176e896 fix: lint 2023-07-18 08:35:46 +02:00
Alexis Rouillard 52a8b1d911
Merge pull request #2234 from kris7t/offscreen-app-id
sway/window: app_id on unfocused workspaces
2023-07-18 08:32:32 +02:00
MisterPine a8a1a4985f
Add removed secondary identifier
(class for xwayland under sway)
2023-07-10 23:48:18 +02:00
MisterPine 31683d9e2a
Implemented AAppIconLabel for sway/window 2023-07-10 22:55:46 +02:00
sigboe d774de6c46 fix, default to true, sway/workspaces: warp-on-scroll 2023-07-08 21:32:19 +02:00
Alex fc632f50ec fix: lint 2023-07-04 22:52:24 +02:00
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
zjeffer 7ef80d563b Formatting fixes 2023-07-04 19:48:04 +02:00
André Aparício a1cd0acac5 Fix random segfault on GTK icon functions
The segfaults were happening on GTK icon theme functions, which are
called via the C++ interface functions such as Gtk::IconTheme::has_icon.

There are multiple modules and threads using this functions on the default
icon theme by calling Gtk::IconTheme::get_default(), which returns the same
object for all callers, and was causing concurrent access to the same internal
data structures on the GTK lib. Even a seemingly read-only function such as
has_icon can cause writes due to the internal icon cache being updated.

To avoid this issues, a program wide global mutex must be used to ensure
a single thread is accessing the default icon theme instance.

This commit implements wrappers for the existing IconTheme function calls,
ensuring the global lock is held while calling the underling GTK functions.
2023-07-03 22:32:24 +01:00
Lasse Luttermann 43434254e0 Add output port of workspace to template 2023-06-26 11:01:50 +02:00
Kristóf Marussy 5bfdbf116d
sway/window: app_id on unfocused workspaces
If the unfocused workspace has a single window, use window-specific
styling when offscreen-css is enabled.
2023-06-13 01:52:13 +02:00
Rene D. Obermueller fff4509723 sway/window: fix appid style not cleared (#2227)
Probably a rebase error during development of #1419. The code block now
removed was not supposed to be there anymore.
2023-06-11 08:41:20 +02:00
dmitry 62f4125927 change order 2023-06-08 23:31:14 +03:00
sigboe a67e692d4a sway: warp-on-scroll toggle 2023-06-07 15:49:11 +02:00
TheRealLorenz f557697e92 Rewrite entire label in sway/window module
Closes #1742
2023-03-25 17:37:49 +01:00
TheRealLorenz 63525ec956 Rename function name 2023-03-25 17:33:01 +01:00
Pascal Huber 23f39938fb Revert "feat(sway): add workspace css class"
This reverts commit a10464d9bb.
2023-03-01 10:55:15 +01:00
Alex 8cc8820369
Merge pull request #2017 from pascal-huber/master 2023-03-01 09:43:44 +01:00
Elyes Haouas 1af25094b7 Fix some typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-02-25 09:55:04 +01:00
Pascal Huber a10464d9bb feat(sway): add workspace css class 2023-02-18 20:31:12 +01:00
Aleksei Bavshin ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
Aleksei Bavshin ca9d237b00
fix(sway): add missing includes for GCC 13
See also: https://gcc.gnu.org/gcc-13/porting_to.html
2023-01-20 22:49:58 -08:00
Rene D. Obermueller 328573332f sway-window, Issue 1399: new style classes
Provides CSS classes empty, floating, tabbed, tiled, solo, stacked and
app_id.

Adds offscreen-css bool option (default false), only effective when
"all-outputs" is true. This adds styles on outputs without focused
node, according to its focused workspaces window situation.

Adds an "offscreen-css-text" string option (default empty), only
effective when "all-outputs" and "offscreen-style" are set. This
is shown as a text on outputs without a focused node.

Adds a "show-focused-workspace" bool option (default false) to indicate
the workspace name if the whole workspace is focused when nodes are
also present. If not set, empty text is shown, but css classes
according to nodes in the workspace are still applied.

Limitation:
When the top level layout changes, there is no sway event so the
module cannot react. Perhaps in the future recurring polling can
be added to go around this limitation.
2023-01-12 05:53:59 +01:00
Alex 1938bb5d28 fix: lint 2023-01-04 16:26:50 +01: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
Simon Plakolb 5e9bbe5c76 modules: Revert button to label 2022-11-24 13:08:16 +01:00
herlev e660a3634d Fix linter 2022-10-19 13:29:05 +02:00
herlev 54e04b5a30 Refactor rewriteTitle 2022-10-19 13:25:08 +02:00
Alex 7746328daa
Merge pull request #1667 from asas1asas200/zeng-feat-sway_scratchpad 2022-10-18 09:00:31 +02:00
Simon Plakolb 2b735f44bc modules: Set tooltip on button
Mouse-over tooltips set on the label only appear once the mouse hovers
over exactly the label. Other apps (e.g. firefox) show the tooltip once
the pointer hovers the button. Not solely its label. With this commit we
get the same behaviour.
2022-10-12 10:25:30 +02:00
Simon Plakolb 8fa5d9b838 modules: Set style-context on button
Fixes issue where the class parameters in style.css would have no
effect.

The CSS now references the GtkButton instead of the GtkLabel. Removing
all style-classes from the custom module GtkButton however removes
any properties set via style.css. Thus, the default classes 'flat' and
'text-button' are added on every update of these modules.
2022-10-12 10:25:30 +02:00
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
asas1asas200 d2ff116c92 feat(sway/scratchpad): add some configs
Add some configs for displaying.
Remove draft codes.
2022-08-31 16:27:25 +08:00
asas1asas200 e3342467fc feat(sway/scratchpad): add basic counter 2022-08-31 16:27:25 +08:00
asas1asas200 51670f0506 Fix typo 2022-08-21 12:35:33 +08:00
Alex bcee4e15d3 fix: lint files 2022-08-18 15:22:25 +02:00
Alex b7bd06ad8f
Update window.cpp 2022-08-18 15:21:50 +02:00
TheRealLorenz 5b1cd65e20 Fix: better formatting 2022-08-10 10:41:18 +02:00
TheRealLorenz 99ed2bb7fa Feature: sway/window can show 'shell' parameter 2022-08-10 10:34:51 +02:00
Alex d906080f26
Merge pull request #1617 from alebastr/fmt-9
fix: adapt to fmt 9.0.0 breaking changes
2022-07-18 10:00:46 +02:00
Carlos Ortega 48d2759df5 add layout as class to language module 2022-07-17 16:13:32 +01:00
Aleksei Bavshin 24a8332b62
fix: adapt to fmt 9.0.0 breaking changes 2022-07-13 22:36:32 -07:00
Alex 4d1aeb7eb8
Merge pull request #1525 from FlexW/feature/icon-heuristics
sway/window: Add heuristics for finding icons
2022-05-23 13:42:26 +02:00
Alex 89be55b00b
Merge pull request #1510 from towoe/sway-bar-show
Show hidden bar
2022-04-20 05:13:53 +02:00
Felix Weilbach 3f123d9c4e sway/window: Add heuristics for finding icons
This adds heuristics for finding the applications icon.
2022-04-18 03:09:25 +02:00