Commit Graph

65 Commits

Author SHA1 Message Date
Aleksei Bavshin 13fdbc13c3
refactor: change `enum ipc_command_type` to uint32_t
As we always use the enum to compare or initialize uint32_t values, it
would be better to declare it with the right type. This way we could
avoid `-Wnarrowing` warnings or unnecessary type casts.
2022-04-10 12:52:46 -07:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Felix Weilbach bcadf64031 Show application icon when using sway window module
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
2022-01-24 17:37:51 +01:00
Alex 7069429c03
Merge pull request #1229 from kraftwerk28/sway-language-country-flag
`sway/language` country flag
2021-12-01 11:49:39 +01:00
kraftwerk28 59040c53e4 Move definition to .cpp 2021-11-24 02:15:10 +02:00
kraftwerk28 0472d279e4 Add {flag} format replacement 2021-11-24 02:15:10 +02:00
Aleksei Bavshin 6bfb674d1b
fix(swaybar-ipc): better logs 2021-11-21 17:28:47 -08:00
dmitry c058a2d196 Add number to shortDescripton 2021-08-20 01:09:16 +03:00
dmitry a57e431437 Add shortDescription 2021-08-17 05:28:41 +03:00
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
Aleksei Bavshin ebdeb86703
feat(swaybar-ipc): handle visibility_by_modifier update 2020-10-19 19:35:55 -07:00
Aleksei Bavshin 23e5181cac
feat(swaybar-ipc): add swaybar IPC client 2020-10-19 19:34:48 -07: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