Commit graph

116 commits

Author SHA1 Message Date
Yavor Kolev
ac3edec14b
Add activeworkspace hyprctl command (#2202)
* Add `activeworkspace` hyprctl command

* fix format in hyprctl

* Make stuff more shared in workspace hyprctl

---------

Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-05-02 14:51:52 +01:00
Jan Beich
609c7ab6b5
Unbreak CMake build on FreeBSD (#2209)
* cmake: unbreak on non-GNU after 474ada9267

CMake Error at CMakeLists.txt:121 (target_link_libraries):
  The keyword signature for target_link_libraries has already been used with
  the target "Hyprland".  All uses of target_link_libraries with a target
  must be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * CMakeLists.txt:107 (target_link_libraries)

Fixes https://github.com/hyprwm/Hyprland/issues/1780

* cmake: always link with dependencies via imported targets

On BSD systems base compiler by default only looks for headers and
libraries from base system. For dependencies from packages extra flags
are necessary.

ld: error: unable to find library -lxcb
ld: error: unable to find library -lpixman-1
ld: error: unable to find library -lOpenGL
ld: error: unable to find library -lGLESv2

* make: use same make in recursive calls

On BSDs `make` is BSD make while `gmake` is GNU make

* make: work around GNU vs. BSD sed -i incompatibility

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254091

* make: replace GNU make extension with POSIX sh

`$(shell ...)` in GNU make is similar to `${:!..!}` in BSD make

* make: fall back when nproc isn't available

Only FreeBSD added nproc for compatibility with Linux.

* make: unbreak hyprctl on Clang-based systems

/bin/sh: g++: not found
error: invalid value 'c++23' in '-std=c++23'

* make: create lib/ before copying libwlroots.so there

$ make install PREFIX=/tmp/test
[...]
cp: directory /tmp/test/lib does not exist

* make: pass cp(1) flags before arguments

cp: -f is not a directory

* make: replace install -Dt with mkdir

install: illegal option -- t

* make: replace cp --parents with cpio -dump

cp: illegal option -- -

* make: limit pkg-config workaround to Linux when run as root

/usr/share/pkgconfig doesn't exist on BSDs or may not be writable.
2023-05-02 14:38:36 +01:00
Jan Beich
f7579fc923
internal: unhardcode sun_path size after a6cfe70428 (#2137)
hyprctl/main.cpp:83:5: warning: 'strncpy' size argument is too large; destination buffer has size 104, but size argument is 107 [-Wfortify-source]
    strncpy(serverAddress.sun_path, socketPath.c_str(), 107);
    ^
hyprctl/main.cpp:146:5: warning: 'strncpy' size argument is too large; destination buffer has size 104, but size argument is 107 [-Wfortify-source]
    strncpy(serverAddress.sun_path, socketPath.c_str(), 107);
    ^
src/managers/EventManager.cpp:70:9: warning: 'strncpy' size argument is too large; destination buffer has size 104, but size argument is 107 [-Wfortify-source]
        strncpy(SERVERADDRESS.sun_path, socketPath.c_str(), 107);
        ^
2023-04-23 21:20:29 +01:00
vaxerski
510db64860 hyprctl: allow spaces in cursor themes 2023-04-20 23:59:31 +01:00
vaxerski
a6cfe70428 internal: avoid buffer overflows with socket paths 2023-04-17 16:38:52 +01:00
Vaxry
046ad79d11
GlobalShortcuts protocol impl (#1886)
Implements the `hyprland-global-shortcuts-v1` protocol

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-04-09 13:48:20 +01:00
vaxerski
22721a37d5 hyprctl: add notify 2023-03-20 16:00:54 +00:00
Vaxry
8b81f41e52
Plugin System (#1590)
---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-02-27 12:32:38 +00:00
ozwaldorf
445f8c71c5
fix(hyprctl): allow dispatcher to have no args (#1464)
* fix(hyprctl): allow dispatch to have no args

* chore: add .idea/ to gitignore
2023-02-01 10:01:56 +00:00
vaxerski
9813ba2f56 Add hyprctl animations 2023-01-25 15:16:28 +00:00
a2ae37396f add hyprctl setprop 2023-01-24 19:05:43 +00:00
8f57db28f7 added hyprctl seterror 2023-01-22 16:38:17 +01:00
98ce867104 added hyprctl binds 2023-01-06 14:32:25 +01:00
vaxerski
4fd90144d1 touch up the clang format and format all files 2022-12-20 02:18:47 +00:00
vaxerski
6aa26582f6 added hyprctl switchxkblayout 2022-12-03 16:22:02 +00:00
61995e3b4e guard empty str in isNumber 2022-11-11 14:04:35 +00:00
Philip Jones
27cada2a02
Allow arguments to hyprctl dispatch exec commands. (#990) 2022-11-10 15:36:36 +00:00
vaxerski
5a750b485a Added creating / destroying outputs on a multi-backend + headless backend
See `hyprctl output`.
2022-11-05 18:04:44 +00:00
Riley Martin
c064711d2a Improve hyprctl
Added better help for some hyprctl commands.
Failed commands should now 'fail' by returning a nonzero status to the shell

Fix typos
2022-10-27 10:39:21 -04:00
vaxerski
4aebb73de0 Added hyprctl cursorpos 2022-10-26 13:19:37 +01:00
vaxerski
46e51a81c4 unrestrict hyprctl message size 2022-10-26 13:11:05 +01:00
Felix Dick
bf3f519eb7 Remove trailing whitespace. 2022-09-25 20:07:48 +02:00
9bfa3ebc50 fix up keyword to accept spaced args 2022-08-22 23:25:11 +02:00
vaxerski
fb0e81c18e fix up hyprctl dispatch 2022-08-22 19:16:35 +02:00
Florian sp1rit​
39a9980fb1
dropped deprecated gethostbyname check
Done to avoid the rpmlint warning:
hyprland.x86_64: W: binary-or-shlib-calls-gethostbyname /usr/bin/hyprctl
The binary calls gethostbyname. Please port the code to use getaddrinfo.

Signed-off-by: Florian "sp1rit"​ <sp1ritCS@protonmail.com>
2022-08-22 14:35:41 +02:00
9102471610 added hyprctl getoption 2022-08-11 21:16:38 +02:00
9b39a0c2e0 Added hyprctl setcursor 2022-08-10 21:22:11 +02:00
Roger Roger
5bc9534642 Fix hyprctl flags help 2022-07-28 16:42:18 +02:00
vaxerski
f512bf6b5a remove server from hyprctl as it's unused 2022-07-21 19:27:55 +02:00
vaxerski
ec2afb563e fix oopsie include 2022-07-19 14:28:37 +02:00
vaxerski
59e34e311e fix oopsie include 2022-07-19 14:27:52 +02:00
vaxerski
c6c3d66373 fix hyprctl with relative negative 2022-07-19 14:24:03 +02:00
Vaxry
069e3b2114
Merge pull request #376 from dgerblick/hyprctl-json-segfault-fix
Fixed SEGFAULT when running hyprctl with only the -j option
2022-07-15 23:21:46 +02:00
Daniel Gerblick
db693ec7e5 Fixed SEGFAULT when running hyprctl with only the -j option 2022-07-15 15:39:39 -04:00
vaxerski
fbcc6936f4 fix dashes in hyprctl 2022-07-15 20:07:52 +02:00
vaxerski
ba48e7ceea fixed up hyprctl flags 2022-07-15 11:58:09 +02:00
bazuin-32
0085319c18 Fix error when running hyprctl dispatch exec with an arg that contains
a `/`
2022-07-14 11:23:18 -06:00
vaxerski
e93b45615c better doc in help 2022-07-13 15:50:46 +02:00
vaxerski
99e9503732 flag pos 2022-07-13 15:47:35 +02:00
bazuin-32
ab859ec9fc Fix issues with batch requests 2022-07-12 16:34:28 -06:00
vaxerski
4bea3467e0 update hyprctl help 2022-07-12 23:21:00 +02:00
vaxerski
bca93f4d3c code styling 2022-07-12 23:17:55 +02:00
bazuin-32
2402f2e364 Use enum for specifying hyprctl output format and change the way flags
are passed for json output
2022-07-12 14:59:36 -06:00
bazuin-32
036f431206 Add hyprctl output in json when -j flag is used 2022-07-12 11:57:33 -06:00
vaxerski
4b334594dc Added splashes 2022-07-10 15:41:26 +02:00
vaxerski
b7b3344188 hyprctl: added support for hyprpaper 2022-07-02 18:27:44 +02:00
vaxerski
781526dac5 added hyprctl kill 2022-06-27 13:42:20 +02:00
vaxerski
f5f531562b
Merge pull request #205 from sp1ritCS/meson
Added meson buildfiles
2022-06-20 13:56:58 +01:00
alba4k
faa1b5a44f
Update main.cpp 2022-06-17 22:02:57 +02:00
alba4k
9c6c5481bb revised makefile, newline after execution 2022-06-17 12:18:25 +02:00
Florian "sp1rit"​
fd0112425f
Added meson buildfiles
this makes for a far better experience in combination with wlroots,
since that whole makefile mess is not required.
Additionaly, handling of wayland protocol sources is also slightly
better, but could be improved with mesons inbuilt wayland module.

To build Hyprland using meson:
    meson _build -Ddefault_library=static
    ninja -C _build
    ninja -C _build install
2022-06-16 23:30:28 +02:00
vaxerski
6f3b004199 IPC and log changes, introduce signature 2022-06-03 17:41:57 +02:00
vaxerski
7afcf656bd Added hyprctl devices 2022-06-02 13:59:33 +02:00
vaxerski
ba7e3cd9a1 Major IPC Rework + Added Socket2
IPC is now done with UNIX sockets instead of TCP ones (security!), and added Socket2, see Wiki.
2022-05-24 19:42:43 +02:00
vaxerski
39dcfa61c3 Added hyprctl reload 2022-05-08 15:28:45 +02:00
jwijenbergh
58f13efa30
Hyprctrl: Use printf format specifiers for the usage string 2022-05-01 14:59:15 +02:00
vaxerski
31a429899b added hyprctl batch 2022-04-29 19:44:09 +02:00
vaxerski
e3b19e0131 Added hyprctl version 2022-04-22 18:14:25 +02:00
vaxerski
07080498fd Added hyprctl keyword 2022-04-21 16:56:27 +02:00
vaxerski
c02afa0c27 Added hyprctl dispatch 2022-04-21 16:11:29 +02:00
vaxerski
2ca834479f update commands in hyprctl i forgot 2022-03-30 22:40:53 +02:00
vaxerski
8a8b26a635 added 2 more hyprctl commands 2022-03-22 16:54:45 +01:00
vaxerski
1b50377a5a R> is redundant 2022-03-21 18:34:49 +01:00
vaxerski
509f0c9a8a IPC is now a socket 2022-03-21 18:29:41 +01:00
vaxerski
0eba018c8b fixed an oopsie 2022-03-20 18:23:16 +01:00
vaxerski
c32917a5ba added hyprctl 2022-03-20 16:51:14 +01:00