Commit graph

160 commits

Author SHA1 Message Date
Ryan Dwyer 6f4cb2b29d Add tree representation to IPC workspace description 2018-05-29 17:42:11 +10:00
Ryan Dwyer c72940837c Implement IPC get_seats command 2018-05-12 18:17:36 +10:00
Ryan Dwyer ae39d7b28c Remove sway_container.workspace_layout
Fixes #1716.
2018-04-26 10:14:18 +10:00
Tony Crisci 0ff22c1755 implement ipc focus stack 2018-04-07 16:23:53 -04:00
Drew DeVault 640232eb22
Revert "Break everything^W^WUse wlr_box for sway_container" 2018-04-06 16:13:26 -04:00
Drew DeVault 764489e737 Break everything^W^WUse wlr_box for sway_container 2018-04-06 15:38:37 -04:00
emersion c2b1beef15
Remove L_TYPES 2018-04-05 23:22:08 -04:00
Tony Crisci 6b308dbeb7 address feedback 2018-04-05 22:50:10 -04:00
Tony Crisci bbfc5487bc add layout to ipc containers 2018-04-05 17:33:35 -04:00
Tony Crisci 04ce09630c add type to container json 2018-04-04 22:41:05 -04:00
Tony Crisci 0828c77251 rename input-manager functions 2018-04-02 08:49:38 -04:00
Tony Crisci e677c5b204 rename seat functions 2018-04-02 08:45:37 -04:00
Drew DeVault b28e6d2369 IPC fixes 2018-03-30 13:56:31 -04:00
Drew DeVault f26ecd9f58 Merge remote-tracking branch 'origin/wlroots' into swaybar-layers 2018-03-30 00:04:04 -04:00
Tony Crisci dc8c9fbeb6 Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
This reverts commit 472e81f35d, reversing
changes made to 6b7841b11f.
2018-03-29 23:41:33 -04:00
Drew DeVault d0c7f66e95
Revert "Refactor tree" 2018-03-29 23:29:29 -04:00
Drew DeVault 6836074fed Implement enough IPC for swaybar to work 2018-03-29 22:11:08 -04:00
Tony Crisci b90099b4b7 rename container functions 2018-03-29 16:40:40 -04:00
Tony Crisci 874f009866 move tree includes to their own directory 2018-03-29 14:21:42 -04:00
emersion 4ab5506064
ipc: add output modes 2018-03-12 13:48:42 +01:00
Tony Crisci ad879c99e0 ipc show focused container 2018-02-26 19:07:59 -05:00
Tony Crisci 93084c9cf8 remove old focus member 2018-02-10 19:53:50 -05:00
Tony Crisci f2985000f3 ipc get_inputs 2017-12-18 14:27:38 -05:00
emersion 4e2ab53119
Add IPC get_outputs 2017-12-18 14:06:03 +01:00
Tony Crisci 421f49fe03 basic get_tree 2017-12-03 08:33:52 -05:00
Drew DeVault 7753a0ec75 Wire up IPC server 2017-11-22 21:37:07 -05:00
Drew DeVault 733993a651 Move everything to sway/old/ 2017-11-18 11:22:02 -05:00
Drew DeVault 1efd5f819f Wire up output frame loop 2017-11-11 14:41:18 -05:00
Drew DeVault 7eafcc75f6 Initialize outputs from backend and add to tree 2017-11-11 11:58:43 -05:00
Drew DeVault 46e5aeac50 Fix crash on swaygrab with scratchpad populated
Fixes #1217
2017-10-08 10:48:33 -04:00
lbonn fd7c4bacbd ipc/tree: populate focus fields
Ids of children, by order of focus
2017-10-08 11:51:03 +02:00
lbonn 661625b29e ipc/tree: output mandatory fields for all nodes
Still missing: focus
2017-10-08 11:51:03 +02:00
Calvin Lee 843ad38b3c Implement Tray Icons
This commit implements the StatusNotifierItem protocol, and enables
swaybar to show tray icons. It also uses `xembedsniproxy` in order to
communicate with xembed applications.
The tray is completely optional, and can be disabled on compile time
with the `enable-tray` option. Or on runtime with the bar config option
`tray_output none`.

