Commit Graph

54 Commits

Author SHA1 Message Date
dmitry
68e4457f3a Add tooltip-formay 2021-07-24 17:24:37 +03:00
dmitry
8310700bbb Improve sway/language 2021-07-13 04:33:12 +03:00
Matthias Richter
b16c8972c7 Add option to rewrite sway/window title
Rewrites window title according to config option "rewrite".
"rewrite" is an object where keys are regular expressions and values are
rewrite rules if the expression matches. Rules may contain references to
captures of the expression. Regex and replacement follow ECMA-script
rules. If no regex matches, the title is left unchanged.

example:
"sway/window": {
  "rewrite": {
    "(.*) - Mozilla Firefox": " $1",
    "(.*) - zsh": " $1",
  }
}
2021-04-21 12:24:47 +02:00
Genesis
7eb2a6b709
Add a configuration entry to disable auto_back_and_forth on Sway workspaces 2021-02-02 21:58:26 +01:00
nikto_b
cc3acf8102
feature: created sway language submodule; added styles & config part for a sway language submodule 2020-10-10 19:09:18 +03:00
Michael Rodler
006850ea5e Changed helper function for workspace->num assignment to a static method of Workspaces class
and adapted comments/method name to be consistent with the rest
2020-07-27 10:56:49 +02:00
Tudor Brindus
0080feb9af sway/workspaces: make clicking on workspaces idempotent
Previously, clicking on the same workspace you were on would throw you
to another workspace if `workspace_auto_back_and_forth yes` was
specified in your sway config. This also fixes workspace output moving
misbehaving and doing the same.
2020-06-09 20:43:43 -04:00
Jan Beich
1dc557456e Add missing includes for libc++
In file included from ../src/modules/custom.cpp:1:
In file included from ../include/modules/custom.hpp:7:
../include/util/command.hpp:15:25: error: implicit instantiation of undefined template 'std::__1::array<char, 128>'
  std::array<char, 128> buffer = {0};
                        ^
