aboutsummaryrefslogtreecommitdiff
path: root/swaymsg
AgeCommit message (Collapse)AuthorLines
2019-02-10ipc: handle unnamed xkb_active_layout_nameFurkan Sahin-2/+2
If the active xkb_layout does not have a name, use `NULL` instead of `json_object_new_string(NULL)`. This also makes it so swaymsg will pretty print this as `(unnamed)`.
2019-01-23Make json-c include respect pkg-config --cflagsFurkan Sahin-1/+1
json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>` won't be found unless the parent directory is searched by default.
2019-01-21Removed unused wlroots dependency for sway(bg|bar|msg|nag)Furkan Sahin-1/+1
Also remove direct libm dependency where unused.
2019-01-20Replace wlr_log with sway_logFurkan Sahin-2/+2
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-18meson: remove rpath optionsFurkan Sahin-7/+6
2019-01-09get_inputs: add libinput send events modeFurkan Sahin-1/+5
Add `libinput_send_events` to the IPC output for `get_inputs` to allow scripting of mode changes.
2018-12-09Remove readline.cFurkan Sahin-1/+0
All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
2018-11-28swaymsg: parse success of single objectFurkan Sahin-0/+3
Allows swaymsg to parse the success attribute of a single object response. This is needed for the subscribe event.
2018-11-28Implement support for swaymsg -t SUBSCRIBE [-m]Furkan Sahin-13/+68
In `i3 4.16`, `i3-msg` can be used with the message type `subscribe` and has the ability to monitor for responses until killed. This adds support for both to swaymsg. If the JSON array of event types is malformed or contains an invalid event, sway will send a response with `success` set to `false`. If swaymsg sees this, it will not display the failure and exit. If the `subscribe` event is successful, swaymsg will wait for the first response and display that instead of the success message. If `-m/--monitor` is given, swaymsg will continue monitor for responses until killed or a malformed response is received. For the `subscribe` event, the responses will always be printed as JSON. If `-r/--raw` is given, the JSON will not be pretty printed, which may be preferred when monitoring due to there being multiple responses. Example: `swaymsg -t SUBSCRIBE -m "['window']"`
2018-11-25Replace _XOPEN_SOURCE with _POSIX_C_SOURCEFurkan Sahin-1/+1
And make sure we don't define both in the same source file.
2018-11-12IPC: Send keyboard layout info in IPC_GET_INPUTSFurkan Sahin-2/+9
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
2018-11-04document swaymessage type for get_seatsFurkan Sahin-0/+4
2018-11-03ipc: move refresh from output to output->current_modeFurkan Sahin-11/+9
2018-11-02swaymsg: get_outputs: use output->current_mode for current mode displayFurkan Sahin-3/+8
2018-10-29swaymsg: fix get_outputs status codeFurkan Sahin-1/+1
2018-10-10Fix program name in version stringsFurkan Sahin-1/+1
When running swaymsg -v, the version returned is actually the version of swaymsg itself, yet the message displayed was "sway version <version>". This can create confusion if users update sway and swaymsg but don't restart sway, then use swaymsg to check the version. This patch changes the wording to be "swaymsg version <version>" instead, and likewise for swaybar. To get the version of a running sway instance, users should run swaymsg -t get_version.
2018-09-30Add support for installing binaries with DT_RPATHFurkan Sahin-0/+1
It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway.
2018-07-18ipc: add tick eventFurkan Sahin-1/+10
2018-07-09Remove `clipboard` command and `get_clipboard` messageFurkan Sahin-48/+2
2018-07-08Add get_config message type to ipcFurkan Sahin-1/+17
2018-07-08Add get_binding_modes message type to ipcFurkan Sahin-0/+5
2018-07-09Update for swaywm/wlroots#1126Furkan Sahin-1/+1
2018-06-30refactor success_objectFurkan Sahin-5/+1
2018-06-30fix swaymsg: errors are displayed againFurkan Sahin-6/+21
Command errors didn't get displayed, because the success function didn't accept objects
2018-06-05Store sway_outputs so that they can be reenabledFurkan Sahin-20/+29
2018-05-29Add tree representation to IPC workspace descriptionFurkan Sahin-3/+7
2018-05-28swaymsg: Fix exit codeFurkan Sahin-4/+17
2018-05-25Delete old asciidoc man pagesFurkan Sahin-89/+0
2018-05-12Merge remote-tracking branch 'origin/master' into scdocFurkan Sahin-1/+39
2018-05-11Add swaylock(1) and swaymsg(1)Furkan Sahin-0/+66
2018-05-11Implement IPC get_seats commandFurkan Sahin-1/+39
2018-05-05swaymsg: Fix spelling in error messageFurkan Sahin-1/+1
2018-03-12ipc: add output modesFurkan Sahin-2/+24
2018-01-05swaymsg: convert to wlr_logFurkan Sahin-2/+2
2018-01-04update json-c dep to 0.13Furkan Sahin-1/+1
2017-12-29Pretty-print all output info in swaymsg -t get_outputsFurkan Sahin-3/+16
2017-12-19fix memory leak in swaymsgFurkan Sahin-1/+3
2017-12-18fix memory leak in swaymsgFurkan Sahin-1/+1
2017-12-18ipc get_inputsFurkan Sahin-39/+33
2017-11-30remove relevant CMakeLists.txtFurkan Sahin-23/+0
2017-11-30meson build swaymsgFurkan Sahin-0/+8
2017-10-13fintune swaymsg manpageFurkan Sahin-1/+3
Added a hint where to find the commands. Also indicate that command is itself not a command,
2017-10-08Merge pull request #1263 from nyorain/masterFurkan Sahin-6/+57
Implement get_clipboard ipc message
2017-10-06Fix github links in docFurkan Sahin-1/+1
2017-07-11Add get_clipbard ipc errors; Adapt swaymsgFurkan Sahin-2/+14
Also increase the get_clipboard timeout to 30 secs
2017-07-07Rework get_clipboard implementationFurkan Sahin-14/+33
2017-07-07Implement ipc get_clipboardFurkan Sahin-1/+21
2017-07-04Make asciidoc (and man pages) optionalFurkan Sahin-1/+3
And remove it from the build
2017-04-26Add -DVERSION flag for release version numbersFurkan Sahin-5/+1
2017-04-03Add pretty printing to swaymsgFurkan Sahin-7/+184
If stdout is a tty, it will pretty print unless -r (--raw) is given. Sample outputs: ``` ~/s/s/build > ./bin/swaymsg fullscreen toggle Error: Permission denied for fullscreen toggle via IPC ~/s/s/build > ./bin/swaymsg -t get_workspaces Workspace 3:三 Output: DVI-I-1 Layout: splith Workspace 1:一 (off-screen) Output: HDMI-A-1 Layout: splith Workspace 5:五 (focused) Output: HDMI-A-1 Layout: splith ~/s/s/build > ./bin/swaymsg -t get_inputs Input device Metadot - Das Keyboard Das Keyboard Type: Keyboard Sway ID: 9456:320:Metadot_-_Das_Keyboard_Das_Keyb Input device Wacom Intuos S 2 Pen Type: Tablet tool Sway ID: 1386:827:Wacom_Intuos_S_2 Input device Wacom Intuos S 2 Pad Type: Tablet pad Sway ID: 1386:827:Wacom_Intuos_S_2 Input device Logitech Gaming Mouse G502 Type: Keyboard, Mouse Sway ID: 1133:49277:Logitech_Gaming_Mous ~/s/s/build > ./bin/swaymsg -t get_outputs Output DVI-I-1 Geometry: 1920x1080 @ 3840,0 Scale factor: 1x Workspace: 3:三 Output DVI-D-1 Geometry: 1920x1080 @ 0,0 Scale factor: 1x Workspace: 4:四 Output HDMI-A-1 Geometry: 1920x1080 @ 1920,0 Scale factor: 1x Workspace: 5:五 ```