i3-last-scratchpad/scratchpad/show.go

17 lines
445 B
Go
Raw Normal View History

2024-09-15 21:48:45 -04:00
package scratchpad
import "fmt"
import "github.com/mdirkse/i3ipc"
import "gitea.ashishdsouza.com/ashish/i3-last-scratchpad/notify"
func ShowScratchpadNode(ipcSocket *i3ipc.IPCSocket, node *i3ipc.I3Node) {
var i3Command = fmt.Sprintf("[con_id=%d] scratchpad show", node.ID)
if success, err := ipcSocket.Command(i3Command); !success {
notify.SendNotification("Failed to show scratchpad window", notify.CriticalPriority)
panic(err)
}
}