Documentation
¶
Index ¶
- Constants
- Variables
- func FavoritsMarshalJSON(list AppList) ([]byte, error)
- func GetDbusConnection(serviceName string) *dbus.Conn
- func GetDbusListener[T any](serviceName, servicePath, signalName string) chan T
- func GetGlobalScheduler() *gocron.Scheduler
- func NotiEye()
- func NotiPose()
- func NotiWater()
- func NotifySend(title, msg, iconPath string)
- func PrettyPrint(i interface{}) string
- func SaveFavorites(data []byte) error
- func ServeCommand[T any](ctx context.Context, service DbusCommand, signal chan T)
- type App
- type AppClass
- type AppList
- type Apps
- type Client
- type Clients
- type DbusCommand
- type DockAction
- type DockSignal
- type HyprSignal
- type HyprSignalManager
- type HyprWorkspaces
- type Monitor
- type Monitors
- type Workspaces
Constants ¶
View Source
const ( InterfacePrefix = "com.hypr." BaseServiceObjectPath = "/com/hypr" ServiceInterface = "com.hypr.HelperService" )
Variables ¶
View Source
var ( Red = "#e68183" Peach = "#d79921" Green = "#87af87" Blue = "#89beba" Pink = "#e39b7b" Yellow = "#d9bb80" Teal = "#458588" Lavender = "#98971a" Bg = "#3c3836" )
View Source
var ( Active = Lavender Empty = Bg FocusedColors = []string{Red, Peach, Green, Blue} UnfocusedColors = []string{Pink, Yellow, Teal, Lavender} )
View Source
var (
AddCnt int
)
AddCnt is a temp solution to making apps sortable. TODO they now have an ID
Functions ¶
func FavoritsMarshalJSON ¶
func GetDbusConnection ¶
func GetDbusListener ¶
func GetGlobalScheduler ¶
GetGlobalScheduler returns the global scheduler, initializing it if needed.
func NotifySend ¶
func NotifySend(title, msg, iconPath string)
func PrettyPrint ¶
func PrettyPrint(i interface{}) string
PrettyPrint to print struct in a readable way
func SaveFavorites ¶
func ServeCommand ¶
func ServeCommand[T any](ctx context.Context, service DbusCommand, signal chan T)
Types ¶
type Apps ¶
type Apps struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct {
Address string `json:"address"`
Mapped bool `json:"mapped"`
Hidden bool `json:"hidden"`
At []int `json:"at"`
Size []int `json:"size"`
Workspace struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"workspace"`
Floating bool `json:"floating"`
Monitor int `json:"monitor"`
Class string `json:"class"`
Title string `json:"title"`
Pid int `json:"pid"`
Xwayland bool `json:"xwayland"`
Pinned bool `json:"pinned"`
Fullscreen int `json:"fullscreen"`
FullscreenMode int `json:"fullscreenMode"`
FakeFullscreen bool `json:"fakeFullscreen"`
Grouped []any `json:"grouped"`
Swallowing string `json:"swallowing"`
FocusHistoryID int `json:"focusHistoryID"`
XDGTag string `json:"xdgTag"`
XDGDescription string `json:"xdgDescription"`
}
func FocusedClient ¶
func FocusedClient() Client
type DbusCommand ¶
type DockAction ¶
type DockAction string
type DockSignal ¶
type DockSignal struct {
Type DockAction
Msg string
}
type HyprSignal ¶
type HyprSignalManager ¶
type HyprSignalManager struct {
HyprEvent chan HyprSignal
DockSignal chan string
SubmapSignal chan string
WeatherSignal chan string
MonitorSignal chan string
WorkspaceSignal chan string
QuoteSignal chan string
TitleSignal chan string
}
func (*HyprSignalManager) HyprClientListen ¶
func (h *HyprSignalManager) HyprClientListen(ctx context.Context)
func (*HyprSignalManager) HyprListen ¶
func (h *HyprSignalManager) HyprListen(ctx context.Context)
type HyprWorkspaces ¶
type HyprWorkspaces []struct {
ID int `json:"id"`
Name string `json:"name"`
Monitor string `json:"monitor"`
Windows int `json:"windows"`
Hasfullscreen bool `json:"hasfullscreen"`
Lastwindow string `json:"lastwindow"`
Lastwindowtitle string `json:"lastwindowtitle"`
}
func GetHyprWorkspaces ¶
func GetHyprWorkspaces() (w HyprWorkspaces)
type Monitor ¶
type Monitor struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Make string `json:"make"`
Model string `json:"model"`
Serial string `json:"serial"`
Width int `json:"width"`
Height int `json:"height"`
RefreshRate float64 `json:"refreshRate"`
X int `json:"x"`
Y int `json:"y"`
ActiveWorkspace struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"activeWorkspace"`
SpecialWorkspace struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"specialWorkspace"`
Reserved []int `json:"reserved"`
Scale float64 `json:"scale"`
Transform int `json:"transform"`
Focused bool `json:"focused"`
DpmsStatus bool `json:"dpmsStatus"`
Vrr bool `json:"vrr"`
}
type Workspaces ¶
type Workspaces []struct {
Number string `json:"number"`
Color string `json:"color"`
Icon string `json:"icon"`
ActiveWindowIcon string `json:"active_client_icon"`
// contains filtered or unexported fields
}
func NewWorkspaces ¶
func NewWorkspaces() Workspaces
func (Workspaces) String ¶
func (w Workspaces) String() string
func (Workspaces) Update ¶
func (w Workspaces) Update(m Monitors, clients Clients)
Click to show internal directories.
Click to hide internal directories.