../src/modules/pulseaudio.cpp:175:41: error: implicit instantiation of undefined template 'std::__1::array<std::__1::basic_string<char>, 9>'
static const std::array<std::string, 9> ports = {
                                        ^
/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from ../src/factory.cpp:1:
In file included from ../include/factory.hpp:8:
../include/modules/sway/workspaces.hpp:39:8: error: no template named 'unordered_map' in namespace 'std'
  std::unordered_map<std::string, Gtk::Button> buttons_;
  ~~~~~^
../src/factory.cpp:20:14: error: cannot initialize return object of type 'waybar::AModule *' with an rvalue of type 'waybar::modules::sway::Workspaces *'
      return new waybar::modules::sway::Workspaces(id, bar_, config_[name]);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-05-19 10:37:27 +00:00
Danilo Spinella
e0c42ae415 fix(sway): add missing unordered_map include 2020-02-11 14:31:17 +01:00
Aleksei Bavshin
ae6ca36fa7
fix(sway): resolve destruction dependency between Ipc and SleeperThread
Ipc destructor closes socket and thus wakes up SleeperThread which was
waiting for socket data in Ipc::handleEvent.
Ipc::handleEvent then proceeds with sending signal to already destroyed
object, causing heap-use-after-free Address Sanitizer error.
2020-02-04 23:22:43 -08:00
Alex
ff9d598c16 fix: add proper mutex 2019-06-17 11:39:45 +02:00
Alex
340ec7be91 refactor: AModule 2019-06-15 14:57:52 +02:00
Alex
dabe2bebbb feat(sway/window): handle floating nodes 2019-06-14 11:27:40 +02:00
Alex
486b5a5d38 fix(sway/window): check output recursively 2019-06-14 10:57:22 +02:00
Patrick Hilhorst
ed4521d113
Workspaces: fix twitchy scrolling on touchpads
Previously, any and all scroll events were interpreted as reason to switch
workspaces. This resulted in twitchy behaviour, where the scrolling was
practically unusable.

Now, we pool all scroll values, and only scroll if the value is larger than the
new config option "smooth-scrolling-threshold". If this option is not set, the
behaviour is unchanged.
2019-06-11 17:22:24 +02:00
Alex
1962caf144 refactor(window): gtk stuff in update method 2019-06-04 17:34:00 +02:00
Alex
fcf2d18a01 refactor: destroy threads first 2019-05-29 17:53:22 +02:00
Alex
2a9fa1a4b9 refactor(bar): onRealize, onMap 2019-05-25 17:50:45 +02:00
Lucas Lazare
1a76aa0c8c Improving ordering 2019-05-18 11:58:01 -04:00
Alex
4d4cadb5ae refactor: simpler code 2019-05-17 09:59:37 +02:00
RX14
b45dcdf74e
Allow scrolling on the entire bar surface 2019-05-16 22:18:43 +01:00
Alex
362c393b1d refactor: try/catch, sigc trackable 2019-05-13 15:15:50 +02:00
Alex
0c3c548bc0 fix(Window): avoid concurrency 2019-05-13 14:35:45 +02:00
Alex
5bf0ca85ac refactor: try/catch around json parse 2019-05-09 10:30:54 +02:00
Alex
5a44c8c6de refactor: avoid unneeded json parsing 2019-05-07 13:43:48 +02:00
Alex
b75e0bb0d0 refactor: remove useless bar param 2019-05-07 13:21:18 +02:00
Alex
d027243a19 fix: json thread safe 2019-05-02 14:24:54 +02:00
Alex
bb8ff5a99f feat(Bar): add class depend of window in the workspace 2019-04-25 16:47:51 +02:00
Alex
311c34ecbc feat(Bar): handle widget size changes 2019-04-24 12:37:24 +02:00
Alex
cccf60c30e fix(Workspaces): fix concurrence and move json parser to ipc client 2019-04-23 11:42:08 +02:00
Alex
cbb6f2a307 refactor(Workspaces, IPC): no more mutex in the workspaces modules, moved to the IPC client for a proper handling 2019-04-19 16:48:02 +02:00
Alex
e77c155ede fix(workspaces): avoid mutex block 2019-04-19 12:11:55 +02:00
Alex
bb1cf7570e refactor(IPC): use sigc signal 2019-04-19 11:09:06 +02:00
Alex
6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Alex
bc9a49787a feat: enable pango markup on sway workspaces 2019-04-15 10:55:44 +02:00
Alex
22cddc5e26 refactor(workspaces): scroll output aware 2019-03-18 14:44:07 +01:00
John Doe
737da3615f resolves #205 2019-03-03 21:35:32 +11:00
Alex
add9e925f4 fix(Workspaces): button order 2019-02-02 00:36:52 +01:00
Alexis
399f61df98 refactor: proper modules destruction 2019-01-13 22:22:22 +01:00
Robinhuett
29a2ee1744 refactor: Replace all occurencec of gtkmm.h and only use the necessary headers 2019-01-08 21:05:44 +01:00
Caleb Bassi
8ea0659ee2 Remove ws index from sway ws names 2018-12-28 09:36:02 -08:00
Alexis
b554094c7e feat: args && class id 2018-12-18 17:30:54 +01:00
Alexis
691fb88057 refactor(modules): const bar 2018-12-01 00:10:41 +01:00
David96
168415440f Fix clicking and scrolling through workspaces
The way waybar used the workspace "num", clicking a workspace called "1:
something" resulted in going to a newly created workspace called "1",
because the workspace ipc command expects the workspace name, not its number.
2018-11-05 20:16:19 +01:00
Robinhuett
a042eea384 Add module to show sway binding mode 2018-10-30 13:39:30 +01:00
maxice8
047473e5a4
add missing <cstring> include for strncpy, fixes musl
I/usr/include/libdbusmenu-glib-0.4 -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -std=c++17 -DHAVE_SWAY -DHAVE_LIBPULSE -DHAVE_DBUSMENU -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -D_REENTRANT -pthread  -MD -MQ 'waybar@exe/src_modules_sway_ipc_client.cpp.o' -MF 'waybar@exe/src_modules_sway_ipc_client.cpp.o.d' -o 'waybar@exe/src_modules_sway_ipc_client.cpp.o' -c ../src/modules/sway/ipc/client.cpp
../src/modules/sway/ipc/client.cpp: In member function 'int waybar::modules::sway::Ipc::open(const string&) const':
../src/modules/sway/ipc/client.cpp:47:3: error: 'strncpy' was not declared in this scope
   strncpy(addr.sun_path, socketPath.c_str(), sizeof(addr.sun_path) - 1);
   ^~~~~~~
../src/modules/sway/ipc/client.cpp:47:3: note: 'strncpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
../src/modules/sway/ipc/client.cpp:2:1:
+#include <cstring>

../src/modules/sway/ipc/client.cpp:47:3:
   strncpy(addr.sun_path, socketPath.c_str(), sizeof(addr.sun_path) - 1);
   ^~~~~~~
[36/44] Compiling C++ object 'waybar@exe/src_modules_custom.cpp.o'.
[37/44] Compiling C++ object 'waybar@exe/src_client.cpp.o'.
[38/44] Compiling C++ object 'waybar@exe/src_modules_cpu.cpp.o'.
ninja: build stopped: subcommand failed.
2018-10-28 04:06:07 -03:00
Alexis
d5d620e72d
feat(Window): handle closed window 2018-09-18 21:16:35 +02:00
Alexis
7020af7653
feat(Workspaces): urgent, visible, focused icons 2018-09-05 00:16:56 +02:00
Alex
49232eed8d
Clean (#31) 2018-08-20 14:50:45 +02:00
Alex
6705134034
Handle screens disconnection (#29) 2018-08-19 13:39:57 +02:00