Sebastian Noack
173b338567
Add -DVERSION flag for release version numbers
8 years ago
Drew DeVault
60ce81e06a
Add pretty printing to swaymsg
...
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:五
```
8 years ago
Drew DeVault
9aed9d9359
UnGNUify the codebase
8 years ago
Tony Crisci
6535da7bde
swaymsg: pretty print ipc response
...
fixes #809
9 years ago
Mikkel Oscar Lyderik
5e253fdd9a
Correctly exit sway on errors.
...
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).
A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
9 years ago
Cole Mickens
28081b7689
libinput
9 years ago
Christoph Gysin
88368362df
swaymsg: add newline after response
9 years ago
Christoph Gysin
923c3245ac
Fix option parsing
...
Using 'flag' results in duplicate code paths for short and long options.
This broke the -q short option in swaymsg, because there was:
{"quiet", no_argument, &quiet, 'q'}
Which will set quiet to 'q' and return 0, not 'q'.
10 years ago
Christoph Gysin
bf97a5ada5
swaymsg: Add --help option that prints usage
10 years ago
Christoph Gysin
0d55d1a067
swaymsg: Print usage and exit on unknown options
10 years ago
Christoph Gysin
3ba33321de
Use macros for exit values
10 years ago
Drew DeVault
062c74b7d0
Add command line to swaygrab
...
Also modifies IPC client so that we can work with persistent
connections.
10 years ago
Drew DeVault
27f03c705d
Move IPC client into common, refactor IPC
10 years ago
Drew DeVault
5ae359279b
Fix build warnings
10 years ago
Drew DeVault
a1018f3280
Implement swaymsg IPC behavior
10 years ago
Drew DeVault
9a15371ba3
Parse command line args for swaymsg
10 years ago
Drew DeVault
d69cbeabc0
Add swaymsg subproject
10 years ago