mirror of
https://codeberg.org/scip/swaycycle.git
synced 2025-12-16 20:11:02 +01:00
little doc tweaks
This commit is contained in:
BIN
.github/assets/screenshot.png
vendored
BIN
.github/assets/screenshot.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 73 KiB |
@@ -76,7 +76,7 @@ https://github.com/tlinden/swaycycle/issues.
|
|||||||
|
|
||||||
- [sway-ipc(7)](https://www.mankier.com/7/sway-ipc)
|
- [sway-ipc(7)](https://www.mankier.com/7/sway-ipc)
|
||||||
- [swaywm](https://github.com/swaywm/sway/)
|
- [swaywm](https://github.com/swaywm/sway/)
|
||||||
- [swayfs](https://github.com/WillPower3309/swayfx)
|
- [swayfx](https://github.com/WillPower3309/swayfx)
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
|
|||||||
5
main.go
5
main.go
@@ -19,7 +19,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/hex"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@@ -214,7 +213,7 @@ func readResponseIPC(sock net.Conn) ([]byte, error) {
|
|||||||
return nil, fmt.Errorf("failed to read header from socket: %s", err)
|
return nil, fmt.Errorf("failed to read header from socket: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Debug("got IPC header", "header", hex.EncodeToString(buf))
|
// slog.Debug("got IPC header", "header", hex.EncodeToString(buf))
|
||||||
|
|
||||||
if string(buf[:6]) != IPC_MAGIC {
|
if string(buf[:6]) != IPC_MAGIC {
|
||||||
return nil, fmt.Errorf("got invalid IPC response from sway socket")
|
return nil, fmt.Errorf("got invalid IPC response from sway socket")
|
||||||
@@ -314,7 +313,7 @@ func findNextWindow() int {
|
|||||||
func switchFocus(id int, sock net.Conn) error {
|
func switchFocus(id int, sock net.Conn) error {
|
||||||
command := fmt.Sprintf("[con_id=%d] focus", id)
|
command := fmt.Sprintf("[con_id=%d] focus", id)
|
||||||
|
|
||||||
slog.Debug("executing", "command", command)
|
slog.Debug("sending ipc", "command", command)
|
||||||
|
|
||||||
// send switch focus command
|
// send switch focus command
|
||||||
err := sendHeaderIPC(sock, IPC_RUN_COMMAND, uint32(len(command)))
|
err := sendHeaderIPC(sock, IPC_RUN_COMMAND, uint32(len(command)))
|
||||||
|
|||||||
Reference in New Issue
Block a user