https://github.com/swaywm/sway
Revision 60ce81e06adc9ea133e8cfd030465e94295a95ff authored by Drew DeVault on 03 April 2017, 11:27:25 UTC, committed by Drew DeVault on 03 April 2017, 11:27:25 UTC
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:五
```
1 parent 8d9a928
History
Tip revision: 60ce81e06adc9ea133e8cfd030465e94295a95ff authored by Drew DeVault on 03 April 2017, 11:27:25 UTC
Add pretty printing to swaymsg
Tip revision: 60ce81e
File Mode Size
CMake
assets
common
completions
contrib
include
protocols
security.d
sway
swaybar
swaybg
swaygrab
swaylock
swaymsg
wayland
.clang-format -rw-r--r-- 405 bytes
.editorconfig -rw-r--r-- 315 bytes
.gitignore -rw-r--r-- 150 bytes
.travis.yml -rw-r--r-- 383 bytes
CMakeLists.txt -rw-r--r-- 3.9 KB
CONTRIBUTING.md -rw-r--r-- 7.7 KB
LICENSE -rw-r--r-- 1.0 KB
README.md -rw-r--r-- 3.1 KB
config.in -rw-r--r-- 5.7 KB
sway.desktop -rw-r--r-- 95 bytes

README.md

back to top