Overview of changes:
In swaybar very little is changed outside the tray subfolder except
that all events are now polled in `event_loop.c`, this creates no
functional difference.

Six bar configuration options were added, these are detailed in
sway-bar(5)

The tray subfolder is where all protocol implementation takes place and
is organised as follows:

tray/sni_watcher.c:
	This file contains the StatusNotifierWatcher. It keeps track of
	items and hosts and reports when they come or go.
tray/tray.c
	This file contains the StatusNotifierHost. It keeps track of
	sway's version of the items and represents the tray itself.
tray/sni.c
	This file contains the StatusNotifierItem struct and all
	communication with individual items.
tray/icon.c
	This file implements the icon theme protocol. It allows for
	finding icons by name, rather than by pixmap.
tray/dbus.c
	This file allows for asynchronous DBus communication.

See #986 #343
2017-06-07 17:49:16 -07:00
Sebastian Noack 173b338567 Add -DVERSION flag for release version numbers 2017-04-26 15:56:46 +02:00
Jerzi Kaminsky b463fb8adc Remain compat with libinput < 1.7.0 2017-04-14 02:30:41 +03:00
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:五
```
2017-04-03 07:27:25 -04:00
Mykyta Holubakha e714fbcbec Add window instance support 2017-01-19 03:14:59 +02:00
Hummer12007 d59af31256 Fix workspace layouts in json data 2017-01-06 01:28:36 +02:00
Drew DeVault 10c8b73075 Handle calloc failures 2016-12-15 19:01:41 -05:00
D.B 58eb7ac19f change bar colors from char[10] to *char
This commit removes has_* booleans from bar color struct. It also
generalizes of functions in commands/bar/colors.c.
2016-11-02 21:07:04 +01:00
D.B ad4d21d60b add bar colours for focused_(workspace|statusline|separator)
If these aren't defined in config, color settings without 'focused_'
prefix are used as a fallback.
2016-11-02 18:58:33 +01:00
D.B 39ee0ec552 use urgent_ws color in swaybar if binding_mode is undefined 2016-11-02 18:58:33 +01:00
Zandr Martin ba581c4442
consolidate nodes json 2016-10-02 22:21:16 -05:00
Zandr Martin 7d947fdb95
add unique IDs to containers 2016-09-21 21:05:09 -05:00
Zandr Martin 0516dba3f6
implement "focused container" feature for swaygrab 2016-09-18 16:41:08 -05:00
Zandr Martin 87080bb9cc
take four! 2016-09-17 16:36:55 -05:00
Drew DeVault 416417a54c Reorganize includes 2016-09-01 08:18:37 -04:00
Tony Crisci 50901a0892 ipc: always include nodes in views
This is for i3 (and i3ipc library) compatability.
2016-08-04 21:19:52 -04:00
Tony Crisci c98e91f01f Use uintptr_t for ipc container id
This is for compatability with i3.
2016-08-03 20:34:47 -04:00
Zandr Martin 9fa92951fe
remove unmanaged nodes from get_tree 2016-08-02 13:24:21 -05:00
Drew DeVault cad085ed9d Update IPC JSON responses for HiDPI setups 2016-07-28 14:42:39 -04:00
Mykyta Holubakha f022628a2e Handle transient_for 2016-07-21 21:53:36 +03:00
Mykyta Holubakha f52daa26c9 Unite describe_view and describe_window 2016-07-21 21:51:20 +03:00
Mykyta Holubakha 2029fef6b8 More progress on window events 2016-07-21 21:51:20 +03:00
Drew DeVault 3bb880bf20 Implement configurable wrapping on bar ws scroll 2016-07-17 11:26:38 -04:00
Hummer12007 cf7c6c5822 Fix a memory leak 2016-07-17 00:00:51 +03:00
Mykyta Holubakha ea7917784d Fix build on x86 2016-07-12 09:43:48 +00:00
Zandr Martin c65d6e6e95
get_tree json fixes
- null pointer check against container names
- use actual json null values instead of "null" strings
- add "visible" property to all containers
2016-07-05 07:23:44 -05:00
Zandr Martin f8a94f2f4b
fix typo in ipc-json.c 2016-07-04 13:46:19 -05:00
Zandr Martin 15a324b0d3
implement get_tree command 2016-07-04 13:34:44 -05:00