Beispiel #1
0
// WM_CLASS set
func WmClassSet(xu *xgbutil.XUtil, win xproto.Window, class *WmClass) error {
	raw := make([]byte, len(class.Instance)+len(class.Class)+2)
	copy(raw, class.Instance)
	copy(raw[(len(class.Instance)+1):], class.Class)

	return xprop.ChangeProp(xu, win, 8, "WM_CLASS", "STRING", raw)
}
Beispiel #2
0
// _NET_DESKTOP_NAMES set
func DesktopNamesSet(xu *xgbutil.XUtil, names []string) error {
	nullterm := make([]byte, 0)
	for _, name := range names {
		nullterm = append(nullterm, name...)
		nullterm = append(nullterm, 0)
	}
	return xprop.ChangeProp(xu, xu.RootWin(), 8, "_NET_DESKTOP_NAMES",
		"UTF8_STRING", nullterm)
}
Beispiel #3
0
// WM_ICON_NAME set
func WmIconNameSet(xu *xgbutil.XUtil, win xproto.Window, name string) error {
	return xprop.ChangeProp(xu, win, 8, "WM_ICON_NAME", "STRING",
		([]byte)(name))
}
Beispiel #4
0
// WM_CLIENT_MACHINE set
func WmClientMachineSet(xu *xgbutil.XUtil, win xproto.Window,
	client string) error {

	return xprop.ChangeProp(xu, win, 8, "WM_CLIENT_MACHINE", "STRING",
		([]byte)(client))
}
Beispiel #5
0
// _NET_WM_NAME set
func WmNameSet(xu *xgbutil.XUtil, win xproto.Window, name string) error {
	return xprop.ChangeProp(xu, win, 8, "_NET_WM_NAME", "UTF8_STRING",
		[]byte(name))
}